describeLocationS3 method

Future<DescribeLocationS3Response> describeLocationS3({
  1. required String locationArn,
})

Returns metadata, such as bucket name, about an Amazon S3 bucket location.

May throw InvalidRequestException. May throw InternalException.

Parameter locationArn : The Amazon Resource Name (ARN) of the Amazon S3 bucket location to describe.

Implementation

Future<DescribeLocationS3Response> describeLocationS3({
  required String locationArn,
}) async {
  ArgumentError.checkNotNull(locationArn, 'locationArn');
  _s.validateStringLength(
    'locationArn',
    locationArn,
    0,
    128,
    isRequired: true,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'FmrsService.DescribeLocationS3'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'LocationArn': locationArn,
    },
  );

  return DescribeLocationS3Response.fromJson(jsonResponse.body);
}