EC2 / Client / reset_snapshot_attribute

reset_snapshot_attribute#

EC2.Client.reset_snapshot_attribute(**kwargs)#

Resets permission settings for the specified snapshot.

For more information about modifying snapshot permissions, see Share a snapshot in the Amazon EBS User Guide.

See also: AWS API Documentation

Request Syntax

response = client.reset_snapshot_attribute(
    Attribute='productCodes'|'createVolumePermission',
    SnapshotId='string',
    DryRun=True|False
)
Parameters:
  • Attribute (string) –

    [REQUIRED]

    The attribute to reset. Currently, only the attribute for permission to create volumes can be reset.

  • SnapshotId (string) –

    [REQUIRED]

    The ID of the snapshot.

  • DryRun (boolean) – Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

Returns:

None

Examples

This example resets the create volume permissions for snapshot snap-1234567890abcdef0. If the command succeeds, no output is returned.

response = client.reset_snapshot_attribute(
    Attribute='createVolumePermission',
    SnapshotId='snap-1234567890abcdef0',
)

print(response)

Expected Output:

{
    'ResponseMetadata': {
        '...': '...',
    },
}