listTagsForResource method

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

Retrieve a list of the tags (keys and values) that are associated with a specified application. A tag is a label that you optionally define and associate with an application. Each tag consists of a required tag key and an optional associated tag value. A tag key is a general label that acts as a category for more specific tag values. A tag value acts as a descriptor within a tag key.

May throw ResourceNotFoundException. May throw ValidationException.

Parameter resourceARN : The Amazon Resource Name (ARN) of the application that you want to retrieve tag information for.

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': 'EC2WindowsBarleyService.ListTagsForResource'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'ResourceARN': resourceARN,
    },
  );

  return ListTagsForResourceResponse.fromJson(jsonResponse.body);
}