Skip to content

update_availability_options async

update_availability_options(
    domain_name: DomainName,
    multi_az: Boolean,
    *,
    config_overrides: Optional[AsyncCloudSearchClientConfig] = None,
) -> UpdateAvailabilityOptionsResponse

Configures the availability options for a domain. Enabling the Multi-AZ option expands an Amazon CloudSearch domain to an additional Availability Zone in the same Region to increase fault tolerance in the event of a service disruption. Changes to the Multi-AZ option can take about half an hour to become active. For more information, see Configuring Availability Options in the Amazon CloudSearch Developer Guide.

Parameters:

  • multi_az (Boolean) –

    You expand an existing search domain to a second Availability Zone by setting the Multi-AZ option to true. Similarly, you can turn off the Multi-AZ option to downgrade the domain to a single Availability Zone by setting the Multi-AZ option to false.

Raises:

Source code in docs_src/capo_cloudsearch/_services/async_cloud_search.py
async def update_availability_options(
    self,
    domain_name: "capo_cloudsearch.types.domain_name.DomainName",
    multi_az: "capo_cloudsearch.types.boolean.Boolean",
    *,
    config_overrides: Optional[AsyncCloudSearchClientConfig] = None,
) -> "capo_cloudsearch.types.update_availability_options_response.UpdateAvailabilityOptionsResponse":
    """<p>Configures the availability options for a domain. Enabling the Multi-AZ option expands an Amazon CloudSearch domain to an additional Availability Zone in the same Region to increase fault tolerance in the event of a service disruption. Changes to the Multi-AZ option can take about half an hour to become active. For more information, see <a href="http://docs.aws.amazon.com/cloudsearch/latest/developerguide/configuring-availability-options.html" target="_blank">Configuring Availability Options</a> in the <i>Amazon CloudSearch Developer Guide</i>.</p>

    Args:
        multi_az: <p>You expand an existing search domain to a second Availability Zone by setting the Multi-AZ option to true. Similarly, you can turn off the Multi-AZ option to downgrade the domain to a single Availability Zone by setting the Multi-AZ option to <code>false</code>. </p>

    Raises:
        capo_cloudsearch.errors.base_exception.BaseException: <p>An error occurred while processing the request.</p>
        capo_cloudsearch.errors.disabled_operation_exception.DisabledOperationException: <p>The request was rejected because it attempted an operation which is not enabled.</p>
        capo_cloudsearch.errors.internal_exception.InternalException: <p>An internal error occurred while processing the request. If this problem persists, report an issue from the <a href="http://status.aws.amazon.com/" target="_blank">Service Health Dashboard</a>.</p>
        capo_cloudsearch.errors.invalid_type_exception.InvalidTypeException: <p>The request was rejected because it specified an invalid type definition.</p>
        capo_cloudsearch.errors.limit_exceeded_exception.LimitExceededException: <p>The request was rejected because a resource limit has already been met.</p>
        capo_cloudsearch.errors.resource_not_found_exception.ResourceNotFoundException: <p>The request was rejected because it attempted to reference a resource that does not exist.</p>
        capo_cloudsearch.errors.validation_exception.ValidationException: <p>The request was rejected because it has invalid parameters.</p>
        capo_cloudsearch.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_cloudsearch.types.update_availability_options_request.UpdateAvailabilityOptionsRequest]",
    ) -> AsyncOperationResponse[
        "capo_cloudsearch.types.update_availability_options_response.UpdateAvailabilityOptionsResponse"
    ]:
        import capo_cloudsearch._operations.a9_search_cloud_config_service2013.update_availability_options

        (
            output,
            http_response,
        ) = await capo_cloudsearch._operations.a9_search_cloud_config_service2013.update_availability_options.async_update_availability_options(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdateAvailabilityOptions")
    )
    input_: capo_cloudsearch.types.update_availability_options_request.UpdateAvailabilityOptionsRequest = {
        "domain_name": domain_name,
        "multi_az": multi_az,
    }

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