{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-iot-sitewise/json-schema/amazon-iot-sitewise-create-workspace-request-schema.json",
  "title": "CreateWorkspaceRequest",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-iot-sitewise-workspaces-api-openapi.yml#/components/schemas/CreateWorkspaceRequest",
  "type": "object",
  "properties": {
    "workspaceName": {
      "type": "string",
      "description": "The name of the workspace to create."
    },
    "workspaceDescription": {
      "type": "string",
      "description": "A description for the workspace."
    },
    "encryptionConfiguration": {
      "$ref": "#/$defs/WorkspaceEncryptionConfiguration"
    },
    "tags": {
      "type": "object",
      "additionalProperties": {
        "type": "string"
      },
      "description": "A list of key-value pairs that contain metadata for the workspace. For more information, see Tagging your IoT SiteWise resources in the IoT SiteWise User Guide."
    },
    "clientToken": {
      "type": "string",
      "description": "A unique, case-sensitive identifier that you provide to ensure that the request is idempotent. If you retry a request that completed successfully using the same client token, the retry succeeds without performing any further actions."
    }
  },
  "required": [
    "workspaceName",
    "encryptionConfiguration"
  ],
  "$defs": {
    "WorkspaceEncryptionConfiguration": {
      "type": "object",
      "properties": {
        "encryptionType": {
          "type": "string",
          "enum": [
            "SITEWISE_DEFAULT_ENCRYPTION",
            "KMS_BASED_ENCRYPTION"
          ],
          "description": "The encryption scheme for the workspace. SITEWISE_DEFAULT_ENCRYPTION encrypts data with the IoT SiteWise default key. KMS_BASED_ENCRYPTION encrypts data with the customer managed KMS key identified by kmsKeyId."
        },
        "kmsKeyId": {
          "type": "string",
          "description": "The customer managed KMS key used when encryptionType is KMS_BASED_ENCRYPTION. Accepts a key ID, key ARN, or key alias. Required for KMS_BASED_ENCRYPTION; must be omitted for SITEWISE_DEFAULT_ENCRYPTION. After a workspace's customer managed key configuration becomes active, the key can't be changed."
        }
      },
      "required": [
        "encryptionType"
      ]
    }
  }
}