Skip to content

update_clone async

update_clone(
    domain_name: DomainName,
    *,
    config_overrides: Optional[AsyncElasticsearchServiceClientConfig] = None,
    traffic_split_options: Optional[TrafficSplitRequestOptions] = None,
    cutover_options: Optional[CutoverRequestOptions] = None,
    retention_options: Optional[RetentionOptions] = None,
) -> UpdateCloneResponse

Manages a cloned blue/green upgrade that is in progress on a domain. Use it to shift a percentage of search traffic to the cloned cluster, to cut over to the cloned cluster or back to the primary cluster, or to change the retention period. Specify exactly one of TrafficSplitOptions, CutoverOptions, or RetentionOptions in each request.

Parameters:

  • domain_name (DomainName) –

    The name of the domain that has a cloned blue/green upgrade in progress.

  • traffic_split_options (Optional[TrafficSplitRequestOptions], default: None ) –

    Shifts a percentage of search traffic from the primary cluster to the cloned cluster.

  • cutover_options (Optional[CutoverRequestOptions], default: None ) –

    Cuts the domain over to the cloned cluster or back to the primary cluster.

  • retention_options (Optional[RetentionOptions], default: None ) –

    Changes the retention period, or ends it after cutover completes.

Raises:

  • BaseException –

    An error occurred while processing the request.

  • DisabledOperationException –

    An error occured because the client wanted to access a not supported operation. Gives http status code of 409.

  • InternalException –

    The request processing has failed because of an unknown error, exception or failure (the failure is internal to the service) . Gives http status code of 500.

  • ResourceNotFoundException –

    An exception for accessing or deleting a resource that does not exist. Gives http status code of 400.

  • 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/async_elasticsearch_service.py
async def update_clone(
    self,
    domain_name: "capo_elasticsearch_service.types.domain_name.DomainName",
    *,
    config_overrides: Optional[AsyncElasticsearchServiceClientConfig] = None,
    traffic_split_options: Optional[
        "capo_elasticsearch_service.types.traffic_split_request_options.TrafficSplitRequestOptions"
    ] = None,
    cutover_options: Optional[
        "capo_elasticsearch_service.types.cutover_request_options.CutoverRequestOptions"
    ] = None,
    retention_options: Optional[
        "capo_elasticsearch_service.types.retention_options.RetentionOptions"
    ] = None,
) -> "capo_elasticsearch_service.types.update_clone_response.UpdateCloneResponse":
    """<p>Manages a cloned blue/green upgrade that is in progress on a domain. Use it to shift a percentage of search traffic to the cloned cluster, to cut over to the cloned cluster or back to the primary cluster, or to change the retention period. Specify exactly one of <code>TrafficSplitOptions</code>, <code>CutoverOptions</code>, or <code>RetentionOptions</code> in each request.</p>

    Args:
        domain_name: <p>The name of the domain that has a cloned blue/green upgrade in progress.</p>
        traffic_split_options: <p>Shifts a percentage of search traffic from the primary cluster to the cloned cluster.</p>
        cutover_options: <p>Cuts the domain over to the cloned cluster or back to the primary cluster.</p>
        retention_options: <p>Changes the retention period, or ends it after cutover completes.</p>

    Raises:
        capo_elasticsearch_service.errors.base_exception.BaseException: <p>An error occurred while processing the request.</p>
        capo_elasticsearch_service.errors.disabled_operation_exception.DisabledOperationException: <p>An error occured because the client wanted to access a not supported operation. Gives http status code of 409.</p>
        capo_elasticsearch_service.errors.internal_exception.InternalException: <p>The request processing has failed because of an unknown error, exception or failure (the failure is internal to the service) . Gives http status code of 500.</p>
        capo_elasticsearch_service.errors.resource_not_found_exception.ResourceNotFoundException: <p>An exception for accessing or deleting a resource that does not exist. Gives http status code of 400.</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.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_elasticsearch_service.types.update_clone_request.UpdateCloneRequest]",
    ) -> AsyncOperationResponse[
        "capo_elasticsearch_service.types.update_clone_response.UpdateCloneResponse"
    ]:
        import capo_elasticsearch_service._operations.amazon_elasticsearch_service2015.update_clone

        (
            output,
            http_response,
        ) = await capo_elasticsearch_service._operations.amazon_elasticsearch_service2015.update_clone.async_update_clone(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdateClone")
    )
    input_: capo_elasticsearch_service.types.update_clone_request.UpdateCloneRequest = {
        "domain_name": domain_name
    }
    if traffic_split_options is not None:
        input_["traffic_split_options"] = traffic_split_options
    if cutover_options is not None:
        input_["cutover_options"] = cutover_options
    if retention_options is not None:
        input_["retention_options"] = retention_options

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