{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-parallel-computing-service/json-schema/amazon-parallel-computing-service-update-cluster-request-schema.json",
  "title": "UpdateClusterRequest",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-parallel-computing-service-updatecluster-api-openapi.yml#/components/schemas/UpdateClusterRequest",
  "type": "object",
  "properties": {
    "clusterIdentifier": {
      "type": "string",
      "description": "The name or ID of the cluster to update."
    },
    "clientToken": {
      "type": "string",
      "description": "A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. Idempotency ensures that an API request completes only once. With an idempotent request, if the original request completes successfully, the subsequent retries with the same client token return the result from the original successful request and they have no additional effect. If you don't specify a client token, the CLI and SDK automatically generate one for you."
    },
    "slurmConfiguration": {
      "$ref": "#/$defs/UpdateClusterSlurmConfigurationRequest"
    },
    "scheduler": {
      "$ref": "#/$defs/UpdateSchedulerRequest"
    }
  },
  "required": [
    "clusterIdentifier"
  ],
  "$defs": {
    "CgroupCustomSetting": {
      "type": "object",
      "properties": {
        "parameterName": {
          "type": "string",
          "description": "PCS supports custom Cgroup settings for clusters. For more information, see Configuring custom Cgroup settings in PCS in the PCS User Guide."
        },
        "parameterValue": {
          "type": "string",
          "description": "The values for the configured Cgroup settings."
        }
      },
      "required": [
        "parameterName",
        "parameterValue"
      ]
    },
    "SlurmCustomSetting": {
      "type": "object",
      "properties": {
        "parameterName": {
          "type": "string",
          "description": "PCS supports custom Slurm settings for clusters, compute node groups, and queues. For more information, see Configuring custom Slurm settings in PCS in the PCS User Guide."
        },
        "parameterValue": {
          "type": "string",
          "description": "The values for the configured Slurm settings."
        }
      },
      "required": [
        "parameterName",
        "parameterValue"
      ]
    },
    "SlurmdbdCustomSetting": {
      "type": "object",
      "properties": {
        "parameterName": {
          "type": "string",
          "description": "PCS supports custom SlurmDBD settings for clusters. For more information, see Configuring custom SlurmDBD settings in PCS in the PCS User Guide."
        },
        "parameterValue": {
          "type": "string",
          "description": "The values for the configured SlurmDBD settings."
        }
      },
      "required": [
        "parameterName",
        "parameterValue"
      ]
    },
    "UpdateAccountingRequest": {
      "type": "object",
      "properties": {
        "defaultPurgeTimeInDays": {
          "type": "integer",
          "description": "The default value for all purge settings for slurmdbd.conf. For more information, see the slurmdbd.conf documentation at SchedMD. The default value for defaultPurgeTimeInDays is -1. A value of -1 means there is no purge time and records persist as long as the cluster exists. 0 isn't a valid value."
        },
        "mode": {
          "type": "string",
          "enum": [
            "STANDARD",
            "NONE"
          ],
          "description": "The default value for mode is NONE. A value of STANDARD means Slurm accounting is enabled."
        }
      }
    },
    "UpdateClusterSlurmConfigurationRequest": {
      "type": "object",
      "properties": {
        "scaleDownIdleTimeInSeconds": {
          "type": "integer",
          "description": "The time (in seconds) before an idle node is scaled down. Default: 600"
        },
        "slurmCustomSettings": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/SlurmCustomSetting"
          },
          "description": "Additional Slurm-specific configuration that directly maps to Slurm settings."
        },
        "slurmdbdCustomSettings": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/SlurmdbdCustomSetting"
          },
          "description": "Additional SlurmDBD-specific configuration that directly maps to SlurmDBD settings."
        },
        "cgroupCustomSettings": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/CgroupCustomSetting"
          },
          "description": "Additional Cgroup-specific configuration that directly maps to Cgroup settings."
        },
        "accounting": {
          "$ref": "#/$defs/UpdateAccountingRequest"
        },
        "slurmRest": {
          "$ref": "#/$defs/UpdateSlurmRestRequest"
        }
      }
    },
    "UpdateSchedulerRequest": {
      "type": "object",
      "properties": {
        "version": {
          "type": "string",
          "description": "The scheduler version to update the cluster to. You can only update to a newer version. For more information about supported versions and update paths, see Updating the scheduler version on a cluster in the PCS User Guide. Valid Values: 24.05 | 24.11 | 25.05 | 25.11 | 26.05"
        }
      },
      "required": [
        "version"
      ]
    },
    "UpdateSlurmRestRequest": {
      "type": "object",
      "properties": {
        "mode": {
          "type": "string",
          "enum": [
            "STANDARD",
            "NONE"
          ],
          "description": "The default value for mode is NONE. A value of STANDARD means the Slurm REST API is enabled."
        }
      }
    }
  }
}