getTagValues method
Returns all tag values for the specified key in the specified Region for the AWS account.
May throw InvalidParameterException. May throw ThrottledException. May throw InternalServiceException. May throw PaginationTokenExpiredException.
Parameter key
:
The key for which you want to list all existing values in the specified
Region for the AWS account.
Parameter paginationToken
:
A string that indicates that additional data is available. Leave this
value empty for your initial request. If the response includes a
PaginationToken
, use that string for this value to request an
additional page of data.
Implementation
Future<GetTagValuesOutput> getTagValues({
required String key,
String? paginationToken,
}) async {
ArgumentError.checkNotNull(key, 'key');
_s.validateStringLength(
'key',
key,
1,
128,
isRequired: true,
);
_s.validateStringLength(
'paginationToken',
paginationToken,
0,
2048,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'ResourceGroupsTaggingAPI_20170126.GetTagValues'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'Key': key,
if (paginationToken != null) 'PaginationToken': paginationToken,
},
);
return GetTagValuesOutput.fromJson(jsonResponse.body);
}