Deletes the specified tags.
Parameters:
Raises:
-
ResourceContentionFault
–
You already have a pending update to an Amazon EC2 Auto Scaling resource (for example, an Auto Scaling group, instance, or load balancer).
-
ResourceInUseFault
–
The operation can't be performed because the resource is in use.
-
UnknownServiceError
–
The service returned an error code this client does not model.
Examples:
To delete a tag from an Auto Scaling group
This example deletes the specified tag from the specified Auto Scaling group.
>>> await client.delete_tags(tags=[{'ResourceId': 'my-auto-scaling-group', 'ResourceType': 'auto-scaling-group', 'Key': 'Dept', 'Value': 'Research'}])
Source code in docs_src/capo_auto_scaling/_services/async_auto_scaling.py
| async def delete_tags(
self,
*,
config_overrides: Optional[AsyncAutoScalingClientConfig] = None,
tags: Optional["capo_auto_scaling.types.tags.Tags"] = None,
) -> None:
"""<p>Deletes the specified tags.</p>
Args:
tags: <p>One or more tags.</p>
Raises:
capo_auto_scaling.errors.resource_contention_fault.ResourceContentionFault: <p>You already have a pending update to an Amazon EC2 Auto Scaling resource (for example, an Auto Scaling group, instance, or load balancer).</p>
capo_auto_scaling.errors.resource_in_use_fault.ResourceInUseFault: <p>The operation can't be performed because the resource is in use.</p>
capo_auto_scaling.errors.UnknownServiceError: The service returned an error code this client does not model.
Examples:
To delete a tag from an Auto Scaling group
This example deletes the specified tag from the specified Auto Scaling group.
>>> await client.delete_tags(tags=[{'ResourceId': 'my-auto-scaling-group', 'ResourceType': 'auto-scaling-group', 'Key': 'Dept', 'Value': 'Research'}])
"""
async def _handler(
req: "AsyncOperationRequest[capo_auto_scaling.types.delete_tags_type.DeleteTagsType]",
) -> AsyncOperationResponse[None]:
import capo_auto_scaling._operations.auto_scaling_2011_01_01.delete_tags
(
output,
http_response,
) = await capo_auto_scaling._operations.auto_scaling_2011_01_01.delete_tags.async_delete_tags(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("DeleteTags")
)
input_: capo_auto_scaling.types.delete_tags_type.DeleteTagsType = {}
if tags is not None:
input_["tags"] = tags
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|