{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/microsoft-azure-kubernetes-service/json-schema/microsoft-azure-kubernetes-service-fleet-schema.json",
  "title": "Fleet",
  "description": "The Fleet resource.",
  "x-generated": "2026-11-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/_superseded/microsoft-azure-kubernetes-service-fleets-api-openapi.yml#/components/schemas/Fleet",
  "type": "object",
  "properties": {
    "properties": {
      "$ref": "#/$defs/FleetProperties",
      "description": "The resource-specific properties for this resource.",
      "x-ms-client-flatten": true
    },
    "eTag": {
      "type": "string",
      "description": "If eTag is provided in the response body, it may also be provided as a header per the normal etag convention.  Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields.",
      "readOnly": true
    },
    "identity": {
      "$ref": "../../../../../../common-types/resource-management/v4/managedidentity.json#/definitions/ManagedServiceIdentity",
      "description": "Managed identity."
    }
  },
  "allOf": [
    {
      "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/TrackedResource"
    }
  ],
  "$defs": {
    "APIServerAccessProfile": {
      "type": "object",
      "description": "Access profile for the Fleet hub API server.",
      "properties": {
        "enablePrivateCluster": {
          "type": "boolean",
          "description": "Whether to create the Fleet hub as a private cluster or not.",
          "x-ms-mutability": [
            "read",
            "create"
          ]
        },
        "enableVnetIntegration": {
          "type": "boolean",
          "description": "Whether to enable apiserver vnet integration for the Fleet hub or not.",
          "x-ms-mutability": [
            "read",
            "create"
          ]
        },
        "subnetId": {
          "$ref": "#/$defs/SubnetResourceId",
          "description": "The subnet to be used when apiserver vnet integration is enabled. It is required when creating a new Fleet with BYO vnet.",
          "x-ms-mutability": [
            "read",
            "create"
          ]
        }
      }
    },
    "AgentProfile": {
      "type": "object",
      "description": "Agent profile for the Fleet hub.",
      "properties": {
        "subnetId": {
          "$ref": "#/$defs/SubnetResourceId",
          "description": "The ID of the subnet which the Fleet hub node will join on startup. If this is not specified, a vnet and subnet will be generated and used.",
          "x-ms-mutability": [
            "read",
            "create"
          ]
        },
        "vmSize": {
          "type": "string",
          "description": "The virtual machine size of the Fleet hub.",
          "x-ms-mutability": [
            "read",
            "create"
          ]
        }
      }
    },
    "FleetHubProfile": {
      "type": "object",
      "description": "The FleetHubProfile configures the fleet hub.",
      "properties": {
        "dnsPrefix": {
          "type": "string",
          "description": "DNS prefix used to create the FQDN for the Fleet hub.",
          "minLength": 1,
          "maxLength": 54,
          "pattern": "^[a-zA-Z0-9]$|^[a-zA-Z0-9][a-zA-Z0-9-]{0,52}[a-zA-Z0-9]$",
          "x-ms-mutability": [
            "read",
            "create"
          ]
        },
        "apiServerAccessProfile": {
          "$ref": "#/$defs/APIServerAccessProfile",
          "description": "The access profile for the Fleet hub API server.",
          "x-ms-mutability": [
            "read",
            "create"
          ]
        },
        "agentProfile": {
          "$ref": "#/$defs/AgentProfile",
          "description": "The agent profile for the Fleet hub.",
          "x-ms-mutability": [
            "read",
            "create"
          ]
        },
        "fqdn": {
          "type": "string",
          "description": "The FQDN of the Fleet hub.",
          "readOnly": true
        },
        "kubernetesVersion": {
          "type": "string",
          "description": "The Kubernetes version of the Fleet hub.",
          "readOnly": true
        },
        "portalFqdn": {
          "type": "string",
          "description": "The Azure Portal FQDN of the Fleet hub.",
          "readOnly": true
        }
      }
    },
    "FleetProperties": {
      "type": "object",
      "description": "Fleet properties.",
      "properties": {
        "provisioningState": {
          "$ref": "#/$defs/FleetProvisioningState",
          "description": "The status of the last operation.",
          "readOnly": true
        },
        "hubProfile": {
          "$ref": "#/$defs/FleetHubProfile",
          "description": "The FleetHubProfile configures the Fleet's hub."
        },
        "status": {
          "$ref": "#/$defs/FleetStatus",
          "description": "Status information for the fleet.",
          "readOnly": true
        }
      }
    },
    "FleetProvisioningState": {
      "type": "string",
      "description": "The provisioning state of the last accepted operation.",
      "enum": [
        "Succeeded",
        "Failed",
        "Canceled",
        "Creating",
        "Updating",
        "Deleting"
      ],
      "x-ms-enum": {
        "name": "FleetProvisioningState",
        "modelAsString": true,
        "values": [
          {
            "name": "Succeeded",
            "value": "Succeeded",
            "description": "Resource has been created."
          },
          {
            "name": "Failed",
            "value": "Failed",
            "description": "Resource creation failed."
          },
          {
            "name": "Canceled",
            "value": "Canceled",
            "description": "Resource creation was canceled."
          },
          {
            "name": "Creating",
            "value": "Creating",
            "description": "The provisioning state of a fleet being created."
          },
          {
            "name": "Updating",
            "value": "Updating",
            "description": "The provisioning state of a fleet being updated."
          },
          {
            "name": "Deleting",
            "value": "Deleting",
            "description": "The provisioning state of a fleet being deleted."
          }
        ]
      },
      "readOnly": true
    },
    "FleetStatus": {
      "type": "object",
      "description": "Status information for the fleet.",
      "properties": {
        "lastOperationId": {
          "type": "string",
          "description": "The last operation ID for the fleet.",
          "readOnly": true
        },
        "lastOperationError": {
          "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorDetail",
          "description": "The last operation error for the fleet.",
          "readOnly": true
        }
      }
    },
    "SubnetResourceId": {
      "type": "string",
      "format": "arm-id",
      "description": "A type definition that refers the id to an Azure Resource Manager resource.",
      "x-ms-arm-id-details": {
        "allowedResources": [
          {
            "type": "Microsoft.Network/virtualNetworks/subnets"
          }
        ]
      }
    }
  }
}