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.
Parameters:
-
tag_keys
(TagKeyList)
–
One or more tags to delete.
-
resource_id
(EntityId)
–
The ID of the tagged ML object. For example, exampleModelId.
-
resource_type
(TaggableResourceType)
–
The type of the tagged ML object.
Raises:
Source code in docs_src/capo_machine_learning/_services/machine_learning.py
| def delete_tags(
self,
tag_keys: "capo_machine_learning.types.tag_key_list.TagKeyList",
resource_id: "capo_machine_learning.types.entity_id.EntityId",
resource_type: "capo_machine_learning.types.taggable_resource_type.TaggableResourceType",
*,
config_overrides: Optional[MachineLearningClientConfig] = None,
) -> "capo_machine_learning.types.delete_tags_output.DeleteTagsOutput":
"""<p>Deletes the specified tags associated with an ML object. After this operation is complete, you can't recover deleted tags.</p> <p>If you specify a tag that doesn't exist, Amazon ML ignores it.</p>
Args:
tag_keys: <p>One or more tags to delete.</p>
resource_id: <p>The ID of the tagged ML object. For example, <code>exampleModelId</code>.</p>
resource_type: <p>The type of the tagged ML object.</p>
Raises:
capo_machine_learning.errors.internal_server_exception.InternalServerException: <p>An error on the server occurred when trying to process a request.</p>
capo_machine_learning.errors.invalid_input_exception.InvalidInputException: <p>An error on the client occurred. Typically, the cause is an invalid input value.</p>
capo_machine_learning.errors.invalid_tag_exception.InvalidTagException
capo_machine_learning.errors.resource_not_found_exception.ResourceNotFoundException: <p>A specified resource cannot be located.</p>
capo_machine_learning.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_machine_learning.types.delete_tags_input.DeleteTagsInput]",
) -> OperationResponse[
"capo_machine_learning.types.delete_tags_output.DeleteTagsOutput"
]:
import capo_machine_learning._operations.amazon_ml_20141212.delete_tags
output, http_response = (
capo_machine_learning._operations.amazon_ml_20141212.delete_tags.delete_tags(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("DeleteTags")
)
input_: capo_machine_learning.types.delete_tags_input.DeleteTagsInput = {
"tag_keys": tag_keys,
"resource_id": resource_id,
"resource_type": resource_type,
}
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|