reset_snapshot_attribute
¶
reset_snapshot_attribute(
*,
config_overrides: Optional[EC2ClientConfig] = None,
attribute: Optional[SnapshotAttributeName] = None,
snapshot_id: Optional[SnapshotId] = None,
dry_run: Optional[Boolean] = None,
) -> None
Resets permission settings for the specified snapshot.
For more information about modifying snapshot permissions, see Share a snapshot in the Amazon EBS User Guide.
Parameters:
-
attribute(Optional[SnapshotAttributeName], default:None) –The attribute to reset. Currently, only the attribute for permission to create volumes can be reset.
-
snapshot_id(Optional[SnapshotId], default:None) –The ID of the snapshot.
-
dry_run(Optional[Boolean], default:None) –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 isUnauthorizedOperation.
Raises:
-
UnknownServiceError–The service returned an error code this client does not model.
Examples:
To reset a snapshot attribute
This example resets the create volume permissions for snapshot snap-1234567890abcdef0. If the command succeeds, no output is returned.
>>> client.reset_snapshot_attribute(snapshot_id='snap-1234567890abcdef0', attribute='createVolumePermission')
Source code in docs_src/capo_ec2/_services/ec2.py
58059 58060 58061 58062 58063 58064 58065 58066 58067 58068 58069 58070 58071 58072 58073 58074 58075 58076 58077 58078 58079 58080 58081 58082 58083 58084 58085 58086 58087 58088 58089 58090 58091 58092 58093 58094 58095 58096 58097 58098 58099 58100 58101 58102 58103 58104 58105 58106 58107 58108 58109 58110 58111 58112 58113 58114 58115 | |