Skip to content

untag_resource

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

Remove one or more tags (keys and values) from a specified application.

Parameters:

  • resource_arn (AmazonResourceName) –

    The Amazon Resource Name (ARN) of the application that you want to remove one or more tags from.

  • tag_keys (TagKeyList) –

    The tags (tag keys) that you want to remove from the resource. When you specify a tag key, the action removes both that key and its associated tag value.

    To remove more than one tag from the application, append the TagKeys parameter and argument for each additional tag to remove, separated by an ampersand.

Raises:

Source code in docs_src/capo_application_insights/_services/application_insights.py
def untag_resource(
    self,
    resource_arn: "capo_application_insights.types.amazon_resource_name.AmazonResourceName",
    tag_keys: "capo_application_insights.types.tag_key_list.TagKeyList",
    *,
    config_overrides: Optional[ApplicationInsightsClientConfig] = None,
) -> (
    "capo_application_insights.types.untag_resource_response.UntagResourceResponse"
):
    """<p>Remove one or more tags (keys and values) from a specified application.</p>

    Args:
        resource_arn: <p>The Amazon Resource Name (ARN) of the application that you want to remove one or more tags from.</p>
        tag_keys: <p>The tags (tag keys) that you want to remove from the resource. When you specify a tag key, the action removes both that key and its associated tag value.</p> <p>To remove more than one tag from the application, append the <code>TagKeys</code> parameter and argument for each additional tag to remove, separated by an ampersand. </p>

    Raises:
        capo_application_insights.errors.resource_not_found_exception.ResourceNotFoundException: <p>The resource does not exist in the customer account.</p>
        capo_application_insights.errors.validation_exception.ValidationException: <p>The parameter is not valid.</p>
        capo_application_insights.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

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

        output, http_response = (
            capo_application_insights._operations.ec2_windows_barley_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_application_insights.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