{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/azure-health/json-schema/azure-health-fhir-service-collection-schema.json",
  "title": "FhirServiceCollection",
  "description": "A collection of Fhir services.",
  "x-generated": "2026-11-05",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/azure-health-fhirservices-api-openapi.yml#/components/schemas/FhirServiceCollection",
  "type": "object",
  "properties": {
    "nextLink": {
      "description": "The link used to get the next page of Fhir Services.",
      "type": "string"
    },
    "value": {
      "description": "The list of Fhir Services.",
      "type": "array",
      "items": {
        "$ref": "#/$defs/FhirService"
      }
    }
  },
  "$defs": {
    "CorsConfigurationHeaderEntry": {
      "description": "A header for CORS.",
      "type": "string"
    },
    "CorsConfigurationMethodEntry": {
      "description": "A method for CORS.",
      "type": "string"
    },
    "CorsConfigurationOriginEntry": {
      "description": "An origin for CORS.",
      "type": "string",
      "pattern": "^(?:(?:(?:[hH][tT][tT][pP](?:[sS]|))\\:\\/\\/(?:[a-zA-Z0-9-]+[.]?)+(?:\\:[0-9]{1,5})?|[*]))$"
    },
    "Encryption": {
      "description": "Settings to encrypt a service",
      "type": "object",
      "properties": {
        "customerManagedKeyEncryption": {
          "type": "object",
          "description": "The encryption settings for the customer-managed key",
          "readOnly": false,
          "properties": {
            "keyEncryptionKeyUrl": {
              "type": "string",
              "description": "The URL of the key to use for encryption",
              "readOnly": false
            }
          }
        }
      }
    },
    "FhirResourceVersionPolicy": {
      "type": "string",
      "description": "Controls how resources are versioned on the FHIR service",
      "enum": [
        "no-version",
        "versioned",
        "versioned-update"
      ],
      "x-ms-enum": {
        "name": "FhirResourceVersionPolicy",
        "modelAsString": true
      }
    },
    "FhirService": {
      "type": "object",
      "description": "The description of Fhir Service",
      "allOf": [
        {
          "$ref": "#/$defs/TaggedResource"
        },
        {
          "$ref": "#/$defs/ServiceManagedIdentity"
        }
      ],
      "properties": {
        "kind": {
          "readOnly": false,
          "type": "string",
          "description": "The kind of the service.",
          "enum": [
            "fhir-Stu3",
            "fhir-R4"
          ],
          "x-ms-enum": {
            "name": "fhirServiceKind",
            "modelAsString": true
          }
        },
        "properties": {
          "description": "Fhir Service configuration.",
          "$ref": "#/$defs/FhirServiceProperties",
          "x-ms-client-flatten": true
        },
        "systemData": {
          "description": "Metadata pertaining to creation and last modification of the resource.",
          "$ref": "#/$defs/systemData"
        }
      }
    },
    "FhirServiceAcrConfiguration": {
      "description": "Azure container registry configuration information",
      "type": "object",
      "properties": {
        "loginServers": {
          "type": "array",
          "description": "The list of the Azure container registry login servers.",
          "readOnly": false,
          "items": {
            "type": "string"
          }
        },
        "ociArtifacts": {
          "type": "array",
          "description": "The list of Open Container Initiative (OCI) artifacts.",
          "readOnly": false,
          "items": {
            "$ref": "#/$defs/ServiceOciArtifactEntry"
          },
          "x-ms-identifiers": []
        }
      }
    },
    "FhirServiceAuthenticationConfiguration": {
      "description": "Authentication configuration information",
      "type": "object",
      "properties": {
        "authority": {
          "type": "string",
          "description": "The authority url for the service",
          "readOnly": false
        },
        "audience": {
          "type": "string",
          "description": "The audience url for the service",
          "readOnly": false
        },
        "smartProxyEnabled": {
          "type": "boolean",
          "description": "If the SMART on FHIR proxy is enabled",
          "readOnly": false
        },
        "smartIdentityProviders": {
          "type": "array",
          "description": "The array of identity provider configurations for SMART on FHIR authentication.",
          "readOnly": false,
          "items": {
            "$ref": "#/$defs/SmartIdentityProviderConfiguration"
          },
          "x-ms-identifiers": []
        }
      }
    },
    "FhirServiceCorsConfiguration": {
      "description": "The settings for the CORS configuration of the service instance.",
      "type": "object",
      "properties": {
        "origins": {
          "type": "array",
          "description": "The origins to be allowed via CORS.",
          "readOnly": false,
          "items": {
            "$ref": "#/$defs/CorsConfigurationOriginEntry"
          }
        },
        "headers": {
          "type": "array",
          "description": "The headers to be allowed via CORS.",
          "readOnly": false,
          "items": {
            "$ref": "#/$defs/CorsConfigurationHeaderEntry"
          }
        },
        "methods": {
          "type": "array",
          "description": "The methods to be allowed via CORS.",
          "readOnly": false,
          "items": {
            "$ref": "#/$defs/CorsConfigurationMethodEntry"
          }
        },
        "maxAge": {
          "type": "integer",
          "format": "int32",
          "description": "The max age to be allowed via CORS.",
          "readOnly": false,
          "minimum": 0,
          "maximum": 99999
        },
        "allowCredentials": {
          "type": "boolean",
          "description": "If credentials are allowed via CORS.",
          "readOnly": false
        }
      }
    },
    "FhirServiceExportConfiguration": {
      "description": "Export operation configuration information",
      "type": "object",
      "properties": {
        "storageAccountName": {
          "type": "string",
          "description": "The name of the default export storage account.",
          "readOnly": false
        }
      }
    },
    "FhirServiceImportConfiguration": {
      "description": "Import operation configuration information",
      "type": "object",
      "properties": {
        "integrationDataStore": {
          "type": "string",
          "description": "The name of the default integration storage account.",
          "readOnly": false
        },
        "initialImportMode": {
          "type": "boolean",
          "description": "If the FHIR service is in InitialImportMode.",
          "readOnly": false
        },
        "enabled": {
          "type": "boolean",
          "description": "If the import operation is enabled.",
          "readOnly": false
        }
      }
    },
    "FhirServiceProperties": {
      "description": "Fhir Service properties.",
      "type": "object",
      "properties": {
        "provisioningState": {
          "description": "The provisioning state.",
          "$ref": "#/$defs/ProvisioningState"
        },
        "acrConfiguration": {
          "description": "Fhir Service Azure container registry configuration.",
          "$ref": "#/$defs/FhirServiceAcrConfiguration"
        },
        "authenticationConfiguration": {
          "description": "Fhir Service authentication configuration.",
          "$ref": "#/$defs/FhirServiceAuthenticationConfiguration"
        },
        "corsConfiguration": {
          "description": "Fhir Service Cors configuration.",
          "$ref": "#/$defs/FhirServiceCorsConfiguration"
        },
        "exportConfiguration": {
          "description": "Fhir Service export configuration.",
          "$ref": "#/$defs/FhirServiceExportConfiguration"
        },
        "privateEndpointConnections": {
          "description": "The list of private endpoint connections that are set up for this resource.",
          "type": "array",
          "items": {
            "$ref": "../../../../../../common-types/resource-management/v1/privatelinks.json#/definitions/PrivateEndpointConnection"
          },
          "readOnly": true
        },
        "publicNetworkAccess": {
          "description": "Control permission for data plane traffic coming from public networks while private endpoint is enabled.",
          "$ref": "#/$defs/ResourcePublicNetworkAccess"
        },
        "eventState": {
          "description": "Fhir Service event support status.",
          "$ref": "#/$defs/ResourceEventState"
        },
        "resourceVersionPolicyConfiguration": {
          "description": "Determines tracking of history for resources.",
          "$ref": "#/$defs/ResourceVersionPolicyConfiguration"
        },
        "importConfiguration": {
          "description": "Fhir Service import configuration.",
          "$ref": "#/$defs/FhirServiceImportConfiguration"
        },
        "implementationGuidesConfiguration": {
          "description": "Implementation Guides configuration.",
          "$ref": "#/$defs/ImplementationGuidesConfiguration"
        },
        "encryption": {
          "description": "The encryption settings of the FHIR service",
          "$ref": "#/$defs/Encryption"
        }
      }
    },
    "ImplementationGuidesConfiguration": {
      "description": "The settings for Implementation Guides - defining capabilities for national standards, vendor consortiums, clinical societies, etc.",
      "type": "object",
      "properties": {
        "usCoreMissingData": {
          "type": "boolean",
          "description": "If US Core Missing Data requirement is enabled.",
          "readOnly": false
        }
      }
    },
    "LocationBasedResource": {
      "type": "object",
      "description": "The common properties for any location based resource, tracked or proxy.",
      "allOf": [
        {
          "$ref": "#/$defs/ResourceCore"
        }
      ],
      "properties": {
        "location": {
          "type": "string",
          "description": "The resource location.",
          "x-ms-mutability": [
            "create",
            "read"
          ]
        }
      },
      "x-ms-azure-resource": true
    },
    "ProvisioningState": {
      "description": "The provisioning state.",
      "enum": [
        "Deleting",
        "Succeeded",
        "Creating",
        "Accepted",
        "Verifying",
        "Updating",
        "Failed",
        "Canceled",
        "Deprovisioned",
        "Moving",
        "Suspended",
        "Warned",
        "SystemMaintenance"
      ],
      "type": "string",
      "readOnly": true,
      "x-ms-enum": {
        "name": "provisioningState",
        "modelAsString": true
      }
    },
    "ResourceCore": {
      "type": "object",
      "description": "The common properties for any resource, tracked or proxy.",
      "properties": {
        "id": {
          "readOnly": true,
          "type": "string",
          "description": "The resource identifier."
        },
        "name": {
          "readOnly": true,
          "type": "string",
          "description": "The resource name.",
          "pattern": "^[a-z0-9][a-z0-9-]{1,21}[a-z0-9]$"
        },
        "type": {
          "readOnly": true,
          "type": "string",
          "description": "The resource type."
        },
        "etag": {
          "description": "An etag associated with the resource, used for optimistic concurrency when editing it.",
          "type": "string"
        }
      },
      "x-ms-azure-resource": true
    },
    "ResourceEventState": {
      "type": "string",
      "description": "Indicates the current status of event support for the resource.",
      "enum": [
        "Disabled",
        "Enabled",
        "Updating"
      ],
      "x-ms-enum": {
        "name": "ServiceEventState",
        "modelAsString": true
      },
      "readOnly": true
    },
    "ResourcePublicNetworkAccess": {
      "description": "Control permission for data plane traffic coming from public networks while private endpoint is enabled.",
      "enum": [
        "Enabled",
        "Disabled"
      ],
      "type": "string",
      "x-ms-enum": {
        "name": "PublicNetworkAccess",
        "modelAsString": true
      },
      "readOnly": true
    },
    "ResourceTags": {
      "type": "object",
      "description": "List of key value pairs that describe the resource. This will overwrite the existing tags.",
      "properties": {
        "tags": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          },
          "x-ms-mutability": [
            "read",
            "create",
            "update"
          ],
          "description": "Resource tags."
        }
      }
    },
    "ResourceVersionPolicyConfiguration": {
      "description": "The settings for history tracking for FHIR resources.",
      "type": "object",
      "properties": {
        "default": {
          "description": "The default value for tracking history across all resources.",
          "$ref": "#/$defs/FhirResourceVersionPolicy"
        },
        "resourceTypeOverrides": {
          "description": "A list of FHIR Resources and their version policy overrides.",
          "type": "object",
          "additionalProperties": {
            "$ref": "#/$defs/FhirResourceVersionPolicy"
          }
        }
      }
    },
    "ServiceManagedIdentity": {
      "type": "object",
      "description": "Managed service identity (system assigned and/or user assigned identities)",
      "properties": {
        "identity": {
          "type": "object",
          "description": "Setting indicating whether the service has a managed identity associated with it.",
          "properties": {
            "type": {
              "description": "Type of identity being specified, currently SystemAssigned and None are allowed.",
              "type": "string",
              "enum": [
                "None",
                "SystemAssigned",
                "UserAssigned",
                "SystemAssigned,UserAssigned"
              ],
              "x-ms-enum": {
                "name": "ServiceManagedIdentityType",
                "modelAsString": true
              }
            },
            "principalId": {
              "readOnly": true,
              "format": "uuid",
              "type": "string",
              "description": "The service principal ID of the system assigned identity. This property will only be provided for a system assigned identity."
            },
            "tenantId": {
              "readOnly": true,
              "format": "uuid",
              "type": "string",
              "description": "The tenant ID of the system assigned identity. This property will only be provided for a system assigned identity."
            },
            "userAssignedIdentities": {
              "$ref": "#/$defs/UserAssignedIdentities"
            }
          },
          "required": [
            "type"
          ]
        }
      }
    },
    "ServiceOciArtifactEntry": {
      "description": "An Open Container Initiative (OCI) artifact.",
      "type": "object",
      "properties": {
        "loginServer": {
          "description": "The Azure Container Registry login server.",
          "type": "string"
        },
        "imageName": {
          "description": "The artifact name.",
          "type": "string"
        },
        "digest": {
          "description": "The artifact digest.",
          "type": "string"
        }
      }
    },
    "SmartDataActions": {
      "type": "string",
      "description": "The Data Actions that can be enabled for a Smart Identity Provider Application.",
      "enum": [
        "Read"
      ],
      "x-ms-enum": {
        "name": "SmartDataActions",
        "modelAsString": true
      }
    },
    "SmartIdentityProviderApplication": {
      "description": "An Application configured in the Identity Provider used to access FHIR resources.",
      "type": "object",
      "properties": {
        "clientId": {
          "description": "The application client id defined in the identity provider. This value will be used to validate bearer tokens against the given authority.",
          "type": "string"
        },
        "audience": {
          "description": "The audience that will be used to validate bearer tokens against the given authority.",
          "type": "string"
        },
        "allowedDataActions": {
          "description": "The actions that are permitted to be performed on FHIR resources for the application.",
          "type": "array",
          "items": {
            "$ref": "#/$defs/SmartDataActions"
          }
        }
      }
    },
    "SmartIdentityProviderConfiguration": {
      "description": "An object to configure an identity provider for use with SMART on FHIR authentication.",
      "type": "object",
      "properties": {
        "authority": {
          "description": "The identity provider token authority also known as the token issuing authority.",
          "type": "string"
        },
        "applications": {
          "type": "array",
          "description": "The array of identity provider applications for SMART on FHIR authentication.",
          "readOnly": false,
          "items": {
            "$ref": "#/$defs/SmartIdentityProviderApplication"
          },
          "x-ms-identifiers": []
        }
      }
    },
    "TaggedResource": {
      "type": "object",
      "description": "The common properties of tracked resources in the service.",
      "allOf": [
        {
          "$ref": "#/$defs/ResourceTags"
        },
        {
          "$ref": "#/$defs/LocationBasedResource"
        }
      ],
      "x-ms-azure-resource": true
    },
    "UserAssignedIdentities": {
      "title": "User-Assigned Identities",
      "description": "The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. The dictionary values can be empty objects ({}) in requests.",
      "type": "object",
      "additionalProperties": {
        "$ref": "#/$defs/UserAssignedIdentity"
      }
    },
    "UserAssignedIdentity": {
      "type": "object",
      "description": "User assigned identity properties",
      "properties": {
        "principalId": {
          "description": "The principal ID of the assigned identity.",
          "format": "uuid",
          "type": "string",
          "readOnly": true
        },
        "clientId": {
          "description": "The client ID of the assigned identity.",
          "format": "uuid",
          "type": "string",
          "readOnly": true
        }
      }
    },
    "systemData": {
      "description": "Metadata pertaining to creation and last modification of the resource.",
      "type": "object",
      "readOnly": true,
      "properties": {
        "createdBy": {
          "type": "string",
          "description": "The identity that created the resource."
        },
        "createdByType": {
          "type": "string",
          "description": "The type of identity that created the resource.",
          "enum": [
            "User",
            "Application",
            "ManagedIdentity",
            "Key"
          ],
          "x-ms-enum": {
            "name": "createdByType",
            "modelAsString": true
          }
        },
        "createdAt": {
          "type": "string",
          "format": "date-time",
          "description": "The timestamp of resource creation (UTC)."
        },
        "lastModifiedBy": {
          "type": "string",
          "description": "The identity that last modified the resource."
        },
        "lastModifiedByType": {
          "type": "string",
          "description": "The type of identity that last modified the resource.",
          "enum": [
            "User",
            "Application",
            "ManagedIdentity",
            "Key"
          ],
          "x-ms-enum": {
            "name": "createdByType",
            "modelAsString": true
          }
        },
        "lastModifiedAt": {
          "type": "string",
          "format": "date-time",
          "description": "The timestamp of resource last modification (UTC)"
        }
      }
    }
  }
}