getTags method

Future<GetTagsResponse> getTags({
  1. required String resourceArn,
})

Retrieves a list of tags associated with a resource.

May throw InvalidInputException. May throw InternalServiceException. May throw OperationTimeoutException. May throw EntityNotFoundException.

Parameter resourceArn : The Amazon Resource Name (ARN) of the resource for which to retrieve tags.

Implementation

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

  return GetTagsResponse.fromJson(jsonResponse.body);
}