Skip to content

list_provisioned_capacity async

list_provisioned_capacity(
    account_id: string, *, config_overrides: Optional[AsyncGlacierClientConfig] = None
) -> ListProvisionedCapacityOutput

This operation lists the provisioned capacity units for the specified AWS account.

Parameters:

  • account_id (string) –

    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.

Raises:

Examples:

To list the provisioned capacity units for an account The example lists the provisioned capacity units for an account.

>>> await client.list_provisioned_capacity(account_id='-')
Source code in docs_src/capo_glacier/_services/async_glacier.py
async def list_provisioned_capacity(
    self,
    account_id: "capo_glacier.types.string.string",
    *,
    config_overrides: Optional[AsyncGlacierClientConfig] = None,
) -> "capo_glacier.types.list_provisioned_capacity_output.ListProvisionedCapacityOutput":
    """<p>This operation lists the provisioned capacity units for the specified AWS account.</p>

    Args:
        account_id: <p>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. </p>

    Raises:
        capo_glacier.errors.invalid_parameter_value_exception.InvalidParameterValueException: <p>Returned if a parameter of the request is incorrectly specified.</p>
        capo_glacier.errors.missing_parameter_value_exception.MissingParameterValueException: <p>Returned if a required header or parameter is missing from the request.</p>
        capo_glacier.errors.no_longer_supported_exception.NoLongerSupportedException: <p>Returned if the request was made by a customer with no Amazon Glacier storage. The request is denied as the API is no longer supported for new customers. Please use Amazon S3 Glacier storage classes instead.</p>
        capo_glacier.errors.service_unavailable_exception.ServiceUnavailableException: <p>Returned if the service cannot complete the request.</p>
        capo_glacier.errors.UnknownServiceError: The service returned an error code this client does not model.

    Examples:
        To list the provisioned capacity units for an account
        The example lists the provisioned capacity units for an account.

        >>> await client.list_provisioned_capacity(account_id='-')
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_glacier.types.list_provisioned_capacity_input.ListProvisionedCapacityInput]",
    ) -> AsyncOperationResponse[
        "capo_glacier.types.list_provisioned_capacity_output.ListProvisionedCapacityOutput"
    ]:
        import capo_glacier._operations.glacier.list_provisioned_capacity

        (
            output,
            http_response,
        ) = await capo_glacier._operations.glacier.list_provisioned_capacity.async_list_provisioned_capacity(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListProvisionedCapacity")
    )
    input_: capo_glacier.types.list_provisioned_capacity_input.ListProvisionedCapacityInput = {
        "account_id": account_id
    }

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output