Skip to content

untag_resource async

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

Remove one or more metadata tag from the specified Amazon Web Services resource.

Parameters:

  • resource_arn (SubscriptionProviderArn) –

    The Amazon Resource Name (ARN) of the Amazon Web Services resource to remove the metadata tags from.

  • tag_keys (TagKeyList) –

    A list of metadata tag keys to remove from the requested resource.

Raises:

Source code in docs_src/capo_license_manager_linux_subscriptions/_services/async_license_manager_linux_subscriptions.py
async def untag_resource(
    self,
    resource_arn: "capo_license_manager_linux_subscriptions.types.subscription_provider_arn.SubscriptionProviderArn",
    tag_keys: "capo_license_manager_linux_subscriptions.types.tag_key_list.TagKeyList",
    *,
    config_overrides: Optional[
        AsyncLicenseManagerLinuxSubscriptionsClientConfig
    ] = None,
) -> "capo_license_manager_linux_subscriptions.types.untag_resource_response.UntagResourceResponse":
    """<p>Remove one or more metadata tag from the specified Amazon Web Services resource.</p>

    Args:
        resource_arn: <p>The Amazon Resource Name (ARN) of the Amazon Web Services resource to remove the metadata tags from.</p>
        tag_keys: <p>A list of metadata tag keys to remove from the requested resource.</p>

    Raises:
        capo_license_manager_linux_subscriptions.errors.internal_server_exception.InternalServerException: <p>An exception occurred with the service.</p>
        capo_license_manager_linux_subscriptions.errors.resource_not_found_exception.ResourceNotFoundException: <p>Unable to find the requested Amazon Web Services resource.</p>
        capo_license_manager_linux_subscriptions.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

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

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

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

        return capo_license_manager_linux_subscriptions.types.untag_resource_request.redact_sensitive(
            input_
        )

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