listTagsForResource2018_06_18 method

Future<ListTagsForResourceResult> listTagsForResource2018_06_18(
  1. {@required String resource}
)

List tags for a CloudFront resource.

May throw AccessDenied. May throw InvalidArgument. May throw InvalidTagging. May throw NoSuchResource.

Parameter resource : An ARN of a CloudFront resource.

Implementation

Future<ListTagsForResourceResult> listTagsForResource2018_06_18({
  @_s.required String resource,
}) async {
  ArgumentError.checkNotNull(resource, 'resource');
  _s.validateStringPattern(
    'resource',
    resource,
    r'''arn:aws:cloudfront::[0-9]+:.*''',
    isRequired: true,
  );
  final $query = <String, List<String>>{
    if (resource != null) 'Resource': [resource],
  };
  final $result = await _protocol.sendRaw(
    method: 'GET',
    requestUri: '/2018-06-18/tagging',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  final $elem = await _s.xmlFromResponse($result);
  return ListTagsForResourceResult(
    tags: Tags.fromXml($elem),
  );
}