Skip to content

untag_resource async

untag_resource(
    resource_arn: __string,
    *,
    config_overrides: Optional[AsyncKafkaClientConfig] = None,
    tag_keys: Optional[__listOf__string] = None,
) -> None

Removes the tags associated with the keys that are provided in the query.

Parameters:

  • resource_arn (__string) –

    The Amazon Resource Name (ARN) that uniquely identifies the resource that's associated with the tags.

  • tag_keys (Optional[__listOf__string], default: None ) –

    Tag keys must be unique for a given cluster. In addition, the following restrictions apply:

    • Each tag key must be unique. If you add a tag with a key that's already in use, your new tag overwrites the existing key-value pair.

    • You can't start a tag key with aws: because this prefix is reserved for use by AWS. AWS creates tags that begin with this prefix on your behalf, but you can't edit or delete them.

    • Tag keys must be between 1 and 128 Unicode characters in length.

    • Tag keys must consist of the following characters: Unicode letters, digits, white space, and the following special characters: _ . / = + - @.

Raises:

Source code in docs_src/capo_kafka/_services/async_kafka.py
async def untag_resource(
    self,
    resource_arn: "capo_kafka.types.__string.__string",
    *,
    config_overrides: Optional[AsyncKafkaClientConfig] = None,
    tag_keys: Optional[
        "capo_kafka.types.__list_of__string.__listOf__string"
    ] = None,
) -> None:
    """<p>Removes the tags associated with the keys that are provided in the query.</p>

    Args:
        resource_arn: <p>The Amazon Resource Name (ARN) that uniquely identifies the resource that's associated with the tags.</p>
        tag_keys: <p>Tag keys must be unique for a given cluster. In addition, the following restrictions apply:</p> <ul> <li> <p>Each tag key must be unique. If you add a tag with a key that's already in use, your new tag overwrites the existing key-value pair. </p> </li> <li> <p>You can't start a tag key with aws: because this prefix is reserved for use by AWS. AWS creates tags that begin with this prefix on your behalf, but you can't edit or delete them.</p> </li> <li> <p>Tag keys must be between 1 and 128 Unicode characters in length.</p> </li> <li> <p>Tag keys must consist of the following characters: Unicode letters, digits, white space, and the following special characters: _ . / = + - @.</p> </li> </ul>

    Raises:
        capo_kafka.errors.bad_request_exception.BadRequestException: <p>Returns information about an error.</p>
        capo_kafka.errors.internal_server_error_exception.InternalServerErrorException: <p>Returns information about an error.</p>
        capo_kafka.errors.not_found_exception.NotFoundException: <p>Returns information about an error.</p>
        capo_kafka.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_kafka.types.untag_resource_request.UntagResourceRequest]",
    ) -> AsyncOperationResponse[None]:
        import capo_kafka._operations.kafka.untag_resource

        (
            output,
            http_response,
        ) = await capo_kafka._operations.kafka.untag_resource.async_untag_resource(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UntagResource")
    )
    input_: capo_kafka.types.untag_resource_request.UntagResourceRequest = {
        "resource_arn": resource_arn
    }
    if tag_keys is not None:
        input_["tag_keys"] = tag_keys

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output