listTagsForResource method

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

Displays the tags associated with an EventBridge resource. In EventBridge, rules and event buses can be tagged.

May throw ResourceNotFoundException. May throw InternalException.

Parameter resourceARN : The ARN of the EventBridge resource for which you want to view tags.

Implementation

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

  return ListTagsForResourceResponse.fromJson(jsonResponse.body);
}