Skip to content

untag_resource

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

Remove resource tags from a Greengrass Resource.

Parameters:

  • resource_arn (__string) –

    The Amazon Resource Name (ARN) of the resource.

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

    An array of tag keys to delete

Raises:

Source code in docs_src/capo_greengrass/_services/greengrass.py
def untag_resource(
    self,
    resource_arn: "capo_greengrass.types.__string.__string",
    *,
    config_overrides: Optional[GreengrassClientConfig] = None,
    tag_keys: Optional[
        "capo_greengrass.types.__list_of__string.__listOf__string"
    ] = None,
) -> None:
    """Remove resource tags from a Greengrass Resource.

    Args:
        resource_arn: The Amazon Resource Name (ARN) of the resource.
        tag_keys: An array of tag keys to delete

    Raises:
        capo_greengrass.errors.bad_request_exception.BadRequestException: General error information.
        capo_greengrass.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

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

        output, http_response = (
            capo_greengrass._operations.greengrass.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_greengrass.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