Skip to content

untag_resource

untag_resource(
    resource_arn: __string,
    *,
    config_overrides: Optional[PinpointClientConfig] = None,
    tag_keys: Optional[ListOf__string] = None,
) -> None

Removes one or more tags (keys and values) from an application, campaign, message template, or segment.

Parameters:

  • resource_arn (__string) –

    The Amazon Resource Name (ARN) of the resource.

  • tag_keys (Optional[ListOf__string], default: None ) –

    The key of the tag to remove from the resource. To remove multiple tags, append the tagKeys parameter and argument for each additional tag to remove, separated by an ampersand (&).

Raises:

Source code in docs_src/capo_pinpoint/_services/pinpoint.py
def untag_resource(
    self,
    resource_arn: "capo_pinpoint.types.__string.__string",
    *,
    config_overrides: Optional[PinpointClientConfig] = None,
    tag_keys: Optional["capo_pinpoint.types.list_of__string.ListOf__string"] = None,
) -> None:
    """<p>Removes one or more tags (keys and values) from an application, campaign, message template, or segment.</p>

    Args:
        resource_arn: <p>The Amazon Resource Name (ARN) of the resource.</p>
        tag_keys: <p>The key of the tag to remove from the resource. To remove multiple tags, append the tagKeys parameter and argument for each additional tag to remove, separated by an ampersand (&amp;).</p>

    Raises:
        capo_pinpoint.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_pinpoint.types.untag_resource_request.UntagResourceRequest]",
    ) -> OperationResponse[None]:
        import capo_pinpoint._operations.pinpoint.untag_resource

        output, http_response = (
            capo_pinpoint._operations.pinpoint.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_pinpoint.types.untag_resource_request.UntagResourceRequest = {
        "resource_arn": resource_arn
    }
    if tag_keys is not None:
        input_["tag_keys"] = tag_keys

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output