{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/microsoft-azure-sql-database/json-schema/microsoft-azure-sql-database-job-target-group-schema.json",
  "title": "JobTargetGroup",
  "description": "A group of job targets.",
  "x-generated": "2026-11-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/microsoft-azure-sql-database-jobtargetgroups-api-openapi.yml#/components/schemas/JobTargetGroup",
  "type": "object",
  "properties": {
    "properties": {
      "$ref": "#/$defs/JobTargetGroupProperties",
      "description": "Resource properties.",
      "x-ms-client-flatten": true
    }
  },
  "allOf": [
    {
      "$ref": "#/$defs/ProxyResource"
    }
  ],
  "$defs": {
    "JobTarget": {
      "type": "object",
      "description": "A job target, for example a specific database or a container of databases that is evaluated during job execution.",
      "properties": {
        "membershipType": {
          "type": "string",
          "description": "Whether the target is included or excluded from the group.",
          "default": "Include",
          "enum": [
            "Include",
            "Exclude"
          ],
          "x-ms-enum": {
            "name": "JobTargetGroupMembershipType",
            "modelAsString": false,
            "values": [
              {
                "name": "Include",
                "value": "Include",
                "description": "Include"
              },
              {
                "name": "Exclude",
                "value": "Exclude",
                "description": "Exclude"
              }
            ]
          }
        },
        "type": {
          "$ref": "#/$defs/JobTargetType",
          "description": "The target type."
        },
        "serverName": {
          "type": "string",
          "description": "The target server name."
        },
        "databaseName": {
          "type": "string",
          "description": "The target database name."
        },
        "elasticPoolName": {
          "type": "string",
          "description": "The target elastic pool name."
        },
        "shardMapName": {
          "type": "string",
          "description": "The target shard map."
        },
        "refreshCredential": {
          "type": "string",
          "description": "The resource ID of the credential that is used during job execution to connect to the target and determine the list of databases inside the target."
        }
      },
      "required": [
        "type"
      ]
    },
    "JobTargetGroupProperties": {
      "type": "object",
      "description": "Properties of job target group.",
      "properties": {
        "members": {
          "type": "array",
          "description": "Members of the target group.",
          "items": {
            "$ref": "#/$defs/JobTarget"
          }
        }
      },
      "required": [
        "members"
      ]
    },
    "JobTargetType": {
      "type": "string",
      "description": "The type of the target.",
      "enum": [
        "TargetGroup",
        "SqlDatabase",
        "SqlElasticPool",
        "SqlShardMap",
        "SqlServer"
      ],
      "x-ms-enum": {
        "name": "JobTargetType",
        "modelAsString": true,
        "values": [
          {
            "name": "TargetGroup",
            "value": "TargetGroup",
            "description": "TargetGroup"
          },
          {
            "name": "SqlDatabase",
            "value": "SqlDatabase",
            "description": "SqlDatabase"
          },
          {
            "name": "SqlElasticPool",
            "value": "SqlElasticPool",
            "description": "SqlElasticPool"
          },
          {
            "name": "SqlShardMap",
            "value": "SqlShardMap",
            "description": "SqlShardMap"
          },
          {
            "name": "SqlServer",
            "value": "SqlServer",
            "description": "SqlServer"
          }
        ]
      }
    },
    "ProxyResource": {
      "type": "object",
      "title": "Proxy Resource",
      "description": "The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location",
      "allOf": [
        {
          "$ref": "#/$defs/Resource"
        }
      ]
    },
    "Resource": {
      "type": "object",
      "description": "Referenced by this document but never defined in it. API Evangelist added this empty placeholder so the document resolves; the shape is unknown and is NOT a claim about the API.",
      "x-ae-placeholder": true
    }
  }
}