Amazon Elastic Compute Cloud

2025/11/05 - Amazon Elastic Compute Cloud - 3 updated api methods

Changes  This release adds AvailabilityZoneId support for DescribeFastSnapshotRestores, DisableFastSnapshotRestores, and EnableFastSnapshotRestores APIs.

DescribeFastSnapshotRestores (updated) Link ¶
Changes (response)
{'FastSnapshotRestores': {'AvailabilityZoneId': 'string'}}

Describes the state of fast snapshot restores for your snapshots.

See also: AWS API Documentation

Request Syntax

client.describe_fast_snapshot_restores(
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    MaxResults=123,
    NextToken='string',
    DryRun=True|False
)
type Filters:

list

param Filters:

The filters. The possible values are:

  • availability-zone: The Availability Zone of the snapshot. For example, us-east-2a.

  • availability-zone-id: The ID of the Availability Zone of the snapshot. For example, use2-az1.

  • owner-id: The ID of the Amazon Web Services account that enabled fast snapshot restore on the snapshot.

  • snapshot-id: The ID of the snapshot.

  • state: The state of fast snapshot restores for the snapshot ( enabling | optimizing | enabled | disabling | disabled).

  • (dict) --

    A filter name and value pair that is used to return a more specific list of results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

    If you specify multiple filters, the filters are joined with an AND, and the request returns only results that match all of the specified filters.

    For more information, see List and filter using the CLI and API in the Amazon EC2 User Guide.

    • Name (string) --

      The name of the filter. Filter names are case-sensitive.

    • Values (list) --

      The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR, and the request returns all results that match any of the specified values.

      • (string) --

type MaxResults:

integer

param MaxResults:

The maximum number of items to return for this request. To get the next page of items, make another request with the token returned in the output. For more information, see Pagination.

type NextToken:

string

param NextToken:

The token returned from a previous paginated request. Pagination continues from the end of the items returned by the previous request.

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.

rtype:

dict

returns:

Response Syntax

{
    'FastSnapshotRestores': [
        {
            'SnapshotId': 'string',
            'AvailabilityZone': 'string',
            'AvailabilityZoneId': 'string',
            'State': 'enabling'|'optimizing'|'enabled'|'disabling'|'disabled',
            'StateTransitionReason': 'string',
            'OwnerId': 'string',
            'OwnerAlias': 'string',
            'EnablingTime': datetime(2015, 1, 1),
            'OptimizingTime': datetime(2015, 1, 1),
            'EnabledTime': datetime(2015, 1, 1),
            'DisablingTime': datetime(2015, 1, 1),
            'DisabledTime': datetime(2015, 1, 1)
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • FastSnapshotRestores (list) --

      Information about the state of fast snapshot restores.

      • (dict) --

        Describes fast snapshot restores for a snapshot.

        • SnapshotId (string) --

          The ID of the snapshot.

        • AvailabilityZone (string) --

          The Availability Zone.

        • AvailabilityZoneId (string) --

          The ID of the Availability Zone.

        • State (string) --

          The state of fast snapshot restores.

        • StateTransitionReason (string) --

          The reason for the state transition. The possible values are as follows:

          • Client.UserInitiated - The state successfully transitioned to enabling or disabling.

          • Client.UserInitiated - Lifecycle state transition - The state successfully transitioned to optimizing, enabled, or disabled.

        • OwnerId (string) --

          The ID of the Amazon Web Services account that enabled fast snapshot restores on the snapshot.

        • OwnerAlias (string) --

          The Amazon Web Services owner alias that enabled fast snapshot restores on the snapshot. This is intended for future use.

        • EnablingTime (datetime) --

          The time at which fast snapshot restores entered the enabling state.

        • OptimizingTime (datetime) --

          The time at which fast snapshot restores entered the optimizing state.

        • EnabledTime (datetime) --

          The time at which fast snapshot restores entered the enabled state.

        • DisablingTime (datetime) --

          The time at which fast snapshot restores entered the disabling state.

        • DisabledTime (datetime) --

          The time at which fast snapshot restores entered the disabled state.

    • NextToken (string) --

      The token to include in another request to get the next page of items. This value is null when there are no more items to return.

DisableFastSnapshotRestores (updated) Link ¶
Changes (request, response)
Request
{'AvailabilityZoneIds': ['string']}
Response
{'Successful': {'AvailabilityZoneId': 'string'},
 'Unsuccessful': {'FastSnapshotRestoreStateErrors': {'AvailabilityZoneId': 'string'}}}

Disables fast snapshot restores for the specified snapshots in the specified Availability Zones.

See also: AWS API Documentation

Request Syntax

client.disable_fast_snapshot_restores(
    AvailabilityZones=[
        'string',
    ],
    AvailabilityZoneIds=[
        'string',
    ],
    SourceSnapshotIds=[
        'string',
    ],
    DryRun=True|False
)
type AvailabilityZones:

list

param AvailabilityZones:

One or more Availability Zones. For example, us-east-2a.

Either AvailabilityZone or AvailabilityZoneId must be specified in the request, but not both.

  • (string) --

type AvailabilityZoneIds:

list

param AvailabilityZoneIds:

One or more Availability Zone IDs. For example, use2-az1.

Either AvailabilityZone or AvailabilityZoneId must be specified in the request, but not both.

  • (string) --

type SourceSnapshotIds:

list

param SourceSnapshotIds:

[REQUIRED]

The IDs of one or more snapshots. For example, snap-1234567890abcdef0.

  • (string) --

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.

rtype:

dict

returns:

Response Syntax

{
    'Successful': [
        {
            'SnapshotId': 'string',
            'AvailabilityZone': 'string',
            'AvailabilityZoneId': 'string',
            'State': 'enabling'|'optimizing'|'enabled'|'disabling'|'disabled',
            'StateTransitionReason': 'string',
            'OwnerId': 'string',
            'OwnerAlias': 'string',
            'EnablingTime': datetime(2015, 1, 1),
            'OptimizingTime': datetime(2015, 1, 1),
            'EnabledTime': datetime(2015, 1, 1),
            'DisablingTime': datetime(2015, 1, 1),
            'DisabledTime': datetime(2015, 1, 1)
        },
    ],
    'Unsuccessful': [
        {
            'SnapshotId': 'string',
            'FastSnapshotRestoreStateErrors': [
                {
                    'AvailabilityZone': 'string',
                    'AvailabilityZoneId': 'string',
                    'Error': {
                        'Code': 'string',
                        'Message': 'string'
                    }
                },
            ]
        },
    ]
}

Response Structure

  • (dict) --

    • Successful (list) --

      Information about the snapshots for which fast snapshot restores were successfully disabled.

      • (dict) --

        Describes fast snapshot restores that were successfully disabled.

        • SnapshotId (string) --

          The ID of the snapshot.

        • AvailabilityZone (string) --

          The Availability Zone.

        • AvailabilityZoneId (string) --

          The ID of the Availability Zone.

        • State (string) --

          The state of fast snapshot restores for the snapshot.

        • StateTransitionReason (string) --

          The reason for the state transition. The possible values are as follows:

          • Client.UserInitiated - The state successfully transitioned to enabling or disabling.

          • Client.UserInitiated - Lifecycle state transition - The state successfully transitioned to optimizing, enabled, or disabled.

        • OwnerId (string) --

          The ID of the Amazon Web Services account that enabled fast snapshot restores on the snapshot.

        • OwnerAlias (string) --

          The Amazon Web Services owner alias that enabled fast snapshot restores on the snapshot. This is intended for future use.

        • EnablingTime (datetime) --

          The time at which fast snapshot restores entered the enabling state.

        • OptimizingTime (datetime) --

          The time at which fast snapshot restores entered the optimizing state.

        • EnabledTime (datetime) --

          The time at which fast snapshot restores entered the enabled state.

        • DisablingTime (datetime) --

          The time at which fast snapshot restores entered the disabling state.

        • DisabledTime (datetime) --

          The time at which fast snapshot restores entered the disabled state.

    • Unsuccessful (list) --

      Information about the snapshots for which fast snapshot restores could not be disabled.

      • (dict) --

        Contains information about the errors that occurred when disabling fast snapshot restores.

        • SnapshotId (string) --

          The ID of the snapshot.

        • FastSnapshotRestoreStateErrors (list) --

          The errors.

          • (dict) --

            Contains information about an error that occurred when disabling fast snapshot restores.

            • AvailabilityZone (string) --

              The Availability Zone.

            • AvailabilityZoneId (string) --

              The ID of the Availability Zone.

            • Error (dict) --

              The error.

              • Code (string) --

                The error code.

              • Message (string) --

                The error message.

EnableFastSnapshotRestores (updated) Link ¶
Changes (request, response)
Request
{'AvailabilityZoneIds': ['string']}
Response
{'Successful': {'AvailabilityZoneId': 'string'},
 'Unsuccessful': {'FastSnapshotRestoreStateErrors': {'AvailabilityZoneId': 'string'}}}

Enables fast snapshot restores for the specified snapshots in the specified Availability Zones.

You get the full benefit of fast snapshot restores after they enter the enabled state.

For more information, see Amazon EBS fast snapshot restore in the Amazon EBS User Guide.

See also: AWS API Documentation

Request Syntax

client.enable_fast_snapshot_restores(
    AvailabilityZones=[
        'string',
    ],
    AvailabilityZoneIds=[
        'string',
    ],
    SourceSnapshotIds=[
        'string',
    ],
    DryRun=True|False
)
type AvailabilityZones:

list

param AvailabilityZones:

One or more Availability Zones. For example, us-east-2a.

Either AvailabilityZone or AvailabilityZoneId must be specified in the request, but not both.

  • (string) --

type AvailabilityZoneIds:

list

param AvailabilityZoneIds:

One or more Availability Zone IDs. For example, use2-az1.

Either AvailabilityZone or AvailabilityZoneId must be specified in the request, but not both.

  • (string) --

type SourceSnapshotIds:

list

param SourceSnapshotIds:

[REQUIRED]

The IDs of one or more snapshots. For example, snap-1234567890abcdef0. You can specify a snapshot that was shared with you from another Amazon Web Services account.

  • (string) --

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.

rtype:

dict

returns:

Response Syntax

{
    'Successful': [
        {
            'SnapshotId': 'string',
            'AvailabilityZone': 'string',
            'AvailabilityZoneId': 'string',
            'State': 'enabling'|'optimizing'|'enabled'|'disabling'|'disabled',
            'StateTransitionReason': 'string',
            'OwnerId': 'string',
            'OwnerAlias': 'string',
            'EnablingTime': datetime(2015, 1, 1),
            'OptimizingTime': datetime(2015, 1, 1),
            'EnabledTime': datetime(2015, 1, 1),
            'DisablingTime': datetime(2015, 1, 1),
            'DisabledTime': datetime(2015, 1, 1)
        },
    ],
    'Unsuccessful': [
        {
            'SnapshotId': 'string',
            'FastSnapshotRestoreStateErrors': [
                {
                    'AvailabilityZone': 'string',
                    'AvailabilityZoneId': 'string',
                    'Error': {
                        'Code': 'string',
                        'Message': 'string'
                    }
                },
            ]
        },
    ]
}

Response Structure

  • (dict) --

    • Successful (list) --

      Information about the snapshots for which fast snapshot restores were successfully enabled.

      • (dict) --

        Describes fast snapshot restores that were successfully enabled.

        • SnapshotId (string) --

          The ID of the snapshot.

        • AvailabilityZone (string) --

          The Availability Zone.

        • AvailabilityZoneId (string) --

          The ID of the Availability Zone.

        • State (string) --

          The state of fast snapshot restores.

        • StateTransitionReason (string) --

          The reason for the state transition. The possible values are as follows:

          • Client.UserInitiated - The state successfully transitioned to enabling or disabling.

          • Client.UserInitiated - Lifecycle state transition - The state successfully transitioned to optimizing, enabled, or disabled.

        • OwnerId (string) --

          The ID of the Amazon Web Services account that enabled fast snapshot restores on the snapshot.

        • OwnerAlias (string) --

          The Amazon Web Services owner alias that enabled fast snapshot restores on the snapshot. This is intended for future use.

        • EnablingTime (datetime) --

          The time at which fast snapshot restores entered the enabling state.

        • OptimizingTime (datetime) --

          The time at which fast snapshot restores entered the optimizing state.

        • EnabledTime (datetime) --

          The time at which fast snapshot restores entered the enabled state.

        • DisablingTime (datetime) --

          The time at which fast snapshot restores entered the disabling state.

        • DisabledTime (datetime) --

          The time at which fast snapshot restores entered the disabled state.

    • Unsuccessful (list) --

      Information about the snapshots for which fast snapshot restores could not be enabled.

      • (dict) --

        Contains information about the errors that occurred when enabling fast snapshot restores.

        • SnapshotId (string) --

          The ID of the snapshot.

        • FastSnapshotRestoreStateErrors (list) --

          The errors.

          • (dict) --

            Contains information about an error that occurred when enabling fast snapshot restores.

            • AvailabilityZone (string) --

              The Availability Zone.

            • AvailabilityZoneId (string) --

              The ID of the Availability Zone.

            • Error (dict) --

              The error.

              • Code (string) --

                The error code.

              • Message (string) --

                The error message.