Product Documentation

FairCom Replication JSON RPC API

Previous Topic

Next Topic

ctMemphisPersistReplicasToAvailGroup

int ctMemphisPersistReplicasToAvailGroup( pRCESJson request, ppRCESJson result )

Description:

Define replica(s) to an Availability Group. It removes the current Replica list and persist the new list. If the Availability Group is already deployed and/or started, it will try to automatically make the adjustments on-the-fly.

HTTP URL: <baseURL>/ctMemphisPersistReplicasToAvailGroup/

HTTP Verb: POST

Constraints:

  • id must be an existing AvailGroup ID
  • all replicaList/dbEngine must be existing DBEngine IDs
  • all replicaList/publication must be existing Publication IDs

Parameters:

  • request [IN] - Add Replicas to Avail Group request in JSON format. For example:

{

"id": 0, // required, existing availability group ID

"replicaList": [ // required

{

"dbEngine": 0, // required, existing DBEngine ID

"publication": 0 // required in case of primary, ignored otherwise

"isPrimary": true, // optional, if not passed, assume FALSE (secondary)

"isSync": true, // optional, if not passed, assume FALSE (async)

},

{

"isPrimary": false, // optional, if not passed, assumes false

(secondary replica)

"isSync": true,

"dbEngine": 3

},

{

"isPrimary": false,

"isSync": false,

"dbEngine": 63

}

]

}

  • result [OUT] - Result in JSON format. For example:

{

"success": true,

"error":

{

"errorCode": 0,

"message": "Success"

}

}

Return:

Error code

TOCIndex