createQuote method
Creates a quote for an Outpost. A quote provides pricing and configuration options based on the requested capacity. You can optionally associate the quote with an existing Outpost or create a standalone quote by specifying only the country code and requested capacities.
May throw AccessDeniedException.
May throw InternalServerException.
May throw NotFoundException.
May throw ValidationException.
Parameter countryCode :
The country code for the Outpost site location.
Parameter requestedCapacities :
The capacity requirements for the quote. Each entry specifies a capacity
type (such as Amazon EC2), the unit, and the quantity. For Amazon EC2, the
quantity is the number of additional instances to add to the Outpost. For
Amazon EBS and Amazon S3, the quantity is the total desired end-state
capacity of the Outpost.
Parameter description :
A description for the quote.
Parameter outpostIdentifier :
The ID or ARN of the Outpost to associate with the quote. If not
specified, the quote is created without an Outpost association.
Parameter requestedConstraints :
The physical constraints for the quote, such as maximum number of racks,
maximum power draw per rack, or maximum weight per rack.
Parameter requestedPaymentOptions :
The payment options to include in the quote pricing. If not specified, all
available payment options are returned.
Parameter requestedPaymentTerms :
The payment terms to include in the quote pricing. If not specified, all
available payment terms are returned.
Implementation
Future<CreateQuoteOutput> createQuote({
required String countryCode,
required List<QuoteCapacity> requestedCapacities,
String? description,
String? outpostIdentifier,
List<QuoteConstraint>? requestedConstraints,
List<PaymentOption>? requestedPaymentOptions,
List<PaymentTerm>? requestedPaymentTerms,
}) async {
final $payload = <String, dynamic>{
'CountryCode': countryCode,
'RequestedCapacities': requestedCapacities,
if (description != null) 'Description': description,
if (outpostIdentifier != null) 'OutpostIdentifier': outpostIdentifier,
if (requestedConstraints != null)
'RequestedConstraints': requestedConstraints,
if (requestedPaymentOptions != null)
'RequestedPaymentOptions':
requestedPaymentOptions.map((e) => e.value).toList(),
if (requestedPaymentTerms != null)
'RequestedPaymentTerms':
requestedPaymentTerms.map((e) => e.value).toList(),
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/quotes',
exceptionFnMap: _exceptionFns,
);
return CreateQuoteOutput.fromJson(response);
}