deleteTags method
Future<DeleteTagsOutput>
deleteTags({
- required String resourceId,
- required TaggableResourceType resourceType,
- required List<
String> tagKeys,
Deletes the specified tags associated with an ML object. After this operation is complete, you can't recover deleted tags.
If you specify a tag that doesn't exist, Amazon ML ignores it.
May throw InvalidInputException. May throw InvalidTagException. May throw ResourceNotFoundException. May throw InternalServerException.
Parameter resourceId
:
The ID of the tagged ML object. For example, exampleModelId
.
Parameter resourceType
:
The type of the tagged ML object.
Parameter tagKeys
:
One or more tags to delete.
Implementation
Future<DeleteTagsOutput> deleteTags({
required String resourceId,
required TaggableResourceType resourceType,
required List<String> tagKeys,
}) async {
ArgumentError.checkNotNull(resourceId, 'resourceId');
_s.validateStringLength(
'resourceId',
resourceId,
1,
64,
isRequired: true,
);
ArgumentError.checkNotNull(resourceType, 'resourceType');
ArgumentError.checkNotNull(tagKeys, 'tagKeys');
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AmazonML_20141212.DeleteTags'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'ResourceId': resourceId,
'ResourceType': resourceType.toValue(),
'TagKeys': tagKeys,
},
);
return DeleteTagsOutput.fromJson(jsonResponse.body);
}