Skip to content

untag_resource async

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

Deletes the tags for a resource.

Parameters:

  • resource_arn (ResourceArn) –

    The Amazon Resource Name (ARN) of the resource from which you want to remove tags.

  • tag_keys (TagKeyList) –

    One or more tag keys. Specify only the tag keys, not the tag values.

Raises:

Source code in docs_src/capo_migrationhuborchestrator/_services/async_migration_hub_orchestrator.py
async def untag_resource(
    self,
    resource_arn: "capo_migrationhuborchestrator.types.resource_arn.ResourceArn",
    tag_keys: "capo_migrationhuborchestrator.types.tag_key_list.TagKeyList",
    *,
    config_overrides: Optional[AsyncMigrationHubOrchestratorClientConfig] = None,
) -> "capo_migrationhuborchestrator.types.untag_resource_response.UntagResourceResponse":
    """<p>Deletes the tags for a resource.</p>

    Args:
        resource_arn: <p>The Amazon Resource Name (ARN) of the resource from which you want to remove tags.</p>
        tag_keys: <p>One or more tag keys. Specify only the tag keys, not the tag values.</p>

    Raises:
        capo_migrationhuborchestrator.errors.resource_not_found_exception.ResourceNotFoundException: <p>The resource is not available.</p>
        capo_migrationhuborchestrator.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints specified by an AWS service.</p>
        capo_migrationhuborchestrator.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

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

        (
            output,
            http_response,
        ) = await capo_migrationhuborchestrator._operations.aws_migration_hub_orchestrator.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_migrationhuborchestrator.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