{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/azure-cosmos-db/json-schema/azure-cosmos-db-service-resource-schema.json",
  "title": "ServiceResource",
  "description": "Properties for the database account.",
  "x-generated": "2026-11-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/_superseded/azure-cosmos-db-datatransfer-api-openapi.yml#/components/schemas/ServiceResource",
  "type": "object",
  "properties": {
    "properties": {
      "$ref": "#/$defs/ServiceResourceProperties",
      "description": "Services response resource."
    }
  },
  "allOf": [
    {
      "$ref": "../../../../../../common-types/resource-management/v6/types.json#/definitions/ProxyResource"
    }
  ],
  "$defs": {
    "ServiceResourceProperties": {
      "type": "object",
      "description": "Services response resource.",
      "properties": {
        "creationTime": {
          "type": "string",
          "format": "date-time",
          "description": "Time of the last state change (ISO-8601 format).",
          "readOnly": true
        },
        "instanceSize": {
          "$ref": "#/$defs/ServiceSize",
          "description": "Instance type for the service."
        },
        "instanceCount": {
          "type": "integer",
          "format": "int32",
          "description": "Instance count for the service.",
          "minimum": 0
        },
        "serviceType": {
          "$ref": "#/$defs/ServiceType",
          "description": "ServiceType for the service."
        },
        "status": {
          "$ref": "#/$defs/ServiceStatus",
          "description": "Describes the status of a service.",
          "readOnly": true
        }
      },
      "required": [
        "serviceType"
      ],
      "additionalProperties": {}
    },
    "ServiceSize": {
      "type": "string",
      "description": "Instance type for the service.",
      "enum": [
        "Cosmos.D4s",
        "Cosmos.D8s",
        "Cosmos.D16s"
      ],
      "x-ms-enum": {
        "name": "ServiceSize",
        "modelAsString": true,
        "values": [
          {
            "name": "CosmosD4S",
            "value": "Cosmos.D4s"
          },
          {
            "name": "CosmosD8S",
            "value": "Cosmos.D8s"
          },
          {
            "name": "CosmosD16S",
            "value": "Cosmos.D16s"
          }
        ]
      }
    },
    "ServiceStatus": {
      "type": "string",
      "description": "Describes the status of a service.",
      "enum": [
        "Creating",
        "Running",
        "Updating",
        "Deleting",
        "Error",
        "Stopped"
      ],
      "x-ms-enum": {
        "name": "ServiceStatus",
        "modelAsString": true,
        "values": [
          {
            "name": "Creating",
            "value": "Creating"
          },
          {
            "name": "Running",
            "value": "Running"
          },
          {
            "name": "Updating",
            "value": "Updating"
          },
          {
            "name": "Deleting",
            "value": "Deleting"
          },
          {
            "name": "Error",
            "value": "Error"
          },
          {
            "name": "Stopped",
            "value": "Stopped"
          }
        ]
      }
    },
    "ServiceType": {
      "type": "string",
      "description": "ServiceType for the service.",
      "enum": [
        "SqlDedicatedGateway",
        "DataTransfer",
        "GraphAPICompute",
        "MaterializedViewsBuilder"
      ],
      "x-ms-enum": {
        "name": "ServiceType",
        "modelAsString": true,
        "values": [
          {
            "name": "SqlDedicatedGateway",
            "value": "SqlDedicatedGateway"
          },
          {
            "name": "DataTransfer",
            "value": "DataTransfer"
          },
          {
            "name": "GraphAPICompute",
            "value": "GraphAPICompute"
          },
          {
            "name": "MaterializedViewsBuilder",
            "value": "MaterializedViewsBuilder"
          }
        ]
      }
    }
  }
}