Skip to content

untag_resource async

untag_resource(
    resource_arn: ARN,
    tag_keys: TagKeys,
    *,
    config_overrides: Optional[AsyncmgnClientConfig] = None,
) -> None

Deletes the specified set of tags from the specified set of Application Migration Service resources.

Parameters:

  • resource_arn (ARN) –

    Untag resource by ARN.

  • tag_keys (TagKeys) –

    Untag resource by Keys.

Raises:

Source code in docs_src/capo_mgn/_services/async_mgn.py
async def untag_resource(
    self,
    resource_arn: "capo_mgn.types.arn.ARN",
    tag_keys: "capo_mgn.types.tag_keys.TagKeys",
    *,
    config_overrides: Optional[AsyncmgnClientConfig] = None,
) -> None:
    """<p>Deletes the specified set of tags from the specified set of Application Migration Service resources.</p>

    Args:
        resource_arn: <p>Untag resource by ARN.</p>
        tag_keys: <p>Untag resource by Keys.</p>

    Raises:
        capo_mgn.errors.access_denied_exception.AccessDeniedException: <p>Operation denied due to a file permission or access check error.</p>
        capo_mgn.errors.internal_server_exception.InternalServerException: <p>The server encountered an unexpected condition that prevented it from fulfilling the request.</p>
        capo_mgn.errors.resource_not_found_exception.ResourceNotFoundException: <p>Resource not found exception.</p>
        capo_mgn.errors.throttling_exception.ThrottlingException: <p>Reached throttling quota exception.</p>
        capo_mgn.errors.validation_exception.ValidationException: <p>Validate exception.</p>
        capo_mgn.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_mgn.types.untag_resource_request.UntagResourceRequest]",
    ) -> AsyncOperationResponse[None]:
        import capo_mgn._operations.application_migration_service.untag_resource

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

    def _redact_input(
        input_: "capo_mgn.types.untag_resource_request.UntagResourceRequest",
    ) -> dict[str, Any]:
        import capo_mgn.types.untag_resource_request

        return capo_mgn.types.untag_resource_request.redact_sensitive(input_)

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging("UntagResource", redact_input=_redact_input),
    )
    input_: capo_mgn.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