Skip to content

disconnect_recovery_instance

disconnect_recovery_instance(
    recovery_instance_id: RecoveryInstanceID,
    *,
    config_overrides: Optional[drsClientConfig] = None,
) -> None

Disconnect a Recovery Instance from Elastic Disaster Recovery. Data replication is stopped immediately. All AWS resources created by Elastic Disaster Recovery for enabling the replication of the Recovery Instance will be terminated / deleted within 90 minutes. If the agent on the Recovery Instance has not been prevented from communicating with the Elastic Disaster Recovery service, then it will receive a command to uninstall itself (within approximately 10 minutes). The following properties of the Recovery Instance will be changed immediately: dataReplicationInfo.dataReplicationState will be set to DISCONNECTED; The totalStorageBytes property for each of dataReplicationInfo.replicatedDisks will be set to zero; dataReplicationInfo.lagDuration and dataReplicationInfo.lagDuration will be nullified.

Parameters:

  • recovery_instance_id (RecoveryInstanceID) –

    The ID of the Recovery Instance to disconnect.

Raises:

Source code in docs_src/capo_drs/_services/drs.py
def disconnect_recovery_instance(
    self,
    recovery_instance_id: "capo_drs.types.recovery_instance_id.RecoveryInstanceID",
    *,
    config_overrides: Optional[drsClientConfig] = None,
) -> None:
    """<p>Disconnect a Recovery Instance from Elastic Disaster Recovery. Data replication is stopped immediately. All AWS resources created by Elastic Disaster Recovery for enabling the replication of the Recovery Instance will be terminated / deleted within 90 minutes. If the agent on the Recovery Instance has not been prevented from communicating with the Elastic Disaster Recovery service, then it will receive a command to uninstall itself (within approximately 10 minutes). The following properties of the Recovery Instance will be changed immediately: dataReplicationInfo.dataReplicationState will be set to DISCONNECTED; The totalStorageBytes property for each of dataReplicationInfo.replicatedDisks will be set to zero; dataReplicationInfo.lagDuration and dataReplicationInfo.lagDuration will be nullified.</p>

    Args:
        recovery_instance_id: <p>The ID of the Recovery Instance to disconnect.</p>

    Raises:
        capo_drs.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action.</p>
        capo_drs.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_drs.errors.internal_server_exception.InternalServerException: <p>The request processing has failed because of an unknown error, exception or failure.</p>
        capo_drs.errors.resource_not_found_exception.ResourceNotFoundException: <p>The resource for this operation was not found.</p>
        capo_drs.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling.</p>
        capo_drs.errors.uninitialized_account_exception.UninitializedAccountException: <p>The account performing the request has not been initialized.</p>
        capo_drs.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_drs.types.disconnect_recovery_instance_request.DisconnectRecoveryInstanceRequest]",
    ) -> OperationResponse[None]:
        import capo_drs._operations.elastic_disaster_recovery_service.disconnect_recovery_instance

        output, http_response = (
            capo_drs._operations.elastic_disaster_recovery_service.disconnect_recovery_instance.disconnect_recovery_instance(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DisconnectRecoveryInstance")
    )
    input_: capo_drs.types.disconnect_recovery_instance_request.DisconnectRecoveryInstanceRequest = {
        "recovery_instance_id": recovery_instance_id
    }

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output