describeAddress method

Future<DescribeAddressResult> describeAddress({
  1. required String addressId,
})

Takes an AddressId and returns specific details about that address in the form of an Address object.

May throw InvalidResourceException.

Parameter addressId : The automatically generated ID for a specific address.

Implementation

Future<DescribeAddressResult> describeAddress({
  required String addressId,
}) async {
  ArgumentError.checkNotNull(addressId, 'addressId');
  _s.validateStringLength(
    'addressId',
    addressId,
    40,
    40,
    isRequired: true,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'AWSIESnowballJobManagementService.DescribeAddress'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'AddressId': addressId,
    },
  );

  return DescribeAddressResult.fromJson(jsonResponse.body);
}