listTags method
Returns the tags for the specified Amazon SageMaker resource.
Parameter resourceArn
:
The Amazon Resource Name (ARN) of the resource whose tags you want to
retrieve.
Parameter maxResults
:
Maximum number of tags to return.
Parameter nextToken
:
If the response to the previous ListTags
request is
truncated, Amazon SageMaker returns this token. To retrieve the next set
of tags, use it in the subsequent request.
Implementation
Future<ListTagsOutput> listTags({
required String resourceArn,
int? maxResults,
String? nextToken,
}) async {
ArgumentError.checkNotNull(resourceArn, 'resourceArn');
_s.validateStringLength(
'resourceArn',
resourceArn,
0,
256,
isRequired: true,
);
_s.validateNumRange(
'maxResults',
maxResults,
50,
1152921504606846976,
);
_s.validateStringLength(
'nextToken',
nextToken,
0,
8192,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'SageMaker.ListTags'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'ResourceArn': resourceArn,
if (maxResults != null) 'MaxResults': maxResults,
if (nextToken != null) 'NextToken': nextToken,
},
);
return ListTagsOutput.fromJson(jsonResponse.body);
}