listTagsForResource method
Returns a list of tags for the resource identified by a specified Amazon Resource Name (ARN). Tags are used to organize and categorize your CodeDeploy resources.
May throw ArnNotSupportedException. May throw InvalidArnException. May throw ResourceArnRequiredException.
Parameter resourceArn
:
The ARN of a CodeDeploy resource. ListTagsForResource
returns
all the tags associated with the resource that is identified by the
ResourceArn
.
Parameter nextToken
:
An identifier returned from the previous ListTagsForResource
call. It can be used to return the next set of applications in the list.
Implementation
Future<ListTagsForResourceOutput> listTagsForResource({
required String resourceArn,
String? nextToken,
}) async {
ArgumentError.checkNotNull(resourceArn, 'resourceArn');
_s.validateStringLength(
'resourceArn',
resourceArn,
1,
1011,
isRequired: true,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'CodeDeploy_20141006.ListTagsForResource'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'ResourceArn': resourceArn,
if (nextToken != null) 'NextToken': nextToken,
},
);
return ListTagsForResourceOutput.fromJson(jsonResponse.body);
}