Skip To Content
ArcGIS Developers
Dashboard

Edit (Scaling)

Description

This operation updates the scaling (replicas min and max) and resource allocation (cpuMin, cpuMax, memoryMin, memoryMax) for an individual service. Changes made using this operation will be reflected in the deployment resource for the GIS service microservice.

Request parameters

ParameterDetails
serviceScalingSpec

The service scaling properties, represented as a JSON object.

Example

serviceScalingSpec={
  "scalingSpec": [
    {
      "deploymentType": "MapServer",
      "replicas": {
        "min": 2,
        "max": 2
      },
      "deploymentId": "kui6zmtqzkjrsihh6tegq",
      "resources": {
        "memoryMin": "500Mi",
        "memoryMax": "2Gi",
        "cpuMin": "0.125",
        "cpuMax": "2"
      }
    }
  ]
}
f

The response format. The default format is html.

Values: html | json | pjson

Scaling properties

The example below demonstrates the scalingSpec JSON object of a GIS service microservice:

{
  "scalingSpec": [
    {
      "deploymentType": "MapServer",
      "replicas": {
        "min": 1,
        "max": 1
      },
      "deploymentId": "knftr3em9ezf1rb7tvpym",
      "resources": {
        "memoryMin": "500Mi",
        "memoryMax": "2Gi",
        "cpuMin": "0.125",
        "cpuMax": "2"
      }
    }
  ]
}

The following sections outline the individual properties included in the scalingSpec JSON object that can, and cannot, be updated using this operation

Editable properties

The following properties can be updated using the edit operation.

PropertyDetails
replicas

The number of replicas for the microservice. Both min and max values will need to be the same, as there is no auto-scaling.

Example

"replicas": {
  "min": 1,
  "max": 1
},
resources

The minimum and maximum resource allocations for the microservice, including the minimum memory (memoryMin) and minimum CPU (cpuMin) resources required for the service to start.

Example

"resources": {
  "memoryMin": "500Mi",
  "memoryMax": "2Gi",
  "cpuMin": "0.125",
  "cpuMax": "2"
},

Uneditable properties

The following properties are unable to be edited, but are required to be passed through in the serviceScalingSpec object.

PropertyDetails
deploymentType

The GIS service microservice type.

Values: FeatureServer | GeometryServer | GPServer | GPSyncServer | MapServer | TileServer

deploymentId

The microservice ID.

Example usage

The following is a sample POST request for the edit operation, formatted for readability:

POST /context/admin/services/MyService.MapServer/scaling/edit HTTP/1.1
Host: organization.domain.com
Content-Type: application/x-www-form-urlencoded
Content-Length: []

serviceScalingSpec={
  "scalingSpec": [
    {
      "deploymentType": "MapServer",
      "replicas": {
        "min": 2,
        "max": 2
      },
      "deploymentId": "kui6zmtqzkjrsihh6tegq",
      "resources": {
        "memoryMin": "500Mi",
        "memoryMax": "2Gi",
        "cpuMin": "0.125",
        "cpuMax": "2"
      }
    }
  ]
}&f=pjson&token=_2AKqbDf5yQyOBrCXyfoMx3vHLY3z7Hp-ZQ27GJXN9Vqz5og2NnjAZjbHiB6YUnLg3gslmfCkDWgqEtsPmLIXB3gnhkmYD3VzM698NLJnoN4gOlXdn3EXX3UUJGXO4s19-fh8_stvig0ldDffzz6AuAbOWLPlTf0hOmyhxNJi8WckhJMV_VZ1SHNAGrcwdF6hPKoUQHTqcoAqNdsBUglm1VqH2nG8oq1a9JjESkTtDR12Yc-4dlttQPyiDsRVwZu

JSON Response example

{"status": "success"}