listTagsForResource method

Future<ListTagsForResourceOutput> listTagsForResource({
  1. required String resource,
})

Returns a list of the tags assigned to the specified container.

May throw ContainerInUseException. May throw ContainerNotFoundException. May throw InternalServerError.

Parameter resource : The Amazon Resource Name (ARN) for the container.

Implementation

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

  return ListTagsForResourceOutput.fromJson(jsonResponse.body);
}