Skip to content

untag_resource async

untag_resource(
    resource_arn: str,
    tag_keys: StringList,
    *,
    config_overrides: Optional[AsyncResourceExplorer2ClientConfig] = None,
) -> UntagResourceOutput

Removes one or more tag key and value pairs from an Amazon Web Services Resource Explorer view or index.

Parameters:

  • resource_arn (str) –

    The Amazon Resource Name (ARN) of the view or index that you want to remove tags from.

  • tag_keys (StringList) –

    A list of the keys for the tags that you want to remove from the specified view or index.

Raises:

Source code in docs_src/capo_resource_explorer_2/_services/async_resource_explorer2.py
async def untag_resource(
    self,
    resource_arn: str,
    tag_keys: "capo_resource_explorer_2.types.string_list.StringList",
    *,
    config_overrides: Optional[AsyncResourceExplorer2ClientConfig] = None,
) -> "capo_resource_explorer_2.types.untag_resource_output.UntagResourceOutput":
    """<p>Removes one or more tag key and value pairs from an Amazon Web Services Resource Explorer view or index.</p>

    Args:
        resource_arn: <p>The Amazon Resource Name (ARN) of the view or index that you want to remove tags from.</p>
        tag_keys: <p>A list of the keys for the tags that you want to remove from the specified view or index.</p>

    Raises:
        capo_resource_explorer_2.errors.access_denied_exception.AccessDeniedException: <p>The credentials that you used to call this operation don't have the minimum required permissions.</p>
        capo_resource_explorer_2.errors.internal_server_exception.InternalServerException: <p>The request failed because of internal service error. Try your request again later.</p>
        capo_resource_explorer_2.errors.resource_not_found_exception.ResourceNotFoundException: <p>You specified a resource that doesn't exist. Check the ID or ARN that you used to identity the resource, and try again.</p>
        capo_resource_explorer_2.errors.throttling_exception.ThrottlingException: <p>The request failed because you exceeded a rate limit for this operation. For more information, see <a href="https://docs.aws.amazon.com/resource-explorer/latest/userguide/quotas.html">Quotas for Resource Explorer</a>.</p>
        capo_resource_explorer_2.errors.unauthorized_exception.UnauthorizedException: <p>The principal making the request isn't permitted to perform the operation.</p>
        capo_resource_explorer_2.errors.validation_exception.ValidationException: <p>You provided an invalid value for one of the operation's parameters. Check the syntax for the operation, and try again.</p>
        capo_resource_explorer_2.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

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

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

    def _redact_input(
        input_: "capo_resource_explorer_2.types.untag_resource_input.UntagResourceInput",
    ) -> dict[str, Any]:
        import capo_resource_explorer_2.types.untag_resource_input

        return capo_resource_explorer_2.types.untag_resource_input.redact_sensitive(
            input_
        )

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