untag_resource
¶
untag_resource(
resource_arn: String,
tag_keys: TagKeys,
*,
config_overrides: Optional[ECSClientConfig] = None,
) -> UntagResourceResponse
Deletes specified tags from a resource.
Parameters:
-
resource_arn(String) –The Amazon Resource Name (ARN) of the resource to delete tags from. Currently, the supported resources are Amazon ECS capacity providers, tasks, services, task definitions, clusters, and container instances.
-
tag_keys(TagKeys) –The keys of the tags to be removed.
Raises:
-
AccessDeniedException–You don't have authorization to perform the requested action.
-
ClientException–These errors are usually caused by a client action. This client action might be using an action or resource on behalf of a user that doesn't have permissions to use the action or resource. Or, it might be specifying an identifier that isn't valid.
-
ClusterNotFoundException–The specified cluster wasn't found. You can view your available clusters with ListClusters. Amazon ECS clusters are Region specific.
-
InvalidParameterException–The specified parameter isn't valid. Review the available parameters for the API request.
For more information about service event errors, see Amazon ECS service event messages.
-
ResourceNotFoundException–The specified resource wasn't found.
-
ServerException–These errors are usually caused by a server issue.
-
UnknownServiceError–The service returned an error code this client does not model.
Examples:
To untag a cluster. This example deletes the 'team' tag from the 'dev' cluster.
>>> client.untag_resource(resource_arn='arn:aws:ecs:region:aws_account_id:cluster/dev', tag_keys=['team'])