Skip to content

list_domain_maintenances async

list_domain_maintenances(
    domain_name: DomainName,
    *,
    config_overrides: Optional[AsyncOpenSearchClientConfig] = None,
    action: Optional[MaintenanceType] = None,
    status: Optional[MaintenanceStatus] = None,
    max_results: Optional[MaxResults] = None,
    next_token: Optional[NextToken] = None,
) -> ListDomainMaintenancesResponse

A list of maintenance actions for the domain.

Parameters:

  • domain_name (DomainName) –

    The name of the domain.

  • action (Optional[MaintenanceType], default: None ) –

    The name of the action.

  • status (Optional[MaintenanceStatus], default: None ) –

    The status of the action.

  • max_results (Optional[MaxResults], default: None ) –

    An optional parameter that specifies the maximum number of results to return. You can use nextToken to get the next page of results.

  • next_token (Optional[NextToken], default: None ) –

    If your initial ListDomainMaintenances operation returns a nextToken, include the returned nextToken in subsequent ListDomainMaintenances operations, which returns results in the next page.

Raises:

Source code in docs_src/capo_opensearch/_services/async_open_search.py
async def list_domain_maintenances(
    self,
    domain_name: "capo_opensearch.types.domain_name.DomainName",
    *,
    config_overrides: Optional[AsyncOpenSearchClientConfig] = None,
    action: Optional[
        "capo_opensearch.types.maintenance_type.MaintenanceType"
    ] = None,
    status: Optional[
        "capo_opensearch.types.maintenance_status.MaintenanceStatus"
    ] = None,
    max_results: Optional["capo_opensearch.types.max_results.MaxResults"] = None,
    next_token: Optional["capo_opensearch.types.next_token.NextToken"] = None,
) -> "capo_opensearch.types.list_domain_maintenances_response.ListDomainMaintenancesResponse":
    """<p>A list of maintenance actions for the domain.</p>

    Args:
        domain_name: <p>The name of the domain.</p>
        action: <p>The name of the action.</p>
        status: <p>The status of the action.</p>
        max_results: <p>An optional parameter that specifies the maximum number of results to return. You can use <code>nextToken</code> to get the next page of results.</p>
        next_token: <p>If your initial <code>ListDomainMaintenances</code> operation returns a <code>nextToken</code>, include the returned <code>nextToken</code> in subsequent <code>ListDomainMaintenances</code> operations, which returns results in the next page.</p>

    Raises:
        capo_opensearch.errors.base_exception.BaseException: <p>An error occurred while processing the request.</p>
        capo_opensearch.errors.disabled_operation_exception.DisabledOperationException: <p>An error occured because the client wanted to access an unsupported operation.</p>
        capo_opensearch.errors.internal_exception.InternalException: <p>Request processing failed because of an unknown error, exception, or internal failure.</p>
        capo_opensearch.errors.resource_not_found_exception.ResourceNotFoundException: <p>An exception for accessing or deleting a resource that doesn't exist.</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.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_opensearch.types.list_domain_maintenances_request.ListDomainMaintenancesRequest]",
    ) -> AsyncOperationResponse[
        "capo_opensearch.types.list_domain_maintenances_response.ListDomainMaintenancesResponse"
    ]:
        import capo_opensearch._operations.amazon_open_search_service.list_domain_maintenances

        (
            output,
            http_response,
        ) = await capo_opensearch._operations.amazon_open_search_service.list_domain_maintenances.async_list_domain_maintenances(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListDomainMaintenances")
    )
    input_: capo_opensearch.types.list_domain_maintenances_request.ListDomainMaintenancesRequest = {
        "domain_name": domain_name
    }
    if action is not None:
        input_["action"] = action
    if status is not None:
        input_["status"] = status
    if max_results is not None:
        input_["max_results"] = max_results
    if next_token is not None:
        input_["next_token"] = next_token

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output