Skip to content

untag_resource

untag_resource(
    resource_arn: Arn,
    tag_keys: TagKeyList,
    *,
    config_overrides: Optional[NetworkMonitorClientConfig] = None,
) -> UntagResourceOutput

Removes a key-value pair from a monitor or probe.

Parameters:

  • resource_arn (Arn) –

    The ARN of the monitor or probe that the tag should be removed from.

  • tag_keys (TagKeyList) –

    The key-value pa

Raises:

Source code in docs_src/capo_networkmonitor/_services/network_monitor.py
def untag_resource(
    self,
    resource_arn: "capo_networkmonitor.types.arn.Arn",
    tag_keys: "capo_networkmonitor.types.tag_key_list.TagKeyList",
    *,
    config_overrides: Optional[NetworkMonitorClientConfig] = None,
) -> "capo_networkmonitor.types.untag_resource_output.UntagResourceOutput":
    """<p>Removes a key-value pair from a monitor or probe.</p>

    Args:
        resource_arn: <p>The ARN of the monitor or probe that the tag should be removed from. </p>
        tag_keys: <p>The key-value pa</p>

    Raises:
        capo_networkmonitor.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action.</p>
        capo_networkmonitor.errors.conflict_exception.ConflictException: <p>This operation attempted to create a resource that already exists.</p>
        capo_networkmonitor.errors.internal_server_exception.InternalServerException: <p>The request processing has failed because of an unknown error, exception or failure.</p>
        capo_networkmonitor.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource does not exist.</p>
        capo_networkmonitor.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling</p>
        capo_networkmonitor.errors.validation_exception.ValidationException: <p>One of the parameters for the request is not valid.</p>
        capo_networkmonitor.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_networkmonitor.types.untag_resource_input.UntagResourceInput]",
    ) -> OperationResponse[
        "capo_networkmonitor.types.untag_resource_output.UntagResourceOutput"
    ]:
        import capo_networkmonitor._operations.network_monitor.untag_resource

        output, http_response = (
            capo_networkmonitor._operations.network_monitor.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_networkmonitor.types.untag_resource_input.UntagResourceInput = {
        "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