Mit der REST-API migrieren

Führen Sie die Migration mit der REST-API wie folgt aus:

  1. GET DR-Schutzgruppendetails. Endpunkt:GET /drProtectionGroups/{drProtectionGroupId}
    Response:
    
    {
      "id": "ocid1.drprotectiongroup.oc1.iad.xxxxxxxx",
      "compartmentId": "ocid1.compartment.oc1..xxxxxxx",
      "displayName": "IAD-DRPG-1234",
      "role": "PRIMARY",
      "peerId": "ocid1.drprotectiongroup.oc1.phx.xxxxxxx",
      "peerRegion": "us-phoenix-1",
      "logLocation": {
        "namespace": "xyz1234",
        "bucket": "bucket-1234",
        "object": null
      },
      "members": [
        {
          "memberId": "ocid1.instance.oc1. iad.xxxxxxxx1",
          "memberType": "COMPUTE_INSTANCE",
          "isMovable": true,
          "vnicMapping": [
            {
              "sourceVnicId": "ocid1.vnic.oc1.iad.xxxxxxxx",
              "destinationSubnetId": "ocid1.subnet.oc1.phx.xxxxxx"
            }
          ]
        },
        {
          "memberId": "ocid1.instance.oc1.iad.xxxxxxxx2",
          "memberType": "COMPUTE_INSTANCE",
          "isMovable": false
        },
        {
          "memberId": "ocid1.volumegroup.oc1.iad.xxxxxxx",
          "memberType": "VOLUME_GROUP"
        }
      ],
      "timeCreated": "2023-10-17T00:14:28.860Z",
      "timeUpdated": "2023-10-17T00:14:44.544Z",
      "lifecycleState": "ACTIVE",
      "lifeCycleDetails": null,
      "lifecycleSubState": null,
      "freeformTags": null,
      "definedTags": null,
      "systemTags": null
    }
  2. Aktualisieren Sie das DRPG, das Legacy-Compute-Member löscht, mit memberType: COMPUTE_INSTANCE, indem Sie eine Update-DRPG-API (PUT) aufrufen. Verwenden Sie die Antwort der GET-Anforderung, um die Payload der Aktualisierungsanforderung zu erstellen, indem Sie die Legacy-Elemente entfernen. Endpoint :GET /drProtectionGroups/{drProtectionGroupId}
    Request:
    {
      "members": [
        {
          "memberType": "VOLUME_GROUP",
          "memberId": "ocid1.volumegroup.oc1.iad.xxxxxxx"
        }
      ]
    }
  3. Aktualisieren Sie das DRPG, indem Sie neue Compute-Member hinzufügen, und ersetzen Sie die Legacy-Compute-Member mit isMovable: false durch memberType: COMPUTE_INSTANCE_NON_MOVABLE, die isMovable: true durch memberType:COMPUTE_INSTANCE_MOVABLE aufweisen.
    Hinweis

    Das Attribut vnicMapping im Legacy-Compute-Elementobjekt wird in dem neuen Objekt in vnicMappings geändert.
    Endpoint :PUT /drProtectionGroups/{drProtectionGroupId}
    Request:
    {
      "members": [
        {
          "memberId": "ocid1.instance.oc1. iad.xxxxxxxx1",
          "memberType": "COMPUTE_INSTANCE_MOVABLE",
          "vnicMappings": [
            {
              "sourceVnicId": "ocid1.vnic.oc1.iad.xxxxxxxx",
              "destinationSubnetId": "ocid1.subnet.oc1.phx.xxxxxx"
            }
          ]
        },
        {
          "memberId": "ocid1.instance.oc1.iad.xxxxxxxx2",
          "memberType": "COMPUTE_INSTANCE_NON_MOVABLE"
        },
        {
          "memberId": "ocid1.volumegroup.oc1.iad.xxxxxxx",
          "memberType": "VOLUME_GROUP"
        }
      ]
    }