describeTags method

Future<TagsType> describeTags({
  1. List<Filter>? filters,
  2. int? maxRecords,
  3. String? nextToken,
})

Describes the specified tags.

You can use filters to limit the results. For example, you can query for the tags for a specific Auto Scaling group. You can specify multiple values for a filter. A tag must match at least one of the specified values for it to be included in the results.

You can also specify multiple filters. The result includes information for a particular tag only if it matches all the filters. If there's no match, no special message is returned.

For more information, see Tagging Auto Scaling groups and instances in the Amazon EC2 Auto Scaling User Guide.

May throw InvalidNextToken. May throw ResourceContentionFault.

Parameter filters : One or more filters to scope the tags to return. The maximum number of filters per filter type (for example, auto-scaling-group) is 1000.

Parameter maxRecords : The maximum number of items to return with this call. The default value is 50 and the maximum value is 100.

Parameter nextToken : The token for the next set of items to return. (You received this token from a previous call.)

Implementation

Future<TagsType> describeTags({
  List<Filter>? filters,
  int? maxRecords,
  String? nextToken,
}) async {
  final $request = <String, dynamic>{};
  filters?.also((arg) => $request['Filters'] = arg);
  maxRecords?.also((arg) => $request['MaxRecords'] = arg);
  nextToken?.also((arg) => $request['NextToken'] = arg);
  final $result = await _protocol.send(
    $request,
    action: 'DescribeTags',
    version: '2011-01-01',
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    shape: shapes['DescribeTagsType'],
    shapes: shapes,
    resultWrapper: 'DescribeTagsResult',
  );
  return TagsType.fromXml($result);
}