Endpoint

/v2/replication/source-relationships/reverse-target-relationship

POST

Reverse source and target for the specified replication relationship. This operation is initiated on the target cluster. The previous target directory will be made the new source, and the previous source directory will be made the new target. Any relationship configurations on the source will be retained, and any configurations on the target that have been retained from a previous reversal will be reapplied. To resume replication after reversal, edit any relationship configurations if desired and reconnect the relationship from the new target cluster.

Parameters

This resource has no parameters.

Request

Schema

{
  "description": "api_reverse_request",
  "type": "object",
  "properties": {
    "target_relationship_id": {
      "description": "The identifier of the target relationship to reverse",
      "type": "string"
    },
    "source_address": {
      "description": "The IP address of the source cluster",
      "type": "string"
    },
    "source_port": {
      "description": "Network port of the source cluster (defaults to 3712)",
      "type": "number"
    }
  }
}

Response

Codes

Code Description
200 Return value on success

Schema

{
  "description": "api_source_relationship",
  "type": "object",
  "properties": {
    "id": {
      "description": "Unique identifier of the replication relationship",
      "type": "string"
    },
    "target_address": {
      "description": "The target IP address",
      "type": "string"
    },
    "target_port": {
      "description": "Network port to replicate to on the target",
      "type": "number"
    },
    "source_root_id": {
      "description": "File ID of the source directory",
      "type": "string"
    },
    "source_root_read_only": {
      "description": "Whether the source directory is read-only",
      "type": "boolean"
    },
    "map_local_ids_to_nfs_ids": {
      "description": "Whether to map local user/group identities to their associated NFS UID/GID when replicating them to the target cluster. Replication of local identities fails if this option is false",
      "type": "boolean"
    },
    "replication_enabled": {
      "description": "Whether automatic replication is enabled",
      "type": "boolean"
    },
    "replication_mode": {
      "type": "string",
      "enum": [
        "REPLICATION_CONTINUOUS",
        "REPLICATION_SNAPSHOT_POLICY",
        "REPLICATION_SNAPSHOT_POLICY_WITH_CONTINUOUS"
      ],
      "description": "Whether to replicate continuously, replicate snapshots from linked snapshot policies, or both:\n * `REPLICATION_CONTINUOUS` - REPLICATION_CONTINUOUS,\n * `REPLICATION_SNAPSHOT_POLICY` - REPLICATION_SNAPSHOT_POLICY,\n * `REPLICATION_SNAPSHOT_POLICY_WITH_CONTINUOUS` - REPLICATION_SNAPSHOT_POLICY_WITH_CONTINUOUS"
    },
    "blackout_window_timezone": {
      "description": "The timezone in which the blackout windows should be interpreted (e.g, America/Los_Angeles or UTC)",
      "type": "string"
    },
    "blackout_windows": {
      "type": "array",
      "items": {
        "description": "List of blackout windows for the relationship",
        "type": "object",
        "properties": {
          "start_hour": {
            "description": "Hour of day [0, 23] at which the blackout window begins",
            "type": "number"
          },
          "start_minute": {
            "description": "Minute of hour [0, 59] at which the blackout window begins",
            "type": "number"
          },
          "end_hour": {
            "description": "Hour of day [0, 23] at which the blackout window ends",
            "type": "number"
          },
          "end_minute": {
            "description": "Minute of hour [0, 59] at which the blackout window ends",
            "type": "number"
          },
          "on_days": {
            "description": "List of days of the week on which the replication schedule applies. Choose from SUN, MON, TUE, WED, THU, FRI, and/or SAT. EVERY_DAY can be used to specify all days.",
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "SUN",
                "MON",
                "TUE",
                "WED",
                "THU",
                "FRI",
                "SAT",
                "EVERY_DAY"
              ],
              "description": "List of days of the week on which the replication schedule applies. Choose from SUN, MON, TUE, WED, THU, FRI, and/or SAT. EVERY_DAY can be used to specify all days.:\n * `EVERY_DAY` - EVERY_DAY,\n * `FRI` - FRI,\n * `MON` - MON,\n * `SAT` - SAT,\n * `SUN` - SUN,\n * `THU` - THU,\n * `TUE` - TUE,\n * `WED` - WED"
            }
          }
        }
      }
    },
    "snapshot_policies": {
      "type": "array",
      "items": {
        "description": "List of snapshot policies linked with the relationship along with the corresponding expiration time of the replicated snapshots on the target for each linked policy",
        "type": "object",
        "properties": {
          "id": {
            "description": "Unique identifier for the snapshot policy linked with the relationship",
            "type": "number"
          },
          "target_expiration": {
            "description": "Duration after which to expire snapshots on the target cluster that were replicated from this snapshot policy, in format <quantity><units>, where <quantity> is a positive integer less than 100 and <units> is one of [months, weeks, days, hours, minutes], e.g. 5days or 1hours. 'never' indicates snapshots should never expire and 'same_as_policy' indicates snapshots should expire at the same time as the snapshot policy specifies.",
            "type": "string"
          }
        }
      }
    }
  }
}