All Downloads are FREE. Search and download functionalities are using the official Maven repository.

target.apidocs.com.google.api.services.iam.v2.Iam.Policies.html Maven / Gradle / Ivy







Iam.Policies (Identity and Access Management (IAM) API v2-rev20241114-2.0.0)












com.google.api.services.iam.v2

Class Iam.Policies

  • Enclosing class:
    Iam


    public class Iam.Policies
    extends Object
    The "policies" collection of methods.
    • Constructor Detail

      • Policies

        public Policies()
    • Method Detail

      • createPolicy

        public Iam.Policies.CreatePolicy createPolicy(String parent,
                                                      GoogleIamV2Policy content)
                                               throws IOException
        Creates a policy. Create a request for the method "policies.createPolicy". This request holds the parameters needed by the iam server. After setting any optional parameters, call the AbstractGoogleClientRequest.execute() method to invoke the remote operation.
        Parameters:
        parent - Required. The resource that the policy is attached to, along with the kind of policy to create. Format: `policies/{attachment_point}/denypolicies` The attachment point is identified by its URL-encoded full resource name, which means that the forward-slash character, `/`, must be written as `%2F`. For example, `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies`. For organizations and folders, use the numeric ID in the full resource name. For projects, you can use the alphanumeric or the numeric ID.
        content - the GoogleIamV2Policy
        Returns:
        the request
        Throws:
        IOException
      • delete

        public Iam.Policies.Delete delete(String name)
                                   throws IOException
        Deletes a policy. This action is permanent. Create a request for the method "policies.delete". This request holds the parameters needed by the iam server. After setting any optional parameters, call the AbstractGoogleClientRequest.execute() method to invoke the remote operation.
        Parameters:
        name - Required. The resource name of the policy to delete. Format: `policies/{attachment_point}/denypolicies/{policy_id}` Use the URL-encoded full resource name, which means that the forward-slash character, `/`, must be written as `%2F`. For example, `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy- project/denypolicies/my-policy`. For organizations and folders, use the numeric ID in the full resource name. For projects, you can use the alphanumeric or the numeric ID.
        Returns:
        the request
        Throws:
        IOException
      • get

        public Iam.Policies.Get get(String name)
                             throws IOException
        Gets a policy. Create a request for the method "policies.get". This request holds the parameters needed by the iam server. After setting any optional parameters, call the AbstractGoogleClientRequest.execute() method to invoke the remote operation.
        Parameters:
        name - Required. The resource name of the policy to retrieve. Format: `policies/{attachment_point}/denypolicies/{policy_id}` Use the URL-encoded full resource name, which means that the forward-slash character, `/`, must be written as `%2F`. For example, `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy- project/denypolicies/my-policy`. For organizations and folders, use the numeric ID in the full resource name. For projects, you can use the alphanumeric or the numeric ID.
        Returns:
        the request
        Throws:
        IOException
      • listPolicies

        public Iam.Policies.ListPolicies listPolicies(String parent)
                                               throws IOException
        Retrieves the policies of the specified kind that are attached to a resource. The response lists only policy metadata. In particular, policy rules are omitted. Create a request for the method "policies.listPolicies". This request holds the parameters needed by the iam server. After setting any optional parameters, call the AbstractGoogleClientRequest.execute() method to invoke the remote operation.
        Parameters:
        parent - Required. The resource that the policy is attached to, along with the kind of policy to list. Format: `policies/{attachment_point}/denypolicies` The attachment point is identified by its URL-encoded full resource name, which means that the forward-slash character, `/`, must be written as `%2F`. For example, `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies`. For organizations and folders, use the numeric ID in the full resource name. For projects, you can use the alphanumeric or the numeric ID.
        Returns:
        the request
        Throws:
        IOException
      • update

        public Iam.Policies.Update update(String name,
                                          GoogleIamV2Policy content)
                                   throws IOException
        Updates the specified policy. You can update only the rules and the display name for the policy. To update a policy, you should use a read-modify-write loop: 1. Use GetPolicy to read the current version of the policy. 2. Modify the policy as needed. 3. Use `UpdatePolicy` to write the updated policy. This pattern helps prevent conflicts between concurrent updates. Create a request for the method "policies.update". This request holds the parameters needed by the iam server. After setting any optional parameters, call the AbstractGoogleClientRequest.execute() method to invoke the remote operation.
        Parameters:
        name - Immutable. The resource name of the `Policy`, which must be unique. Format: `policies/{attachment_point}/denypolicies/{policy_id}` The attachment point is identified by its URL-encoded full resource name, which means that the forward-slash character, `/`, must be written as `%2F`. For example, `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my- deny-policy`. For organizations and folders, use the numeric ID in the full resource name. For projects, requests can use the alphanumeric or the numeric ID. Responses always contain the numeric ID.
        content - the GoogleIamV2Policy
        Returns:
        the request
        Throws:
        IOException
      • operations

        public Iam.Policies.Operations operations()
        An accessor for creating requests from the Operations collection.

        The typical use is:

            Iam iam = new Iam(...);
            Iam.Operations.List request = iam.operations().list(parameters ...)
         
        Returns:
        the resource collection

Copyright © 2011–2024 Google. All rights reserved.





© 2015 - 2025 Weber Informatics LLC | Privacy Policy