listTagsForResource method

Future<ListTagsForResourceResponse> listTagsForResource({
  1. required String resourceArn,
})

List all tags for an accelerator.

For more information, see Tagging in AWS Global Accelerator in the AWS Global Accelerator Developer Guide.

May throw AcceleratorNotFoundException. May throw InternalServiceErrorException. May throw InvalidArgumentException.

Parameter resourceArn : The Amazon Resource Name (ARN) of the accelerator to list tags for. An ARN uniquely identifies an accelerator.

Implementation

Future<ListTagsForResourceResponse> listTagsForResource({
  required String resourceArn,
}) async {
  ArgumentError.checkNotNull(resourceArn, 'resourceArn');
  _s.validateStringLength(
    'resourceArn',
    resourceArn,
    1,
    1011,
    isRequired: true,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'GlobalAccelerator_V20180706.ListTagsForResource'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'ResourceArn': resourceArn,
    },
  );

  return ListTagsForResourceResponse.fromJson(jsonResponse.body);
}