listTagsForResource method
List the tags for an Amazon ECR resource.
May throw InvalidParameterException. May throw RepositoryNotFoundException. May throw ServerException.
Parameter resourceArn
:
The Amazon Resource Name (ARN) that identifies the resource for which to
list the tags. Currently, the only supported resource is an Amazon ECR
repository.
Implementation
Future<ListTagsForResourceResponse> listTagsForResource({
required String resourceArn,
}) async {
ArgumentError.checkNotNull(resourceArn, 'resourceArn');
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AmazonEC2ContainerRegistry_V20150921.ListTagsForResource'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'resourceArn': resourceArn,
},
);
return ListTagsForResourceResponse.fromJson(jsonResponse.body);
}