createSite method
Creates a site for an Outpost.
May throw AccessDeniedException.
May throw ConflictException.
May throw InternalServerException.
May throw ServiceQuotaExceededException.
May throw ValidationException.
Parameter notes :
Additional information that you provide about site access requirements,
electrician scheduling, personal protective equipment, or regulation of
equipment materials that could affect your installation process.
Parameter operatingAddress :
The location to install and power on the hardware. This address might be
different from the shipping address.
Parameter rackPhysicalProperties :
Information about the physical and logistical details for the rack at this
site. For more information about hardware requirements for racks, see Network
readiness checklist in the Amazon Web Services Outposts User Guide.
Parameter shippingAddress :
The location to ship the hardware. This address might be different from
the operating address.
Parameter tags :
The tags to apply to a site.
Implementation
Future<CreateSiteOutput> createSite({
required String name,
String? description,
String? notes,
Address? operatingAddress,
RackPhysicalProperties? rackPhysicalProperties,
Address? shippingAddress,
Map<String, String>? tags,
}) async {
final $payload = <String, dynamic>{
'Name': name,
if (description != null) 'Description': description,
if (notes != null) 'Notes': notes,
if (operatingAddress != null) 'OperatingAddress': operatingAddress,
if (rackPhysicalProperties != null)
'RackPhysicalProperties': rackPhysicalProperties,
if (shippingAddress != null) 'ShippingAddress': shippingAddress,
if (tags != null) 'Tags': tags,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/sites',
exceptionFnMap: _exceptionFns,
);
return CreateSiteOutput.fromJson(response);
}