{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-workspaces/json-schema/amazon-workspaces-create-environment-request-schema.json",
  "title": "CreateEnvironmentRequest",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-workspaces-environments-api-openapi.yml#/components/schemas/CreateEnvironmentRequest",
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "The name for the environment."
    },
    "desktopArn": {
      "type": "string",
      "description": "The Amazon Resource Name (ARN) of the desktop to stream from Amazon WorkSpaces, WorkSpaces Secure Browser, or AppStream 2.0."
    },
    "desktopEndpoint": {
      "type": "string",
      "description": "The URL for the identity provider login (only for environments that use AppStream 2.0)."
    },
    "softwareSetUpdateSchedule": {
      "type": "string",
      "enum": [
        "USE_MAINTENANCE_WINDOW",
        "APPLY_IMMEDIATELY"
      ],
      "description": "An option to define if software updates should be applied within a maintenance window."
    },
    "maintenanceWindow": {
      "$ref": "#/$defs/MaintenanceWindow"
    },
    "softwareSetUpdateMode": {
      "type": "string",
      "enum": [
        "USE_LATEST",
        "USE_DESIRED"
      ],
      "description": "An option to define which software updates to apply."
    },
    "desiredSoftwareSetId": {
      "type": "string",
      "description": "The ID of the software set to apply."
    },
    "kmsKeyArn": {
      "type": "string",
      "description": "The Amazon Resource Name (ARN) of the Key Management Service key to use to encrypt the environment."
    },
    "clientToken": {
      "type": "string",
      "description": "Specifies a unique, case-sensitive identifier that you provide to ensure the idempotency of the request. This lets you safely retry the request without accidentally performing the same operation a second time. Passing the same value to a later call to an operation requires that you also pass the same value for all other parameters. We recommend that you use a UUID type of value. If you don't provide this value, then Amazon Web Services generates a random one for you. If you retry the operation with the same ClientToken, but with different parameters, the retry fails with an IdempotentParameter"
    },
    "tags": {
      "type": "object",
      "additionalProperties": {
        "type": "string"
      },
      "description": "A map of the key-value pairs of the tag or tags to assign to the resource."
    },
    "deviceCreationTags": {
      "type": "object",
      "additionalProperties": {
        "type": "string"
      },
      "description": "A map of the key-value pairs of the tag or tags to assign to the newly created devices for this environment."
    }
  },
  "required": [
    "desktopArn"
  ],
  "$defs": {
    "MaintenanceWindow": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "SYSTEM",
            "CUSTOM"
          ],
          "description": "An option to select the default or custom maintenance window."
        },
        "startTimeHour": {
          "type": "integer",
          "description": "The hour for the maintenance window start (00-23)."
        },
        "startTimeMinute": {
          "type": "integer",
          "description": "The minutes past the hour for the maintenance window start (00-59)."
        },
        "endTimeHour": {
          "type": "integer",
          "description": "The hour for the maintenance window end (00-23)."
        },
        "endTimeMinute": {
          "type": "integer",
          "description": "The minutes for the maintenance window end (00-59)."
        },
        "daysOfTheWeek": {
          "type": "array",
          "items": {
            "type": "string",
            "enum": [
              "MONDAY",
              "TUESDAY",
              "WEDNESDAY",
              "THURSDAY",
              "FRIDAY",
              "SATURDAY",
              "SUNDAY"
            ]
          },
          "description": "The days of the week during which the maintenance window is open."
        },
        "applyTimeOf": {
          "type": "string",
          "enum": [
            "UTC",
            "DEVICE"
          ],
          "description": "The option to set the maintenance window during the device local time or Universal Coordinated Time (UTC)."
        }
      },
      "required": [
        "type"
      ]
    }
  }
}