Skip to content

untag_resource

untag_resource(
    resource_arn: str,
    tag_keys: TagKeys,
    *,
    config_overrides: Optional[BraketClientConfig] = None,
) -> UntagResourceResponse

Remove tags from a resource.

Parameters:

  • resource_arn (str) –

    Specify the resourceArn for the resource from which to remove the tags.

  • tag_keys (TagKeys) –

    Specify the keys for the tags to remove from the resource.

Raises:

Source code in docs_src/capo_braket/_services/braket.py
def untag_resource(
    self,
    resource_arn: str,
    tag_keys: "capo_braket.types.tag_keys.TagKeys",
    *,
    config_overrides: Optional[BraketClientConfig] = None,
) -> "capo_braket.types.untag_resource_response.UntagResourceResponse":
    """<p>Remove tags from a resource.</p>

    Args:
        resource_arn: <p>Specify the <code>resourceArn</code> for the resource from which to remove the tags.</p>
        tag_keys: <p>Specify the keys for the tags to remove from the resource.</p>

    Raises:
        capo_braket.errors.internal_service_exception.InternalServiceException: <p>The request failed because of an unknown error.</p>
        capo_braket.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource was not found.</p>
        capo_braket.errors.validation_exception.ValidationException: <p>The input request failed to satisfy constraints expected by Amazon Braket.</p>
        capo_braket.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

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

        output, http_response = (
            capo_braket._operations.braket.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_braket.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