Skip to content

untag_resource async

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

Removes a tag from the specified resource.

Parameters:

  • resource_arn (ResourceArn) –

    The Amazon Resource Name (ARN) of the resource whose tags are to be removed.

  • tag_keys (TagKeyList) –

    A list of tag key names to remove from the resource. You don't specify the value. Both the key and its associated value are removed.

    This parameter to the API requires a JSON text string argument. For information on how to format a JSON parameter for the various command line tool environments, see Using JSON for Parameters in the AWS CLI User Guide.

Raises:

Source code in docs_src/capo_iotthingsgraph/_services/async_io_t_things_graph.py
async def untag_resource(
    self,
    resource_arn: "capo_iotthingsgraph.types.resource_arn.ResourceArn",
    tag_keys: "capo_iotthingsgraph.types.tag_key_list.TagKeyList",
    *,
    config_overrides: Optional[AsyncIoTThingsGraphClientConfig] = None,
) -> "capo_iotthingsgraph.types.untag_resource_response.UntagResourceResponse":
    """<p>Removes a tag from the specified resource.</p>

    Args:
        resource_arn: <p>The Amazon Resource Name (ARN) of the resource whose tags are to be removed.</p>
        tag_keys: <p>A list of tag key names to remove from the resource. You don't specify the value. Both the key and its associated value are removed. </p> <p>This parameter to the API requires a JSON text string argument. For information on how to format a JSON parameter for the various command line tool environments, see <a href="https://docs.aws.amazon.com/cli/latest/userguide/cli-usage-parameters.html#cli-using-param-json">Using JSON for Parameters</a> in the <i>AWS CLI User Guide</i>. </p>

    Raises:
        capo_iotthingsgraph.errors.internal_failure_exception.InternalFailureException: <p></p>
        capo_iotthingsgraph.errors.invalid_request_exception.InvalidRequestException: <p></p>
        capo_iotthingsgraph.errors.resource_already_exists_exception.ResourceAlreadyExistsException: <p></p>
        capo_iotthingsgraph.errors.throttling_exception.ThrottlingException: <p></p>
        capo_iotthingsgraph.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_iotthingsgraph.types.untag_resource_request.UntagResourceRequest]",
    ) -> AsyncOperationResponse[
        "capo_iotthingsgraph.types.untag_resource_response.UntagResourceResponse"
    ]:
        import capo_iotthingsgraph._operations.iot_things_graph_front_end_service.untag_resource

        (
            output,
            http_response,
        ) = await capo_iotthingsgraph._operations.iot_things_graph_front_end_service.untag_resource.async_untag_resource(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UntagResource")
    )
    input_: capo_iotthingsgraph.types.untag_resource_request.UntagResourceRequest = {
        "resource_arn": resource_arn,
        "tag_keys": tag_keys,
    }

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output