createAddress method
Creates an address for a Snow device to be shipped to. In most regions,
addresses are validated at the time of creation. The address you provide
must be located within the serviceable area of your region. If the address
is invalid or unsupported, then an exception is thrown. If providing an
address as a JSON file through the cli-input-json option,
include the full file path. For example, --cli-input-json
file://create-address.json.
May throw InvalidAddressException.
May throw UnsupportedAddressException.
Parameter address :
The address that you want the Snow device shipped to.
Implementation
Future<CreateAddressResult> createAddress({
required Address address,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AWSIESnowballJobManagementService.CreateAddress'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'Address': address,
},
);
return CreateAddressResult.fromJson(jsonResponse.body);
}