Class PutResourcePolicyRequest
- java.lang.Object
-
- software.amazon.awssdk.core.SdkRequest
-
- software.amazon.awssdk.awscore.AwsRequest
-
- software.amazon.awssdk.services.dynamodb.model.DynamoDbRequest
-
- software.amazon.awssdk.services.dynamodb.model.PutResourcePolicyRequest
-
- All Implemented Interfaces:
SdkPojo
,ToCopyableBuilder<PutResourcePolicyRequest.Builder,PutResourcePolicyRequest>
@Generated("software.amazon.awssdk:codegen") public final class PutResourcePolicyRequest extends DynamoDbRequest implements ToCopyableBuilder<PutResourcePolicyRequest.Builder,PutResourcePolicyRequest>
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
PutResourcePolicyRequest.Builder
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static PutResourcePolicyRequest.Builder
builder()
Boolean
confirmRemoveSelfResourceAccess()
Set this parameter totrue
to confirm that you want to remove your permissions to change the policy of this resource in the future.boolean
equals(Object obj)
boolean
equalsBySdkFields(Object obj)
String
expectedRevisionId()
A string value that you can use to conditionally update your policy.<T> Optional<T>
getValueForField(String fieldName, Class<T> clazz)
int
hashCode()
String
policy()
An Amazon Web Services resource-based policy document in JSON format.String
resourceArn()
The Amazon Resource Name (ARN) of the DynamoDB resource to which the policy will be attached.Map<String,SdkField<?>>
sdkFieldNameToField()
List<SdkField<?>>
sdkFields()
static Class<? extends PutResourcePolicyRequest.Builder>
serializableBuilderClass()
PutResourcePolicyRequest.Builder
toBuilder()
String
toString()
Returns a string representation of this object.-
Methods inherited from class software.amazon.awssdk.awscore.AwsRequest
overrideConfiguration
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface software.amazon.awssdk.utils.builder.ToCopyableBuilder
copy
-
-
-
-
Method Detail
-
resourceArn
public final String resourceArn()
The Amazon Resource Name (ARN) of the DynamoDB resource to which the policy will be attached. The resources you can specify include tables and streams.
You can control index permissions using the base table's policy. To specify the same permission level for your table and its indexes, you can provide both the table and index Amazon Resource Name (ARN)s in the
Resource
field of a givenStatement
in your policy document. Alternatively, to specify different permissions for your table, indexes, or both, you can define multipleStatement
fields in your policy document.- Returns:
- The Amazon Resource Name (ARN) of the DynamoDB resource to which the policy will be attached. The
resources you can specify include tables and streams.
You can control index permissions using the base table's policy. To specify the same permission level for your table and its indexes, you can provide both the table and index Amazon Resource Name (ARN)s in the
Resource
field of a givenStatement
in your policy document. Alternatively, to specify different permissions for your table, indexes, or both, you can define multipleStatement
fields in your policy document.
-
policy
public final String policy()
An Amazon Web Services resource-based policy document in JSON format.
-
The maximum size supported for a resource-based policy document is 20 KB. DynamoDB counts whitespaces when calculating the size of a policy against this limit.
-
Within a resource-based policy, if the action for a DynamoDB service-linked role (SLR) to replicate data for a global table is denied, adding or deleting a replica will fail with an error.
For a full list of all considerations that apply while attaching a resource-based policy, see Resource-based policy considerations.
- Returns:
- An Amazon Web Services resource-based policy document in JSON format.
-
The maximum size supported for a resource-based policy document is 20 KB. DynamoDB counts whitespaces when calculating the size of a policy against this limit.
-
Within a resource-based policy, if the action for a DynamoDB service-linked role (SLR) to replicate data for a global table is denied, adding or deleting a replica will fail with an error.
For a full list of all considerations that apply while attaching a resource-based policy, see Resource-based policy considerations.
-
-
-
expectedRevisionId
public final String expectedRevisionId()
A string value that you can use to conditionally update your policy. You can provide the revision ID of your existing policy to make mutating requests against that policy.
When you provide an expected revision ID, if the revision ID of the existing policy on the resource doesn't match or if there's no policy attached to the resource, your request will be rejected with a
PolicyNotFoundException
.To conditionally attach a policy when no policy exists for the resource, specify
NO_POLICY
for the revision ID.- Returns:
- A string value that you can use to conditionally update your policy. You can provide the revision ID of
your existing policy to make mutating requests against that policy.
When you provide an expected revision ID, if the revision ID of the existing policy on the resource doesn't match or if there's no policy attached to the resource, your request will be rejected with a
PolicyNotFoundException
.To conditionally attach a policy when no policy exists for the resource, specify
NO_POLICY
for the revision ID.
-
confirmRemoveSelfResourceAccess
public final Boolean confirmRemoveSelfResourceAccess()
Set this parameter to
true
to confirm that you want to remove your permissions to change the policy of this resource in the future.- Returns:
- Set this parameter to
true
to confirm that you want to remove your permissions to change the policy of this resource in the future.
-
toBuilder
public PutResourcePolicyRequest.Builder toBuilder()
- Specified by:
toBuilder
in interfaceToCopyableBuilder<PutResourcePolicyRequest.Builder,PutResourcePolicyRequest>
- Specified by:
toBuilder
in classDynamoDbRequest
-
builder
public static PutResourcePolicyRequest.Builder builder()
-
serializableBuilderClass
public static Class<? extends PutResourcePolicyRequest.Builder> serializableBuilderClass()
-
hashCode
public final int hashCode()
- Overrides:
hashCode
in classAwsRequest
-
equals
public final boolean equals(Object obj)
- Overrides:
equals
in classAwsRequest
-
equalsBySdkFields
public final boolean equalsBySdkFields(Object obj)
- Specified by:
equalsBySdkFields
in interfaceSdkPojo
-
toString
public final String toString()
Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be redacted from this string using a placeholder value.
-
getValueForField
public final <T> Optional<T> getValueForField(String fieldName, Class<T> clazz)
- Overrides:
getValueForField
in classSdkRequest
-
sdkFieldNameToField
public final Map<String,SdkField<?>> sdkFieldNameToField()
- Specified by:
sdkFieldNameToField
in interfaceSdkPojo
-
-