Get Resource Policy
dynamodb_get_resource_policy | R Documentation |
Returns the resource-based policy document attached to the resource, which can be a table or stream, in JSON format¶
Description¶
Returns the resource-based policy document attached to the resource, which can be a table or stream, in JSON format.
get_resource_policy
follows an eventually
consistent
model. The following list describes the outcomes when you issue the
get_resource_policy
request immediately after issuing another request:
-
If you issue a
get_resource_policy
request immediately after aput_resource_policy
request, DynamoDB might return aPolicyNotFoundException
. -
If you issue a
get_resource_policy
request immediately after adelete_resource_policy
request, DynamoDB might return the policy that was present before the deletion request. -
If you issue a
get_resource_policy
request immediately after acreate_table
request, which includes a resource-based policy, DynamoDB might return aResourceNotFoundException
or aPolicyNotFoundException
.
Because get_resource_policy
uses an eventually consistent query, the
metadata for your policy or table might not be available at that moment.
Wait for a few seconds, and then retry the get_resource_policy
request.
After a get_resource_policy
request returns a policy created using the
put_resource_policy
request, the policy will be applied in the
authorization of requests to the resource. Because this process is
eventually consistent, it will take some time to apply the policy to all
requests to a resource. Policies that you attach while creating a table
using the create_table
request will always be applied to all requests
for that table.
Usage¶
Arguments¶
ResourceArn
[required] The Amazon Resource Name (ARN) of the DynamoDB resource to which the policy is attached. The resources you can specify include tables and streams.
Value¶
A list with the following syntax: