listTagsForResource method

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

Gets the set of key-value pairs (metadata) that are used to manage the resource.

May throw ResourceNotFoundException.

Parameter resourceArn : The Amazon Resource Name (ARN) of the resource for which you want to get information about tags, if any.

Implementation

Future<ListTagsForResourceOutput> 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.0',
    'X-Amz-Target':
        'com.amazonaws.codestar.connections.CodeStar_connections_20191201.ListTagsForResource'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'ResourceArn': resourceArn,
    },
  );

  return ListTagsForResourceOutput.fromJson(jsonResponse.body);
}