untag_resource
(**kwargs)¶Removes one or more tags from the specified resource.
See also: AWS API Documentation
Request Syntax
response = client.untag_resource(
ResourceARN='string',
TagKeys=[
'string',
]
)
[REQUIRED]
The Amazon Resource Name (ARN) of the resource that you want to retrieve tags for.
[REQUIRED]
The tag keys to remove from the specified resource.
dict
Response Syntax
{}
Response Structure
Exceptions
ServiceDiscovery.Client.exceptions.ResourceNotFoundException
ServiceDiscovery.Client.exceptions.InvalidInput
ServiceDiscovery.Client.exceptions.RequestLimitExceeded
Examples
This example removes the "Department" and "Project" tags from a resource.
response = client.untag_resource(
ResourceARN='arn:aws:servicediscovery:us-east-1:123456789012:namespace/ns-ylexjili4cdxy3xm',
TagKeys=[
'Project',
'Department',
],
)
print(response)
Expected Output:
{
'ResponseMetadata': {
'...': '...',
},
}