Amazon Elastic Compute Cloud

2019/11/20 - Amazon Elastic Compute Cloud - 3 new2 updated api methods

Changes  Update ec2 client to latest version

DisableFastSnapshotRestores (new) Link ¶

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',
    ],
    SourceSnapshotIds=[
        'string',
    ],
    DryRun=True|False
)
type AvailabilityZones:

list

param AvailabilityZones:

[REQUIRED]

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

  • (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',
            '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',
                    '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.

        • 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 AWS account that owns the snapshot.

        • OwnerAlias (string) --

          The alias of the snapshot owner.

        • 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.

            • Error (dict) --

              The error.

              • Code (string) --

                The error code.

              • Message (string) --

                The error message.

DescribeFastSnapshotRestores (new) Link ¶

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.

  • owner-id: The ID of the AWS account that owns 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. The filters supported by a describe operation are documented with the describe operation. For example:

    • DescribeAvailabilityZones

    • DescribeImages

    • DescribeInstances

    • DescribeKeyPairs

    • DescribeSecurityGroups

    • DescribeSnapshots

    • DescribeSubnets

    • DescribeTags

    • DescribeVolumes

    • DescribeVpcs

    • Name (string) --

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

    • Values (list) --

      The filter values. Filter values are case-sensitive.

      • (string) --

type MaxResults:

integer

param MaxResults:

The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.

type NextToken:

string

param NextToken:

The token for the next page of results.

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',
            '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.

        • 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 AWS account that owns the snapshot.

        • OwnerAlias (string) --

          The alias of the snapshot owner.

        • 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 use to retrieve the next page of results. This value is null when there are no more results to return.

EnableFastSnapshotRestores (new) Link ¶

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. To get the current state of fast snapshot restores, use DescribeFastSnapshotRestores. To disable fast snapshot restores, use DisableFastSnapshotRestores.

See also: AWS API Documentation

Request Syntax

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

list

param AvailabilityZones:

[REQUIRED]

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

  • (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 AWS 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',
            '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',
                    '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.

        • 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 AWS account that owns the snapshot.

        • OwnerAlias (string) --

          The alias of the snapshot owner.

        • 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.

            • Error (dict) --

              The error.

              • Code (string) --

                The error code.

              • Message (string) --

                The error message.

CreateVolume (updated) Link ¶
Changes (response)
{'FastRestored': 'boolean'}

Creates an EBS volume that can be attached to an instance in the same Availability Zone. The volume is created in the regional endpoint that you send the HTTP request to. For more information see Regions and Endpoints.

You can create a new empty volume or restore a volume from an EBS snapshot. Any AWS Marketplace product codes from the snapshot are propagated to the volume.

You can create encrypted volumes. Encrypted volumes must be attached to instances that support Amazon EBS encryption. Volumes that are created from encrypted snapshots are also automatically encrypted. For more information, see Amazon EBS Encryption in the Amazon Elastic Compute Cloud User Guide.

You can tag your volumes during creation. For more information, see Tagging Your Amazon EC2 Resources in the Amazon Elastic Compute Cloud User Guide.

For more information, see Creating an Amazon EBS Volume in the Amazon Elastic Compute Cloud User Guide.

See also: AWS API Documentation

Request Syntax

client.create_volume(
    AvailabilityZone='string',
    Encrypted=True|False,
    Iops=123,
    KmsKeyId='string',
    Size=123,
    SnapshotId='string',
    VolumeType='standard'|'io1'|'gp2'|'sc1'|'st1',
    DryRun=True|False,
    TagSpecifications=[
        {
            'ResourceType': 'client-vpn-endpoint'|'customer-gateway'|'dedicated-host'|'dhcp-options'|'elastic-ip'|'fleet'|'fpga-image'|'host-reservation'|'image'|'instance'|'internet-gateway'|'launch-template'|'natgateway'|'network-acl'|'network-interface'|'reserved-instances'|'route-table'|'security-group'|'snapshot'|'spot-instances-request'|'subnet'|'traffic-mirror-filter'|'traffic-mirror-session'|'traffic-mirror-target'|'transit-gateway'|'transit-gateway-attachment'|'transit-gateway-route-table'|'volume'|'vpc'|'vpc-peering-connection'|'vpn-connection'|'vpn-gateway',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ]
)
type AvailabilityZone:

string

param AvailabilityZone:

[REQUIRED]

The Availability Zone in which to create the volume.

type Encrypted:

boolean

param Encrypted:

Specifies whether the volume should be encrypted. The effect of setting the encryption state to true depends on the volume origin (new or from a snapshot), starting encryption state, ownership, and whether encryption by default is enabled. For more information, see Encryption by Default in the Amazon Elastic Compute Cloud User Guide.

Encrypted Amazon EBS volumes must be attached to instances that support Amazon EBS encryption. For more information, see Supported Instance Types.

type Iops:

integer

param Iops:

The number of I/O operations per second (IOPS) to provision for the volume, with a maximum ratio of 50 IOPS/GiB. Range is 100 to 64,000 IOPS for volumes in most Regions. Maximum IOPS of 64,000 is guaranteed only on Nitro-based instances. Other instance families guarantee performance up to 32,000 IOPS. For more information, see Amazon EBS Volume Types in the Amazon Elastic Compute Cloud User Guide.

This parameter is valid only for Provisioned IOPS SSD (io1) volumes.

type KmsKeyId:

string

param KmsKeyId:

The identifier of the AWS Key Management Service (AWS KMS) customer master key (CMK) to use for Amazon EBS encryption. If this parameter is not specified, your AWS managed CMK for EBS is used. If KmsKeyId is specified, the encrypted state must be true.

You can specify the CMK using any of the following:

  • Key ID. For example, key/1234abcd-12ab-34cd-56ef-1234567890ab.

  • Key alias. For example, alias/ExampleAlias.

  • Key ARN. For example, arn:aws:kms:us-east-1:012345678910:key/abcd1234-a123-456a-a12b-a123b4cd56ef.

  • Alias ARN. For example, arn:aws:kms:us-east-1:012345678910:alias/ExampleAlias.

AWS authenticates the CMK asynchronously. Therefore, if you specify an ID, alias, or ARN that is not valid, the action can appear to complete, but eventually fails.

type Size:

integer

param Size:

The size of the volume, in GiBs.

Constraints: 1-16,384 for gp2, 4-16,384 for io1, 500-16,384 for st1, 500-16,384 for sc1, and 1-1,024 for standard. If you specify a snapshot, the volume size must be equal to or larger than the snapshot size.

Default: If you're creating the volume from a snapshot and don't specify a volume size, the default is the snapshot size.

type SnapshotId:

string

param SnapshotId:

The snapshot from which to create the volume.

type VolumeType:

string

param VolumeType:

The volume type. This can be gp2 for General Purpose SSD, io1 for Provisioned IOPS SSD, st1 for Throughput Optimized HDD, sc1 for Cold HDD, or standard for Magnetic volumes.

Default: gp2

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 TagSpecifications:

list

param TagSpecifications:

The tags to apply to the volume during creation.

  • (dict) --

    The tags to apply to a resource when the resource is being created.

    • ResourceType (string) --

      The type of resource to tag. Currently, the resource types that support tagging on creation are: capacity-reservation | client-vpn-endpoint | dedicated-host | fleet | fpga-image | instance | launch-template | snapshot | traffic-mirror-filter | traffic-mirror-session | traffic-mirror-target | transit-gateway | transit-gateway-attachment | transit-gateway-route-table | volume.

      To tag a resource after it has been created, see CreateTags.

    • Tags (list) --

      The tags to apply to the resource.

      • (dict) --

        Describes a tag.

        • Key (string) --

          The key of the tag.

          Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws:.

        • Value (string) --

          The value of the tag.

          Constraints: Tag values are case-sensitive and accept a maximum of 255 Unicode characters.

rtype:

dict

returns:

Response Syntax

{
    'Attachments': [
        {
            'AttachTime': datetime(2015, 1, 1),
            'Device': 'string',
            'InstanceId': 'string',
            'State': 'attaching'|'attached'|'detaching'|'detached'|'busy',
            'VolumeId': 'string',
            'DeleteOnTermination': True|False
        },
    ],
    'AvailabilityZone': 'string',
    'CreateTime': datetime(2015, 1, 1),
    'Encrypted': True|False,
    'KmsKeyId': 'string',
    'Size': 123,
    'SnapshotId': 'string',
    'State': 'creating'|'available'|'in-use'|'deleting'|'deleted'|'error',
    'VolumeId': 'string',
    'Iops': 123,
    'Tags': [
        {
            'Key': 'string',
            'Value': 'string'
        },
    ],
    'VolumeType': 'standard'|'io1'|'gp2'|'sc1'|'st1',
    'FastRestored': True|False
}

Response Structure

  • (dict) --

    Describes a volume.

    • Attachments (list) --

      Information about the volume attachments.

      • (dict) --

        Describes volume attachment details.

        • AttachTime (datetime) --

          The time stamp when the attachment initiated.

        • Device (string) --

          The device name.

        • InstanceId (string) --

          The ID of the instance.

        • State (string) --

          The attachment state of the volume.

        • VolumeId (string) --

          The ID of the volume.

        • DeleteOnTermination (boolean) --

          Indicates whether the EBS volume is deleted on instance termination.

    • AvailabilityZone (string) --

      The Availability Zone for the volume.

    • CreateTime (datetime) --

      The time stamp when volume creation was initiated.

    • Encrypted (boolean) --

      Indicates whether the volume is encrypted.

    • KmsKeyId (string) --

      The Amazon Resource Name (ARN) of the AWS Key Management Service (AWS KMS) customer master key (CMK) that was used to protect the volume encryption key for the volume.

    • Size (integer) --

      The size of the volume, in GiBs.

    • SnapshotId (string) --

      The snapshot from which the volume was created, if applicable.

    • State (string) --

      The volume state.

    • VolumeId (string) --

      The ID of the volume.

    • Iops (integer) --

      The number of I/O operations per second (IOPS) that the volume supports. For Provisioned IOPS SSD volumes, this represents the number of IOPS that are provisioned for the volume. For General Purpose SSD volumes, this represents the baseline performance of the volume and the rate at which the volume accumulates I/O credits for bursting. For more information, see Amazon EBS Volume Types in the Amazon Elastic Compute Cloud User Guide.

      Constraints: Range is 100-16,000 IOPS for gp2 volumes and 100 to 64,000IOPS for io1 volumes, in most Regions. The maximum IOPS for io1 of 64,000 is guaranteed only on Nitro-based instances. Other instance families guarantee performance up to 32,000 IOPS.

      Condition: This parameter is required for requests to create io1 volumes; it is not used in requests to create gp2, st1, sc1, or standard volumes.

    • Tags (list) --

      Any tags assigned to the volume.

      • (dict) --

        Describes a tag.

        • Key (string) --

          The key of the tag.

          Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws:.

        • Value (string) --

          The value of the tag.

          Constraints: Tag values are case-sensitive and accept a maximum of 255 Unicode characters.

    • VolumeType (string) --

      The volume type. This can be gp2 for General Purpose SSD, io1 for Provisioned IOPS SSD, st1 for Throughput Optimized HDD, sc1 for Cold HDD, or standard for Magnetic volumes.

    • FastRestored (boolean) --

      Indicates whether the volume was created using fast snapshot restore.

DescribeVolumes (updated) Link ¶
Changes (response)
{'Volumes': {'FastRestored': 'boolean'}}

Describes the specified EBS volumes or all of your EBS volumes.

If you are describing a long list of volumes, you can paginate the output to make the list more manageable. The MaxResults parameter sets the maximum number of results returned in a single page. If the list of results exceeds your MaxResults value, then that number of results is returned along with a NextToken value that can be passed to a subsequent DescribeVolumes request to retrieve the remaining results.

For more information about EBS volumes, see Amazon EBS Volumes in the Amazon Elastic Compute Cloud User Guide.

See also: AWS API Documentation

Request Syntax

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

list

param Filters:

The filters.

  • attachment.attach-time - The time stamp when the attachment initiated.

  • attachment.delete-on-termination - Whether the volume is deleted on instance termination.

  • attachment.device - The device name specified in the block device mapping (for example, /dev/sda1).

  • attachment.instance-id - The ID of the instance the volume is attached to.

  • attachment.status - The attachment state ( attaching | attached | detaching).

  • availability-zone - The Availability Zone in which the volume was created.

  • create-time - The time stamp when the volume was created.

  • encrypted - Indicates whether the volume is encrypted ( true | false)

  • size - The size of the volume, in GiB.

  • snapshot-id - The snapshot from which the volume was created.

  • status - The status of the volume ( creating | available | in-use | deleting | deleted | error).

  • tag:<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA, specify tag:Owner for the filter name and TeamA for the filter value.

  • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.

  • volume-id - The volume ID.

  • volume-type - The Amazon EBS volume type. This can be gp2 for General Purpose SSD, io1 for Provisioned IOPS SSD, st1 for Throughput Optimized HDD, sc1 for Cold HDD, or standard for Magnetic volumes.

  • (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. The filters supported by a describe operation are documented with the describe operation. For example:

    • DescribeAvailabilityZones

    • DescribeImages

    • DescribeInstances

    • DescribeKeyPairs

    • DescribeSecurityGroups

    • DescribeSnapshots

    • DescribeSubnets

    • DescribeTags

    • DescribeVolumes

    • DescribeVpcs

    • Name (string) --

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

    • Values (list) --

      The filter values. Filter values are case-sensitive.

      • (string) --

type VolumeIds:

list

param VolumeIds:

The volume IDs.

  • (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.

type MaxResults:

integer

param MaxResults:

The maximum number of volume results returned by DescribeVolumes in paginated output. When this parameter is used, DescribeVolumes only returns MaxResults results in a single page along with a NextToken response element. The remaining results of the initial request can be seen by sending another DescribeVolumes request with the returned NextToken value. This value can be between 5 and 500; if MaxResults is given a value larger than 500, only 500 results are returned. If this parameter is not used, then DescribeVolumes returns all results. You cannot specify this parameter and the volume IDs parameter in the same request.

type NextToken:

string

param NextToken:

The NextToken value returned from a previous paginated DescribeVolumes request where MaxResults was used and the results exceeded the value of that parameter. Pagination continues from the end of the previous results that returned the NextToken value. This value is null when there are no more results to return.

rtype:

dict

returns:

Response Syntax

{
    'Volumes': [
        {
            'Attachments': [
                {
                    'AttachTime': datetime(2015, 1, 1),
                    'Device': 'string',
                    'InstanceId': 'string',
                    'State': 'attaching'|'attached'|'detaching'|'detached'|'busy',
                    'VolumeId': 'string',
                    'DeleteOnTermination': True|False
                },
            ],
            'AvailabilityZone': 'string',
            'CreateTime': datetime(2015, 1, 1),
            'Encrypted': True|False,
            'KmsKeyId': 'string',
            'Size': 123,
            'SnapshotId': 'string',
            'State': 'creating'|'available'|'in-use'|'deleting'|'deleted'|'error',
            'VolumeId': 'string',
            'Iops': 123,
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ],
            'VolumeType': 'standard'|'io1'|'gp2'|'sc1'|'st1',
            'FastRestored': True|False
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • Volumes (list) --

      Information about the volumes.

      • (dict) --

        Describes a volume.

        • Attachments (list) --

          Information about the volume attachments.

          • (dict) --

            Describes volume attachment details.

            • AttachTime (datetime) --

              The time stamp when the attachment initiated.

            • Device (string) --

              The device name.

            • InstanceId (string) --

              The ID of the instance.

            • State (string) --

              The attachment state of the volume.

            • VolumeId (string) --

              The ID of the volume.

            • DeleteOnTermination (boolean) --

              Indicates whether the EBS volume is deleted on instance termination.

        • AvailabilityZone (string) --

          The Availability Zone for the volume.

        • CreateTime (datetime) --

          The time stamp when volume creation was initiated.

        • Encrypted (boolean) --

          Indicates whether the volume is encrypted.

        • KmsKeyId (string) --

          The Amazon Resource Name (ARN) of the AWS Key Management Service (AWS KMS) customer master key (CMK) that was used to protect the volume encryption key for the volume.

        • Size (integer) --

          The size of the volume, in GiBs.

        • SnapshotId (string) --

          The snapshot from which the volume was created, if applicable.

        • State (string) --

          The volume state.

        • VolumeId (string) --

          The ID of the volume.

        • Iops (integer) --

          The number of I/O operations per second (IOPS) that the volume supports. For Provisioned IOPS SSD volumes, this represents the number of IOPS that are provisioned for the volume. For General Purpose SSD volumes, this represents the baseline performance of the volume and the rate at which the volume accumulates I/O credits for bursting. For more information, see Amazon EBS Volume Types in the Amazon Elastic Compute Cloud User Guide.

          Constraints: Range is 100-16,000 IOPS for gp2 volumes and 100 to 64,000IOPS for io1 volumes, in most Regions. The maximum IOPS for io1 of 64,000 is guaranteed only on Nitro-based instances. Other instance families guarantee performance up to 32,000 IOPS.

          Condition: This parameter is required for requests to create io1 volumes; it is not used in requests to create gp2, st1, sc1, or standard volumes.

        • Tags (list) --

          Any tags assigned to the volume.

          • (dict) --

            Describes a tag.

            • Key (string) --

              The key of the tag.

              Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws:.

            • Value (string) --

              The value of the tag.

              Constraints: Tag values are case-sensitive and accept a maximum of 255 Unicode characters.

        • VolumeType (string) --

          The volume type. This can be gp2 for General Purpose SSD, io1 for Provisioned IOPS SSD, st1 for Throughput Optimized HDD, sc1 for Cold HDD, or standard for Magnetic volumes.

        • FastRestored (boolean) --

          Indicates whether the volume was created using fast snapshot restore.

    • NextToken (string) --

      The NextToken value to include in a future DescribeVolumes request. When the results of a DescribeVolumes request exceed MaxResults, this value can be used to retrieve the next page of results. This value is null when there are no more results to return.