listTagsForResource method

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

Lists the tags (metadata) you have assigned to the resource.

May throw InvalidRequestException. May throw InternalFailureException. May throw ResourceNotFoundException. May throw ThrottlingException.

Parameter resourceArn : The ARN of the resource.

Parameter nextToken : To retrieve the next set of results, the nextToken value from a previous response; otherwise null to receive the first set of results.

Implementation

Future<ListTagsForResourceResponse> listTagsForResource({
  required String resourceArn,
  String? nextToken,
}) async {
  ArgumentError.checkNotNull(resourceArn, 'resourceArn');
  final $query = <String, List<String>>{
    'resourceArn': [resourceArn],
    if (nextToken != null) 'nextToken': [nextToken],
  };
  final response = await _protocol.send(
    payload: null,
    method: 'GET',
    requestUri: '/tags',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return ListTagsForResourceResponse.fromJson(response);
}