:doc:`Glacier <../../glacier>` / Client / purchase_provisioned_capacity

*****************************
purchase_provisioned_capacity
*****************************



.. py:method:: Glacier.Client.purchase_provisioned_capacity(**kwargs)

  

  This operation purchases a provisioned capacity unit for an AWS account.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/glacier-2012-06-01/PurchaseProvisionedCapacity>`_  


  **Request Syntax**
  ::

    response = client.purchase_provisioned_capacity(
        
    )
    
  :type accountId: string
  :param accountId: 

    The AWS account ID of the account that owns the vault. You can either specify an AWS account ID or optionally a single '-' (hyphen), in which case Amazon Glacier uses the AWS account ID associated with the credentials used to sign the request. If you use an account ID, don't include any hyphens ('-') in the ID.

        Note: this parameter is set to "-" bydefault if no value is not specified.


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

    
    ::

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

    

    - *(dict) --* 
      

      - **capacityId** *(string) --* 

        The ID that identifies the provisioned capacity unit.

        
  
  **Exceptions**
  
  *   :py:class:`Glacier.Client.exceptions.InvalidParameterValueException`

  
  *   :py:class:`Glacier.Client.exceptions.MissingParameterValueException`

  
  *   :py:class:`Glacier.Client.exceptions.LimitExceededException`

  
  *   :py:class:`Glacier.Client.exceptions.ServiceUnavailableException`

  
  *   :py:class:`Glacier.Client.exceptions.NoLongerSupportedException`

  

  **Examples**

  The example purchases provisioned capacity unit for an AWS account.
  ::

    response = client.purchase_provisioned_capacity(
        accountId='-',
    )
    
    print(response)

  
  Expected Output:
  ::

    {
        'capacityId': 'zSaq7NzHFQDANTfQkDen4V7z',
        'ResponseMetadata': {
            '...': '...',
        },
    }

  