Skip to content

start_cutover async

start_cutover(
    source_server_i_ds: StartCutoverRequestSourceServerIDs,
    *,
    config_overrides: Optional[AsyncmgnClientConfig] = None,
    tags: Optional[TagsMap] = None,
    account_id: Optional[AccountID] = None,
) -> StartCutoverResponse

Launches a Cutover Instance for specific Source Servers. This command starts a LAUNCH job whose initiatedBy property is StartCutover and changes the SourceServer.lifeCycle.state property to CUTTING_OVER.

Parameters:

Raises:

Source code in docs_src/capo_mgn/_services/async_mgn.py
async def start_cutover(
    self,
    source_server_i_ds: "capo_mgn.types.start_cutover_request_source_server_i_ds.StartCutoverRequestSourceServerIDs",
    *,
    config_overrides: Optional[AsyncmgnClientConfig] = None,
    tags: Optional["capo_mgn.types.tags_map.TagsMap"] = None,
    account_id: Optional["capo_mgn.types.account_id.AccountID"] = None,
) -> "capo_mgn.types.start_cutover_response.StartCutoverResponse":
    """<p>Launches a Cutover Instance for specific Source Servers. This command starts a LAUNCH job whose initiatedBy property is StartCutover and changes the SourceServer.lifeCycle.state property to CUTTING_OVER.</p>

    Args:
        source_server_i_ds: <p>Start Cutover by Source Server IDs.</p>
        tags: <p>Start Cutover by Tags.</p>
        account_id: <p>Start Cutover by Account IDs</p>

    Raises:
        capo_mgn.errors.conflict_exception.ConflictException: <p>The request could not be completed due to a conflict with the current state of the target resource.</p>
        capo_mgn.errors.uninitialized_account_exception.UninitializedAccountException: <p>Uninitialized account exception.</p>
        capo_mgn.errors.validation_exception.ValidationException: <p>Validate exception.</p>
        capo_mgn.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_mgn.types.start_cutover_request.StartCutoverRequest]",
    ) -> AsyncOperationResponse[
        "capo_mgn.types.start_cutover_response.StartCutoverResponse"
    ]:
        import capo_mgn._operations.application_migration_service.start_cutover

        (
            output,
            http_response,
        ) = await capo_mgn._operations.application_migration_service.start_cutover.async_start_cutover(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    def _redact_input(
        input_: "capo_mgn.types.start_cutover_request.StartCutoverRequest",
    ) -> dict[str, Any]:
        import capo_mgn.types.start_cutover_request

        return capo_mgn.types.start_cutover_request.redact_sensitive(input_)

    def _redact_output(
        output: "capo_mgn.types.start_cutover_response.StartCutoverResponse",
    ) -> dict[str, Any]:
        import capo_mgn.types.start_cutover_response

        return capo_mgn.types.start_cutover_response.redact_sensitive(output)

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging(
            "StartCutover", redact_input=_redact_input, redact_output=_redact_output
        ),
    )
    input_: capo_mgn.types.start_cutover_request.StartCutoverRequest = {
        "source_server_i_ds": source_server_i_ds
    }
    if tags is not None:
        input_["tags"] = tags
    if account_id is not None:
        input_["account_id"] = account_id

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