Skip to content

delete_tags

Operation

delete_tags

delete_tags(request: DeleteTagsInput | DeleteTagsInputDict | None = None, /, *, plugins: list[Plugin] | None = None, **kwargs: Unpack[DeleteTagsInputDict]) -> DeleteTagsOutput

Deletes the specified set of tags from the specified set of resources.

To list the current tags, use DescribeTags. For more information about tags, see Tag your Amazon EC2 resources in the Amazon Elastic Compute Cloud User Guide.

Parameters:

Name Type Description Default
request DeleteTagsInput | DeleteTagsInputDict | None

The input as a model or dictionary. Pass this or keyword arguments, not both.

None
plugins list[Plugin] | None

A list of callables that modify the configuration dynamically. Changes made by these plugins only apply for the duration of the operation execution and will not affect any other operation invocations.

None
**kwargs Unpack[DeleteTagsInputDict]

The input fields as keyword arguments.

{}

Returns:

Type Description
DeleteTagsOutput

An instance of DeleteTagsOutput.

delete_tags async

delete_tags(request: DeleteTagsInput | DeleteTagsInputDict | None = None, /, *, plugins: list[Plugin] | None = None, **kwargs: Unpack[DeleteTagsInputDict]) -> DeleteTagsOutput

Deletes the specified set of tags from the specified set of resources.

To list the current tags, use DescribeTags. For more information about tags, see Tag your Amazon EC2 resources in the Amazon Elastic Compute Cloud User Guide.

Parameters:

Name Type Description Default
request DeleteTagsInput | DeleteTagsInputDict | None

The input as a model or dictionary. Pass this or keyword arguments, not both.

None
plugins list[Plugin] | None

A list of callables that modify the configuration dynamically. Changes made by these plugins only apply for the duration of the operation execution and will not affect any other operation invocations.

None
**kwargs Unpack[DeleteTagsInputDict]

The input fields as keyword arguments.

{}

Returns:

Type Description
DeleteTagsOutput

An instance of DeleteTagsOutput.

Input

Pass the input as keyword arguments, a positional dictionary, or a positional model object. Pass plugins separately as a keyword argument.

DeleteTagsInputDict

Bases: TypedDict

Dictionary form of DeleteTagsInput.

Attributes

dry_run instance-attribute
dry_run: bool | None

Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

resources instance-attribute
resources: Required[Sequence[str]]

The IDs of the resources, separated by spaces.

Constraints: Up to 1000 resource IDs. We recommend breaking up this request into smaller batches.

tags instance-attribute
tags: Sequence[Tag | TagDict] | None

The tags to delete. Specify a tag key and an optional tag value to delete specific tags. If you specify a tag key without a tag value, we delete any tag with this key regardless of its value. If you specify a tag key with an empty string as the tag value, we delete the tag only if its value is an empty string.

If you omit this parameter, we delete all user-defined tags for the specified resources. We do not delete Amazon Web Services-generated tags (tags that have the aws: prefix).

Constraints: Up to 1000 tags.

DeleteTagsInput dataclass

Bases: _SerdeShape

Dataclass for DeleteTagsInput structure.

Attributes

dry_run class-attribute instance-attribute
dry_run: bool | None = ...

Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

resources class-attribute instance-attribute
resources: list[str] | None = ...

The IDs of the resources, separated by spaces.

Constraints: Up to 1000 resource IDs. We recommend breaking up this request into smaller batches.

tags class-attribute instance-attribute
tags: list[Tag] | None = ...

The tags to delete. Specify a tag key and an optional tag value to delete specific tags. If you specify a tag key without a tag value, we delete any tag with this key regardless of its value. If you specify a tag key with an empty string as the tag value, we delete the tag only if its value is an empty string.

If you omit this parameter, we delete all user-defined tags for the specified resources. We do not delete Amazon Web Services-generated tags (tags that have the aws: prefix).

Constraints: Up to 1000 tags.

Output

DeleteTagsOutput dataclass

Bases: _SerdeShape

Dataclass for DeleteTagsOutput structure.

Attributes

response_metadata class-attribute instance-attribute
response_metadata: ResponseMetadata = ...

Metadata about the response that produced this output. Use this to recover the request identifiers a service's support team needs in order to investigate a call. Members of the metadata are individually optional.