Amazon Elastic Compute Cloud

2015/07/23 - Amazon Elastic Compute Cloud - 2 updated api methods

ModifySnapshotAttribute (updated) Link ¶
Changes (request)
{'Attribute': {'productCodes'}}

Adds or removes permission settings for the specified snapshot. You may add or remove specified AWS account IDs from a snapshot's list of create volume permissions, but you cannot do both in a single API call. If you need to both add and remove account IDs for a snapshot, you must use multiple API calls.

For more information on modifying snapshot permissions, see Sharing Snapshots in the Amazon Elastic Compute Cloud User Guide .

Note

Snapshots with AWS Marketplace product codes cannot be made public.

Request Syntax

client.modify_snapshot_attribute(
    DryRun=True|False,
    SnapshotId='string',
    Attribute='productCodes'|'createVolumePermission',
    OperationType='string',
    UserIds=[
        'string',
    ],
    GroupNames=[
        'string',
    ],
    CreateVolumePermission={
        'Add': [
            {
                'UserId': 'string',
                'Group': 'all'
            },
        ],
        'Remove': [
            {
                'UserId': 'string',
                'Group': 'all'
            },
        ]
    }
)
type DryRun

boolean

param DryRun

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 .

type SnapshotId

string

param SnapshotId

[REQUIRED]

The ID of the snapshot.

type Attribute

string

param Attribute

The snapshot attribute to modify.

Note

Only volume creation permissions may be modified at the customer level.

type OperationType

string

param OperationType

The type of operation to perform to the attribute.

type UserIds

list

param UserIds

The account ID to modify for the snapshot.

  • (string) --

type GroupNames

list

param GroupNames

The group to modify for the snapshot.

  • (string) --

type CreateVolumePermission

dict

param CreateVolumePermission

A JSON representation of the snapshot attribute modification.

  • Add (list) --

    Adds a specific AWS account ID or group to a volume's list of create volume permissions.

    • (dict) --

      Describes the user or group to be added or removed from the permissions for a volume.

      • UserId (string) --

        The specific AWS account ID that is to be added or removed from a volume's list of create volume permissions.

      • Group (string) --

        The specific group that is to be added or removed from a volume's list of create volume permissions.

  • Remove (list) --

    Removes a specific AWS account ID or group from a volume's list of create volume permissions.

    • (dict) --

      Describes the user or group to be added or removed from the permissions for a volume.

      • UserId (string) --

        The specific AWS account ID that is to be added or removed from a volume's list of create volume permissions.

      • Group (string) --

        The specific group that is to be added or removed from a volume's list of create volume permissions.

returns

None

ResetSnapshotAttribute (updated) Link ¶
Changes (request)
{'Attribute': {'productCodes'}}

Resets permission settings for the specified snapshot.

For more information on modifying snapshot permissions, see Sharing Snapshots in the Amazon Elastic Compute Cloud User Guide .

Request Syntax

client.reset_snapshot_attribute(
    DryRun=True|False,
    SnapshotId='string',
    Attribute='productCodes'|'createVolumePermission'
)
type DryRun

boolean

param DryRun

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 .

type SnapshotId

string

param SnapshotId

[REQUIRED]

The ID of the snapshot.

type Attribute

string

param Attribute

[REQUIRED]

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

returns

None