Skip to content

untag_resource

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

Removes the tags with the specified keys from the specified resource. Tags are key:value pairs that you can use to categorize and manage your resources, for purposes like billing. For example, you might set the tag key to "customer" and the value to the customer name or ID. You can specify one or more tags to add to each Amazon Web Services resource, up to 50 tags for a resource.

You can manage tags for the Amazon Web Services resources that you manage through Network Firewall: firewalls, firewall policies, and rule groups.

Parameters:

  • resource_arn (ResourceArn) –

    The Amazon Resource Name (ARN) of the resource.

  • tag_keys (TagKeyList) –

Raises:

  • InternalServerError –

    Your request is valid, but Network Firewall couldn't perform the operation because of a system problem. Retry your request.

  • InvalidRequestException –

    The operation failed because of a problem with your request. Examples include:

    • You specified an unsupported parameter name or value.

    • You tried to update a property with a value that isn't among the available types.

    • Your request references an ARN that is malformed, or corresponds to a resource that isn't valid in the context of the request.

  • ResourceNotFoundException –

    Unable to locate a resource using the parameters that you provided.

  • ThrottlingException –

    Unable to process the request due to throttling limitations.

  • UnknownServiceError –

    The service returned an error code this client does not model.

Source code in docs_src/capo_network_firewall/_services/network_firewall.py
def untag_resource(
    self,
    resource_arn: "capo_network_firewall.types.resource_arn.ResourceArn",
    tag_keys: "capo_network_firewall.types.tag_key_list.TagKeyList",
    *,
    config_overrides: Optional[NetworkFirewallClientConfig] = None,
) -> "capo_network_firewall.types.untag_resource_response.UntagResourceResponse":
    """<p>Removes the tags with the specified keys from the specified resource. Tags are key:value pairs that you can use to categorize and manage your resources, for purposes like billing. For example, you might set the tag key to "customer" and the value to the customer name or ID. You can specify one or more tags to add to each Amazon Web Services resource, up to 50 tags for a resource.</p> <p>You can manage tags for the Amazon Web Services resources that you manage through Network Firewall: firewalls, firewall policies, and rule groups. </p>

    Args:
        resource_arn: <p>The Amazon Resource Name (ARN) of the resource.</p>
        tag_keys: <p></p>

    Raises:
        capo_network_firewall.errors.internal_server_error.InternalServerError: <p>Your request is valid, but Network Firewall couldn't perform the operation because of a system problem. Retry your request. </p>
        capo_network_firewall.errors.invalid_request_exception.InvalidRequestException: <p>The operation failed because of a problem with your request. Examples include: </p> <ul> <li> <p>You specified an unsupported parameter name or value.</p> </li> <li> <p>You tried to update a property with a value that isn't among the available types.</p> </li> <li> <p>Your request references an ARN that is malformed, or corresponds to a resource that isn't valid in the context of the request.</p> </li> </ul>
        capo_network_firewall.errors.resource_not_found_exception.ResourceNotFoundException: <p>Unable to locate a resource using the parameters that you provided.</p>
        capo_network_firewall.errors.throttling_exception.ThrottlingException: <p>Unable to process the request due to throttling limitations.</p>
        capo_network_firewall.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

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

        output, http_response = (
            capo_network_firewall._operations.network_firewall_20201112.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_network_firewall.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