Skip to main content

Modify a volume

Contributors netapp-ranuk

You can modify the configuration of an existing volume.

Choose the workflow to use based on the type of Cloud Volumes ONTAP deployment:

Modify volume for single node

You can use this workflow to modify the volume configuration for a single node working environment.

Step 1. Create the working environment

Perform the workflow Create Azure single node working environment and choose the publicId value of the working environment to be used as the workingEnvironmentId path parameter.

Step 2. Select the volume

Perform the workflow Get volumes and choose the name and the svmName values of the volume to modify and use them for the volumeName and svmName path parameters.

Step 3. Modify the volume

You can issue the REST API call modify the volume.

HTTP method and endpoint

This REST API call uses the following method and endpoint.

HTTP method Path

PUT

/occm/api/azure/vsa/volumes/{workingEnvironmentId}/{svmName}/{volumeName}

Curl example
curl --request PUT \
--location "https://cloudmanager.cloud.netapp.com/occm/api/azure/vsa/volumes/<WORKING_ENV_ID>/<SVM_NAME>/<VOLUME_NAME>" \
--header "Content-Type: application/json" \
--header "x-agent-id: <AGENT_ID>" \
--header "Authorization: Bearer <ACCESS_TOKEN>" \
--d @JSONinput
Additional input parameters

The JSON input example includes the minimum list of parameters.

Parameter Type Required Description

<SVM_NAME> (svmName)

Path

Yes

Identifies the SVM

workingEnvironmentId <WORKING_ENV_ID>

Path

Yes

Identifies the working environment ID

<VOLUME_NAME> (volumeName)

Path

Yes

Identifies the volume

Note

The exportpolicyInfo → policyType parameter can have two values none and custom.

  • When policyType:none, the rules parameter must be empty.

  • When policyType:custom, the rules parameter must have at least one rule.

JSON input example
{
  "volumeName": "vol5",
  "svmName": "svm_ShirleyAzureVsa2601",
  "originalVolumeInfo": {
    "exportPolicyInfo": {
      "ips": [
        "10.0.0.0/16"
      ],
      "name": "export-svm_ShirleyAzureVsa2601-vol5",
      "nfsVersion": [
        "nfs3",
        "nfs4"
      ],
      "policyType": "custom"
    },
    "shareInfo": [],
    "snapshotPolicyName": "default"
  },
  "workingEnvironmentName": "ShirleyAzureVsa2601",
  "snapshotPolicyName": "default",
  "exportPolicyInfo": {
    "ips": [],
    "policyType": "none"
  },
  "workingEnvironmentId": "VsaWorkingEnvironment-IsDYFJf8"
}
Output

None

Modify volume for high availability pair

You can use this workflow to modify the volume configuration for an HA working environment.

Step 1. Create the working environment

Perform the workflow Create Azure HA working environment and choose the publicId value of the working environment to be used as the workingEnvironmentId path parameter.

Step 2. Select the volume

Perform the workflow Get volumes and choose the name and the svmName values of the volume to modify and use them for the volumeName and svmName path parameters.

Step 3. Modify the volume

You can issue the REST API call modify the volume.

HTTP method and endpoint

This REST API call uses the following method and endpoint.

HTTP method Path

PUT

/occm/api/azure/ha/volumes/{workingEnvironmentId}/{svmName}/{volumeName}

Curl example
curl --request PUT \
--location "https://cloudmanager.cloud.netapp.com/occm/api/azure/ha/volumes/<WORKING_ENV_ID>/<SVM_NAME>/<VOLUME_NAME>" \
--header "Content-Type: application/json" \
--header "x-agent-id: <AGENT_ID>" \
--header "Authorization: Bearer <ACCESS_TOKEN>" \
--d @JSONinput
Additional input parameters

The JSON input example includes the minimum list of parameters.

Parameter Type Required Description

<SVM_NAME> (svmName)

Path

Yes

Identifies the SVM

workingEnvironmentId <WORKING_ENV_ID>

Path

Yes

Identifies the working environment ID

<VOLUME_NAME> (volumeName)

Path

Yes

Identifies the volume

Note

The exportpolicyInfo → policyType parameter can have two values none and custom.

  • When policyType:none, the rules parameter must be empty.

  • When policyType:custom, the rules parameter must have at least one rule.

JSON input example
{
  "volumeName": "vol2",
  "svmName": "svm_ShirleyHa2901",
  "originalVolumeInfo": {
    "exportPolicyInfo": {
      "ips": [
        "10.0.0.0/16"
      ],
      "name": "export-svm_ShirleyHa2901-vol2",
      "nfsVersion": [
        "nfs3",
        "nfs4"
      ],
      "policyType": "custom"
    },
    "shareInfo": [],
    "snapshotPolicyName": "default"
  },
  "workingEnvironmentName": "ShirleyHa2901",
  "snapshotPolicyName": "default",
  "exportPolicyInfo": {
    "ips": [
      "20.0.0.0/16"
    ],
    "nfsVersion": [
      "nfs4"
    ],
    "policyType": "custom"
  },
  "workingEnvironmentId": "VsaWorkingEnvironment-LUeyohBV"
}
Output

None