Skip to content

untag_resource

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

Disassociates tags from an Amazon Q Apps resource.

Parameters:

  • resource_arn (AmazonResourceName) –

    The Amazon Resource Name (ARN) of the resource to disassociate the tag from.

  • tag_keys (TagKeys) –

    The keys of the tags to disassociate from the resource.

Raises:

Examples:

A call to untag a resource

>>> client.untag_resource(resource_arn='arn:aws:qapps:us-west-2:123456789012:application/3642ba81-344c-42fd-a480-9119a5a5f26b/qapp/7212ff04-de7b-4831-bd80-45d6975ba1b0', tag_keys=['department'])
Source code in docs_src/capo_qapps/_services/q_apps.py
def untag_resource(
    self,
    resource_arn: "capo_qapps.types.amazon_resource_name.AmazonResourceName",
    tag_keys: "capo_qapps.types.tag_keys.TagKeys",
    *,
    config_overrides: Optional[QAppsClientConfig] = None,
) -> "capo_qapps.types.untag_resource_response.UntagResourceResponse":
    """<p>Disassociates tags from an Amazon Q Apps resource.</p>

    Args:
        resource_arn: <p>The Amazon Resource Name (ARN) of the resource to disassociate the tag from.</p>
        tag_keys: <p>The keys of the tags to disassociate from the resource.</p>

    Raises:
        capo_qapps.errors.access_denied_exception.AccessDeniedException: <p>The client is not authorized to perform the requested operation.</p>
        capo_qapps.errors.internal_server_exception.InternalServerException: <p>An internal service error occurred while processing the request.</p>
        capo_qapps.errors.resource_not_found_exception.ResourceNotFoundException: <p>The requested resource could not be found.</p>
        capo_qapps.errors.throttling_exception.ThrottlingException: <p>The requested operation could not be completed because too many requests were sent at once. Wait a bit and try again later.</p>
        capo_qapps.errors.validation_exception.ValidationException: <p>The input failed to satisfy the constraints specified by the service.</p>
        capo_qapps.errors.UnknownServiceError: The service returned an error code this client does not model.

    Examples:
        A call to untag a resource

        >>> client.untag_resource(resource_arn='arn:aws:qapps:us-west-2:123456789012:application/3642ba81-344c-42fd-a480-9119a5a5f26b/qapp/7212ff04-de7b-4831-bd80-45d6975ba1b0', tag_keys=['department'])
    """

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

        output, http_response = (
            capo_qapps._operations.q_apps_service.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_qapps.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