:doc:`WorkspacesInstances <../../workspaces-instances>` / Client / create_volume

*************
create_volume
*************



.. py:method:: WorkspacesInstances.Client.create_volume(**kwargs)

  

  Creates a new volume for WorkSpace Instances.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/workspaces-instances-2022-07-26/CreateVolume>`_  


  **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'
    )
    
  :type AvailabilityZone: string
  :param AvailabilityZone: **[REQUIRED]** 

    Availability zone for the volume.

    

  
  :type ClientToken: string
  :param ClientToken: 

    Unique token to prevent duplicate volume creation.

    This field is autopopulated if not provided.

  
  :type Encrypted: boolean
  :param Encrypted: 

    Indicates if the volume should be encrypted.

    

  
  :type Iops: integer
  :param Iops: 

    Input/output operations per second for the volume.

    

  
  :type KmsKeyId: string
  :param KmsKeyId: 

    KMS key for volume encryption.

    

  
  :type SizeInGB: integer
  :param SizeInGB: 

    Volume size in gigabytes.

    

  
  :type SnapshotId: string
  :param SnapshotId: 

    Source snapshot for volume creation.

    

  
  :type TagSpecifications: list
  :param TagSpecifications: 

    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.

            

          
        
    
    

  :type Throughput: integer
  :param Throughput: 

    Volume throughput performance.

    

  
  :type VolumeType: string
  :param VolumeType: 

    Type of EBS volume.

    

  
  
  :rtype: dict
  :returns: 
    
    **Response Syntax**

    
    ::

      {
          'VolumeId': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 

      Returns the created volume identifier.

      
      

      - **VolumeId** *(string) --* 

        Unique identifier for the new volume.

        
  
  **Exceptions**
  
  *   :py:class:`WorkspacesInstances.Client.exceptions.ValidationException`

  
  *   :py:class:`WorkspacesInstances.Client.exceptions.AccessDeniedException`

  
  *   :py:class:`WorkspacesInstances.Client.exceptions.ThrottlingException`

  
  *   :py:class:`WorkspacesInstances.Client.exceptions.InternalServerException`

  
  *   :py:class:`WorkspacesInstances.Client.exceptions.ServiceQuotaExceededException`

  
  *   :py:class:`WorkspacesInstances.Client.exceptions.ConflictException`

  