Skip to content

untag_resource async

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

Remove a tag from a Step Functions resource

Parameters:

  • resource_arn (Arn) –

    The Amazon Resource Name (ARN) for the Step Functions state machine or activity.

  • tag_keys (TagKeyList) –

    The list of tags to remove from the resource.

Raises:

Source code in docs_src/capo_sfn/_services/async_sfn.py
async def untag_resource(
    self,
    resource_arn: "capo_sfn.types.arn.Arn",
    tag_keys: "capo_sfn.types.tag_key_list.TagKeyList",
    *,
    config_overrides: Optional[AsyncSFNClientConfig] = None,
) -> "capo_sfn.types.untag_resource_output.UntagResourceOutput":
    """<p>Remove a tag from a Step Functions resource</p>

    Args:
        resource_arn: <p>The Amazon Resource Name (ARN) for the Step Functions state machine or activity.</p>
        tag_keys: <p>The list of tags to remove from the resource.</p>

    Raises:
        capo_sfn.errors.invalid_arn.InvalidArn: <p>The provided Amazon Resource Name (ARN) is not valid.</p>
        capo_sfn.errors.resource_not_found.ResourceNotFound: <p>Could not find the referenced resource.</p>
        capo_sfn.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_sfn.types.untag_resource_input.UntagResourceInput]",
    ) -> AsyncOperationResponse[
        "capo_sfn.types.untag_resource_output.UntagResourceOutput"
    ]:
        import capo_sfn._operations.aws_step_functions.untag_resource

        (
            output,
            http_response,
        ) = await capo_sfn._operations.aws_step_functions.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_sfn.types.untag_resource_input.UntagResourceInput = {
        "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