Deletes tags from a resource. You must provide the ARN of the resource from which you want to delete the tag or tags.
Parameters:
-
resource_name
(Optional[String], default:
None
)
–
The Amazon Resource Name (ARN) from which you want to remove the tag or tags. For example, arn:aws:redshift:us-east-2:123456789:cluster:t1.
-
tag_keys
(Optional[TagKeyList], default:
None
)
–
The tag key that you want to delete.
Raises:
Source code in docs_src/capo_redshift/_services/redshift.py
| def delete_tags(
self,
*,
config_overrides: Optional[RedshiftClientConfig] = None,
resource_name: Optional["capo_redshift.types.string.String"] = None,
tag_keys: Optional["capo_redshift.types.tag_key_list.TagKeyList"] = None,
) -> None:
"""<p>Deletes tags from a resource. You must provide the ARN of the resource from which you want to delete the tag or tags.</p>
Args:
resource_name: <p>The Amazon Resource Name (ARN) from which you want to remove the tag or tags. For example, <code>arn:aws:redshift:us-east-2:123456789:cluster:t1</code>. </p>
tag_keys: <p>The tag key that you want to delete.</p>
Raises:
capo_redshift.errors.invalid_tag_fault.InvalidTagFault: <p>The tag is invalid.</p>
capo_redshift.errors.resource_not_found_fault.ResourceNotFoundFault: <p>The resource could not be found.</p>
capo_redshift.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_redshift.types.delete_tags_message.DeleteTagsMessage]",
) -> OperationResponse[None]:
import capo_redshift._operations.redshift_service_version20121201.delete_tags
output, http_response = (
capo_redshift._operations.redshift_service_version20121201.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_redshift.types.delete_tags_message.DeleteTagsMessage = {}
if resource_name is not None:
input_["resource_name"] = resource_name
if tag_keys is not None:
input_["tag_keys"] = tag_keys
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|