purchaseProvisionedCapacity method
Future<PurchaseProvisionedCapacityOutput>
purchaseProvisionedCapacity({
- required String accountId,
This operation purchases a provisioned capacity unit for an AWS account.
May throw InvalidParameterValueException. May throw MissingParameterValueException. May throw LimitExceededException. May throw ServiceUnavailableException.
Parameter 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 S3 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.
Implementation
Future<PurchaseProvisionedCapacityOutput> purchaseProvisionedCapacity({
required String accountId,
}) async {
ArgumentError.checkNotNull(accountId, 'accountId');
final response = await _protocol.sendRaw(
payload: null,
method: 'POST',
requestUri: '/${Uri.encodeComponent(accountId)}/provisioned-capacity',
exceptionFnMap: _exceptionFns,
);
final $json = await _s.jsonFromResponse(response);
return PurchaseProvisionedCapacityOutput(
capacityId:
_s.extractHeaderStringValue(response.headers, 'x-amz-capacity-id'),
);
}