getTags method
Returns a list of tags that are associated with a resource group, specified by an ARN.
Minimum permissions
To run this command, you must have the following permissions:
-
resource-groups:GetTags
May throw BadRequestException. May throw ForbiddenException. May throw NotFoundException. May throw MethodNotAllowedException. May throw TooManyRequestsException. May throw InternalServerErrorException.
Parameter arn
:
The ARN of the resource group whose tags you want to retrieve.
Implementation
Future<GetTagsOutput> getTags({
required String arn,
}) async {
ArgumentError.checkNotNull(arn, 'arn');
_s.validateStringLength(
'arn',
arn,
12,
1600,
isRequired: true,
);
final response = await _protocol.send(
payload: null,
method: 'GET',
requestUri: '/resources/${Uri.encodeComponent(arn)}/tags',
exceptionFnMap: _exceptionFns,
);
return GetTagsOutput.fromJson(response);
}