import "@typespec/rest"; import "@typespec/http"; import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; using TypeSpec.Rest; using TypeSpec.Http; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Versioning; using Azure.Core; namespace Microsoft.DBforPostgreSQL; /** * Type of Microsoft Entra principal to which the server administrator is associated. */ union PrincipalType { string, /** * Principal type is not known or not specified. */ Unknown: "Unknown", /** * A Microsoft Entra user. */ User: "User", /** * A Microsoft Entra group. */ Group: "Group", /** * A Microsoft Entra service principal, typically representing an application or service identity. */ ServicePrincipal: "ServicePrincipal", } /** * Type of identity that created the resource. */ union CreatedByType { string, #suppress "@azure-tools/typespec-azure-core/documentation-required" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details" User: "User", #suppress "@azure-tools/typespec-azure-core/documentation-required" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details" Application: "Application", #suppress "@azure-tools/typespec-azure-core/documentation-required" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details" ManagedIdentity: "ManagedIdentity", #suppress "@azure-tools/typespec-azure-core/documentation-required" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details" Key: "Key", } #suppress "@azure-tools/typespec-azure-core/documentation-required" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details" union ThreatProtectionName { string, /** Default advanced threat protection settings. */ Default: "Default", } /** * Type of backup. */ union BackupType { string, /** A full backup taken automatically by the service. These backups are retained for a period of time as defined by the backup retention policy, and they cannot be deleted by the customer. */ Full: "Full", /** A full backup triggered by the customer. These backups are retained for a period of time as defined by the backup retention policy, and they can also be deleted by the customer. */ `Customer On-Demand`: "Customer On-Demand", } /** * Mode of high availability supported for this compute. */ union HighAvailabilityMode { string, /** High availability is supported for this compute, with standby server in a different availability zone than that of the primary. */ ZoneRedundant: "ZoneRedundant", /** High availability is supported for this compute, with standby server in the same availability zone as the primary. */ SameZone: "SameZone", } /** * Mode of high availability supported for this compute. */ union PostgreSqlFlexibleServerHighAvailabilityMode { string, /** High availability is disabled for the server. */ Disabled: "Disabled", /** High availability is enabled for the server, with standby server in a different availability zone than that of the primary. */ ZoneRedundant: "ZoneRedundant", /** High availability is enabled for the server, with standby server in the same availability zone as the primary. */ SameZone: "SameZone", } /** * Status of the feature. Indicates if the feature is enabled or not. */ union FeatureStatus { string, /** Feature is enabled. */ Enabled: "Enabled", /** Feature is disabled. */ Disabled: "Disabled", } /** * Indicates if fast provisioning is supported. 'Enabled' means fast provisioning is supported. 'Disabled' stands for fast provisioning is not supported. Will be deprecated in the future. Look to Supported Features for 'FastProvisioning'. */ union FastProvisioningSupport { string, /** Fast provisioning is supported. */ Enabled: "Enabled", /** Fast provisioning is not supported. */ Disabled: "Disabled", } /** * Indicates if geographically redundant backups are supported in this location. Will be deprecated in the future. Look to Supported Features for 'GeoBackup'. */ union GeographicallyRedundantBackupSupport { string, /** Geographically redundant backups are supported in this location. */ Enabled: "Enabled", /** Geographically redundant backups are not supported in this location. */ Disabled: "Disabled", } /** * Indicates if high availability with zone redundancy is supported in this location. Will be deprecated in the future. Look to Supported Features for 'ZoneRedundantHa'. */ union ZoneRedundantHighAvailabilitySupport { string, /** High availability with zone redundancy is supported. */ Enabled: "Enabled", /** High availability with zone redundancy is not supported. */ Disabled: "Disabled", } /** * Indicates if high availability with zone redundancy is supported in conjunction with geographically redundant backups in this location. Will be deprecated in the future. Look to Supported Features for 'ZoneRedundantHaAndGeoBackup'. */ union ZoneRedundantHighAvailabilityAndGeographicallyRedundantBackupSupport { string, /** High availability with zone redundancy is supported in conjunction with geographically redundant backups. */ Enabled: "Enabled", /** High availability with zone redundancy is not supported in conjunction with geographically redundant backups. */ Disabled: "Disabled", } /** * Indicates if storage autogrow is supported in this location. Will be deprecated in the future. Look to Supported Features for 'StorageAutoGrowth'. */ union StorageAutoGrowthSupport { string, /** Storage autogrow is supported. */ Enabled: "Enabled", /** Storage autogrow is not supported. */ Disabled: "Disabled", } /** * Indicates if resizing the storage, without interrupting the operation of the database engine, is supported in this location for the given subscription. Will be deprecated in the future. Look to Supported Features for 'OnlineResize'. */ union OnlineStorageResizeSupport { string, /** Resizing the storage without interrupting the operation of the database engine is supported. */ Enabled: "Enabled", /** Resizing the storage without interrupting the operation of the database engine is not supported. */ Disabled: "Disabled", } /** * Indicates if this location is restricted. Will be deprecated in the future. Look to Supported Features for 'Restricted'. */ union LocationRestricted { string, /** Location is restricted. */ Enabled: "Enabled", /** Location is not restricted. */ Disabled: "Disabled", } /** * Data type of the configuration (also known as server parameter). */ union ConfigurationDataType { string, /** A boolean value. */ Boolean: "Boolean", /** A numeric value. */ Numeric: "Numeric", /** An integer value. */ Integer: "Integer", /** An enumeration value. */ Enumeration: "Enumeration", /** A string value. */ String: "String", /** A set of values. */ Set: "Set", } /** * Service-set extensible enumeration indicating the status of operation. */ union ExecutionStatus { string, /** Operation is currently running. */ Running: "Running", /** Operation has been cancelled. */ Cancelled: "Cancelled", /** Operation has failed. */ Failed: "Failed", /** Operation has succeeded. */ Succeeded: "Succeeded", } /** * State of migration. */ union MigrationState { string, /** Migration is in progress. */ InProgress: "InProgress", /** Migration is waiting for user action. */ WaitingForUserAction: "WaitingForUserAction", /** Migration has been canceled. */ Canceled: "Canceled", /** Migration has failed. */ Failed: "Failed", /** Migration has succeeded. */ Succeeded: "Succeeded", /** Validation for migration has failed. */ ValidationFailed: "ValidationFailed", /** Migration is cleaning up resources. */ CleaningUp: "CleaningUp", } /** * Substate of migration. */ union MigrationSubstate { string, /** Performing pre-requisite steps for migration. */ PerformingPreRequisiteSteps: "PerformingPreRequisiteSteps", /** Waiting for logical replication setup request on source database. */ WaitingForLogicalReplicationSetupRequestOnSourceDB: "WaitingForLogicalReplicationSetupRequestOnSourceDB", /** Waiting for databases to migrate specification. */ WaitingForDBsToMigrateSpecification: "WaitingForDBsToMigrateSpecification", /** Waiting for target database overwrite confirmation. */ WaitingForTargetDBOverwriteConfirmation: "WaitingForTargetDBOverwriteConfirmation", /** Waiting for data migration scheduling. */ WaitingForDataMigrationScheduling: "WaitingForDataMigrationScheduling", /** Waiting for data migration window. */ WaitingForDataMigrationWindow: "WaitingForDataMigrationWindow", /** Migrating data. */ MigratingData: "MigratingData", /** Waiting for cutover trigger. */ WaitingForCutoverTrigger: "WaitingForCutoverTrigger", /** Completing migration. */ CompletingMigration: "CompletingMigration", /** Migration completed. */ Completed: "Completed", /** Canceling requested database migrations. */ CancelingRequestedDBMigrations: "CancelingRequestedDBMigrations", /** Validation in progress. */ ValidationInProgress: "ValidationInProgress", } /** * Migration state of a database. */ union MigrationDatabaseState { string, /** Migration is in progress for the database. */ InProgress: "InProgress", /** Migration is waiting for cutover trigger for the database. */ WaitingForCutoverTrigger: "WaitingForCutoverTrigger", /** Migration has failed for the database. */ Failed: "Failed", /** Migration has been canceled for the database. */ Canceled: "Canceled", /** Migration has succeeded for the database. */ Succeeded: "Succeeded", /** Migration is being canceled for the database. */ Canceling: "Canceling", } /** * Validation state for migration. */ union ValidationState { string, /** Validation has failed. */ Failed: "Failed", /** Validation has succeeded. */ Succeeded: "Succeeded", /** Validation has succeeded with warnings. */ Warning: "Warning", } /** * Mode used to perform the migration. */ union MigrationMode { string, /** Offline migration mode. */ Offline: "Offline", /** Online migration mode. */ Online: "Online", } /** * Supported option for a migration. */ union MigrationOption { string, /** Validate the migration without performing it. */ Validate: "Validate", /** Perform the migration. */ Migrate: "Migrate", /** Validate and perform the migration. */ ValidateAndMigrate: "ValidateAndMigrate", } /** * Source server type used for the migration. */ union SourceType { string, /** On-premises PostgreSQL server. */ OnPremises: "OnPremises", /** Amazon Web Services PostgreSQL server. */ AWS: "AWS", /** Google Cloud Platform PostgreSQL server. */ GCP: "GCP", /** Azure Virtual Machine PostgreSQL server. */ AzureVM: "AzureVM", /** Azure Database for PostgreSQL single server. */ PostgreSQLSingleServer: "PostgreSQLSingleServer", /** Amazon RDS for PostgreSQL. */ AWS_RDS: "AWS_RDS", /** Amazon Aurora for PostgreSQL. */ AWS_AURORA: "AWS_AURORA", /** Amazon EC2 for PostgreSQL. */ AWS_EC2: "AWS_EC2", /** Google Cloud SQL for PostgreSQL. */ GCP_CloudSQL: "GCP_CloudSQL", /** Google Cloud AlloyDB for PostgreSQL. */ GCP_AlloyDB: "GCP_AlloyDB", /** Google Compute Engine for PostgreSQL. */ GCP_Compute: "GCP_Compute", /** EnterpriseDB PostgreSQL server. */ EDB: "EDB", /** EnterpriseDB Oracle Server. */ EDB_Oracle_Server: "EDB_Oracle_Server", /** EnterpriseDB PostgreSQL server. */ EDB_PostgreSQL: "EDB_PostgreSQL", /** Azure Database for PostgreSQL flexible server. */ PostgreSQLFlexibleServer: "PostgreSQLFlexibleServer", /** .NET Cosmos DB for PostgreSQL */ PostgreSQLCosmosDB: "PostgreSQLCosmosDB", /** Huawei RDS for PostgreSQL */ Huawei_RDS: "Huawei_RDS", /** Huawei Compute for PostgreSQL */ Huawei_Compute: "Huawei_Compute", /** Heroku PostgreSQL */ Heroku_PostgreSQL: "Heroku_PostgreSQL", /** Crunchy PostgreSQL */ Crunchy_PostgreSQL: "Crunchy_PostgreSQL", /** ApsaraDB RDS for PostgreSQL */ ApsaraDB_RDS: "ApsaraDB_RDS", /** Digital Ocean Droplets for PostgreSQL */ Digital_Ocean_Droplets: "Digital_Ocean_Droplets", /** Digital Ocean PostgreSQL */ Digital_Ocean_PostgreSQL: "Digital_Ocean_PostgreSQL", /** Supabase PostgreSQL */ Supabase_PostgreSQL: "Supabase_PostgreSQL", } /** * SSL mode used by a migration. Default SSL mode for 'PostgreSQLSingleServer' is 'VerifyFull'. Default SSL mode for other source types is 'Prefer'. */ union SslMode { string, /** Prefer SSL connection. If the server does not support SSL, the connection will be established without SSL. */ Prefer: "Prefer", /** Require SSL connection. If the server does not support SSL, the connection will fail. */ Require: "Require", /** Require SSL connection and verify the server certificate against the CA certificate. */ VerifyCA: "VerifyCA", /** Require SSL connection, verify the server certificate against the CA certificate, and verify that the server hostname matches the certificate. */ VerifyFull: "VerifyFull", } /** * Tier of the compute assigned to a server. */ union SkuTier { string, /** Cost-effective tier for infrequent CPU usage, ideal for development and testing workloads with low performance requirements. */ Burstable: "Burstable", /** Balanced compute and memory for most workloads, offering scalable performance and I/O throughput. */ GeneralPurpose: "GeneralPurpose", /** High memory-to-core ratio for demanding workloads needing fast in-memory processing and high concurrency. */ MemoryOptimized: "MemoryOptimized", } /** * Indicates whether to setup logical replication on source server, if needed. */ union LogicalReplicationOnSourceServer { string, /** Logical replication will be set up on the source server. */ True: "True", /** Logical replication will not be set up on the source server. */ False: "False", } /** * Indicates if databases on the target server can be overwritten when already present. */ union OverwriteDatabasesOnTargetServer { string, /** Databases on the target server can be overwritten when already present. */ True: "True", /** Databases on the target server cannot be overwritten when already present. When the migration workflow detects that the database already exists on the target server, it will wait for a confirmation. */ False: "False", } /** * Indicates if roles and permissions must be migrated. */ union MigrateRolesAndPermissions { string, /** Roles and permissions will be migrated. */ True: "True", /** Roles and permissions will not be migrated. */ False: "False", } /** * Indicates if data migration must start right away. */ union StartDataMigration { string, /** Data migration must start right away. */ True: "True", /** Data migration must not start right away. */ False: "False", } /** * Indicates if cutover must be triggered for the entire migration. */ union TriggerCutover { string, /** Cutover must be triggered for the entire migration. */ True: "True", /** Cutover must not be triggered for the entire migration. */ False: "False", } /** * Indicates if cancel must be triggered for the entire migration. */ union Cancel { string, /** Cancel must be triggered for the entire migration. */ True: "True", /** Cancel must not be triggered for the entire migration. */ False: "False", } /** * Indicates the filter to apply when listing migrations. */ union MigrationListFilter { string, /** Only active (in-progress) migrations. */ Active: "Active", /** All migrations. */ All: "All", } /** * Migration name availability reason. */ union MigrationNameAvailabilityReason { string, /** Migration name is invalid. */ Invalid: "Invalid", /** Migration name already exists. */ AlreadyExists: "AlreadyExists", } /** * Reason why the given name is not available. */ union CheckNameAvailabilityReason { string, /** Migration name is invalid. */ Invalid: "Invalid", /** Migration name already exists. */ AlreadyExists: "AlreadyExists", } /** * Intended executor of the operation. */ union OperationOrigin { string, #suppress "@azure-tools/typespec-azure-core/documentation-required" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details" NotSpecified: "NotSpecified", #suppress "@azure-tools/typespec-azure-core/documentation-required" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details" user: "user", #suppress "@azure-tools/typespec-azure-core/documentation-required" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details" system: "system", } /** * Types of identities associated with a server. */ union IdentityType { string, /** No managed identity is assigned to the server. */ None: "None", /** One or more managed identities provided by the user are assigned to the server. */ UserAssigned: "UserAssigned", /** Azure automatically creates and manages the identity associated to the lifecycle of the server. */ SystemAssigned: "SystemAssigned", /** Both system-assigned and user-assigned identities are assigned to the server. */ `SystemAssigned,UserAssigned`: "SystemAssigned,UserAssigned", } /** * Major version of PostgreSQL database engine. */ union PostgresMajorVersion { string, /** PostgreSQL 18. */ `18`: "18", /** PostgreSQL 17. */ `17`: "17", /** PostgreSQL 16. */ `16`: "16", /** PostgreSQL 15. */ `15`: "15", /** PostgreSQL 14. */ `14`: "14", /** PostgreSQL 13. */ `13`: "13", /** PostgreSQL 12. */ `12`: "12", /** PostgreSQL 11. */ `11`: "11", } /** * State of a server. */ union ServerState { string, /** Server is healthy and not undergoing any operations at the management or control plane level. This doesn't mean that the server is fully operational at the data plane level. */ Ready: "Ready", /** Server is being deleted. */ Dropping: "Dropping", /** Server is disabled. Typical reasons include: the subscription on which the server is deployed is explicitly disabled or canceled by the administrator, the spending limit has been reached, or the bill is past due. May also happen when the server is being moved to another resource group or subscription. */ Disabled: "Disabled", /** PostgreSQL database engine is being restarted. */ Starting: "Starting", /** Compute resources associated with the server are being stopped and deallocated. If the server has high availability enabled, the compute resources of the standby server are also stopped and deallocated. */ Stopping: "Stopping", /** Compute resources associated with the server are being stopped and deallocated. */ Stopped: "Stopped", /** Server is undergoing some changes which may or may not impact the availability of the PostgreSQL database engine. For example, the compute resources of the server are being scaled up or down, which may cause temporary unavailability of the database engine. Or, for example, a firewall rule is being added or removed, which doesn't cause any unavailability of the database engine. */ Updating: "Updating", /** PostgreSQL database engine is being restarted. */ Restarting: "Restarting", /** Server isn't accessible, because the key provided to encrypt and decrypt the data is in invalid state. */ Inaccessible: "Inaccessible", /** Server is in the process of being created. */ Provisioning: "Provisioning", } /** * 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. */ union StorageAutoGrow { string, /** Server should automatically grow storage size when available space is nearing zero and conditions allow for automatically growing storage size. */ Enabled: "Enabled", /** Server should not automatically grow storage size when available space is nearing zero. */ Disabled: "Disabled", } /** * Storage tier of a server. */ union AzureManagedDiskPerformanceTier { string, /** Entry-level SSD for minimal IOPS, ideal for light development or testing workloads. */ P1: "P1", /** Slightly higher IOPS for small-scale applications needing consistent low latency. */ P2: "P2", /** Balanced performance for basic production workloads with moderate throughput. */ P3: "P3", /** Enhanced IOPS for growing apps with predictable performance needs. */ P4: "P4", /** Mid-tier SSD for steady workloads requiring reliable throughput and latency. */ P6: "P6", /** Popular choice for general-purpose production workloads with scalable performance. */ P10: "P10", /** High IOPS tier for demanding apps with frequent read/write operations. */ P15: "P15", /** Entry point for high-performance Solid State Disks (SSDs), suitable for small-scale I/O-intensive workloads. */ P20: "P20", /** Balanced tier for moderate throughput and latency-sensitive applications. */ P30: "P30", /** Enhanced performance for growing production workloads with consistent IOPS demands. */ P40: "P40", /** Optimized for enterprise-grade applications needing sustained high throughput. */ P50: "P50", /** High-capacity tier for large databases and analytics workloads with elevated IOPS. */ P60: "P60", /** Designed for mission-critical systems requiring ultra-low latency and high concurrency. */ P70: "P70", /** Top-tier SSD for maximum IOPS and throughput, ideal for the most demanding workloads. */ P80: "P80", } /** * Type of storage assigned to a server. If not specified, it defaults to Premium_LRS. */ union StorageType { string, /** Standard Solid State Disk (SSD) backed storage offering consistent performance for general purpose workloads. */ Premium_LRS: "Premium_LRS", /** Next generation Solid State Disk (SSD) storage with improved scalability and performance for demanding enterprise workloads. */ PremiumV2_LRS: "PremiumV2_LRS", /** High-end Solid State Disk (SSD) storage designed for extreme IOPS and latency-sensitive applications. */ UltraSSD_LRS: "UltraSSD_LRS", } /** * Indicates if the server supports Microsoft Entra authentication. */ union MicrosoftEntraAuth { string, /** Server supports Microsoft Entra authentication. */ Enabled: "Enabled", /** Server does not support Microsoft Entra authentication. */ Disabled: "Disabled", } /** * Indicates if the server supports password based authentication. */ union PasswordBasedAuth { string, /** Server supports password based authentication. */ Enabled: "Enabled", /** Server does not support password based authentication. */ Disabled: "Disabled", } /** * Data encryption type used by a server. */ union DataEncryptionType { string, /** Encryption managed by Azure using platform managed keys for simplicity and compliance. */ SystemManaged: "SystemManaged", /** Encryption using customer managed keys stored in Azure Key Vault for enhanced control and security. */ AzureKeyVault: "AzureKeyVault", } /** * 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. */ union EncryptionKeyStatus { string, /** Key is valid and can be used for encryption. */ Valid: "Valid", /** 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. */ Invalid: "Invalid", } /** * Indicates if the server is configured to create geographically redundant backups. */ union GeographicallyRedundantBackup { string, /** Server is configured to create geographically redundant backups. */ Enabled: "Enabled", /** Server is not configured to create geographically redundant backups. */ Disabled: "Disabled", } /** * Indicates if immutable backup is enabled or disabled for the server. */ union ImmutableBackup { string, /** Immutable backup is enabled for the server. */ Enabled: "Enabled", /** Immutable backup is disabled for the server. */ Disabled: "Disabled", } /** * Indicates if public network access is enabled or not. */ union ServerPublicNetworkAccessState { string, /** 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. */ Enabled: "Enabled", /** Public network access is disabled. This means the server cannot be accessed from the public internet, but only via private endpoints. */ Disabled: "Disabled", } /** * Possible states of the standby server created when high availability is set to SameZone or ZoneRedundant. */ union HighAvailabilityState { string, /** High availability is not enabled for the server. */ NotEnabled: "NotEnabled", /** Standby server is being created. */ CreatingStandby: "CreatingStandby", /** Data is being replicated to the standby server. */ ReplicatingData: "ReplicatingData", /** Failover operation to the standby server is in progress. */ FailingOver: "FailingOver", /** Standby server is healthy and ready to take over in case of a failover. */ Healthy: "Healthy", /** Standby server is being removed. */ RemovingStandby: "RemovingStandby", /** Standby server is being recreated. */ RecreatingStandby: "RecreatingStandby", /** Compute is being updated due to a failover. */ ComputeUpdatingByFailover: "ComputeUpdatingByFailover", } /** * Role of the server in a replication set. */ union ReplicationRole { string, /** No replication role assigned; the server operates independently. */ None: "None", /** Acts as the source server for replication to one or more replicas. */ Primary: "Primary", /** Receives data asynchronously from a primary server within the same region. */ AsyncReplica: "AsyncReplica", /** Receives data asynchronously from a primary server in a different region for geographical redundancy. */ GeoAsyncReplica: "GeoAsyncReplica", } /** * Indicates the replication state of a read replica. This property is returned only when the target server is a read replica. */ union ReplicationState { string, /** * Read replica server is fully synchronized and actively replicating data from the primary server. */ Active: "Active", /** * Read replica server is behind the primary server and is currently catching up with pending changes. */ Catchup: "Catchup", /** * Read replica server is being created and is in process of getting initialized. */ Provisioning: "Provisioning", /** * Read replica server is undergoing some changes it can be changing compute size of promoting it to primary server. */ Updating: "Updating", /** * Replication has failed or been interrupted. */ Broken: "Broken", /** * Read replica server is being reconfigured, possibly due to changes in source or settings. */ Reconfiguring: "Reconfiguring", } /** * Type of operation to apply on the read replica. This property is write only. */ union ReadReplicaPromoteMode { string, /** * Read replica will become an independent server, and a completely independent entity from the replication set. */ Standalone: "Standalone", /** * Read replica will swap roles with primary server. */ Switchover: "Switchover", } /** * Data synchronization option to use when processing the operation specified in the promoteMode property. This property is write only. */ union ReadReplicaPromoteOption { string, /** * Wait for data in the read replica to be fully synchronized with its source server before it initiates the operation. */ Planned: "Planned", /** * Initiate the operation immediately, without waiting for data in the read replica to be synchronized with its source server. */ Forced: "Forced", } /** * Creation mode of a new server. */ union CreateMode { string, /** If the operation is triggered on a non-existing server, it's equivalent to 'Create'. If the operation is triggered on an existing server, it's equivalent to 'Update'. */ Default: "Default", /** Operation creates a new server. */ Create: "Create", /** Operation updates an existing server. */ Update: "Update", /** Operation restores an existing backup of an existing server. This operation creates a new server, and then restores on it the backup of an existing server at a specific point in time. */ PointInTimeRestore: "PointInTimeRestore", /** Operation restores an existing backup of an existing server, on the paired region of the existing server. This operation creates a new server on the paired region of the existing server, and then restores on it the backup of an existing server at a specific point in time, in a different region. This operation is only supported on existing servers that were created with geographically redundant backups enabled. */ GeoRestore: "GeoRestore", /** Operation creates a replica of an existing server. This operation creates a new server, restores a base backup of the existing server (referred to as primary), and configures physical replication to asynchronously stream all changes which are recorded in the transaction log of the primary. */ Replica: "Replica", /** Operation creates a new server, initialized with the backup of a server that was recently deleted. */ ReviveDropped: "ReviveDropped", } /** * Update mode of an existing server. */ union CreateModeForPatch { string, /** It's equivalent to 'Update'. */ Default: "Default", /** Operation updates an existing server. */ Update: "Update", } /** * Failover mode. */ union FailoverMode { string, /** Trigger a failover from primary to standby without killing the primary database process first. This is a graceful failover that attempts to preserve data consistency. */ PlannedFailover: "PlannedFailover", /** Terminate the primary database process first, then triggers the failover. This is more aggressive and used when the primary is unresponsive or in an unhealthy state. */ ForcedFailover: "ForcedFailover", /** Similar to 'PlannedFailover' but prefers a switch over operation where roles are swapped between primary and standby. */ PlannedSwitchover: "PlannedSwitchover", /** Terminate the primary database process first, and then triggers a switch over with role swapping. */ ForcedSwitchover: "ForcedSwitchover", } /** * Name of the tuning option. */ union TuningOptionParameterEnum { string, /** Index related recommendations. */ index: "index", /** Table related recommendations. */ table: "table", } /** * Type for this recommendation. */ union RecommendationTypeEnum { string, /** Recommendation to create an index to improve query performance. */ CreateIndex: "CreateIndex", /** Recommendation to drop an existing index because it's duplicate or unused. */ DropIndex: "DropIndex", /** Recommendation to reindex an existing invalid index. */ ReIndex: "ReIndex", /** Recommendation to analyze a table to update statistics for the query optimizer. */ AnalyzeTable: "AnalyzeTable", /** Recommendation to vacuum a table to reclaim storage and optimize performance. */ @added(Versions.v2026_01_01) VacuumTable: "VacuumTable", } /** * Recommendations list filter. Retrieves recommendations based on type. */ union RecommendationTypeParameterEnum { string, /** Recommendation to create an index to improve query performance. */ CreateIndex: "CreateIndex", /** Recommendation to drop an existing index because it's duplicate or unused. */ DropIndex: "DropIndex", /** Recommendation to reindex an existing invalid index. */ ReIndex: "ReIndex", /** Recommendation to analyze a table to update statistics for the query optimizer. */ AnalyzeTable: "AnalyzeTable", /** Recommendation to vacuum a table to reclaim storage and optimize performance. */ @added(Versions.v2026_01_01) VacuumTable: "VacuumTable", } /** * Type of endpoint for the virtual endpoints. */ union VirtualEndpointType { string, /** Read-write endpoint. */ ReadWrite: "ReadWrite", } /** * Level of details of a migration. */ union MigrationDetailsLevel { string, #suppress "@azure-tools/typespec-azure-core/documentation-required" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details" Default: "Default", #suppress "@azure-tools/typespec-azure-core/documentation-required" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details" Summary: "Summary", #suppress "@azure-tools/typespec-azure-core/documentation-required" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details" Full: "Full", } /** * Specifies the state of the advanced threat protection, whether it is enabled, disabled, or a state has not been applied yet on the server. */ #suppress "@azure-tools/typespec-azure-core/no-enum" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details" enum ThreatProtectionState { Enabled, Disabled, } /** * Status of the capability. */ #suppress "@azure-tools/typespec-azure-core/no-enum" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details" enum CapabilityStatus { Visible, Available, Default, Disabled, } /** * Server administrator associated to a Microsoft Entra principal. */ model AdministratorMicrosoftEntraAdd { /** * Properties of the server administrator associated to a Microsoft Entra principal. */ #suppress "@azure-tools/typespec-azure-core/no-private-usage" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details" properties?: AdministratorMicrosoftEntraPropertiesForAdd; } /** * Properties of a server administrator associated to a Microsoft Entra principal. */ model AdministratorMicrosoftEntraPropertiesForAdd { /** * Type of Microsoft Entra principal to which the server administrator is associated. */ @visibility(Lifecycle.Read, Lifecycle.Create, Lifecycle.Update) principalType?: PrincipalType; /** * Name of the Microsoft Entra principal. */ @visibility(Lifecycle.Read, Lifecycle.Create, Lifecycle.Update) principalName?: string; /** * Identifier of the tenant in which the Microsoft Entra principal exists. */ @visibility(Lifecycle.Create, Lifecycle.Update) tenantId?: string; } /** * Properties of a server administrator associated to a Microsoft Entra principal. */ #suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-provisioning-state" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details" model AdministratorMicrosoftEntraProperties { /** * Type of Microsoft Entra principal to which the server administrator is associated. */ @visibility(Lifecycle.Read, Lifecycle.Create, Lifecycle.Update) principalType?: PrincipalType; /** * Name of the Microsoft Entra principal. */ @visibility(Lifecycle.Read, Lifecycle.Create, Lifecycle.Update) principalName?: string; /** * Object identifier of the Microsoft Entra principal. */ @visibility(Lifecycle.Read, Lifecycle.Create, Lifecycle.Update) objectId?: string; /** * Identifier of the tenant in which the Microsoft Entra principal exists. */ @visibility(Lifecycle.Read, Lifecycle.Create, Lifecycle.Update) tenantId?: string; } /** * List of server administrators associated to Microsoft Entra principals. */ model AdministratorMicrosoftEntraList is Azure.Core.Page; /** * List of advanced threat protection settings for a server. */ model AdvancedThreatProtectionSettingsList is Azure.Core.Page; /** * Properties of advanced threat protection state for a server. */ #suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-provisioning-state" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details" model AdvancedThreatProtectionSettingsProperties { /** * Specifies the state of the advanced threat protection, whether it is enabled, disabled, or a state has not been applied yet on the server. */ state: ThreatProtectionState; /** * Specifies the creation time (UTC) of the policy. */ @visibility(Lifecycle.Read) // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. creationTime?: utcDateTime; } /** * Properties of a backup. */ #suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-provisioning-state" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details" model BackupAutomaticAndOnDemandProperties { /** * Type of backup. */ backupType?: BackupType; /** * Time(ISO8601 format) at which the backup was completed. */ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. completedTime?: utcDateTime; /** * Source of the backup. */ source?: string; } /** * List of backups. */ model BackupAutomaticAndOnDemandList is Azure.Core.Page; /** * List of capabilities for the Azure Database for PostgreSQL flexible server. */ model CapabilityList is Azure.Core.Page; /** * Capability for the Azure Database for PostgreSQL flexible server. */ #suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details" model Capability extends CapabilityBase { /** * Name of flexible servers capabilities. */ name?: string; /** * List of supported compute tiers. */ @visibility(Lifecycle.Read) @identifiers(#["name"]) supportedServerEditions?: ServerEditionCapability[]; /** * List of supported major versions of PostgreSQL database engine. */ @visibility(Lifecycle.Read) @identifiers(#["name"]) supportedServerVersions?: ServerVersionCapability[]; /** * Features supported. */ @visibility(Lifecycle.Read) @identifiers(#["name"]) supportedFeatures?: SupportedFeature[]; /** * Indicates if fast provisioning is supported. 'Enabled' means fast provisioning is supported. 'Disabled' stands for fast provisioning is not supported. Will be deprecated in the future. Look to Supported Features for 'FastProvisioning'. */ @visibility(Lifecycle.Read) fastProvisioningSupported?: FastProvisioningSupport; /** * List of compute tiers supporting fast provisioning. */ @visibility(Lifecycle.Read) @identifiers(#["supportedSku"]) supportedFastProvisioningEditions?: FastProvisioningEditionCapability[]; /** * Indicates if geographically redundant backups are supported in this location. 'Enabled' means geographically redundant backups are supported. 'Disabled' stands for geographically redundant backup is not supported. Will be deprecated in the future. Look to Supported Features for 'GeoBackup'. */ @visibility(Lifecycle.Read) geoBackupSupported?: GeographicallyRedundantBackupSupport; /** * Indicates if high availability with zone redundancy is supported in this location. 'Enabled' means high availability with zone redundancy is supported. 'Disabled' stands for high availability with zone redundancy is not supported. Will be deprecated in the future. Look to Supported Features for 'ZoneRedundantHa'. */ @visibility(Lifecycle.Read) zoneRedundantHaSupported?: ZoneRedundantHighAvailabilitySupport; /** * Indicates if high availability with zone redundancy is supported in conjunction with geographically redundant backups in this location. 'Enabled' means high availability with zone redundancy is supported in conjunction with geographically redundant backups is supported. 'Disabled' stands for high availability with zone redundancy is supported in conjunction with geographically redundant backups is not supported. Will be deprecated in the future. Look to Supported Features for 'ZoneRedundantHaAndGeoBackup'. */ @visibility(Lifecycle.Read) zoneRedundantHaAndGeoBackupSupported?: ZoneRedundantHighAvailabilityAndGeographicallyRedundantBackupSupport; /** * Indicates if storage autogrow is supported in this location. 'Enabled' means storage autogrow is supported. 'Disabled' stands for storage autogrow is not supported. Will be deprecated in the future. Look to Supported Features for 'StorageAutoGrowth'. */ @visibility(Lifecycle.Read) storageAutoGrowthSupported?: StorageAutoGrowthSupport; /** * Indicates if resizing the storage, without interrupting the operation of the database engine, is supported in this location for the given subscription. 'Enabled' means resizing the storage without interrupting the operation of the database engine is supported. 'Disabled' means resizing the storage without interrupting the operation of the database engine is not supported. Will be deprecated in the future. Look to Supported Features for 'OnlineResize'. */ @visibility(Lifecycle.Read) onlineResizeSupported?: OnlineStorageResizeSupport; /** * Indicates if this location is restricted. 'Enabled' means location is restricted. 'Disabled' stands for location is not restricted. Will be deprecated in the future. Look to Supported Features for 'Restricted'. */ @visibility(Lifecycle.Read) restricted?: LocationRestricted; } /** * Capabilities in terms of compute tier. */ #suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details" model ServerEditionCapability extends CapabilityBase { /** * Name of compute tier. */ @visibility(Lifecycle.Read) name?: string; /** * Default compute name (SKU) for this computer tier. */ @visibility(Lifecycle.Read) defaultSkuName?: string; /** * List of storage editions supported by this compute tier and compute name. */ @visibility(Lifecycle.Read) @identifiers(#["name"]) supportedStorageEditions?: StorageEditionCapability[]; /** * List of supported compute names (SKUs). */ @visibility(Lifecycle.Read) @identifiers(#["name"]) supportedServerSkus?: ServerSkuCapability[]; } /** * Capabilities in terms of storage tier. */ #suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details" model StorageEditionCapability extends CapabilityBase { /** * Name of storage tier. */ @visibility(Lifecycle.Read) name?: string; /** * Default storage size (in MB) for this storage tier. */ @visibility(Lifecycle.Read) defaultStorageSizeMb?: int64; /** * Configurations of storage supported for this storage tier. */ @visibility(Lifecycle.Read) @identifiers(#["storageSizeMb"]) supportedStorageMb?: StorageMbCapability[]; } /** * Storage size (in MB) capability. */ #suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details" model StorageMbCapability extends CapabilityBase { /** * Minimum IOPS supported by the storage size. */ @visibility(Lifecycle.Read) supportedIops?: int32; /** * Maximum IOPS supported by the storage size. */ @visibility(Lifecycle.Read) supportedMaximumIops?: int32; /** * Minimum supported size (in MB) of storage. */ @visibility(Lifecycle.Read) storageSizeMb?: int64; /** * Maximum supported size (in MB) of storage. */ @visibility(Lifecycle.Read) maximumStorageSizeMb?: int64; /** * Minimum supported throughput (in MB/s) of storage. */ @visibility(Lifecycle.Read) supportedThroughput?: int32; /** * Maximum supported throughput (in MB/s) of storage. */ @visibility(Lifecycle.Read) supportedMaximumThroughput?: int32; /** * Default IOPS for this tier and storage size. */ @visibility(Lifecycle.Read) defaultIopsTier?: string; /** * List of all supported storage tiers for this tier and storage size. */ @visibility(Lifecycle.Read) @identifiers(#["name"]) supportedIopsTiers?: StorageTierCapability[]; } /** * Capability of a storage tier. */ #suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details" model StorageTierCapability extends CapabilityBase { /** * Name of the storage tier. */ @visibility(Lifecycle.Read) name?: string; /** * Supported IOPS for the storage tier. */ @visibility(Lifecycle.Read) iops?: int32; } /** * Base object for representing capability */ model CapabilityBase { /** * Status of the capability. */ @visibility(Lifecycle.Read) status?: CapabilityStatus; /** * Reason for the capability not being available. */ @visibility(Lifecycle.Read) reason?: string; } /** * Capabilities in terms of compute. */ #suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details" model ServerSkuCapability extends CapabilityBase { /** * Name of the compute (SKU). */ @visibility(Lifecycle.Read) name?: string; /** * vCores available for this compute. */ @visibility(Lifecycle.Read) vCores?: int32; /** * Maximum IOPS supported by this compute. */ @visibility(Lifecycle.Read) supportedIops?: int32; /** * Supported memory (in MB) per virtual core assigned to this compute. */ @visibility(Lifecycle.Read) supportedMemoryPerVcoreMb?: int64; /** * List of supported availability zones. E.g. '1', '2', '3' */ @visibility(Lifecycle.Read) supportedZones?: string[]; /** * Modes of high availability supported for this compute. */ @visibility(Lifecycle.Read) supportedHaMode?: HighAvailabilityMode[]; /** * Features supported. */ @visibility(Lifecycle.Read) @identifiers(#["name"]) supportedFeatures?: SupportedFeature[]; /** * Security profile of the compute. Indicates if it's a Confidential Compute virtual machine. */ @visibility(Lifecycle.Read) securityProfile?: string; } /** * Features supported. */ model SupportedFeature { /** * Name of the feature. */ @visibility(Lifecycle.Read) name?: string; /** * Status of the feature. Indicates if the feature is enabled or not. */ @visibility(Lifecycle.Read) status?: FeatureStatus; } /** * Capabilities in terms of major versions of PostgreSQL database engine. */ #suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details" model ServerVersionCapability extends CapabilityBase { /** * Major version of PostgreSQL database engine. */ @visibility(Lifecycle.Read) name?: string; /** * Major versions of PostgreSQL database engine to which this version can be automatically upgraded. */ @visibility(Lifecycle.Read) supportedVersionsToUpgrade?: string[]; /** * Features supported. */ @visibility(Lifecycle.Read) @identifiers(#["name"]) supportedFeatures?: SupportedFeature[]; } /** * Capability of a fast provisioning compute tier. */ #suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details" model FastProvisioningEditionCapability extends CapabilityBase { /** * Compute tier supporting fast provisioning. */ @visibility(Lifecycle.Read) supportedTier?: string; /** * Compute name (SKU) supporting fast provisioning. */ @visibility(Lifecycle.Read) supportedSku?: string; /** * Storage size (in GB) supporting fast provisioning. */ @visibility(Lifecycle.Read) supportedStorageGb?: int32; /** * Major version of PostgreSQL database engine supporting fast provisioning. */ @visibility(Lifecycle.Read) supportedServerVersions?: string; /** * Count of servers in cache matching this specification. */ @visibility(Lifecycle.Read) serverCount?: int32; } /** * List of log files. */ model CapturedLogList is Azure.Core.Page; /** * Log file. */ #suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details" model CapturedLog extends Azure.ResourceManager.CommonTypes.ProxyResource { /** * Properties of a log file. */ #suppress "@azure-tools/typespec-azure-core/no-private-usage" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details" properties?: CapturedLogProperties; } /** * Properties of a log file. */ model CapturedLogProperties { /** * Creation timestamp of the log file. */ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. createdTime?: utcDateTime; /** * Last modified timestamp of the log file. */ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. lastModifiedTime?: utcDateTime; /** * Size (in KB) of the log file. */ sizeInKb?: int64; /** * Type of log file. Can be 'ServerLogs' or 'UpgradeLogs'. */ type?: string; /** * URL to download the log file from. */ url?: string; } /** * List of configurations (also known as server parameters). */ model ConfigurationList is Azure.Core.Page; /** * Properties of a configuration (also known as server parameter). */ #suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-provisioning-state" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details" model ConfigurationProperties { /** * Value of the configuration (also known as server parameter). Required to update the value assigned to a specific modifiable configuration. */ value?: string; /** * Description of the configuration (also known as server parameter). */ @visibility(Lifecycle.Read) description?: string; /** * Value assigned by default to the configuration (also known as server parameter). */ @visibility(Lifecycle.Read) defaultValue?: string; /** * Data type of the configuration (also known as server parameter). */ @visibility(Lifecycle.Read) dataType?: ConfigurationDataType; /** * Allowed values of the configuration (also known as server parameter). */ @visibility(Lifecycle.Read) allowedValues?: string; /** * Source of the value assigned to the configuration (also known as server parameter). Required to update the value assigned to a specific modifiable configuration. */ source?: string; /** * Indicates if it's a dynamic (true) or static (false) configuration (also known as server parameter). Static server parameters require a server restart after changing the value assigned to them, for the change to take effect. Dynamic server parameters do not require a server restart after changing the value assigned to them, for the change to take effect. */ @visibility(Lifecycle.Read) isDynamicConfig?: boolean; /** * Indicates if it's a read-only (true) or modifiable (false) configuration (also known as server parameter). */ @visibility(Lifecycle.Read) isReadOnly?: boolean; /** * Indicates if the value assigned to the configuration (also known as server parameter) is pending a server restart for it to take effect. */ @visibility(Lifecycle.Read) isConfigPendingRestart?: boolean; /** * Units in which the configuration (also known as server parameter) value is expressed. */ @visibility(Lifecycle.Read) unit?: string; /** * Link pointing to the documentation of the configuration (also known as server parameter). */ @visibility(Lifecycle.Read) documentationLink?: string; } /** * Configuration (also known as server parameter). */ model ConfigurationForUpdate { /** * Properties of a configuration (also known as server parameter). */ #suppress "@azure-tools/typespec-azure-core/no-private-usage" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details" properties?: ConfigurationProperties; } /** * Properties of a database. */ #suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-provisioning-state" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details" model DatabaseProperties { /** * Character set of the database. */ @pattern("^[a-zA-Z]+\\w*$") charset?: string; /** * Collation of the database. */ @pattern("^[a-zA-Z\\-]+([. ]|\\w)*$") collation?: string; } /** * Properties of a tuning option. */ #suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-provisioning-state" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details" model TuningOptionsProperties { /** * State of the tuning option. */ @visibility(Lifecycle.Read) state?: string; } /** * List of all databases in a server. */ model DatabaseList is Azure.Core.Page; /** * Properties of a firewall rule. */ #suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-provisioning-state" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details" model FirewallRuleProperties { /** * IP address defining the start of the range of addresses of a firewall rule. Must be expressed in IPv4 format. */ @pattern("^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$") startIpAddress: string; /** * IP address defining the end of the range of addresses of a firewall rule. Must be expressed in IPv4 format. */ @pattern("^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$") endIpAddress: string; } /** * List of firewall rules. */ model FirewallRuleList is Azure.Core.Page; /** * A request that is made for pre-backup. */ #suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details" #suppress "@azure-tools/typespec-azure-resource-manager/no-empty-model" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details" model LtrPreBackupRequest extends BackupRequestBase {} /** * BackupRequestBase is the base for all backup request. */ model BackupRequestBase { /** * Backup Settings */ backupSettings: BackupSettings; } /** * Settings for the long term backup. */ model BackupSettings { /** * Backup Name for the current backup */ backupName: string; } /** * Response for the LTR pre-backup API call. */ model LtrPreBackupResponse { /** * Additional Properties for the pre backup response */ #suppress "@azure-tools/typespec-azure-core/no-private-usage" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details" properties: BackupsLongTermRetentionResponseProperties; } /** * Response for the pre-backup request. */ model BackupsLongTermRetentionResponseProperties { /** * Number of storage containers the plugin will use during backup. More than one containers may be used for size limitations, parallelism, or redundancy etc. */ numberOfContainers: int32; } /** * Request made for a long term retention backup. */ #suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details" model BackupsLongTermRetentionRequest extends BackupRequestBase { /** * Backup store detail for target server. */ targetDetails: BackupStoreDetails; } /** * Details about the target where the backup content will be stored. */ model BackupStoreDetails { /** * List of SAS uri of storage containers where backup data is to be streamed/copied. */ sasUriList: secretString[]; } /** * Response for the LTR backup API call */ model BackupsLongTermRetentionResponse { /** * Long Term Retention Backup Operation Resource Properties */ #suppress "@azure-tools/typespec-azure-core/no-private-usage" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details" properties?: LtrBackupOperationResponseProperties; } /** * Response for the backup request. */ #suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-provisioning-state" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details" model LtrBackupOperationResponseProperties { /** * Size of datasource in bytes. */ datasourceSizeInBytes?: int64; /** * Data transferred in bytes. */ dataTransferredInBytes?: int64; /** * Name of Backup operation. */ backupName?: string; /** * Metadata to be stored in RP. Store everything that will be required to perform a successful restore using this Recovery point. e.g. Versions, DataFormat etc. */ backupMetadata?: string; /** * Service-set extensible enum indicating the status of operation. */ status: ExecutionStatus; /** * Start time of the operation. */ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. startTime: utcDateTime; /** * End time of the operation. */ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. endTime?: utcDateTime; /** * Percentage completed. */ @minValue(0) @maxValue(100) percentComplete?: float64; /** * Error code. */ @visibility(Lifecycle.Read) errorCode?: string; /** * Error message. */ @visibility(Lifecycle.Read) errorMessage?: string; } /** * A list of long term retention backup operations for server. */ model LtrServerBackupOperationList is Azure.Core.Page; /** * Migration. */ #suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-provisioning-state" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details" model MigrationProperties { /** * Identifier of a migration. */ @visibility(Lifecycle.Read) migrationId?: string; /** * Current status of a migration. */ @visibility(Lifecycle.Read) currentStatus?: MigrationStatus; /** * Identifier of the private endpoint migration instance. */ migrationInstanceResourceId?: armResourceIdentifier; /** * Mode used to perform the migration: Online or Offline. */ migrationMode?: MigrationMode; /** * Supported option for a migration. */ migrationOption?: MigrationOption; /** * Source server type used for the migration: ApsaraDB_RDS, AWS, AWS_AURORA, AWS_EC2, AWS_RDS, AzureVM, Crunchy_PostgreSQL, Digital_Ocean_Droplets, Digital_Ocean_PostgreSQL, EDB, EDB_Oracle_Server, EDB_PostgreSQL, GCP, GCP_AlloyDB, GCP_CloudSQL, GCP_Compute, Heroku_PostgreSQL, Huawei_Compute, Huawei_RDS, OnPremises, PostgreSQLCosmosDB, PostgreSQLFlexibleServer, PostgreSQLSingleServer, or Supabase_PostgreSQL */ sourceType?: SourceType; /** * SSL mode used by a migration. Default SSL mode for 'PostgreSQLSingleServer' is 'VerifyFull'. Default SSL mode for other source types is 'Prefer'. */ sslMode?: SslMode; /** * Metadata of source database server. */ @visibility(Lifecycle.Read) sourceDbServerMetadata?: DbServerMetadata; /** * Metadata of target database server. */ @visibility(Lifecycle.Read) targetDbServerMetadata?: DbServerMetadata; @doc("Identifier of the source database server resource, when 'sourceType' is 'PostgreSQLSingleServer'. For other source types this must be set to ipaddress:port@username or hostname:port@username.") sourceDbServerResourceId?: string; /** * Fully qualified domain name (FQDN) or IP address of the source server. This property is optional. When provided, the migration service will always use it to connect to the source server. */ sourceDbServerFullyQualifiedDomainName?: string; /** * Identifier of the target database server resource. */ @visibility(Lifecycle.Read) targetDbServerResourceId?: string; /** * Fully qualified domain name (FQDN) or IP address of the target server. This property is optional. When provided, the migration service will always use it to connect to the target server. */ targetDbServerFullyQualifiedDomainName?: string; /** * Migration secret parameters. */ secretParameters?: MigrationSecretParameters; /** * Names of databases to migrate. */ #suppress "@azure-tools/typespec-azure-core/no-openapi" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details" @OpenAPI.extension("x-ms-identifiers", #[]) @maxItems(50) dbsToMigrate?: string[]; /** * Indicates whether to setup logical replication on source server, if needed. */ setupLogicalReplicationOnSourceDbIfNeeded?: LogicalReplicationOnSourceServer; /** * Indicates if databases on the target server can be overwritten when already present. If set to 'False', when the migration workflow detects that the database already exists on the target server, it will wait for a confirmation. */ overwriteDbsInTarget?: OverwriteDatabasesOnTargetServer; /** * Start time (UTC) for migration window. */ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. migrationWindowStartTimeInUtc?: utcDateTime; /** * End time (UTC) for migration window. */ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. migrationWindowEndTimeInUtc?: utcDateTime; /** * Indicates if roles and permissions must be migrated. */ migrateRoles?: MigrateRolesAndPermissions; /** * Indicates if data migration must start right away. */ startDataMigration?: StartDataMigration; /** * Indicates if cutover must be triggered for the entire migration. */ triggerCutover?: TriggerCutover; /** * When you want to trigger cutover for specific databases set 'triggerCutover' to 'True' and the names of the specific databases in this array. */ #suppress "@azure-tools/typespec-azure-core/no-openapi" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details" @OpenAPI.extension("x-ms-identifiers", #[]) dbsToTriggerCutoverOn?: string[]; /** * Indicates if cancel must be triggered for the entire migration. */ cancel?: Cancel; /** * When you want to trigger cancel for specific databases set 'triggerCutover' to 'True' and the names of the specific databases in this array. */ #suppress "@azure-tools/typespec-azure-core/no-openapi" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details" @OpenAPI.extension("x-ms-identifiers", #[]) dbsToCancelMigrationOn?: string[]; } /** * State of migration. */ model MigrationStatus { /** * State of migration. */ @visibility(Lifecycle.Read) state?: MigrationState; /** * Error message, if any, for the migration state. */ @visibility(Lifecycle.Read) error?: string; /** * Current migration sub state details. */ @visibility(Lifecycle.Read) currentSubStateDetails?: MigrationSubstateDetails; } /** * Details of migration substate. */ model MigrationSubstateDetails { /** * Substate of migration. */ @visibility(Lifecycle.Read) currentSubState?: MigrationSubstate; #suppress "@azure-tools/typespec-azure-resource-manager/arm-no-record" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details" #suppress "@azure-tools/typespec-azure-core/documentation-required" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details" dbDetails?: Record; #suppress "@azure-tools/typespec-azure-core/documentation-required" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details" validationDetails?: ValidationDetails; } /** * Migration state of a database. */ model DatabaseMigrationState { /** * Name of database. */ databaseName?: string; /** * Migration state of a database. */ migrationState?: MigrationDatabaseState; /** * Migration operation of a database. */ migrationOperation?: string; /** * Start time of a migration state. */ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. startedOn?: utcDateTime; /** * End time of a migration state. */ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. endedOn?: utcDateTime; /** * Number of tables queued for the migration of a database. */ fullLoadQueuedTables?: int32; /** * Number of tables encountering errors during the migration of a database. */ fullLoadErroredTables?: int32; /** * Number of tables loading during the migration of a database. */ fullLoadLoadingTables?: int32; /** * Number of tables loaded during the migration of a database. */ fullLoadCompletedTables?: int32; /** * Change Data Capture update counter. */ cdcUpdateCounter?: int32; /** * Change Data Capture delete counter. */ cdcDeleteCounter?: int32; /** * Change Data Capture insert counter. */ cdcInsertCounter?: int32; /** * Change Data Capture applied changes counter. */ appliedChanges?: int32; /** * Change Data Capture incoming changes counter. */ incomingChanges?: int32; /** * Lag in seconds between source and target during online phase. */ latency?: int32; /** * Error message, if any, for the migration state. */ message?: string; } /** * Details for the validation for migration. */ model ValidationDetails { /** * Validation status for migration. */ status?: ValidationState; /** * Start time (UTC) for validation. */ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. validationStartTimeInUtc?: utcDateTime; /** * End time (UTC) for validation. */ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. validationEndTimeInUtc?: utcDateTime; /** * Details of server level validations. */ @identifiers(#[]) serverLevelValidationDetails?: ValidationSummaryItem[]; /** * Details of server level validations. */ @identifiers(#["databaseName"]) dbLevelValidationDetails?: DbLevelValidationStatus[]; } /** * Validation summary object. */ model ValidationSummaryItem { /** * Validation type. */ type?: string; /** * Validation status for migration. */ state?: ValidationState; /** * Validation messages. */ @identifiers(#[]) messages?: ValidationMessage[]; } /** * Validation message object. */ model ValidationMessage { /** * Severity of validation message. */ state?: ValidationState; /** * Validation message string. */ message?: string; } /** * Validation status summary for a database. */ model DbLevelValidationStatus { /** * Name of database. */ databaseName?: string; /** * Start time of a database level validation. */ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. startedOn?: utcDateTime; /** * End time of a database level validation. */ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. endedOn?: utcDateTime; /** * Summary of database level validations. */ @identifiers(#[]) summary?: ValidationSummaryItem[]; } /** * Database server metadata. */ model DbServerMetadata { /** * Location of database server. */ @visibility(Lifecycle.Read) location?: string; /** * Major version of PostgreSQL database engine. */ version?: string; /** * Storage size (in MB) for database server. */ storageMb?: int32; /** * Compute tier and size of the database server. This object is empty for an Azure Database for PostgreSQL single server. */ sku?: ServerSku; } /** * Compute information of a server. */ model ServerSku { /** * Compute tier and size of the database server. This object is empty for an Azure Database for PostgreSQL single server. */ name?: string; /** * Tier of the compute assigned to a server. */ tier?: SkuTier; } /** * Migration secret parameters. */ model MigrationSecretParameters { /** * Credentials of administrator users for source and target servers. */ @secret adminCredentials: AdminCredentials; /** * Gets or sets the name of the user for the source server. This user doesn't need to be an administrator. */ @visibility(Lifecycle.Create, Lifecycle.Update) sourceServerUsername?: string; /** * Gets or sets the name of the user for the target server. This user doesn't need to be an administrator. */ @visibility(Lifecycle.Create, Lifecycle.Update) targetServerUsername?: string; } /** * Credentials of administrator users for source and target servers. */ model AdminCredentials { /** * Password for the user of the source server. */ @visibility(Lifecycle.Create, Lifecycle.Update) @secret sourceServerPassword: string; /** * Password for the user of the target server. */ @visibility(Lifecycle.Create, Lifecycle.Update) @secret targetServerPassword: string; } /** * Migration. */ model MigrationResourceForPatch { /** * Migration properties. */ #suppress "@azure-tools/typespec-azure-core/no-private-usage" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details" properties?: MigrationPropertiesForPatch; /** * Application-specific metadata in the form of key-value pairs. */ #suppress "@azure-tools/typespec-azure-resource-manager/arm-no-record" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details" tags?: Record; } /** * Migration properties. */ model MigrationPropertiesForPatch { @doc("Identifier of the source database server resource, when 'sourceType' is 'PostgreSQLSingleServer'. For other source types this must be set to ipaddress:port@username or hostname:port@username.") sourceDbServerResourceId?: string; /** * Fully qualified domain name (FQDN) or IP address of the source server. This property is optional. When provided, the migration service will always use it to connect to the source server. */ sourceDbServerFullyQualifiedDomainName?: string; /** * Fully qualified domain name (FQDN) or IP address of the target server. This property is optional. When provided, the migration service will always use it to connect to the target server. */ targetDbServerFullyQualifiedDomainName?: string; /** * Migration secret parameters. */ secretParameters?: MigrationSecretParametersForPatch; /** * Names of databases to migrate. */ #suppress "@azure-tools/typespec-azure-core/no-openapi" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details" @OpenAPI.extension("x-ms-identifiers", #[]) @maxItems(50) dbsToMigrate?: string[]; /** * Indicates whether to setup logical replication on source server, if needed. */ setupLogicalReplicationOnSourceDbIfNeeded?: LogicalReplicationOnSourceServer; /** * Indicates if databases on the target server can be overwritten when already present. If set to 'False', when the migration workflow detects that the database already exists on the target server, it will wait for a confirmation. */ overwriteDbsInTarget?: OverwriteDatabasesOnTargetServer; /** * Start time (UTC) for migration window. */ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. migrationWindowStartTimeInUtc?: utcDateTime; /** * Indicates if roles and permissions must be migrated. */ migrateRoles?: MigrateRolesAndPermissions; /** * Indicates if data migration must start right away. */ startDataMigration?: StartDataMigration; /** * Indicates if cutover must be triggered for the entire migration. */ triggerCutover?: TriggerCutover; /** * When you want to trigger cutover for specific databases set 'triggerCutover' to 'True' and the names of the specific databases in this array. */ #suppress "@azure-tools/typespec-azure-core/no-openapi" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details" @OpenAPI.extension("x-ms-identifiers", #[]) dbsToTriggerCutoverOn?: string[]; /** * Indicates if cancel must be triggered for the entire migration. */ cancel?: Cancel; /** * When you want to trigger cancel for specific databases set 'triggerCutover' to 'True' and the names of the specific databases in this array. */ #suppress "@azure-tools/typespec-azure-core/no-openapi" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details" @OpenAPI.extension("x-ms-identifiers", #[]) dbsToCancelMigrationOn?: string[]; /** * Mode used to perform the migration: Online or Offline. */ migrationMode?: MigrationMode; } /** * Migration secret parameters. */ model MigrationSecretParametersForPatch { /** * Credentials of administrator users for source and target servers. */ @secret adminCredentials?: AdminCredentialsForPatch; /** * Gets or sets the name of the user for the source server. This user doesn't need to be an administrator. */ @visibility(Lifecycle.Update) sourceServerUsername?: string; /** * Gets or sets the name of the user for the target server. This user doesn't need to be an administrator. */ @visibility(Lifecycle.Update) targetServerUsername?: string; } /** * Credentials of administrator users for source and target servers. */ model AdminCredentialsForPatch { /** * Password for the user of the source server. */ @visibility(Lifecycle.Update) @secret sourceServerPassword?: string; /** * Password for the user of the target server. */ @visibility(Lifecycle.Update) @secret targetServerPassword?: string; } /** * List of migrations. */ model MigrationList is Azure.Core.Page; /** * Availability of a migration name. */ model MigrationNameAvailability { /** * Name of the migration to check for validity and availability. */ name: string; /** * Type of resource. */ type: string; /** * Indicates if the migration name is available. */ @visibility(Lifecycle.Read) nameAvailable?: boolean; /** * Migration name availability reason. */ @visibility(Lifecycle.Read) reason?: MigrationNameAvailabilityReason; /** * Migration name availability message. */ @visibility(Lifecycle.Read) message?: string; } /** * Availability of a name. */ #suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details" model NameAvailabilityModel extends Azure.ResourceManager.CommonTypes.CheckNameAvailabilityResponse { /** * Name for which validity and availability was checked. */ @visibility(Lifecycle.Read) name?: string; /** * Type of resource. It can be 'Microsoft.DBforPostgreSQL/flexibleServers' or 'Microsoft.DBforPostgreSQL/flexibleServers/virtualendpoints'. */ @visibility(Lifecycle.Read) type?: string; } /** * Metric specification for an operation. */ model MetricSpecification { /** * Name of the metric. */ name?: string; /** * Display name of the metric. */ displayName?: string; /** * Display description of the metric. */ displayDescription?: string; /** * Unit of the metric. */ unit?: string; /** * Aggregation type of the metric. */ aggregationType?: string; /** * Supported aggregation types for the metric. */ supportedAggregationTypes?: string[]; /** * Supported time grain types for the metric. */ supportedTimeGrainTypes?: string[]; /** * Category of the metric. */ category?: string; } /** * Log specification for an operation. */ model LogSpecification { /** * Name of the log. */ name?: string; /** * Display name of the log. */ displayName?: string; /** * Blob duration for the log. */ blobDuration?: string; } /** * Service specification for an operation. */ model ServiceSpecification { /** * Metric specifications for the operation. */ @visibility(Lifecycle.Read) @identifiers(#["name"]) metricSpecifications?: MetricSpecification[]; /** * Log specifications for the operation. */ @visibility(Lifecycle.Read) @identifiers(#["name"]) logSpecifications?: LogSpecification[]; } /** * Additional properties for operation metadata. */ model OperationProperties { /** * Service specification for the operation. */ serviceSpecification?: ServiceSpecification; } /** * REST API operation definition. */ model Operation { /** * Name of the operation being performed on this particular object. */ @visibility(Lifecycle.Read) name?: string; /** * Localized display information for this particular operation or action. */ @visibility(Lifecycle.Read) display?: OperationDisplay; /** * Indicates if the operation is a data action. */ isDataAction?: boolean; /** * Intended executor of the operation. */ @visibility(Lifecycle.Read) origin?: OperationOrigin; /** * Additional descriptions for the operation. */ @visibility(Lifecycle.Read) properties?: OperationProperties; } /** * Display metadata associated with the operation. */ model OperationDisplay { /** * Name of the resource provider. */ @visibility(Lifecycle.Read) provider?: string; /** * Type of resource on which the operation is performed. */ @visibility(Lifecycle.Read) resource?: string; /** * Name of the operation. */ @visibility(Lifecycle.Read) operation?: string; /** * Description of the operation. */ @visibility(Lifecycle.Read) description?: string; } /** * List of private endpoint connections. */ model PrivateEndpointConnectionList is Azure.Core.Page; /** * A list of private link resources */ model PrivateLinkResourceList is Azure.Core.Page; /** * Capability for the PostgreSQL server */ model QuotaUsageList is Azure.Core.Page; /** * Quota usage for servers */ model QuotaUsage { /** * Name of quota usage for servers */ name?: NameProperty; /** * Quota limit */ limit?: int64; /** * Quota unit */ unit?: string = "Count"; /** * Current Quota usage value */ currentValue?: int64; /** * Fully qualified ARM resource Id */ id?: string; } /** * Name property for quota usage */ model NameProperty { /** * Name value */ value?: string; /** * Localized name */ localizedValue?: string; } /** * A list of servers. */ model ServerList is Azure.Core.Page; /** * Compute information of a server. */ model Sku { /** * Name by which is known a given compute size assigned to a server. */ name: string; /** * Tier of the compute assigned to a server. */ tier: SkuTier; } /** * Identities associated with a server. */ model UserAssignedIdentity { /** * Map of user assigned managed identities. */ #suppress "@azure-tools/typespec-azure-resource-manager/arm-no-record" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details" userAssignedIdentities?: Record; /** * Identifier of the object of the service principal associated to the user assigned managed identity. */ principalId?: string; /** * Types of identities associated with a server. */ type: IdentityType; /** * Identifier of the tenant of a server. */ @visibility(Lifecycle.Read) tenantId?: string; } /** * User assigned managed identity associated with a server. */ model UserIdentity { /** * Identifier of the object of the service principal associated to the user assigned managed identity. */ principalId?: string; /** * Identifier of the client of the service principal associated to the user assigned managed identity. */ clientId?: string; } /** * Properties of a server. */ #suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-provisioning-state" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details" model ServerProperties { /** * 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. */ @visibility(Lifecycle.Read, Lifecycle.Create) administratorLogin?: string; /** * Password assigned to the administrator login. As long as password authentication is enabled, this password can be changed at any time. */ @visibility(Lifecycle.Create, Lifecycle.Update) @secret administratorLoginPassword?: string; /** * Major version of PostgreSQL database engine. */ version?: PostgresMajorVersion; /** * Minor version of PostgreSQL database engine. */ @visibility(Lifecycle.Read) minorVersion?: string; /** * Possible states of a server. */ @visibility(Lifecycle.Read) state?: ServerState; /** * Fully qualified domain name of a server. */ @visibility(Lifecycle.Read) fullyQualifiedDomainName?: string; /** * Storage properties of a server. */ storage?: Storage; /** * Authentication configuration properties of a server. */ authConfig?: AuthConfig; /** * Data encryption properties of a server. */ dataEncryption?: DataEncryption; /** * Backup properties of a server. */ backup?: Backup; /** * Network properties of a server. Only required if you want your server to be integrated into a virtual network provided by customer. */ network?: Network; /** * High availability properties of a server. */ highAvailability?: HighAvailability; /** * Maintenance window properties of a server. */ @visibility(Lifecycle.Read, Lifecycle.Update) maintenanceWindow?: MaintenanceWindow; /** * Identifier of the server to be used as the source of the new server. Required when 'createMode' is 'PointInTimeRestore', 'GeoRestore', 'Replica', or 'ReviveDropped'. This property is returned only when the target server is a read replica. */ @visibility(Lifecycle.Read, Lifecycle.Create) sourceServerResourceId?: armResourceIdentifier<[ { type: "Microsoft.DBforPostgreSQL/flexibleServers"; } ]>; /** * Creation time (in ISO8601 format) of the backup which you want to restore in the new server. It's required when 'createMode' is 'PointInTimeRestore', 'GeoRestore', or 'ReviveDropped'. */ #suppress "@azure-tools/typespec-azure-core/casing-style" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details" @visibility(Lifecycle.Create) // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. pointInTimeUTC?: utcDateTime; /** * Availability zone of a server. */ @visibility(Lifecycle.Read, Lifecycle.Create) availabilityZone?: string = ""; /** * Role of the server in a replication set. */ replicationRole?: ReplicationRole; /** * Maximum number of read replicas allowed for a server. */ @visibility(Lifecycle.Read) replicaCapacity?: int32; /** * Read replica properties of a server. Required only in case that you want to promote a server. */ @visibility(Lifecycle.Read, Lifecycle.Update) replica?: Replica; /** * Creation mode of a new server. */ @visibility(Lifecycle.Create, Lifecycle.Update) createMode?: CreateMode; /** * List of private endpoint connections associated with the specified server. */ @visibility(Lifecycle.Read) privateEndpointConnections?: PrivateEndpointConnection[]; /** * Cluster properties of a server. */ @visibility(Lifecycle.Read, Lifecycle.Create, Lifecycle.Update) cluster?: Cluster; } /** * Storage properties of a server. */ model Storage { /** * Size of storage assigned to a server. */ #suppress "@azure-tools/typespec-azure-core/casing-style" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details" storageSizeGB?: int32; /** * 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. */ autoGrow?: StorageAutoGrow; /** * Storage tier of a server. */ tier?: AzureManagedDiskPerformanceTier; /** * Maximum IOPS supported for storage. Required when type of storage is PremiumV2_LRS or UltraSSD_LRS. */ iops?: int32; /** * Maximum throughput supported for storage. Required when type of storage is PremiumV2_LRS or UltraSSD_LRS. */ throughput?: int32; /** * 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. */ type?: StorageType; } /** * Authentication configuration properties of a server. */ model AuthConfig { /** * Indicates if the server supports Microsoft Entra authentication. */ activeDirectoryAuth?: MicrosoftEntraAuth; /** * Indicates if the server supports password based authentication. */ passwordAuth?: PasswordBasedAuth = PasswordBasedAuth.Enabled; /** * Identifier of the tenant of the delegated resource. */ tenantId?: string = ""; } /** * Data encryption properties of a server. */ model DataEncryption { /** * URI of the key in Azure Key Vault used for data encryption of the primary storage associated to a server. */ #suppress "@azure-tools/typespec-azure-core/casing-style" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details" primaryKeyURI?: string; /** * 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. */ primaryUserAssignedIdentityId?: string; /** * 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. */ #suppress "@azure-tools/typespec-azure-core/casing-style" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details" geoBackupKeyURI?: string; /** * 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?: string; /** * Data encryption type used by a server. */ type?: DataEncryptionType; /** * 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. */ @visibility(Lifecycle.Read) primaryEncryptionKeyStatus?: EncryptionKeyStatus; /** * 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. */ @visibility(Lifecycle.Read) geoBackupEncryptionKeyStatus?: EncryptionKeyStatus; @doc("Client id of multi-tenant Microsoft Entra application.") @added(Versions.v2026_04_01) primaryFederatedIdentityClientId?: string; @doc("Client id of multi-tenant Microsoft Entra application for when it is configured to support geographically redundant backups.") @added(Versions.v2026_04_01) geoBackupFederatedIdentityClientId?: string; } /** * Backup properties of a server. */ model Backup { /** * Backup retention days for the server. */ backupRetentionDays?: int32 = 7; /** * Indicates if the server is configured to create geographically redundant backups. */ @visibility(Lifecycle.Read, Lifecycle.Create) geoRedundantBackup?: GeographicallyRedundantBackup = GeographicallyRedundantBackup.Disabled; /** * Earliest restore point time (ISO8601 format) for a server. */ @visibility(Lifecycle.Read) // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. earliestRestoreDate?: utcDateTime; @visibility(Lifecycle.Read, Lifecycle.Create) @doc("Indicates if immutable backup is enabled or disabled for the server.") @added(Versions.v2026_04_01) immutableBackup?: ImmutableBackup = ImmutableBackup.Disabled; } /** * Network properties of a server. */ model Network { /** * 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. */ publicNetworkAccess?: ServerPublicNetworkAccessState; /** * 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. */ delegatedSubnetResourceId?: armResourceIdentifier<[ { type: "Microsoft.Network/virtualNetworks/subnets"; } ]>; /** * 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. */ privateDnsZoneArmResourceId?: armResourceIdentifier<[ { type: "Microsoft.Network/privateDnsZones"; } ]>; } /** * High availability properties of a server. */ model HighAvailability { /** * High availability mode for a server. */ mode?: PostgreSqlFlexibleServerHighAvailabilityMode = PostgreSqlFlexibleServerHighAvailabilityMode.Disabled; /** * Possible states of the standby server created when high availability is set to SameZone or ZoneRedundant. */ @visibility(Lifecycle.Read) state?: HighAvailabilityState; /** * Availability zone associated to the standby server created when high availability is set to SameZone or ZoneRedundant. */ standbyAvailabilityZone?: string = ""; } /** * Maintenance window properties of a server. */ model MaintenanceWindow { /** * Indicates whether custom window is enabled or disabled. */ customWindow?: string = "Disabled"; /** * Start hour to be used for maintenance window. */ startHour?: int32 = 0; /** * Start minute to be used for maintenance window. */ startMinute?: int32 = 0; /** * Day of the week to be used for maintenance window. */ dayOfWeek?: int32 = 0; } /** * Replica properties of a server. */ model Replica { /** * Role of the server in a replication set. */ role?: ReplicationRole; /** * Maximum number of read replicas allowed for a server. */ @visibility(Lifecycle.Read) capacity?: int32; /** * 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 */ @visibility(Lifecycle.Read) replicationState?: ReplicationState; /** * 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. */ @visibility(Lifecycle.Update) promoteMode?: ReadReplicaPromoteMode; /** * Data synchronization option to use when processing the operation specified in the promoteMode property. This property is write only. */ @visibility(Lifecycle.Update) promoteOption?: ReadReplicaPromoteOption; } /** * Cluster properties of a server. */ model Cluster { /** * Number of nodes assigned to the elastic cluster. */ clusterSize?: int32 = 0; /** * Default database name for the elastic cluster. */ defaultDatabaseName?: string; } /** * Represents a server to be updated. */ model ServerForPatch { /** * Compute tier and size of a server. */ sku?: SkuForPatch; /** * Describes the identity of the application. */ identity?: UserAssignedIdentity; /** * Properties of the server. */ #suppress "@azure-tools/typespec-azure-core/no-private-usage" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details" properties?: ServerPropertiesForPatch; /** * Application-specific metadata in the form of key-value pairs. */ #suppress "@azure-tools/typespec-azure-resource-manager/arm-no-record" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details" tags?: Record; } /** * Compute information of a server. */ model SkuForPatch { /** * Name by which is known a given compute size assigned to a server. */ name?: string; /** * Tier of the compute assigned to a server. */ tier?: SkuTier; } /** * Properties of a server. */ model ServerPropertiesForPatch { /** * 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. */ @visibility(Lifecycle.Read) administratorLogin?: string; /** * Password assigned to the administrator login. As long as password authentication is enabled, this password can be changed at any time. */ @visibility(Lifecycle.Update) @secret administratorLoginPassword?: string; /** * Major version of PostgreSQL database engine. */ version?: PostgresMajorVersion; /** * Storage properties of a server. */ storage?: Storage; /** * Backup properties of a server. */ backup?: BackupForPatch; /** * High availability properties of a server. */ highAvailability?: HighAvailabilityForPatch; /** * Maintenance window properties of a server. */ @visibility(Lifecycle.Read, Lifecycle.Update) maintenanceWindow?: MaintenanceWindowForPatch; /** * Authentication configuration properties of a server. */ authConfig?: AuthConfigForPatch; /** * Data encryption properties of a server. */ dataEncryption?: DataEncryption; /** * Availability zone of a server. */ availabilityZone?: string = ""; /** * Update mode of an existing server. */ @visibility(Lifecycle.Update) createMode?: CreateModeForPatch; /** * Role of the server in a replication set. */ replicationRole?: ReplicationRole; /** * Read replica properties of a server. Required only in case that you want to promote a server. */ @visibility(Lifecycle.Read, Lifecycle.Update) replica?: Replica; /** * Network properties of a server. Only required if you want your server to be integrated into a virtual network provided by customer. */ network?: Network; /** * Cluster properties of a server. */ @visibility(Lifecycle.Read, Lifecycle.Update) cluster?: Cluster; } /** * Backup properties of a server. */ model BackupForPatch { /** * Backup retention days for the server. */ backupRetentionDays?: int32; /** * Indicates if the server is configured to create geographically redundant backups. */ @visibility(Lifecycle.Read) geoRedundantBackup?: GeographicallyRedundantBackup; /** * Earliest restore point time (ISO8601 format) for a server. */ @visibility(Lifecycle.Read) // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. earliestRestoreDate?: utcDateTime; } /** * High availability properties of a server. */ model HighAvailabilityForPatch { /** * High availability mode for a server. */ mode?: PostgreSqlFlexibleServerHighAvailabilityMode; /** * Possible states of the standby server created when high availability is set to SameZone or ZoneRedundant. */ @visibility(Lifecycle.Read) state?: HighAvailabilityState; /** * Availability zone associated to the standby server created when high availability is set to SameZone or ZoneRedundant. */ standbyAvailabilityZone?: string = ""; } /** * Maintenance window properties of a server. */ model MaintenanceWindowForPatch { /** * Indicates whether custom window is enabled or disabled. */ customWindow?: string; /** * Start hour to be used for maintenance window. */ startHour?: int32; /** * Start minute to be used for maintenance window. */ startMinute?: int32; /** * Day of the week to be used for maintenance window. */ dayOfWeek?: int32; } /** * Authentication configuration properties of a server. */ model AuthConfigForPatch { /** * Indicates if the server supports Microsoft Entra authentication. */ activeDirectoryAuth?: MicrosoftEntraAuth; /** * Indicates if the server supports password based authentication. */ passwordAuth?: PasswordBasedAuth; /** * Identifier of the tenant of the delegated resource. */ tenantId?: string; } /** * PostgreSQL database engine restart parameters. */ model RestartParameter { /** * Indicates if restart the PostgreSQL database engine should failover or switch over from primary to standby. This only works if server has high availability enabled. */ restartWithFailover?: boolean; /** * Failover mode. */ failoverMode?: FailoverMode; } /** * List of available object recommendations. */ model ObjectRecommendationList is Azure.Core.Page; /** * Object recommendation properties. */ #suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details" model ObjectRecommendation extends Azure.ResourceManager.CommonTypes.ProxyResource { /** * Always empty. */ kind?: string; /** * Properties of an object recommendation. */ #suppress "@azure-tools/typespec-azure-core/no-private-usage" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details" @visibility(Lifecycle.Read) properties?: ObjectRecommendationProperties; } /** * Object recommendation properties. */ model ObjectRecommendationProperties { /** * Creation time (UTC) of this recommendation. */ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. initialRecommendedTime?: utcDateTime; /** * Last time (UTC) that this recommendation was produced. */ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. lastRecommendedTime?: utcDateTime; /** * Number of times this recommendation has been produced. */ timesRecommended?: int32; /** * List of identifiers for all queries identified as targets for improvement if the recommendation is applied. The list is only populated for CREATE INDEX recommendations. */ improvedQueryIds?: int64[]; /** * Reason for this recommendation. */ recommendationReason?: string; /** * Current state. */ currentState?: string; /** * Type for this recommendation. */ recommendationType?: RecommendationTypeEnum; /** * Implementation details for the recommended action. */ implementationDetails?: ObjectRecommendationPropertiesImplementationDetails; /** * Workload information for the recommended action. */ analyzedWorkload?: ObjectRecommendationPropertiesAnalyzedWorkload; /** * Estimated impact of this recommended action. */ @visibility(Lifecycle.Read) @identifiers(#["dimensionName"]) estimatedImpact?: ImpactRecord[]; /** * Recommendation details for the recommended action. */ @visibility(Lifecycle.Read) details?: ObjectRecommendationDetails; } /** * Implementation details for the recommended action. */ model ObjectRecommendationPropertiesImplementationDetails { /** * Method of implementation for recommended action. */ method?: string; /** * Implementation script for the recommended action. */ script?: string; } /** * Workload information for the recommended action. */ model ObjectRecommendationPropertiesAnalyzedWorkload { /** * Start time (UTC) of the workload analyzed. */ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. startTime?: utcDateTime; /** * End time (UTC) of the workload analyzed. */ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. endTime?: utcDateTime; /** * Number of queries from the workload that were examined to produce this recommendation. For DROP INDEX recommendations it's 0 (zero). */ queryCount?: int32; } /** * Impact on some metric if this recommended action is applied. */ model ImpactRecord { /** * Dimension name. */ dimensionName?: string; /** * Dimension unit. */ unit?: string; /** * Optional property that can be used to store the identifier of the query, if the metric is for a specific query. */ queryId?: int64; /** * Absolute value. */ absoluteValue?: float64; } /** * Recommendation details for the recommended action. */ model ObjectRecommendationDetails { /** * Database name. */ databaseName?: string; /** * Schema name. */ schema?: string; /** * Table name. */ table?: string; /** * Index type. */ indexType?: string; /** * Index name. */ indexName?: string; /** * Index columns. */ indexColumns?: string[]; /** * Index included columns. */ includedColumns?: string[]; } /** * List of server tuning options. */ model TuningOptionsList is Azure.Core.Page; /** * Pair of virtual endpoints for a server. */ model VirtualEndpointResourceForPatch { /** * Properties of the pair of virtual endpoints. */ #suppress "@azure-tools/typespec-azure-core/no-private-usage" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details" properties?: VirtualEndpointResourceProperties; } /** * Properties of a pair of virtual endpoints. */ #suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-provisioning-state" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details" model VirtualEndpointResourceProperties { /** * Type of endpoint for the virtual endpoints. */ endpointType?: VirtualEndpointType; /** * List of servers that one of the virtual endpoints can refer to. */ members?: string[]; /** * List of virtual endpoints for a server. */ @visibility(Lifecycle.Read) virtualEndpoints?: string[]; } /** * List of virtual endpoints. */ model VirtualEndpointsList is Azure.Core.Page; /** * Virtual network subnet usage parameter */ model VirtualNetworkSubnetUsageParameter { /** * Virtual network resource id. */ virtualNetworkArmResourceId?: string; } /** * Virtual network subnet usage data. */ model VirtualNetworkSubnetUsageModel { #suppress "@azure-tools/typespec-azure-core/documentation-required" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details" @visibility(Lifecycle.Read) @identifiers(#["subnetName"]) delegatedSubnetsUsage?: DelegatedSubnetUsage[]; /** * location of the delegated subnet usage */ @visibility(Lifecycle.Read) location?: string; /** * subscriptionId of the delegated subnet usage */ @visibility(Lifecycle.Read) subscriptionId?: string; } /** * Delegated subnet usage data. */ model DelegatedSubnetUsage { /** * Name of the delegated subnet for which IP addresses are in use */ @visibility(Lifecycle.Read) subnetName?: string; /** * Number of IP addresses used by the delegated subnet */ @visibility(Lifecycle.Read) usage?: int64; } /** * Private DNS suffix. */ @mediaTypeHint("application/json") scalar PrivateDnsZoneSuffix extends string; /** * Custom error response for the service. */ #suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details" #suppress "@azure-tools/typespec-azure-core/documentation-required" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details" @error model CustomErrorResponse { @body error: Azure.ResourceManager.ErrorResponse; @header("x-ms-error-code") @doc("ErrorCode string in the event of a failure.") errorCode?: string; @header("x-ms-request-id") @doc("A unique ID for the current operation, service generated. All the resource providers must return this value in the response headers to facilitate debugging.") requestId?: string; } @secret scalar secretString extends string; model OperationList is Azure.Core.Page; /** * State of the network migration operation. */ union NetworkMigrationState { string, /** * Network migration is pending. */ Pending: "Pending", /** * Network migration is in progress. */ InProgress: "InProgress", /** * Network migration succeeded. */ Succeeded: "Succeeded", /** * Network migration failed. */ Failed: "Failed", /** * Network migration cancellation is in progress. */ CancelInProgress: "CancelInProgress", /** * Network migration was cancelled. */ Cancelled: "Cancelled", } /** * Status of a network migration operation. */ model MigrateNetworkStatus { /** * Identifier of the subscription. */ subscriptionId?: string; /** * Name of the resource group. */ resourceGroupName?: string; /** * Name of the server. */ serverName?: string; /** * State of the network migration operation. */ @visibility(Lifecycle.Read) state?: NetworkMigrationState; } @doc("The status of a maintenance event.") @added(Versions.v2026_04_01) union MaintenanceEventStatus { string, @doc("The maintenance event is scheduled and has not yet started.") Planned: "Planned", @doc("The maintenance event is currently in progress.") InProgress: "InProgress", @doc("The maintenance event has completed successfully.") Complete: "Complete", @doc("The maintenance event has been rescheduled (postponed) by the customer.") Rescheduled: "Rescheduled", @doc("The maintenance event was canceled, failed, or timed out.") Canceled: "Canceled", } #suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-provisioning-state" "Maintenance events are read-only resources that do not have a provisioning lifecycle." @doc("Properties of a maintenance event resource.") @added(Versions.v2026_04_01) model MaintenanceEventResourceProperties { @doc("The unique identifier of the maintenance event (e.g. 'op_123456789').") @visibility(Lifecycle.Read) maintenanceEventId?: string; @doc("The maintenance type (e.g., 'PlannedMaintenance').") @visibility(Lifecycle.Read) maintenanceType?: MaintenanceType; @doc("The human-readable description of the maintenance event.") @visibility(Lifecycle.Read) description?: string; @doc("The customer-facing status of the maintenance event.") @visibility(Lifecycle.Read) status?: MaintenanceEventStatus; @doc("The scheduled start time of the maintenance event (UTC).") @visibility(Lifecycle.Read) startTime?: utcDateTime; @doc("The scheduled end time of the maintenance event (UTC).") @visibility(Lifecycle.Read) endTime?: utcDateTime; @doc("The estimated downtime as an ISO 8601 duration string (e.g., 'PT60S' = 60 seconds).") @visibility(Lifecycle.Read) estimatedDowntime?: string; @doc("A value indicating whether this maintenance event can be rescheduled by the customer.") @visibility(Lifecycle.Read) deferrable?: boolean; @doc("The latest date/time this maintenance event can be postponed to (UTC). Present only when deferrable is true.") @visibility(Lifecycle.Read) deferralDeadline?: utcDateTime; @doc("The original scheduled start time before this event was rescheduled. Null if the event has never been rescheduled.") @visibility(Lifecycle.Read) rescheduledFrom?: utcDateTime; @doc("The time this maintenance event record was last updated (UTC).") @visibility(Lifecycle.Read) lastUpdatedTime?: utcDateTime; } @doc("Filter for maintenance event status.") @added(Versions.v2026_04_01) union MaintenanceType { string, @doc("Planned maintenance event.") PlannedMaintenance: "PlannedMaintenance", } @doc("Maintenance event resource for a PostgreSQL flexible server.") @parentResource(Server) @added(Versions.v2026_04_01) model MaintenanceEventResource is Azure.ResourceManager.ProxyResource { ...ResourceNameParameter< MaintenanceEventResource, KeyName = "maintenanceEventId", SegmentName = "maintenanceEvents" >; } @doc("Filter for maintenance event status.") @added(Versions.v2026_04_01) union MaintenanceEventStatusFilter { string, @doc("Return events that are scheduled or in progress (Planned, InProgress, Suspended).") Upcoming: "Upcoming", @doc("Return events that have completed (Succeeded, Failed, Canceled, TimedOut).") Past: "Past", } @doc("Parameters to reschedule a maintenance event.") @added(Versions.v2026_04_01) model MaintenanceEventRescheduleRequest { @doc("New start time in RFC3339 format.") postponeToDateTime: utcDateTime; } @doc("Response model for maintenance event reschedule and apply-now actions.") @added(Versions.v2026_04_01) model MaintenanceEventActionResponse { @doc("The maintenance event name (maintenance ID).") maintenanceEventId?: string; @doc("The full Azure resource ID of the server.") serverId?: armResourceIdentifier; @doc("The status (e.g. 'Accepted', 'Succeeded').") status?: string; @doc("The planned start time of the maintenance event (UTC).") plannedStartTime?: utcDateTime; @doc("The planned end time of the maintenance event (UTC).") plannedEndTime?: utcDateTime; @doc("A value indicating whether this was an apply-now (immediate) action. True for ApplyNow; false for Reschedule.") appliedNow?: boolean; @doc("The time this maintenance event record was last updated (UTC).") lastUpdatedTime?: utcDateTime; } @doc("Error information from precheck validation.") @added(Versions.v2026_04_01) model PrecheckErrorInfo { @doc("The error code.") errorCode?: int32; @doc("The error parameters.") errorParameters?: string[]; } @doc("Upgrade sequence information.") @added(Versions.v2026_04_01) model UpgradeSequence { @doc("The source PostgreSQL version.") sourceVersion?: PostgresMajorVersion; @doc("The target PostgreSQL version.") targetVersion?: PostgresMajorVersion; } @doc("Precheck result details.") @added(Versions.v2026_04_01) model PrecheckResult { @doc("The action performed.") action?: string; @doc("The upgrade sequence information.") upgradeSequence?: UpgradeSequence; @doc("Array of error information.") @identifiers(#["errorCode"]) errorInfo?: PrecheckErrorInfo[]; } @doc("Policy validation details.") @added(Versions.v2026_04_01) model PolicyDetail { @doc("The name of the policy.") policyName?: string; @doc("Whether the policy validation passed.") passed?: boolean; @doc("The error code if validation failed.") errorCode?: int32; @doc("The error message if validation failed.") errorMessage?: string; @doc("Description of what the policy validates.") policyDescription?: string; } #suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-provisioning-state" "Major Version Upgrade Precheck are read-only resources that do not have a provisioning lifecycle." @doc("Major version upgrade precheck resource with validation results.") @added(Versions.v2026_04_01) model MajorVersionUpgradePrecheckResourceProperties { #suppress "azure-core/no-guid-usage" "SubscriptionId is a GUID by design in Azure Resource Manager." @doc("The ID of the target subscription. The value must be an UUID.") @minLength(1) subscriptionId?: Azure.Core.uuid; @doc("The time when the precheck was created.") createTime?: utcDateTime; @doc("The status of the precheck validation.") status?: string; @doc("The detailed result of the precheck operation.") precheckResult?: PrecheckResult; @doc("The target PostgreSQL major version for the upgrade.") targetVersion?: PostgresMajorVersion; @doc("Array of policy validation details.") @identifiers(#["policyName"]) policyDetails?: PolicyDetail[]; } @doc("Request model for creating a major version upgrade precheck.") @added(Versions.v2026_04_01) model MajorVersionUpgradePrecheckCreateRequest { @doc("The target major version to upgrade to.") targetVersion: PostgresMajorVersion; } @doc("Response model for creating a major version upgrade precheck.") @added(Versions.v2026_04_01) model MajorVersionUpgradePrecheckResponse { @doc("The precheck validation ID.") name?: string; @doc("The time when the precheck was created.") createTime?: utcDateTime; @doc("The status of the precheck validation.") status?: string; } @doc("Maintenance event resource for a PostgreSQL flexible server.") @parentResource(Server) @added(Versions.v2026_04_01) model MajorVersionUpgradePrecheckResource is Azure.ResourceManager.ProxyResource { ...ResourceNameParameter< MajorVersionUpgradePrecheckResource, KeyName = "precheckValidationId", SegmentName = "majorVersionUpgradePrecheck" >; } @@visibility(AdvancedThreatProtectionSettingsList.value, Lifecycle.Read); @@visibility(CapabilityList.value, Lifecycle.Read); @@visibility(MigrationList.value, Lifecycle.Read); @@visibility(PrivateEndpointConnectionList.value, Lifecycle.Read); @@visibility(PrivateLinkResourceList.value, Lifecycle.Read); @@visibility(QuotaUsageList.value, Lifecycle.Read); @@identifiers(CapabilityList.value, #["name"]); @@identifiers(ObjectRecommendationList.value, #["name"]); @@identifiers(OperationList.value, #["name"]); @@identifiers(QuotaUsageList.value, #["name"]); @@identifiers(TuningOptionsList.value, #["name"]);