Skip to content

remove_tags

remove_tags(
    arn: ARN,
    tag_keys: StringList,
    *,
    config_overrides: Optional[OpenSearchClientConfig] = None,
) -> None

Removes the specified set of tags from an Amazon OpenSearch Service domain, data source, or application. For more information, see Tagging Amazon OpenSearch Service resources.

Parameters:

  • arn (ARN) –

    The Amazon Resource Name (ARN) of the domain, data source, or application from which you want to delete the specified tags.

  • tag_keys (StringList) –

    The list of tag keys to remove from the domain, data source, or application.

Raises:

  • BaseException –

    An error occurred while processing the request.

  • InternalException –

    Request processing failed because of an unknown error, exception, or internal failure.

  • ValidationException –

    An exception for accessing or deleting a resource that doesn't exist.

  • UnknownServiceError –

    The service returned an error code this client does not model.

Source code in docs_src/capo_opensearch/_services/open_search.py
def remove_tags(
    self,
    arn: "capo_opensearch.types.arn.ARN",
    tag_keys: "capo_opensearch.types.string_list.StringList",
    *,
    config_overrides: Optional[OpenSearchClientConfig] = None,
) -> None:
    """<p>Removes the specified set of tags from an Amazon OpenSearch Service domain, data source, or application. For more information, see <a href="https://docs.aws.amazon.com/opensearch-service/latest/developerguide/managedomains.html#managedomains-awsresorcetagging"> Tagging Amazon OpenSearch Service resources</a>.</p>

    Args:
        arn: <p>The Amazon Resource Name (ARN) of the domain, data source, or application from which you want to delete the specified tags.</p>
        tag_keys: <p>The list of tag keys to remove from the domain, data source, or application.</p>

    Raises:
        capo_opensearch.errors.base_exception.BaseException: <p>An error occurred while processing the request.</p>
        capo_opensearch.errors.internal_exception.InternalException: <p>Request processing failed because of an unknown error, exception, or internal failure.</p>
        capo_opensearch.errors.validation_exception.ValidationException: <p>An exception for accessing or deleting a resource that doesn't exist.</p>
        capo_opensearch.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_opensearch.types.remove_tags_request.RemoveTagsRequest]",
    ) -> OperationResponse[None]:
        import capo_opensearch._operations.amazon_open_search_service.remove_tags

        output, http_response = (
            capo_opensearch._operations.amazon_open_search_service.remove_tags.remove_tags(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("RemoveTags")
    )
    input_: capo_opensearch.types.remove_tags_request.RemoveTagsRequest = {
        "arn": arn,
        "tag_keys": tag_keys,
    }

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output