delete_resource_policy¶
Operation¶
delete_resource_policy
¶
delete_resource_policy(request: DeleteResourcePolicyInput | DeleteResourcePolicyInputDict | None = None, /, *, plugins: list[Plugin] | None = None, **kwargs: Unpack[DeleteResourcePolicyInputDict]) -> DeleteResourcePolicyOutput
Deletes the resource-based policy attached to the resource, which can be a table or stream.
DeleteResourcePolicy is an idempotent operation; running it multiple
times on the same resource doesn't result in an error response,
unless you specify an ExpectedRevisionId, which will then return a
PolicyNotFoundException.
Warning
To make sure that you don't inadvertently lock yourself out of your own
resources, the root principal in your Amazon Web Services account can
perform DeleteResourcePolicy requests, even if your resource-based
policy explicitly denies the root principal's access.
Note:
DeleteResourcePolicy is an asynchronous operation. If you issue a
GetResourcePolicy request immediately after running the
DeleteResourcePolicy request, DynamoDB might still return the deleted
policy. This is because the policy for your resource might not have been
deleted yet. Wait for a few seconds, and then try the
GetResourcePolicy request again.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
request
|
DeleteResourcePolicyInput | DeleteResourcePolicyInputDict | None
|
The input as a model or dictionary. Pass this or keyword arguments, not both. |
None
|
plugins
|
list[Plugin] | None
|
A list of callables that modify the configuration dynamically. Changes made by these plugins only apply for the duration of the operation execution and will not affect any other operation invocations. |
None
|
**kwargs
|
Unpack[DeleteResourcePolicyInputDict]
|
The input fields as keyword arguments. |
{}
|
Returns:
| Type | Description |
|---|---|
DeleteResourcePolicyOutput
|
An instance of |
delete_resource_policy
async
¶
delete_resource_policy(request: DeleteResourcePolicyInput | DeleteResourcePolicyInputDict | None = None, /, *, plugins: list[Plugin] | None = None, **kwargs: Unpack[DeleteResourcePolicyInputDict]) -> DeleteResourcePolicyOutput
Deletes the resource-based policy attached to the resource, which can be a table or stream.
DeleteResourcePolicy is an idempotent operation; running it multiple
times on the same resource doesn't result in an error response,
unless you specify an ExpectedRevisionId, which will then return a
PolicyNotFoundException.
Warning
To make sure that you don't inadvertently lock yourself out of your own
resources, the root principal in your Amazon Web Services account can
perform DeleteResourcePolicy requests, even if your resource-based
policy explicitly denies the root principal's access.
Note:
DeleteResourcePolicy is an asynchronous operation. If you issue a
GetResourcePolicy request immediately after running the
DeleteResourcePolicy request, DynamoDB might still return the deleted
policy. This is because the policy for your resource might not have been
deleted yet. Wait for a few seconds, and then try the
GetResourcePolicy request again.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
request
|
DeleteResourcePolicyInput | DeleteResourcePolicyInputDict | None
|
The input as a model or dictionary. Pass this or keyword arguments, not both. |
None
|
plugins
|
list[Plugin] | None
|
A list of callables that modify the configuration dynamically. Changes made by these plugins only apply for the duration of the operation execution and will not affect any other operation invocations. |
None
|
**kwargs
|
Unpack[DeleteResourcePolicyInputDict]
|
The input fields as keyword arguments. |
{}
|
Returns:
| Type | Description |
|---|---|
DeleteResourcePolicyOutput
|
An instance of |
Input¶
Pass the input as keyword arguments, a positional dictionary, or a positional model object. Pass plugins separately as a keyword argument.
DeleteResourcePolicyInputDict
¶
Bases: TypedDict
Dictionary form of DeleteResourcePolicyInput.
Attributes¶
expected_revision_id
instance-attribute
¶
expected_revision_id: str | None
A string value that you can use to conditionally delete your 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, the request will fail and return a
PolicyNotFoundException.
resource_arn
instance-attribute
¶
The Amazon Resource Name (ARN) of the DynamoDB resource from which the policy will be removed. The resources you can specify include tables and streams. If you remove the policy of a table, it will also remove the permissions for the table's indexes defined in that policy document. This is because index permissions are defined in the table's policy.
DeleteResourcePolicyInput
dataclass
¶
Bases: _SerdeShape
Dataclass for DeleteResourcePolicyInput structure.
Attributes¶
expected_revision_id
class-attribute
instance-attribute
¶
expected_revision_id: str | None = ...
A string value that you can use to conditionally delete your 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, the request will fail and return a
PolicyNotFoundException.
resource_arn
class-attribute
instance-attribute
¶
resource_arn: str | None = ...
The Amazon Resource Name (ARN) of the DynamoDB resource from which the policy will be removed. The resources you can specify include tables and streams. If you remove the policy of a table, it will also remove the permissions for the table's indexes defined in that policy document. This is because index permissions are defined in the table's policy.
Output¶
DeleteResourcePolicyOutput
dataclass
¶
Bases: _SerdeShape
Dataclass for DeleteResourcePolicyOutput structure.
Attributes¶
response_metadata
class-attribute
instance-attribute
¶
Metadata about the response that produced this output. Use this to recover the request identifiers a service's support team needs in order to investigate a call. Members of the metadata are individually optional.
revision_id
class-attribute
instance-attribute
¶
revision_id: str | None = ...
A unique string that represents the revision ID of the policy. If you're comparing revision IDs, make sure to always use string comparison logic.
This value will be empty if you make a request against a resource without a policy.