{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-workspaces/json-schema/amazon-workspaces-get-workspace-instance-response-schema.json",
  "title": "GetWorkspaceInstanceResponse",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-workspaces-workspace-instance-api-openapi.yml#/components/schemas/GetWorkspaceInstanceResponse",
  "type": "object",
  "properties": {
    "WorkspaceInstanceErrors": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/WorkspaceInstanceError"
      },
      "description": "Captures any errors specific to the WorkSpace Instance lifecycle."
    },
    "EC2InstanceErrors": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/EC2InstanceError"
      },
      "description": "Includes any underlying EC2 instance errors encountered."
    },
    "ProvisionState": {
      "type": "string",
      "enum": [
        "ALLOCATING",
        "ALLOCATED",
        "DEALLOCATING",
        "DEALLOCATED",
        "ERROR_ALLOCATING",
        "ERROR_DEALLOCATING"
      ],
      "description": "Current provisioning state of the WorkSpaces Instance."
    },
    "WorkspaceInstanceId": {
      "type": "string",
      "description": "Unique identifier of the retrieved WorkSpaces Instance."
    },
    "EC2ManagedInstance": {
      "$ref": "#/$defs/EC2ManagedInstance"
    },
    "BillingConfiguration": {
      "$ref": "#/$defs/BillingConfiguration"
    }
  },
  "$defs": {
    "BillingConfiguration": {
      "type": "object",
      "properties": {
        "BillingMode": {
          "type": "string",
          "enum": [
            "MONTHLY",
            "HOURLY"
          ],
          "description": "Specifies the billing mode for WorkSpace Instances. MONTHLY provides fixed monthly rates for predictable budgeting, while HOURLY enables pay-per-second billing for actual usage."
        }
      },
      "required": [
        "BillingMode"
      ]
    },
    "EC2InstanceError": {
      "type": "object",
      "properties": {
        "EC2ErrorCode": {
          "type": "string",
          "description": "Unique error code identifying the specific EC2 instance error."
        },
        "EC2ExceptionType": {
          "type": "string",
          "description": "Type of exception encountered during EC2 instance operation."
        },
        "EC2ErrorMessage": {
          "type": "string",
          "description": "Detailed description of the EC2 instance error."
        }
      }
    },
    "EC2ManagedInstance": {
      "type": "object",
      "properties": {
        "InstanceId": {
          "type": "string",
          "description": "Unique identifier of the managed EC2 instance."
        }
      }
    },
    "WorkspaceInstanceError": {
      "type": "object",
      "properties": {
        "ErrorCode": {
          "type": "string",
          "description": "Unique error code for the WorkSpace Instance error."
        },
        "ErrorMessage": {
          "type": "string",
          "description": "Detailed description of the WorkSpace Instance error."
        }
      }
    }
  }
}