Interface PutResourcePolicyRequest.Builder

  • Method Details

    • resourceArn

      PutResourcePolicyRequest.Builder resourceArn(String resourceArn)
      Sets the value of the ResourceArn property for this object.
      Parameters:
      resourceArn - The new value for the ResourceArn property for this object.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • policyDocument

      PutResourcePolicyRequest.Builder policyDocument(String policyDocument)
      Sets the value of the PolicyDocument property for this object.
      Parameters:
      policyDocument - The new value for the PolicyDocument property for this object.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • policyName

      PutResourcePolicyRequest.Builder policyName(String policyName)

      Which named policy to write. Defaults to "default", the customer-managed policy, when omitted (a write AWS Resource Access Manager makes on the owner's behalf resolves to "AWS_RAM" instead). The two writers are exclusive in both directions — only Resource Access Manager can write "AWS_RAM", and only the bus owner can write "default" — so naming the other party's policy fails with AccessDeniedException. A well-formed name that is neither of the two fails with InvalidInputException.

      Parameters:
      policyName - Which named policy to write. Defaults to "default", the customer-managed policy, when omitted (a write AWS Resource Access Manager makes on the owner's behalf resolves to "AWS_RAM" instead). The two writers are exclusive in both directions — only Resource Access Manager can write "AWS_RAM", and only the bus owner can write "default" — so naming the other party's policy fails with AccessDeniedException. A well-formed name that is neither of the two fails with InvalidInputException.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • expectedRevisionId

      PutResourcePolicyRequest.Builder expectedRevisionId(String expectedRevisionId)

      The write succeeds only if the named policy's current revision ID matches this value; a policy that does not exist yet matches only the sentinel "NO_POLICY" (create-only). On mismatch the operation fails with ConflictException. When omitted, the write is unconditional. Every attempt stores a newly generated revision ID, so retrying an unanswered request can conflict with the caller's own earlier attempt; read the policy back and compare it with the one you intended before treating a conflict as another writer's change.

      Parameters:
      expectedRevisionId - The write succeeds only if the named policy's current revision ID matches this value; a policy that does not exist yet matches only the sentinel "NO_POLICY" (create-only). On mismatch the operation fails with ConflictException. When omitted, the write is unconditional. Every attempt stores a newly generated revision ID, so retrying an unanswered request can conflict with the caller's own earlier attempt; read the policy back and compare it with the one you intended before treating a conflict as another writer's change.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • overrideConfiguration

      PutResourcePolicyRequest.Builder overrideConfiguration(AwsRequestOverrideConfiguration overrideConfiguration)
      Description copied from interface: AwsRequest.Builder
      Add an optional request override configuration.
      Specified by:
      overrideConfiguration in interface AwsRequest.Builder
      Parameters:
      overrideConfiguration - The override configuration.
      Returns:
      This object for method chaining.
    • overrideConfiguration

      Description copied from interface: AwsRequest.Builder
      Add an optional request override configuration.
      Specified by:
      overrideConfiguration in interface AwsRequest.Builder
      Parameters:
      builderConsumer - A Consumer to which an empty AwsRequestOverrideConfiguration.Builder will be given.
      Returns:
      This object for method chaining.