Skip to content

untag_resource

untag_resource(
    resource_arn: AmazonResourceName,
    tag_keys: TagKeyList,
    *,
    config_overrides: Optional[TimestreamQueryClientConfig] = None,
) -> UntagResourceResponse

Removes the association of tags from a Timestream query resource.

Parameters:

  • resource_arn (AmazonResourceName) –

    The Timestream resource that the tags will be removed from. This value is an Amazon Resource Name (ARN).

  • tag_keys (TagKeyList) –

    A list of tags keys. Existing tags of the resource whose keys are members of this list will be removed from the Timestream resource.

Raises:

Source code in docs_src/capo_timestream_query/_services/timestream_query.py
def untag_resource(
    self,
    resource_arn: "capo_timestream_query.types.amazon_resource_name.AmazonResourceName",
    tag_keys: "capo_timestream_query.types.tag_key_list.TagKeyList",
    *,
    config_overrides: Optional[TimestreamQueryClientConfig] = None,
) -> "capo_timestream_query.types.untag_resource_response.UntagResourceResponse":
    """<p>Removes the association of tags from a Timestream query resource.</p>

    Args:
        resource_arn: <p>The Timestream resource that the tags will be removed from. This value is an Amazon Resource Name (ARN). </p>
        tag_keys: <p>A list of tags keys. Existing tags of the resource whose keys are members of this list will be removed from the Timestream resource. </p>

    Raises:
        capo_timestream_query.errors.invalid_endpoint_exception.InvalidEndpointException: <p>The requested endpoint is invalid.</p>
        capo_timestream_query.errors.resource_not_found_exception.ResourceNotFoundException: <p>The requested resource could not be found.</p>
        capo_timestream_query.errors.throttling_exception.ThrottlingException: <p>The request was throttled due to excessive requests.</p>
        capo_timestream_query.errors.validation_exception.ValidationException: <p> Invalid or malformed request. </p>
        capo_timestream_query.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_timestream_query.types.untag_resource_request.UntagResourceRequest]",
    ) -> OperationResponse[
        "capo_timestream_query.types.untag_resource_response.UntagResourceResponse"
    ]:
        import capo_timestream_query._operations.timestream_20181101.untag_resource

        output, http_response = (
            capo_timestream_query._operations.timestream_20181101.untag_resource.untag_resource(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UntagResource")
    )
    input_: capo_timestream_query.types.untag_resource_request.UntagResourceRequest = {
        "resource_arn": resource_arn,
        "tag_keys": tag_keys,
    }

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output