Skip to content

list_domain_names

list_domain_names(
    *,
    config_overrides: Optional[ElasticsearchServiceClientConfig] = None,
    engine_type: Optional[EngineType] = None,
) -> ListDomainNamesResponse

Returns the name of all Elasticsearch domains owned by the current user's account.

Parameters:

  • engine_type (Optional[EngineType], default: None ) –

    Optional parameter to filter the output by domain engine type. Acceptable values are 'Elasticsearch' and 'OpenSearch'.

Raises:

  • BaseException –

    An error occurred while processing the request.

  • ValidationException –

    An exception for missing / invalid input fields. Gives http status code of 400.

  • UnknownServiceError –

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

Source code in docs_src/capo_elasticsearch_service/_services/elasticsearch_service.py
def list_domain_names(
    self,
    *,
    config_overrides: Optional[ElasticsearchServiceClientConfig] = None,
    engine_type: Optional[
        "capo_elasticsearch_service.types.engine_type.EngineType"
    ] = None,
) -> "capo_elasticsearch_service.types.list_domain_names_response.ListDomainNamesResponse":
    """<p>Returns the name of all Elasticsearch domains owned by the current user's account. </p>

    Args:
        engine_type: <p> Optional parameter to filter the output by domain engine type. Acceptable values are 'Elasticsearch' and 'OpenSearch'. </p>

    Raises:
        capo_elasticsearch_service.errors.base_exception.BaseException: <p>An error occurred while processing the request.</p>
        capo_elasticsearch_service.errors.validation_exception.ValidationException: <p>An exception for missing / invalid input fields. Gives http status code of 400.</p>
        capo_elasticsearch_service.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_elasticsearch_service.types.list_domain_names_request.ListDomainNamesRequest]",
    ) -> OperationResponse[
        "capo_elasticsearch_service.types.list_domain_names_response.ListDomainNamesResponse"
    ]:
        import capo_elasticsearch_service._operations.amazon_elasticsearch_service2015.list_domain_names

        output, http_response = (
            capo_elasticsearch_service._operations.amazon_elasticsearch_service2015.list_domain_names.list_domain_names(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListDomainNames")
    )
    input_: capo_elasticsearch_service.types.list_domain_names_request.ListDomainNamesRequest = {}
    if engine_type is not None:
        input_["engine_type"] = engine_type

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