Skip to content

update_clone async

update_clone(
    domain_name: DomainName,
    *,
    config_overrides: Optional[AsyncOpenSearchClientConfig] = 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:

Source code in docs_src/capo_opensearch/_services/async_open_search.py
async def update_clone(
    self,
    domain_name: "capo_opensearch.types.domain_name.DomainName",
    *,
    config_overrides: Optional[AsyncOpenSearchClientConfig] = None,
    traffic_split_options: Optional[
        "capo_opensearch.types.traffic_split_request_options.TrafficSplitRequestOptions"
    ] = None,
    cutover_options: Optional[
        "capo_opensearch.types.cutover_request_options.CutoverRequestOptions"
    ] = None,
    retention_options: Optional[
        "capo_opensearch.types.retention_options.RetentionOptions"
    ] = None,
) -> "capo_opensearch.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_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.update_clone_request.UpdateCloneRequest]",
    ) -> AsyncOperationResponse[
        "capo_opensearch.types.update_clone_response.UpdateCloneResponse"
    ]:
        import capo_opensearch._operations.amazon_open_search_service.update_clone

        (
            output,
            http_response,
        ) = await capo_opensearch._operations.amazon_open_search_service.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_opensearch.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