listTagsForResource method

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

Lists all tags associated with an assessment template.

May throw InternalException. May throw InvalidInputException. May throw AccessDeniedException. May throw NoSuchEntityException.

Parameter resourceArn : The ARN that specifies the assessment template whose tags you want to list.

Implementation

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

  return ListTagsForResourceResponse.fromJson(jsonResponse.body);
}