Create (Volumes)

URL:
https://<root>/system/volumes/create
Methods:
POST
Required Capability:
Access allowed with the "Security and infrastructure" privileges
Version Introduced:
11.2

Description

The create operation is used to create PersistentVolumeClaim (PVC) volumes that can be used by GIS service deployments to provide additional resources to its pods, increasing performance. When creating these volumes, administrators will need to define the name of the volume and the properties in the spec JSON object. For more information on the configurable properties and their accepted values, see the Spec properties section below.

After a volume is created, it needs to be applied to a GIS service deployment to provide its pods with the additional resources. Administrators will need to update a GIS service's deployment to include the volume's ID (returned by the Volumes resource). For more information, see the Edit Deployment documentation.

Local volumes

At 11.2, the create operation can be used to create local PVC volumes. These PVC volumes bind to a local PersistentVolume (PV) that has been provisioned and is ready on a specific cluster, or on certain nodes in a cluster.

Local PVC volumes are persistent, existing even after a GIS service's pods are destroyed. These volumes are ideal for services like geocoding services, which can use local volumes to access the data they need for their locators.

Local PVC volumes are not useful in cases where services, such as raster analytics, need to perform large analysis jobs that require data to be loaded to a temporary space for processing. For those cases, administrators should consider creating PVC templates for ephemeral volumes.

Request parameters

ParameterDetails

volumeJson

The JSON object that specifies the volume's configuration information. The name property and spec JSON object will need to be updated. All other information should not be modified.

Example
Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
volumeJson={
  "name": "volumes-test",
  "type": "PVC",
  "spec": {
    "storageClassName": "arcgis-storage-default",
    "resources": {"requests": {"storage": "16Gi"}},
    "accessModes": ["ReadWriteOnce"],
    "volumeMode": "Filesystem",
    "volumeName": "example-name",
    "labels": {
      "label1": "value1",
      "label2": "value2"
    },
    "revision": 1
  }
}

f

The response format. The default format is html.

Values: html | json | pjson

Spec properties

PropertyDetails

accesModes

Specifies how the volume can be mounted. This property accepts the following values:

  • ReadWriteOnce: The volume can be mounted as read-write to one node. The volume is accessible to all pods scheduled to, and running on, that node.
  • ReadOnlyMany: The volume can be mounted as read-only to multiple nodes.
  • ReadWriteMany: The volume can be mounted as read-write to many nodes.

resources

Specifies the amount of storage the pods can request from the volume.

storageClassName

Reflects the name of a defined StorageClass that the PVC volume is connection to.

volumeMode

Specifies the volume type. This property accepts the following values:

  • Filesystem: The volume is mounted in the pod as a directory in the pod's file system.
  • Block: The volume is inserted as a raw data block into the pod.

volumeName

Specifies the name of the associated PV that the PVC will refer and bind to.

labels

Lists labels that match with the associated PV's labels.

Example usage

The following is a sample POST request for the create operation:

Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
POST /context/admin/system/volumes/create HTTP/1.1
Host: organization.domain.com
Content-Type: application/x-www-form-urlencoded
Content-Length: []

volumeJson={
  "name": "volumes-test",
  "type": "PVC",
  "spec": {
    "storageClassName": "arcgis-storage-default",
    "resources": {"requests": {"storage": "16Gi"}},
    "accessModes": ["ReadWriteOnce"],
    "volumeMode": "Filesystem",
    "volumeName": "example-name",
    "labels": {
      "label1": "value1",
      "label2": "value2"
    }
  },
  "revision": 1
}&f=pjson&token= WCLZFEEO_UQsdmhWDjgxnr_MDsWufTE27Ad_uqMYiFIiiLHpOFjep2gY5nRLb582nbBlzJ5epocEcSv9yniX-VZIO3y5OO7UeHBKgvByFpyuaTZCbL5UJK_RmQ7dfmP6XSXCGPPY3bPz3hID3xFfuUFW1wnspXLO-C_Zygb_hwN7Pt5nry0AKxXIG27xuHGWNgwYcU2eXpHgmc5LQrAInvf9Gh7zpqoNBg8mOKEDNCPX4edSHjdrDlD-9la7Oya4

JSON Response example

Use dark colors for code blocksCopy
1
{"status": "success"}

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.