{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/microsoft-azure-machine-learning/json-schema/microsoft-azure-machine-learning-private-endpoint-connection-schema.json",
  "title": "PrivateEndpointConnection",
  "description": "The Private Endpoint Connection resource.",
  "x-generated": "2026-11-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/microsoft-azure-machine-learning-private-endpoint-connections-api-openapi.yml#/components/schemas/PrivateEndpointConnection",
  "type": "object",
  "properties": {
    "properties": {
      "$ref": "#/$defs/PrivateEndpointConnectionProperties",
      "description": "Private endpoint connection properties.",
      "x-ms-client-flatten": true
    },
    "identity": {
      "$ref": "#/$defs/ManagedServiceIdentity",
      "description": "The managed service identities assigned to this resource."
    },
    "sku": {
      "$ref": "#/$defs/Sku",
      "description": "Optional. This field is required to be implemented by the RP because AML is supporting more than one tier"
    },
    "location": {
      "type": "string",
      "description": "*Same as workspace location."
    },
    "tags": {
      "type": "object",
      "additionalProperties": {
        "type": "string"
      }
    }
  },
  "allOf": [
    {
      "$ref": "#/$defs/ProxyResource"
    }
  ],
  "$defs": {
    "EndpointServiceConnectionStatus": {
      "type": "string",
      "description": "Connection status of the service consumer with the service provider",
      "enum": [
        "Approved",
        "Pending",
        "Rejected",
        "Disconnected",
        "Timeout"
      ],
      "x-ms-enum": {
        "name": "EndpointServiceConnectionStatus",
        "modelAsString": true,
        "values": [
          {
            "name": "Approved",
            "value": "Approved"
          },
          {
            "name": "Pending",
            "value": "Pending"
          },
          {
            "name": "Rejected",
            "value": "Rejected"
          },
          {
            "name": "Disconnected",
            "value": "Disconnected"
          },
          {
            "name": "Timeout",
            "value": "Timeout"
          }
        ]
      }
    },
    "ManagedServiceIdentity": {
      "type": "object",
      "description": "Managed service identity (system assigned and/or user assigned identities)",
      "properties": {
        "principalId": {
          "type": "string",
          "format": "uuid",
          "description": "The service principal ID of the system assigned identity. This property will only be provided for a system assigned identity.",
          "readOnly": true
        },
        "tenantId": {
          "type": "string",
          "format": "uuid",
          "description": "The tenant ID of the system assigned identity. This property will only be provided for a system assigned identity.",
          "readOnly": true
        },
        "type": {
          "$ref": "#/$defs/ManagedServiceIdentityType"
        },
        "userAssignedIdentities": {
          "$ref": "#/$defs/UserAssignedIdentities"
        }
      },
      "required": [
        "type"
      ]
    },
    "ManagedServiceIdentityType": {
      "type": "string",
      "description": "Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed).",
      "enum": [
        "None",
        "SystemAssigned",
        "UserAssigned",
        "SystemAssigned,UserAssigned"
      ],
      "x-ms-enum": {
        "name": "ManagedServiceIdentityType",
        "modelAsString": true
      }
    },
    "PrivateEndpointConnectionProperties": {
      "type": "object",
      "description": "Private endpoint connection properties.",
      "properties": {
        "privateEndpoint": {
          "$ref": "#/$defs/WorkspacePrivateEndpointResource"
        },
        "privateLinkServiceConnectionState": {
          "$ref": "#/$defs/PrivateLinkServiceConnectionState",
          "description": "The connection state."
        },
        "provisioningState": {
          "$ref": "#/$defs/PrivateEndpointConnectionProvisioningState",
          "description": "The current provisioning state.",
          "readOnly": true
        }
      }
    },
    "PrivateEndpointConnectionProvisioningState": {
      "type": "string",
      "description": "The current provisioning state.",
      "enum": [
        "Succeeded",
        "Creating",
        "Deleting",
        "Failed"
      ],
      "x-ms-enum": {
        "name": "PrivateEndpointConnectionProvisioningState",
        "modelAsString": true,
        "values": [
          {
            "name": "Succeeded",
            "value": "Succeeded"
          },
          {
            "name": "Creating",
            "value": "Creating"
          },
          {
            "name": "Deleting",
            "value": "Deleting"
          },
          {
            "name": "Failed",
            "value": "Failed"
          }
        ]
      },
      "readOnly": true
    },
    "PrivateLinkServiceConnectionState": {
      "type": "object",
      "description": "A collection of information about the state of the connection between service consumer and provider.",
      "properties": {
        "actionsRequired": {
          "type": "string",
          "description": "Some RP chose \"None\". Other RPs use this for region expansion."
        },
        "description": {
          "type": "string",
          "description": "User-defined message that, per NRP doc, may be used for approval-related message."
        },
        "status": {
          "$ref": "#/$defs/EndpointServiceConnectionStatus",
          "description": "Connection status of the service consumer with the service provider\\r\\nPossible state transitions\\r\\nPending -> Approved (Service provider approves the connection request)\\r\\nPending -> Rejected (Service provider rejects the connection request)\\r\\nPending -> Disconnected (Service provider deletes the connection)\\r\\nApproved -> Rejected (Service provider rejects the approved connection)\\r\\nApproved -> Disconnected (Service provider deletes the connection)\\r\\nRejected -> Pending (Service consumer re-initiates the connection request that was rejected)\\r\\nRejected -> Disconnected (Service provider deletes the connection)"
        }
      }
    },
    "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",
      "title": "Resource",
      "description": "Common fields that are returned in the response for all Azure Resource Manager resources",
      "properties": {
        "id": {
          "type": "string",
          "description": "Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}",
          "readOnly": true
        },
        "name": {
          "type": "string",
          "description": "The name of the resource",
          "readOnly": true
        },
        "type": {
          "type": "string",
          "description": "The type of the resource. E.g. \"Microsoft.Compute/virtualMachines\" or \"Microsoft.Storage/storageAccounts\"",
          "readOnly": true
        },
        "systemData": {
          "$ref": "#/$defs/systemData",
          "type": "object",
          "description": "Azure Resource Manager metadata containing createdBy and modifiedBy information.",
          "readOnly": true
        }
      },
      "x-ms-azure-resource": true
    },
    "Sku": {
      "type": "object",
      "description": "The resource model definition representing SKU",
      "properties": {
        "name": {
          "type": "string",
          "description": "The name of the SKU. Ex - P3. It is typically a letter+number code"
        },
        "tier": {
          "$ref": "#/$defs/SkuTier"
        },
        "size": {
          "type": "string",
          "description": "The SKU size. When the name field is the combination of tier and some other value, this would be the standalone code. "
        },
        "family": {
          "type": "string",
          "description": "If the service has different generations of hardware, for the same SKU, then that can be captured here."
        },
        "capacity": {
          "type": "integer",
          "format": "int32",
          "description": "If the SKU supports scale out/in then the capacity integer should be included. If scale out/in is not possible for the resource this may be omitted."
        }
      },
      "required": [
        "name"
      ]
    },
    "SkuTier": {
      "type": "string",
      "description": "This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required on a PUT.",
      "enum": [
        "Free",
        "Basic",
        "Standard",
        "Premium"
      ],
      "x-ms-enum": {
        "name": "SkuTier",
        "modelAsString": false
      }
    },
    "UserAssignedIdentities": {
      "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
    },
    "WorkspacePrivateEndpointResource": {
      "type": "object",
      "description": "The Private Endpoint resource.",
      "properties": {
        "id": {
          "type": "string",
          "description": "e.g. /subscriptions/{networkSubscriptionId}/resourceGroups/{rgName}/providers/Microsoft.Network/privateEndpoints/{privateEndpointName}",
          "readOnly": true
        },
        "subnetArmId": {
          "type": "string",
          "description": "The subnetId that the private endpoint is connected to.",
          "readOnly": true
        }
      }
    },
    "systemData": {
      "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
    }
  }
}