{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/microsoft-azure-postgresql/json-schema/microsoft-azure-postgresql-server-for-patch-schema.json",
  "title": "ServerForPatch",
  "description": "Represents a server to be updated.",
  "x-generated": "2026-11-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/microsoft-azure-postgresql-servers-api-openapi.yml#/components/schemas/ServerForPatch",
  "type": "object",
  "properties": {
    "sku": {
      "$ref": "#/$defs/SkuForPatch",
      "description": "Compute tier and size of a server."
    },
    "identity": {
      "$ref": "#/$defs/UserAssignedIdentity",
      "description": "Describes the identity of the application."
    },
    "properties": {
      "$ref": "#/$defs/ServerPropertiesForPatch",
      "description": "Properties of the server.",
      "x-ms-client-flatten": true
    },
    "tags": {
      "type": "object",
      "description": "Application-specific metadata in the form of key-value pairs.",
      "additionalProperties": {
        "type": "string"
      }
    }
  },
  "$defs": {
    "AuthConfigForPatch": {
      "type": "object",
      "description": "Authentication configuration properties of a server.",
      "properties": {
        "activeDirectoryAuth": {
          "$ref": "#/$defs/MicrosoftEntraAuth",
          "description": "Indicates if the server supports Microsoft Entra authentication."
        },
        "passwordAuth": {
          "$ref": "#/$defs/PasswordBasedAuth",
          "description": "Indicates if the server supports password based authentication."
        },
        "tenantId": {
          "type": "string",
          "description": "Identifier of the tenant of the delegated resource."
        }
      }
    },
    "Azure.Core.uuid": {
      "type": "string",
      "format": "uuid",
      "description": "Universally Unique Identifier"
    },
    "AzureManagedDiskPerformanceTier": {
      "type": "string",
      "description": "Storage tier of a server.",
      "enum": [
        "P1",
        "P2",
        "P3",
        "P4",
        "P6",
        "P10",
        "P15",
        "P20",
        "P30",
        "P40",
        "P50",
        "P60",
        "P70",
        "P80"
      ],
      "x-ms-enum": {
        "name": "AzureManagedDiskPerformanceTier",
        "modelAsString": true,
        "values": [
          {
            "name": "P1",
            "value": "P1",
            "description": "Entry-level SSD for minimal IOPS, ideal for light development or testing workloads."
          },
          {
            "name": "P2",
            "value": "P2",
            "description": "Slightly higher IOPS for small-scale applications needing consistent low latency."
          },
          {
            "name": "P3",
            "value": "P3",
            "description": "Balanced performance for basic production workloads with moderate throughput."
          },
          {
            "name": "P4",
            "value": "P4",
            "description": "Enhanced IOPS for growing apps with predictable performance needs."
          },
          {
            "name": "P6",
            "value": "P6",
            "description": "Mid-tier SSD for steady workloads requiring reliable throughput and latency."
          },
          {
            "name": "P10",
            "value": "P10",
            "description": "Popular choice for general-purpose production workloads with scalable performance."
          },
          {
            "name": "P15",
            "value": "P15",
            "description": "High IOPS tier for demanding apps with frequent read/write operations."
          },
          {
            "name": "P20",
            "value": "P20",
            "description": "Entry point for high-performance Solid State Disks (SSDs), suitable for small-scale I/O-intensive workloads."
          },
          {
            "name": "P30",
            "value": "P30",
            "description": "Balanced tier for moderate throughput and latency-sensitive applications."
          },
          {
            "name": "P40",
            "value": "P40",
            "description": "Enhanced performance for growing production workloads with consistent IOPS demands."
          },
          {
            "name": "P50",
            "value": "P50",
            "description": "Optimized for enterprise-grade applications needing sustained high throughput."
          },
          {
            "name": "P60",
            "value": "P60",
            "description": "High-capacity tier for large databases and analytics workloads with elevated IOPS."
          },
          {
            "name": "P70",
            "value": "P70",
            "description": "Designed for mission-critical systems requiring ultra-low latency and high concurrency."
          },
          {
            "name": "P80",
            "value": "P80",
            "description": "Top-tier SSD for maximum IOPS and throughput, ideal for the most demanding workloads."
          }
        ]
      }
    },
    "BackupForPatch": {
      "type": "object",
      "description": "Backup properties of a server.",
      "properties": {
        "backupRetentionDays": {
          "type": "integer",
          "format": "int32",
          "description": "Backup retention days for the server."
        },
        "geoRedundantBackup": {
          "$ref": "#/$defs/GeographicallyRedundantBackup",
          "description": "Indicates if the server is configured to create geographically redundant backups.",
          "readOnly": true
        },
        "immutableBackup": {
          "$ref": "#/$defs/ImmutableBackup",
          "description": "Indicates if the server is configured to create immutable backups."
        },
        "earliestRestoreDate": {
          "type": "string",
          "format": "date-time",
          "description": "Earliest restore point time (ISO8601 format) for a server.",
          "readOnly": true
        }
      }
    },
    "Cluster": {
      "type": "object",
      "description": "Cluster properties of a server.",
      "properties": {
        "clusterSize": {
          "type": "integer",
          "format": "int32",
          "description": "Number of nodes assigned to the elastic cluster.",
          "default": 0
        },
        "defaultDatabaseName": {
          "type": "string",
          "description": "Default database name for the elastic cluster."
        }
      }
    },
    "CreateModeForPatch": {
      "type": "string",
      "description": "Update mode of an existing server.",
      "enum": [
        "Default",
        "Update"
      ],
      "x-ms-enum": {
        "name": "CreateModeForPatch",
        "modelAsString": true,
        "values": [
          {
            "name": "Default",
            "value": "Default",
            "description": "It's equivalent to 'Update'."
          },
          {
            "name": "Update",
            "value": "Update",
            "description": "Operation updates an existing server."
          }
        ]
      }
    },
    "DataEncryption": {
      "type": "object",
      "description": "Data encryption properties of a server.",
      "properties": {
        "primaryKeyURI": {
          "type": "string",
          "description": "URI of the key in Azure Key Vault used for data encryption of the primary storage associated to a server."
        },
        "primaryUserAssignedIdentityId": {
          "type": "string",
          "description": "Identifier of the user assigned managed identity used to access the key in Azure Key Vault for data encryption of the primary storage associated to a server."
        },
        "geoBackupKeyURI": {
          "type": "string",
          "description": "Identifier of the user assigned managed identity used to access the key in Azure Key Vault for data encryption of the geographically redundant storage associated to a server that is configured to support geographically redundant backups."
        },
        "geoBackupUserAssignedIdentityId": {
          "type": "string",
          "description": "Identifier of the user assigned managed identity used to access the key in Azure Key Vault for data encryption of the geographically redundant storage associated to a server that is configured to support geographically redundant backups."
        },
        "type": {
          "$ref": "#/$defs/DataEncryptionType",
          "description": "Data encryption type used by a server."
        },
        "primaryEncryptionKeyStatus": {
          "$ref": "#/$defs/EncryptionKeyStatus",
          "description": "Status of key used by a server configured with data encryption based on customer managed key, to encrypt the primary storage associated to the server.",
          "readOnly": true
        },
        "geoBackupEncryptionKeyStatus": {
          "$ref": "#/$defs/EncryptionKeyStatus",
          "description": "Status of key used by a server configured with data encryption based on customer managed key, to encrypt the geographically redundant storage associated to the server when it is configured to support geographically redundant backups.",
          "readOnly": true
        },
        "primaryFederatedIdentityClientId": {
          "$ref": "#/$defs/Azure.Core.uuid",
          "description": "Client id of multi-tenant Microsoft Entra application."
        },
        "geoBackupFederatedIdentityClientId": {
          "$ref": "#/$defs/Azure.Core.uuid",
          "description": "Client id of multi-tenant Microsoft Entra application for when it is configured to support geographically redundant backups."
        }
      }
    },
    "DataEncryptionType": {
      "type": "string",
      "description": "Data encryption type used by a server.",
      "enum": [
        "SystemManaged",
        "AzureKeyVault"
      ],
      "x-ms-enum": {
        "name": "DataEncryptionType",
        "modelAsString": true,
        "values": [
          {
            "name": "SystemManaged",
            "value": "SystemManaged",
            "description": "Encryption managed by Azure using platform managed keys for simplicity and compliance."
          },
          {
            "name": "AzureKeyVault",
            "value": "AzureKeyVault",
            "description": "Encryption using customer managed keys stored in Azure Key Vault for enhanced control and security."
          }
        ]
      }
    },
    "EncryptionKeyStatus": {
      "type": "string",
      "description": "Status of key used by a server configured with data encryption based on customer managed key, to encrypt the primary storage associated to the server.",
      "enum": [
        "Valid",
        "Invalid"
      ],
      "x-ms-enum": {
        "name": "EncryptionKeyStatus",
        "modelAsString": true,
        "values": [
          {
            "name": "Valid",
            "value": "Valid",
            "description": "Key is valid and can be used for encryption."
          },
          {
            "name": "Invalid",
            "value": "Invalid",
            "description": "Key is invalid and cannot be used for encryption. Possible causes include key deletion, permission changes, key being disabled, key type not supported, or current date being outside of validity period associated to the key."
          }
        ]
      }
    },
    "FipsMode": {
      "type": "string",
      "description": "Indicates if FIPS (Federal Information Processing Standards) mode is enabled on the server.",
      "enum": [
        "Enabled",
        "Disabled"
      ],
      "x-ms-enum": {
        "name": "FipsMode",
        "modelAsString": true,
        "values": [
          {
            "name": "Enabled",
            "value": "Enabled",
            "description": "FIPS mode is enabled on the server."
          },
          {
            "name": "Disabled",
            "value": "Disabled",
            "description": "FIPS mode is disabled on the server."
          }
        ]
      }
    },
    "GeographicallyRedundantBackup": {
      "type": "string",
      "description": "Indicates if the server is configured to create geographically redundant backups.",
      "enum": [
        "Enabled",
        "Disabled"
      ],
      "x-ms-enum": {
        "name": "GeographicallyRedundantBackup",
        "modelAsString": true,
        "values": [
          {
            "name": "Enabled",
            "value": "Enabled",
            "description": "Server is configured to create geographically redundant backups."
          },
          {
            "name": "Disabled",
            "value": "Disabled",
            "description": "Server is not configured to create geographically redundant backups."
          }
        ]
      }
    },
    "HighAvailabilityForPatch": {
      "type": "object",
      "description": "High availability properties of a server.",
      "properties": {
        "mode": {
          "$ref": "#/$defs/PostgreSqlFlexibleServerHighAvailabilityMode",
          "description": "High availability mode for a server."
        },
        "state": {
          "$ref": "#/$defs/HighAvailabilityState",
          "description": "Possible states of the standby server created when high availability is set to SameZone or ZoneRedundant.",
          "readOnly": true
        },
        "standbyAvailabilityZone": {
          "type": "string",
          "description": "Availability zone associated to the standby server created when high availability is set to SameZone or ZoneRedundant.",
          "default": ""
        }
      }
    },
    "HighAvailabilityState": {
      "type": "string",
      "description": "Possible states of the standby server created when high availability is set to SameZone or ZoneRedundant.",
      "enum": [
        "NotEnabled",
        "CreatingStandby",
        "ReplicatingData",
        "FailingOver",
        "Healthy",
        "RemovingStandby",
        "RecreatingStandby",
        "ComputeUpdatingByFailover"
      ],
      "x-ms-enum": {
        "name": "HighAvailabilityState",
        "modelAsString": true,
        "values": [
          {
            "name": "NotEnabled",
            "value": "NotEnabled",
            "description": "High availability is not enabled for the server."
          },
          {
            "name": "CreatingStandby",
            "value": "CreatingStandby",
            "description": "Standby server is being created."
          },
          {
            "name": "ReplicatingData",
            "value": "ReplicatingData",
            "description": "Data is being replicated to the standby server."
          },
          {
            "name": "FailingOver",
            "value": "FailingOver",
            "description": "Failover operation to the standby server is in progress."
          },
          {
            "name": "Healthy",
            "value": "Healthy",
            "description": "Standby server is healthy and ready to take over in case of a failover."
          },
          {
            "name": "RemovingStandby",
            "value": "RemovingStandby",
            "description": "Standby server is being removed."
          },
          {
            "name": "RecreatingStandby",
            "value": "RecreatingStandby",
            "description": "Standby server is being recreated."
          },
          {
            "name": "ComputeUpdatingByFailover",
            "value": "ComputeUpdatingByFailover",
            "description": "Compute is being updated due to a failover."
          }
        ]
      }
    },
    "IdentityType": {
      "type": "string",
      "description": "Types of identities associated with a server.",
      "enum": [
        "None",
        "UserAssigned",
        "SystemAssigned",
        "SystemAssigned,UserAssigned"
      ],
      "x-ms-enum": {
        "name": "IdentityType",
        "modelAsString": true,
        "values": [
          {
            "name": "None",
            "value": "None",
            "description": "No managed identity is assigned to the server."
          },
          {
            "name": "UserAssigned",
            "value": "UserAssigned",
            "description": "One or more managed identities provided by the user are assigned to the server."
          },
          {
            "name": "SystemAssigned",
            "value": "SystemAssigned",
            "description": "Azure automatically creates and manages the identity associated to the lifecycle of the server."
          },
          {
            "name": "SystemAssigned,UserAssigned",
            "value": "SystemAssigned,UserAssigned",
            "description": "Both system-assigned and user-assigned identities are assigned to the server."
          }
        ]
      }
    },
    "ImmutableBackup": {
      "type": "string",
      "description": "Indicates if the server is configured to create immutable backups.",
      "enum": [
        "Enabled",
        "Disabled"
      ],
      "x-ms-enum": {
        "name": "ImmutableBackup",
        "modelAsString": true,
        "values": [
          {
            "name": "Enabled",
            "value": "Enabled",
            "description": "Server is configured to create immutable backups."
          },
          {
            "name": "Disabled",
            "value": "Disabled",
            "description": "Server is not configured to create immutable backups."
          }
        ]
      }
    },
    "MaintenanceWindowForPatch": {
      "type": "object",
      "description": "Maintenance window properties of a server.",
      "properties": {
        "customWindow": {
          "type": "string",
          "description": "Indicates whether custom window is enabled or disabled."
        },
        "startHour": {
          "type": "integer",
          "format": "int32",
          "description": "Start hour to be used for maintenance window."
        },
        "startMinute": {
          "type": "integer",
          "format": "int32",
          "description": "Start minute to be used for maintenance window."
        },
        "dayOfWeek": {
          "type": "integer",
          "format": "int32",
          "description": "Day of the week to be used for maintenance window."
        }
      }
    },
    "MicrosoftEntraAuth": {
      "type": "string",
      "description": "Indicates if the server supports Microsoft Entra authentication.",
      "enum": [
        "Enabled",
        "Disabled"
      ],
      "x-ms-enum": {
        "name": "MicrosoftEntraAuth",
        "modelAsString": true,
        "values": [
          {
            "name": "Enabled",
            "value": "Enabled",
            "description": "Server supports Microsoft Entra authentication."
          },
          {
            "name": "Disabled",
            "value": "Disabled",
            "description": "Server does not support Microsoft Entra authentication."
          }
        ]
      }
    },
    "Network": {
      "type": "object",
      "description": "Network properties of a server.",
      "properties": {
        "publicNetworkAccess": {
          "$ref": "#/$defs/ServerPublicNetworkAccessState",
          "description": "Indicates if public network access is enabled or not. This is only supported for servers that are not integrated into a virtual network which is owned and provided by customer when server is deployed."
        },
        "delegatedSubnetResourceId": {
          "type": "string",
          "format": "arm-id",
          "description": "Resource identifier of the delegated subnet. Required during creation of a new server, in case you want the server to be integrated into your own virtual network. For an update operation, you only have to provide this property if you want to change the value assigned for the private DNS zone.",
          "x-ms-arm-id-details": {
            "allowedResources": [
              {
                "type": "Microsoft.Network/virtualNetworks/subnets"
              }
            ]
          }
        },
        "privateDnsZoneArmResourceId": {
          "type": "string",
          "format": "arm-id",
          "description": "Identifier of the private DNS zone. Required during creation of a new server, in case you want the server to be integrated into your own virtual network. For an update operation, you only have to provide this property if you want to change the value assigned for the private DNS zone.",
          "x-ms-arm-id-details": {
            "allowedResources": [
              {
                "type": "Microsoft.Network/privateDnsZones"
              }
            ]
          }
        }
      }
    },
    "PasswordBasedAuth": {
      "type": "string",
      "description": "Indicates if the server supports password based authentication.",
      "enum": [
        "Enabled",
        "Disabled"
      ],
      "x-ms-enum": {
        "name": "PasswordBasedAuth",
        "modelAsString": true,
        "values": [
          {
            "name": "Enabled",
            "value": "Enabled",
            "description": "Server supports password based authentication."
          },
          {
            "name": "Disabled",
            "value": "Disabled",
            "description": "Server does not support password based authentication."
          }
        ]
      }
    },
    "PostgreSqlFlexibleServerHighAvailabilityMode": {
      "type": "string",
      "description": "Mode of high availability supported for this compute.",
      "enum": [
        "Disabled",
        "ZoneRedundant",
        "SameZone"
      ],
      "x-ms-enum": {
        "name": "PostgreSqlFlexibleServerHighAvailabilityMode",
        "modelAsString": true,
        "values": [
          {
            "name": "Disabled",
            "value": "Disabled",
            "description": "High availability is disabled for the server."
          },
          {
            "name": "ZoneRedundant",
            "value": "ZoneRedundant",
            "description": "High availability is enabled for the server, with standby server in a different availability zone than that of the primary."
          },
          {
            "name": "SameZone",
            "value": "SameZone",
            "description": "High availability is enabled for the server, with standby server in the same availability zone as the primary."
          }
        ]
      }
    },
    "ReadReplicaPromoteMode": {
      "type": "string",
      "description": "Type of operation to apply on the read replica. This property is write only.",
      "enum": [
        "Standalone",
        "Switchover"
      ],
      "x-ms-enum": {
        "name": "ReadReplicaPromoteMode",
        "modelAsString": true,
        "values": [
          {
            "name": "Standalone",
            "value": "Standalone",
            "description": "Read replica will become an independent server, and a completely independent entity from the replication set."
          },
          {
            "name": "Switchover",
            "value": "Switchover",
            "description": "Read replica will swap roles with primary server."
          }
        ]
      }
    },
    "ReadReplicaPromoteOption": {
      "type": "string",
      "description": "Data synchronization option to use when processing the operation specified in the promoteMode property. This property is write only.",
      "enum": [
        "Planned",
        "Forced"
      ],
      "x-ms-enum": {
        "name": "ReadReplicaPromoteOption",
        "modelAsString": true,
        "values": [
          {
            "name": "Planned",
            "value": "Planned",
            "description": "Wait for data in the read replica to be fully synchronized with its source server before it initiates the operation."
          },
          {
            "name": "Forced",
            "value": "Forced",
            "description": "Initiate the operation immediately, without waiting for data in the read replica to be synchronized with its source server."
          }
        ]
      }
    },
    "Replica": {
      "type": "object",
      "description": "Replica properties of a server.",
      "properties": {
        "role": {
          "$ref": "#/$defs/ReplicationRole",
          "description": "Role of the server in a replication set."
        },
        "capacity": {
          "type": "integer",
          "format": "int32",
          "description": "Maximum number of read replicas allowed for a server.",
          "readOnly": true
        },
        "replicationState": {
          "$ref": "#/$defs/ReplicationState",
          "description": "Indicates the replication state of a read replica. This property is returned only when the target server is a read replica. Possible  values are Active, Broken, Catchup, Provisioning, Reconfiguring, and Updating",
          "readOnly": true
        },
        "promoteMode": {
          "$ref": "#/$defs/ReadReplicaPromoteMode",
          "description": "Type of operation to apply on the read replica. This property is write only. Standalone means that the read replica will be promoted to a standalone server, and will become a completely independent entity from the replication set. Switchover means that the read replica will roles with the primary server.",
          "x-ms-mutability": [
            "update"
          ]
        },
        "promoteOption": {
          "$ref": "#/$defs/ReadReplicaPromoteOption",
          "description": "Data synchronization option to use when processing the operation specified in the promoteMode property. This property is write only.",
          "x-ms-mutability": [
            "update"
          ]
        }
      }
    },
    "ReplicationRole": {
      "type": "string",
      "description": "Role of the server in a replication set.",
      "enum": [
        "None",
        "Primary",
        "AsyncReplica",
        "GeoAsyncReplica"
      ],
      "x-ms-enum": {
        "name": "ReplicationRole",
        "modelAsString": true,
        "values": [
          {
            "name": "None",
            "value": "None",
            "description": "No replication role assigned; the server operates independently."
          },
          {
            "name": "Primary",
            "value": "Primary",
            "description": "Acts as the source server for replication to one or more replicas."
          },
          {
            "name": "AsyncReplica",
            "value": "AsyncReplica",
            "description": "Receives data asynchronously from a primary server within the same region."
          },
          {
            "name": "GeoAsyncReplica",
            "value": "GeoAsyncReplica",
            "description": "Receives data asynchronously from a primary server in a different region for geographical redundancy."
          }
        ]
      }
    },
    "ReplicationState": {
      "type": "string",
      "description": "Indicates the replication state of a read replica. This property is returned only when the target server is a read replica.",
      "enum": [
        "Active",
        "Catchup",
        "Provisioning",
        "Updating",
        "Broken",
        "Reconfiguring"
      ],
      "x-ms-enum": {
        "name": "ReplicationState",
        "modelAsString": true,
        "values": [
          {
            "name": "Active",
            "value": "Active",
            "description": "Read replica server is fully synchronized and actively replicating data from the primary server."
          },
          {
            "name": "Catchup",
            "value": "Catchup",
            "description": "Read replica server is behind the primary server and is currently catching up with pending changes."
          },
          {
            "name": "Provisioning",
            "value": "Provisioning",
            "description": "Read replica server is being created and is in process of getting initialized."
          },
          {
            "name": "Updating",
            "value": "Updating",
            "description": "Read replica server is undergoing some changes it can be changing compute size of promoting it to primary server."
          },
          {
            "name": "Broken",
            "value": "Broken",
            "description": "Replication has failed or been interrupted."
          },
          {
            "name": "Reconfiguring",
            "value": "Reconfiguring",
            "description": "Read replica server is being reconfigured, possibly due to changes in source or settings."
          }
        ]
      }
    },
    "ServerPropertiesForPatch": {
      "type": "object",
      "description": "Properties of a server.",
      "properties": {
        "administratorLogin": {
          "type": "string",
          "description": "Name of the login designated as the first password based administrator assigned to your instance of PostgreSQL. Must be specified the first time that you enable password based authentication on a server. Once set to a given value, it cannot be changed for the rest of the life of a server. If you disable password based authentication on a server which had it enabled, this password based role isn't deleted.",
          "readOnly": true
        },
        "administratorLoginPassword": {
          "type": "string",
          "format": "password",
          "description": "Password assigned to the administrator login. As long as password authentication is enabled, this password can be changed at any time.",
          "x-ms-mutability": [
            "update"
          ],
          "x-ms-secret": true
        },
        "version": {
          "type": "string",
          "description": "Major version of PostgreSQL database engine."
        },
        "storage": {
          "$ref": "#/$defs/Storage",
          "description": "Storage properties of a server."
        },
        "backup": {
          "$ref": "#/$defs/BackupForPatch",
          "description": "Backup properties of a server."
        },
        "highAvailability": {
          "$ref": "#/$defs/HighAvailabilityForPatch",
          "description": "High availability properties of a server."
        },
        "maintenanceWindow": {
          "$ref": "#/$defs/MaintenanceWindowForPatch",
          "description": "Maintenance window properties of a server.",
          "x-ms-mutability": [
            "read",
            "update"
          ]
        },
        "authConfig": {
          "$ref": "#/$defs/AuthConfigForPatch",
          "description": "Authentication configuration properties of a server."
        },
        "dataEncryption": {
          "$ref": "#/$defs/DataEncryption",
          "description": "Data encryption properties of a server."
        },
        "availabilityZone": {
          "type": "string",
          "description": "Availability zone of a server.",
          "default": ""
        },
        "createMode": {
          "$ref": "#/$defs/CreateModeForPatch",
          "description": "Update mode of an existing server.",
          "x-ms-mutability": [
            "update"
          ]
        },
        "sourceServerResourceId": {
          "type": "string",
          "format": "arm-id",
          "description": "Identifier of the server to be used as the source of the new server.",
          "x-ms-mutability": [
            "update"
          ],
          "x-ms-arm-id-details": {
            "allowedResources": [
              {
                "type": "Microsoft.DBforPostgreSQL/flexibleServers"
              }
            ]
          }
        },
        "replicationRole": {
          "$ref": "#/$defs/ReplicationRole",
          "description": "Role of the server in a replication set."
        },
        "replica": {
          "$ref": "#/$defs/Replica",
          "description": "Read replica properties of a server. Required only in case that you want to promote a server.",
          "x-ms-mutability": [
            "read",
            "update"
          ]
        },
        "network": {
          "$ref": "#/$defs/Network",
          "description": "Network properties of a server. Only required if you want your server to be integrated into a virtual network provided by customer."
        },
        "cluster": {
          "$ref": "#/$defs/Cluster",
          "description": "Cluster properties of a server.",
          "x-ms-mutability": [
            "read",
            "update"
          ]
        },
        "fipsMode": {
          "$ref": "#/$defs/FipsMode",
          "description": "Indicates if FIPS (Federal Information Processing Standards) mode is enabled on the server. If not specified, the current value is preserved."
        }
      }
    },
    "ServerPublicNetworkAccessState": {
      "type": "string",
      "description": "Indicates if public network access is enabled or not.",
      "enum": [
        "Enabled",
        "Disabled"
      ],
      "x-ms-enum": {
        "name": "ServerPublicNetworkAccessState",
        "modelAsString": true,
        "values": [
          {
            "name": "Enabled",
            "value": "Enabled",
            "description": "Public network access is enabled. This allows the server to be accessed from the public internet, provided the necessary firewall rule that allows incoming traffic originating from the connecting client is in place. This is compatible with the use of private endpoints to connect to this server."
          },
          {
            "name": "Disabled",
            "value": "Disabled",
            "description": "Public network access is disabled. This means the server cannot be accessed from the public internet, but only via private endpoints."
          }
        ]
      }
    },
    "SkuForPatch": {
      "type": "object",
      "description": "Compute information of a server.",
      "properties": {
        "name": {
          "type": "string",
          "description": "Name by which is known a given compute size assigned to a server."
        },
        "tier": {
          "$ref": "#/$defs/SkuTier",
          "description": "Tier of the compute assigned to a server."
        }
      }
    },
    "SkuTier": {
      "type": "string",
      "description": "Tier of the compute assigned to a server.",
      "enum": [
        "Burstable",
        "GeneralPurpose",
        "MemoryOptimized"
      ],
      "x-ms-enum": {
        "name": "SkuTier",
        "modelAsString": true,
        "values": [
          {
            "name": "Burstable",
            "value": "Burstable",
            "description": "Cost-effective tier for infrequent CPU usage, ideal for development and testing workloads with low performance requirements."
          },
          {
            "name": "GeneralPurpose",
            "value": "GeneralPurpose",
            "description": "Balanced compute and memory for most workloads, offering scalable performance and I/O throughput."
          },
          {
            "name": "MemoryOptimized",
            "value": "MemoryOptimized",
            "description": "High memory-to-core ratio for demanding workloads needing fast in-memory processing and high concurrency."
          }
        ]
      }
    },
    "Storage": {
      "type": "object",
      "description": "Storage properties of a server.",
      "properties": {
        "storageSizeGB": {
          "type": "integer",
          "format": "int32",
          "description": "Size of storage assigned to a server."
        },
        "autoGrow": {
          "$ref": "#/$defs/StorageAutoGrow",
          "description": "Flag to enable or disable the automatic growth of storage size of a server when available space is nearing zero and conditions allow for automatically growing storage size."
        },
        "autoGrowMaxThresholdMb": {
          "type": "integer",
          "format": "int32",
          "description": "Maximum allocated storage size to which storage autogrow may grow, in MB. This value is not a disk-utilization trigger threshold and must be at least the effective current or requested storage size. Storage conversion uses 1 GB = 1,024 MB.",
          "minimum": 1,
          "maximum": 67108864,
          "x-ms-mutability": [
            "read",
            "update",
            "create"
          ]
        },
        "autoGrowIncrementPercent": {
          "type": "integer",
          "format": "int32",
          "description": "Storage autogrow increment as a percentage of the current allocated storage size. This value is not an absolute size increment or a utilization threshold.",
          "minimum": 1,
          "maximum": 100,
          "x-ms-mutability": [
            "read",
            "update",
            "create"
          ]
        },
        "tier": {
          "$ref": "#/$defs/AzureManagedDiskPerformanceTier",
          "description": "Storage tier of a server."
        },
        "iops": {
          "type": "integer",
          "format": "int32",
          "description": "Maximum IOPS supported for storage. Required when type of storage is PremiumV2_LRS or UltraSSD_LRS."
        },
        "throughput": {
          "type": "integer",
          "format": "int32",
          "description": "Maximum throughput supported for storage. Required when type of storage is PremiumV2_LRS or UltraSSD_LRS."
        },
        "type": {
          "$ref": "#/$defs/StorageType",
          "description": "Type of storage assigned to a server. Allowed values are Premium_LRS, PremiumV2_LRS, or UltraSSD_LRS. If not specified, it defaults to Premium_LRS."
        }
      }
    },
    "StorageAutoGrow": {
      "type": "string",
      "description": "Indicates if the server is configured to automatically grow storage size when available space is nearing zero and conditions allow for automatic growing storage size.",
      "enum": [
        "Enabled",
        "Disabled"
      ],
      "x-ms-enum": {
        "name": "StorageAutoGrow",
        "modelAsString": true,
        "values": [
          {
            "name": "Enabled",
            "value": "Enabled",
            "description": "Server should automatically grow storage size when available space is nearing zero and conditions allow for automatically growing storage size."
          },
          {
            "name": "Disabled",
            "value": "Disabled",
            "description": "Server should not automatically grow storage size when available space is nearing zero."
          }
        ]
      }
    },
    "StorageType": {
      "type": "string",
      "description": "Type of storage assigned to a server. If not specified, it defaults to Premium_LRS.",
      "enum": [
        "Premium_LRS",
        "PremiumV2_LRS",
        "UltraSSD_LRS"
      ],
      "x-ms-enum": {
        "name": "StorageType",
        "modelAsString": true,
        "values": [
          {
            "name": "Premium_LRS",
            "value": "Premium_LRS",
            "description": "Standard Solid State Disk (SSD) backed storage offering consistent performance for general purpose workloads."
          },
          {
            "name": "PremiumV2_LRS",
            "value": "PremiumV2_LRS",
            "description": "Next generation Solid State Disk (SSD) storage with improved scalability and performance for demanding enterprise workloads."
          },
          {
            "name": "UltraSSD_LRS",
            "value": "UltraSSD_LRS",
            "description": "High-end Solid State Disk (SSD) storage designed for extreme IOPS and latency-sensitive applications."
          }
        ]
      }
    },
    "UserAssignedIdentity": {
      "type": "object",
      "description": "Identities associated with a server.",
      "properties": {
        "userAssignedIdentities": {
          "type": "object",
          "description": "Map of user assigned managed identities.",
          "additionalProperties": {
            "$ref": "#/$defs/UserIdentity"
          }
        },
        "principalId": {
          "type": "string",
          "description": "Identifier of the object of the service principal associated to the user assigned managed identity."
        },
        "type": {
          "$ref": "#/$defs/IdentityType",
          "description": "Types of identities associated with a server."
        },
        "tenantId": {
          "type": "string",
          "description": "Identifier of the tenant of a server.",
          "readOnly": true
        }
      },
      "required": [
        "type"
      ]
    },
    "UserIdentity": {
      "type": "object",
      "description": "User assigned managed identity associated with a server.",
      "properties": {
        "principalId": {
          "type": "string",
          "description": "Identifier of the object of the service principal associated to the user assigned managed identity."
        },
        "clientId": {
          "type": "string",
          "description": "Identifier of the client of the service principal associated to the user assigned managed identity."
        }
      }
    }
  }
}