WorkspacesInstances / Client / create_volume

create_volume

WorkspacesInstances.Client.create_volume(**kwargs)

Creates a new volume for WorkSpace Instances.

See also: AWS API Documentation

Request Syntax

response = client.create_volume(
    AvailabilityZone='string',
    ClientToken='string',
    Encrypted=True|False,
    Iops=123,
    KmsKeyId='string',
    SizeInGB=123,
    SnapshotId='string',
    TagSpecifications=[
        {
            'ResourceType': 'instance'|'volume'|'spot-instances-request'|'network-interface',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ],
    Throughput=123,
    VolumeType='standard'|'io1'|'io2'|'gp2'|'sc1'|'st1'|'gp3'
)
Parameters:
  • AvailabilityZone (string) –

    [REQUIRED]

    Availability zone for the volume.

  • ClientToken (string) –

    Unique token to prevent duplicate volume creation.

    This field is autopopulated if not provided.

  • Encrypted (boolean) – Indicates if the volume should be encrypted.

  • Iops (integer) – Input/output operations per second for the volume.

  • KmsKeyId (string) – KMS key for volume encryption.

  • SizeInGB (integer) – Volume size in gigabytes.

  • SnapshotId (string) – Source snapshot for volume creation.

  • TagSpecifications (list) –

    Metadata tags for the volume.

    • (dict) –

      Defines tagging configuration for a resource.

      • ResourceType (string) –

        Type of resource being tagged.

      • Tags (list) –

        Collection of tags for the specified resource.

        • (dict) –

          Represents a key-value metadata tag.

          • Key (string) –

            Unique identifier for the tag.

          • Value (string) –

            Value associated with the tag key.

  • Throughput (integer) – Volume throughput performance.

  • VolumeType (string) – Type of EBS volume.

Return type:

dict

Returns:

Response Syntax

{
    'VolumeId': 'string'
}

Response Structure

  • (dict) –

    Returns the created volume identifier.

    • VolumeId (string) –

      Unique identifier for the new volume.

Exceptions