Set Sync Settings
Scenario Overview
Once Geo H/A has been enabled the settings must be given to Crosscluster so it knows when and how to properly carry out various API calls. The client provides the modified payload in the below listed JSON file. The complete request could fail or succeed, but no partial settings are accepted.
Prerequisites
Before running this example, ensure to obtain access token. Refer 'Getting Started' section.
Set Sync Settings
Run the script set_sync_settings from the example directory.
cd cnc-crosscluster-api-examples;./set_sync_settings.sh
Script Details
#!/bin/bash
. ./cnc-api-common.sh
set_sync_settings() {
# assume cnc jwt is obtained prior to invoking this method by executing get-cnc-jwt.sh script
# read from jwt file and export it as AUTH_TOKEN_HDR
export_jwt
# STEP 1 : User to update input json with details of job to be created in the file CNC_API_INPUT
# STEP 2 : trigger set sync settings API
# STEP 3 : store the output in CNC_API_OUTPUT file
CNC_CROSSCLUSTER_API=$CNC_CROSSCLUSTER_API_CTX/settings
CNC_API_INPUT="@$PRJ/input/set_sync_settings.json"
CNC_API_OUTPUT="$PRJ/output/set_sync_settings.json"
http_post $CNC_CROSSCLUSTER_API $CNC_API_INPUT $CNC_API_OUTPUT
}
set_sync_settings