createOutpost method

Future<CreateOutpostOutput> createOutpost({
  1. required String name,
  2. required String siteId,
  3. String? availabilityZone,
  4. String? availabilityZoneId,
  5. String? description,
  6. SupportedHardwareType? supportedHardwareType,
  7. Map<String, String>? tags,
})

Creates an Outpost.

You can specify either an Availability one or an AZ ID.

May throw AccessDeniedException. May throw ConflictException. May throw InternalServerException. May throw NotFoundException. May throw ServiceQuotaExceededException. May throw ValidationException.

Parameter siteId : The ID or the Amazon Resource Name (ARN) of the site.

Parameter supportedHardwareType : The type of hardware for this Outpost.

Parameter tags : The tags to apply to the Outpost.

Implementation

Future<CreateOutpostOutput> createOutpost({
  required String name,
  required String siteId,
  String? availabilityZone,
  String? availabilityZoneId,
  String? description,
  SupportedHardwareType? supportedHardwareType,
  Map<String, String>? tags,
}) async {
  final $payload = <String, dynamic>{
    'Name': name,
    'SiteId': siteId,
    if (availabilityZone != null) 'AvailabilityZone': availabilityZone,
    if (availabilityZoneId != null) 'AvailabilityZoneId': availabilityZoneId,
    if (description != null) 'Description': description,
    if (supportedHardwareType != null)
      'SupportedHardwareType': supportedHardwareType.value,
    if (tags != null) 'Tags': tags,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/outposts',
    exceptionFnMap: _exceptionFns,
  );
  return CreateOutpostOutput.fromJson(response);
}