listTagsForResources method

Future<ListTagsForResourcesResponse> listTagsForResources({
  1. required List<String> resourceIds,
  2. required TagResourceType resourceType,
})

Lists tags for up to 10 health checks or hosted zones.

For information about using tags for cost allocation, see Using Cost Allocation Tags in the AWS Billing and Cost Management User Guide.

May throw InvalidInput. May throw NoSuchHealthCheck. May throw NoSuchHostedZone. May throw PriorRequestNotComplete. May throw ThrottlingException.

Parameter resourceIds : A complex type that contains the ResourceId element for each resource for which you want to get a list of tags.

Parameter resourceType : The type of the resources.

  • The resource type for health checks is healthcheck.
  • The resource type for hosted zones is hostedzone.

Implementation

Future<ListTagsForResourcesResponse> listTagsForResources({
  required List<String> resourceIds,
  required TagResourceType resourceType,
}) async {
  ArgumentError.checkNotNull(resourceIds, 'resourceIds');
  ArgumentError.checkNotNull(resourceType, 'resourceType');
  final $result = await _protocol.send(
    method: 'POST',
    requestUri:
        '/2013-04-01/tags/${Uri.encodeComponent(resourceType.toValue())}',
    payload: ListTagsForResourcesRequest(
            resourceIds: resourceIds, resourceType: resourceType)
        .toXml(
      'ListTagsForResourcesRequest',
      attributes: [
        _s.XmlAttribute(_s.XmlName('xmlns'),
            'https://route53.amazonaws.com/doc/2013-04-01/'),
      ],
    ),
    exceptionFnMap: _exceptionFns,
  );
  return ListTagsForResourcesResponse.fromXml($result.body);
}