modify_snapshot_attribute¶
Operation¶
modify_snapshot_attribute
¶
modify_snapshot_attribute(request: ModifySnapshotAttributeInput | ModifySnapshotAttributeInputDict | None = None, /, *, plugins: list[Plugin] | None = None, **kwargs: Unpack[ModifySnapshotAttributeInputDict]) -> ModifySnapshotAttributeOutput
Adds or removes permission settings for the specified snapshot. You may add or remove specified Amazon Web Services account IDs from a snapshot's list of create volume permissions, but you cannot do both in a single operation. If you need to both add and remove account IDs for a snapshot, you must use multiple operations. You can make up to 500 modifications to a snapshot in a single operation.
Encrypted snapshots and snapshots with Amazon Web Services Marketplace product codes cannot be made public. Snapshots encrypted with your default KMS key cannot be shared with other accounts.
For more information about modifying snapshot permissions, see Share a snapshot in the Amazon EBS User Guide.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
request
|
ModifySnapshotAttributeInput | ModifySnapshotAttributeInputDict | 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[ModifySnapshotAttributeInputDict]
|
The input fields as keyword arguments. |
{}
|
Returns:
| Type | Description |
|---|---|
ModifySnapshotAttributeOutput
|
An instance of |
modify_snapshot_attribute
async
¶
modify_snapshot_attribute(request: ModifySnapshotAttributeInput | ModifySnapshotAttributeInputDict | None = None, /, *, plugins: list[Plugin] | None = None, **kwargs: Unpack[ModifySnapshotAttributeInputDict]) -> ModifySnapshotAttributeOutput
Adds or removes permission settings for the specified snapshot. You may add or remove specified Amazon Web Services account IDs from a snapshot's list of create volume permissions, but you cannot do both in a single operation. If you need to both add and remove account IDs for a snapshot, you must use multiple operations. You can make up to 500 modifications to a snapshot in a single operation.
Encrypted snapshots and snapshots with Amazon Web Services Marketplace product codes cannot be made public. Snapshots encrypted with your default KMS key cannot be shared with other accounts.
For more information about modifying snapshot permissions, see Share a snapshot in the Amazon EBS User Guide.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
request
|
ModifySnapshotAttributeInput | ModifySnapshotAttributeInputDict | 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[ModifySnapshotAttributeInputDict]
|
The input fields as keyword arguments. |
{}
|
Returns:
| Type | Description |
|---|---|
ModifySnapshotAttributeOutput
|
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.
ModifySnapshotAttributeInputDict
¶
Bases: TypedDict
Dictionary form of ModifySnapshotAttributeInput.
Attributes¶
attribute
instance-attribute
¶
attribute: str | None
The snapshot attribute to modify. Only volume creation permissions can be modified.
create_volume_permission
instance-attribute
¶
create_volume_permission: CreateVolumePermissionModifications | CreateVolumePermissionModificationsDict | None
A JSON representation of the snapshot attribute modification.
dry_run
instance-attribute
¶
dry_run: bool | 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 is UnauthorizedOperation.
group_names
instance-attribute
¶
The group to modify for the snapshot.
ModifySnapshotAttributeInput
dataclass
¶
Bases: _SerdeShape
Dataclass for ModifySnapshotAttributeInput structure.
Attributes¶
attribute
class-attribute
instance-attribute
¶
attribute: str | None = ...
The snapshot attribute to modify. Only volume creation permissions can be modified.
create_volume_permission
class-attribute
instance-attribute
¶
create_volume_permission: CreateVolumePermissionModifications | None = ...
A JSON representation of the snapshot attribute modification.
dry_run
class-attribute
instance-attribute
¶
dry_run: bool | 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 is UnauthorizedOperation.
group_names
class-attribute
instance-attribute
¶
The group to modify for the snapshot.
operation_type
class-attribute
instance-attribute
¶
operation_type: str | None = ...
The type of operation to perform to the attribute.
Output¶
ModifySnapshotAttributeOutput
dataclass
¶
Bases: _SerdeShape
Dataclass for ModifySnapshotAttributeOutput structure.