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.
>>> client.list_provisioned_capacity(account_id='-')
Source code in docs_src/capo_glacier/_services/glacier.py
| def list_provisioned_capacity(
self,
account_id: "capo_glacier.types.string.string",
*,
config_overrides: Optional[GlacierClientConfig] = 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.
>>> client.list_provisioned_capacity(account_id='-')
"""
def _handler(
req: "OperationRequest[capo_glacier.types.list_provisioned_capacity_input.ListProvisionedCapacityInput]",
) -> OperationResponse[
"capo_glacier.types.list_provisioned_capacity_output.ListProvisionedCapacityOutput"
]:
import capo_glacier._operations.glacier.list_provisioned_capacity
output, http_response = (
capo_glacier._operations.glacier.list_provisioned_capacity.list_provisioned_capacity(
req.options, req.input
)
)
return OperationResponse(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 = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|