From 755a24c00edde46ab078ed3dabb28d6aabb13c54 Mon Sep 17 00:00:00 2001 From: nasc17 <69922333+nasc17@users.noreply.github.com> Date: Tue, 29 Oct 2024 16:45:10 -0400 Subject: [PATCH] Review request for Microsoft.DBforPostgreSQL to add version preview/2024-11-01-preview (#30718) * Create copy in 2024-11-01-preview * replace api version * update read me for 20241101 init * add automigration * add tuning * add ultradisk * add version 17 * v5 to v6 * Add to migration sources * Configuration updates * Citus on flex properties * Add system assigned identity * title update * cspell build fix * Add supported features * ref UserAssignedIdentity directly to ManagedServiceIdentity * Remove UserAssignedIdentity * Add securityprofile, add update cluster prop, add cluster to server list * Go back to v5 in flex server json * Add cluster create example , Update create migration, Add create migration with fqdn example, remove cluster properties * Revert "add automigration" This reverts commit d4230a2f8bce8475aed80c210f6f01ccc6cc3b57. * correct case sensitive example issue * Add singleton endpoint for recommendation, and corrections * remove "includedColumns" from Index tuning * Edit optional recommendation type query filter * revert all files back to v5 common-types * Edit recs examples * Edit index tuning parameters * update readme suppression reasons * PR suggestions --- cSpell.json | 4 +- .../2024-03-01-preview/Configuration.json | 4 +- .../2024-11-01-preview/Administrators.json | 406 ++++ .../preview/2024-11-01-preview/Backups.json | 315 +++ .../2024-11-01-preview/Capabilities.json | 650 +++++ .../CheckNameAvailability.json | 155 ++ .../2024-11-01-preview/Configuration.json | 395 +++ .../preview/2024-11-01-preview/Databases.json | 317 +++ .../2024-11-01-preview/FirewallRules.json | 323 +++ .../2024-11-01-preview/FlexibleServers.json | 1239 ++++++++++ .../LongTermRetentionOperation.json | 524 ++++ .../2024-11-01-preview/Migrations.json | 1311 ++++++++++ .../2024-11-01-preview/Operations.json | 164 ++ .../2024-11-01-preview/PrivateDnsZone.json | 77 + .../PrivateEndpointConnections.json | 270 +++ .../PrivateLinkResources.json | 155 ++ .../2024-11-01-preview/QuotaUsages.json | 148 ++ .../preview/2024-11-01-preview/Replicas.json | 83 + .../2024-11-01-preview/ServerLogs.json | 148 ++ .../ServerStartStopRestart.json | 229 ++ .../2024-11-01-preview/ThreatProtection.json | 280 +++ .../2024-11-01-preview/TuningOptions.json | 433 ++++ .../2024-11-01-preview/VirtualEndpoints.json | 403 ++++ .../2024-11-01-preview/VirtualNetwork.json | 142 ++ .../examples/AdministratorAdd.json | 43 + .../examples/AdministratorDelete.json | 19 + .../examples/AdministratorGet.json | 24 + .../examples/AdministratorsListByServer.json | 36 + .../examples/BackupCreate.json | 36 + .../examples/BackupDelete.json | 18 + .../examples/BackupGet.json | 23 + .../examples/BackupListByServer.json | 126 + .../examples/CapabilitiesByLocation.json | 2110 ++++++++++++++++ .../CheckMigrationNameAvailability.json | 23 + .../examples/CheckNameAvailability.json | 20 + .../CheckNameAvailabilityLocationBased.json | 21 + .../examples/ClusterCreate.json | 152 ++ .../examples/ConfigurationGet.json | 26 + .../examples/ConfigurationListByServer.json | 1902 +++++++++++++++ .../examples/ConfigurationUpdate.json | 53 + .../examples/DatabaseCreate.json | 45 + .../examples/DatabaseDelete.json | 19 + .../examples/DatabaseGet.json | 22 + .../examples/DatabasesListByServer.json | 34 + .../examples/FirewallRuleCreate.json | 45 + .../examples/FirewallRuleDelete.json | 19 + .../examples/FirewallRuleGet.json | 22 + .../examples/FirewallRuleListByServer.json | 35 + .../examples/GetPrivateDnsZoneSuffix.json | 11 + .../examples/LogFilesListByServer.json | 28 + .../examples/LongTermRetentionBackup.json | 39 + .../LongTermRetentionOperationGet.json | 28 + ...ongTermRetentionOperationListByServer.json | 31 + .../examples/LongTermRetentionPreBackup.json | 22 + .../examples/Migrations_Cancel.json | 59 + .../examples/Migrations_Create.json | 101 + ...te_Other_SourceTypes_Validate_Migrate.json | 107 + .../Migrations_Create_Validate_Only.json | 100 + ..._Create_With_FullyQualifiedDomainName.json | 107 + .../Migrations_Create_With_Other_Users.json | 101 + ...s_Create_With_PrivateEndpoint_Servers.json | 104 + .../Migrations_Create_With_Roles.json | 102 + .../examples/Migrations_Delete.json | 14 + .../examples/Migrations_Get.json | 62 + ...nWithSuccessfulValidationAndMigration.json | 100 + ...ccessfulValidationButMigrationFailure.json | 98 + ...MigrationWithSuccessfulValidationOnly.json | 82 + ...ns_GetMigrationWithValidationFailures.json | 198 ++ .../Migrations_ListByTargetServer.json | 65 + .../examples/Migrations_Update.json | 67 + .../examples/OperationList.json | 176 ++ .../PrivateEndpointConnectionDelete.json | 18 + .../PrivateEndpointConnectionGet.json | 32 + .../PrivateEndpointConnectionList.json | 54 + .../PrivateEndpointConnectionUpdate.json | 67 + .../examples/PrivateLinkResourcesGet.json | 27 + .../examples/PrivateLinkResourcesList.json | 30 + ...romoteReplicaAsForcedStandaloneServer.json | 85 + .../PromoteReplicaAsForcedSwitchover.json | 85 + ...omoteReplicaAsPlannedStandaloneServer.json | 85 + .../PromoteReplicaAsPlannedSwitchover.json | 85 + .../QuotaUsagesForFlexibleServers.json | 35 + .../examples/ReplicasListByServer.json | 75 + .../examples/ServerCapabilities.json | 2111 +++++++++++++++++ .../examples/ServerCreate.json | 158 ++ ...teGeoRestoreWithDataEncryptionEnabled.json | 179 ++ .../ServerCreatePointInTimeRestore.json | 127 + .../examples/ServerCreateReplica.json | 180 ++ .../examples/ServerCreateReviveDropped.json | 125 + .../ServerCreateWithAadAuthEnabled.json | 165 ++ ...ServerCreateWithDataEncryptionEnabled.json | 194 ++ .../examples/ServerDelete.json | 18 + .../examples/ServerGet.json | 61 + .../ServerGetWithPrivateEndpoints.json | 82 + .../examples/ServerGetWithVnet.json | 64 + .../examples/ServerList.json | 102 + .../examples/ServerListByResourceGroup.json | 184 ++ .../examples/ServerRestart.json | 17 + .../examples/ServerRestartWithFailover.json | 21 + .../examples/ServerStart.json | 17 + .../examples/ServerStop.json | 17 + ...hreatProtectionSettingsCreateOrUpdate.json | 39 + .../ServerThreatProtectionSettingsGet.json | 22 + ...rThreatProtectionSettingsListByServer.json | 25 + .../examples/ServerUpdate.json | 91 + .../ServerUpdateWithAadAuthEnabled.json | 97 + ...erUpdateWithCustomerMaintenanceWindow.json | 84 + ...ServerUpdateWithDataEncryptionEnabled.json | 123 + .../ServerUpdateWithMajorVersionUpgrade.json | 79 + .../Tuning_GetFilteredRecommendedIndexes.json | 122 + .../Tuning_GetRecommendedIndexes.json | 201 ++ .../examples/Tuning_GetTuningOption.json | 18 + .../examples/Tuning_ListTuningOptions.json | 21 + .../examples/VirtualEndpointCreate.json | 63 + .../examples/VirtualEndpointDelete.json | 22 + .../examples/VirtualEndpointUpdate.json | 46 + .../examples/VirtualEndpointsGet.json | 28 + .../VirtualEndpointsListByServer.json | 31 + .../examples/VirtualNetworkSubnetUsage.json | 28 + .../stable/2022-12-01/Configuration.json | 4 +- .../postgresql/resource-manager/readme.md | 59 +- 121 files changed, 20546 insertions(+), 7 deletions(-) create mode 100644 specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2024-11-01-preview/Administrators.json create mode 100644 specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2024-11-01-preview/Backups.json create mode 100644 specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2024-11-01-preview/Capabilities.json create mode 100644 specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2024-11-01-preview/CheckNameAvailability.json create mode 100644 specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2024-11-01-preview/Configuration.json create mode 100644 specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2024-11-01-preview/Databases.json create mode 100644 specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2024-11-01-preview/FirewallRules.json create mode 100644 specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2024-11-01-preview/FlexibleServers.json create mode 100644 specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2024-11-01-preview/LongTermRetentionOperation.json create mode 100644 specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2024-11-01-preview/Migrations.json create mode 100644 specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2024-11-01-preview/Operations.json create mode 100644 specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2024-11-01-preview/PrivateDnsZone.json create mode 100644 specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2024-11-01-preview/PrivateEndpointConnections.json create mode 100644 specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2024-11-01-preview/PrivateLinkResources.json create mode 100644 specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2024-11-01-preview/QuotaUsages.json create mode 100644 specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2024-11-01-preview/Replicas.json create mode 100644 specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2024-11-01-preview/ServerLogs.json create mode 100644 specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2024-11-01-preview/ServerStartStopRestart.json create mode 100644 specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2024-11-01-preview/ThreatProtection.json create mode 100644 specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2024-11-01-preview/TuningOptions.json create mode 100644 specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2024-11-01-preview/VirtualEndpoints.json create mode 100644 specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2024-11-01-preview/VirtualNetwork.json create mode 100644 specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2024-11-01-preview/examples/AdministratorAdd.json create mode 100644 specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2024-11-01-preview/examples/AdministratorDelete.json create mode 100644 specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2024-11-01-preview/examples/AdministratorGet.json create mode 100644 specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2024-11-01-preview/examples/AdministratorsListByServer.json create mode 100644 specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2024-11-01-preview/examples/BackupCreate.json create mode 100644 specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2024-11-01-preview/examples/BackupDelete.json create mode 100644 specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2024-11-01-preview/examples/BackupGet.json create mode 100644 specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2024-11-01-preview/examples/BackupListByServer.json create mode 100644 specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2024-11-01-preview/examples/CapabilitiesByLocation.json create mode 100644 specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2024-11-01-preview/examples/CheckMigrationNameAvailability.json create mode 100644 specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2024-11-01-preview/examples/CheckNameAvailability.json create mode 100644 specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2024-11-01-preview/examples/CheckNameAvailabilityLocationBased.json create mode 100644 specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2024-11-01-preview/examples/ClusterCreate.json create mode 100644 specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2024-11-01-preview/examples/ConfigurationGet.json create mode 100644 specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2024-11-01-preview/examples/ConfigurationListByServer.json create mode 100644 specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2024-11-01-preview/examples/ConfigurationUpdate.json create mode 100644 specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2024-11-01-preview/examples/DatabaseCreate.json create mode 100644 specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2024-11-01-preview/examples/DatabaseDelete.json create mode 100644 specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2024-11-01-preview/examples/DatabaseGet.json create mode 100644 specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2024-11-01-preview/examples/DatabasesListByServer.json create mode 100644 specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2024-11-01-preview/examples/FirewallRuleCreate.json create mode 100644 specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2024-11-01-preview/examples/FirewallRuleDelete.json create mode 100644 specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2024-11-01-preview/examples/FirewallRuleGet.json create mode 100644 specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2024-11-01-preview/examples/FirewallRuleListByServer.json create mode 100644 specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2024-11-01-preview/examples/GetPrivateDnsZoneSuffix.json create mode 100644 specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2024-11-01-preview/examples/LogFilesListByServer.json create mode 100644 specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2024-11-01-preview/examples/LongTermRetentionBackup.json create mode 100644 specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2024-11-01-preview/examples/LongTermRetentionOperationGet.json create mode 100644 specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2024-11-01-preview/examples/LongTermRetentionOperationListByServer.json create mode 100644 specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2024-11-01-preview/examples/LongTermRetentionPreBackup.json create mode 100644 specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2024-11-01-preview/examples/Migrations_Cancel.json create mode 100644 specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2024-11-01-preview/examples/Migrations_Create.json create mode 100644 specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2024-11-01-preview/examples/Migrations_Create_Other_SourceTypes_Validate_Migrate.json create mode 100644 specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2024-11-01-preview/examples/Migrations_Create_Validate_Only.json create mode 100644 specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2024-11-01-preview/examples/Migrations_Create_With_FullyQualifiedDomainName.json create mode 100644 specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2024-11-01-preview/examples/Migrations_Create_With_Other_Users.json create mode 100644 specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2024-11-01-preview/examples/Migrations_Create_With_PrivateEndpoint_Servers.json create mode 100644 specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2024-11-01-preview/examples/Migrations_Create_With_Roles.json create mode 100644 specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2024-11-01-preview/examples/Migrations_Delete.json create mode 100644 specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2024-11-01-preview/examples/Migrations_Get.json create mode 100644 specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2024-11-01-preview/examples/Migrations_GetMigrationWithSuccessfulValidationAndMigration.json create mode 100644 specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2024-11-01-preview/examples/Migrations_GetMigrationWithSuccessfulValidationButMigrationFailure.json create mode 100644 specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2024-11-01-preview/examples/Migrations_GetMigrationWithSuccessfulValidationOnly.json create mode 100644 specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2024-11-01-preview/examples/Migrations_GetMigrationWithValidationFailures.json create mode 100644 specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2024-11-01-preview/examples/Migrations_ListByTargetServer.json create mode 100644 specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2024-11-01-preview/examples/Migrations_Update.json create mode 100644 specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2024-11-01-preview/examples/OperationList.json create mode 100644 specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2024-11-01-preview/examples/PrivateEndpointConnectionDelete.json create mode 100644 specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2024-11-01-preview/examples/PrivateEndpointConnectionGet.json create mode 100644 specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2024-11-01-preview/examples/PrivateEndpointConnectionList.json create mode 100644 specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2024-11-01-preview/examples/PrivateEndpointConnectionUpdate.json create mode 100644 specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2024-11-01-preview/examples/PrivateLinkResourcesGet.json create mode 100644 specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2024-11-01-preview/examples/PrivateLinkResourcesList.json create mode 100644 specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2024-11-01-preview/examples/PromoteReplicaAsForcedStandaloneServer.json create mode 100644 specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2024-11-01-preview/examples/PromoteReplicaAsForcedSwitchover.json create mode 100644 specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2024-11-01-preview/examples/PromoteReplicaAsPlannedStandaloneServer.json create mode 100644 specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2024-11-01-preview/examples/PromoteReplicaAsPlannedSwitchover.json create mode 100644 specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2024-11-01-preview/examples/QuotaUsagesForFlexibleServers.json create mode 100644 specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2024-11-01-preview/examples/ReplicasListByServer.json create mode 100644 specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2024-11-01-preview/examples/ServerCapabilities.json create mode 100644 specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2024-11-01-preview/examples/ServerCreate.json create mode 100644 specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2024-11-01-preview/examples/ServerCreateGeoRestoreWithDataEncryptionEnabled.json create mode 100644 specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2024-11-01-preview/examples/ServerCreatePointInTimeRestore.json create mode 100644 specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2024-11-01-preview/examples/ServerCreateReplica.json create mode 100644 specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2024-11-01-preview/examples/ServerCreateReviveDropped.json create mode 100644 specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2024-11-01-preview/examples/ServerCreateWithAadAuthEnabled.json create mode 100644 specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2024-11-01-preview/examples/ServerCreateWithDataEncryptionEnabled.json create mode 100644 specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2024-11-01-preview/examples/ServerDelete.json create mode 100644 specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2024-11-01-preview/examples/ServerGet.json create mode 100644 specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2024-11-01-preview/examples/ServerGetWithPrivateEndpoints.json create mode 100644 specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2024-11-01-preview/examples/ServerGetWithVnet.json create mode 100644 specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2024-11-01-preview/examples/ServerList.json create mode 100644 specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2024-11-01-preview/examples/ServerListByResourceGroup.json create mode 100644 specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2024-11-01-preview/examples/ServerRestart.json create mode 100644 specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2024-11-01-preview/examples/ServerRestartWithFailover.json create mode 100644 specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2024-11-01-preview/examples/ServerStart.json create mode 100644 specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2024-11-01-preview/examples/ServerStop.json create mode 100644 specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2024-11-01-preview/examples/ServerThreatProtectionSettingsCreateOrUpdate.json create mode 100644 specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2024-11-01-preview/examples/ServerThreatProtectionSettingsGet.json create mode 100644 specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2024-11-01-preview/examples/ServerThreatProtectionSettingsListByServer.json create mode 100644 specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2024-11-01-preview/examples/ServerUpdate.json create mode 100644 specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2024-11-01-preview/examples/ServerUpdateWithAadAuthEnabled.json create mode 100644 specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2024-11-01-preview/examples/ServerUpdateWithCustomerMaintenanceWindow.json create mode 100644 specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2024-11-01-preview/examples/ServerUpdateWithDataEncryptionEnabled.json create mode 100644 specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2024-11-01-preview/examples/ServerUpdateWithMajorVersionUpgrade.json create mode 100644 specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2024-11-01-preview/examples/Tuning_GetFilteredRecommendedIndexes.json create mode 100644 specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2024-11-01-preview/examples/Tuning_GetRecommendedIndexes.json create mode 100644 specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2024-11-01-preview/examples/Tuning_GetTuningOption.json create mode 100644 specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2024-11-01-preview/examples/Tuning_ListTuningOptions.json create mode 100644 specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2024-11-01-preview/examples/VirtualEndpointCreate.json create mode 100644 specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2024-11-01-preview/examples/VirtualEndpointDelete.json create mode 100644 specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2024-11-01-preview/examples/VirtualEndpointUpdate.json create mode 100644 specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2024-11-01-preview/examples/VirtualEndpointsGet.json create mode 100644 specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2024-11-01-preview/examples/VirtualEndpointsListByServer.json create mode 100644 specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2024-11-01-preview/examples/VirtualNetworkSubnetUsage.json diff --git a/cSpell.json b/cSpell.json index 652fcaf53163..16d595e98b6c 100644 --- a/cSpell.json +++ b/cSpell.json @@ -1071,7 +1071,9 @@ { "filename": "**/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/**/*json", "words": [ - "automigration" + "automigration", + "apsaradb", + "supabase" ] }, { diff --git a/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2024-03-01-preview/Configuration.json b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2024-03-01-preview/Configuration.json index bd166a5baf8b..736ac200c76e 100644 --- a/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2024-03-01-preview/Configuration.json +++ b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2024-03-01-preview/Configuration.json @@ -271,7 +271,7 @@ "properties": { "value": { "type": "string", - "description": "Value of the configuration." + "description": "Value of the configuration. Required to update the configuration." }, "description": { "type": "string", @@ -305,7 +305,7 @@ }, "source": { "type": "string", - "description": "Source of the configuration." + "description": "Source of the configuration. Required to update the configuration." }, "isDynamicConfig": { "type": "boolean", diff --git a/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2024-11-01-preview/Administrators.json b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2024-11-01-preview/Administrators.json new file mode 100644 index 000000000000..0006a53131c2 --- /dev/null +++ b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2024-11-01-preview/Administrators.json @@ -0,0 +1,406 @@ +{ + "swagger": "2.0", + "info": { + "title": "PostgreSQLServerManagementClient", + "description": "The Microsoft Azure management API provides create, read, update, and delete functionality for Azure PostgreSQL resources including servers, databases, firewall rules, VNET rules, security alert policies, log files and configurations with new business model.", + "version": "2024-11-01-preview" + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "security": [ + { + "azure_auth": [ + "user_impersonation" + ] + } + ], + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "flow": "implicit", + "description": "Azure Active Directory OAuth2 Flow", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + }, + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/administrators/{objectId}": { + "put": { + "tags": [ + "Administrators" + ], + "operationId": "Administrators_Create", + "x-ms-examples": { + "Adds an Active DIrectory Administrator for the server": { + "$ref": "./examples/AdministratorAdd.json" + } + }, + "description": "Creates a new server.", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "../../../types/common-types.json#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/ObjectIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/ActiveDirectoryAdministratorAdd" + }, + "description": "The required parameters for adding an active directory administrator for a server." + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/ActiveDirectoryAdministrator" + } + }, + "201": { + "description": "Created", + "schema": { + "$ref": "#/definitions/ActiveDirectoryAdministrator" + } + }, + "202": { + "description": "Accepted", + "headers": { + "Location": { + "type": "string" + } + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "azure-async-operation" + } + }, + "delete": { + "tags": [ + "Administrators" + ], + "operationId": "Administrators_Delete", + "x-ms-examples": { + "AdministratorDelete": { + "$ref": "./examples/AdministratorDelete.json" + } + }, + "description": "Deletes an Active Directory Administrator associated with the server.", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "../../../types/common-types.json#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/ObjectIdParameter" + } + ], + "responses": { + "200": { + "description": "OK" + }, + "202": { + "description": "Accepted", + "headers": { + "Location": { + "type": "string" + } + } + }, + "204": { + "description": "NoContent" + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + } + }, + "get": { + "tags": [ + "Administrators" + ], + "operationId": "Administrators_Get", + "x-ms-examples": { + "ServerGet": { + "$ref": "./examples/AdministratorGet.json" + } + }, + "description": "Gets information about a server.", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "../../../types/common-types.json#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/ObjectIdParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/ActiveDirectoryAdministrator" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/administrators": { + "get": { + "tags": [ + "Administrators" + ], + "operationId": "Administrators_ListByServer", + "x-ms-examples": { + "AdministratorsListByServer": { + "$ref": "./examples/AdministratorsListByServer.json" + } + }, + "description": "List all the AAD administrators for a given server.", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "../../../types/common-types.json#/parameters/ServerNameParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/AdministratorListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + } + }, + "definitions": { + "ActiveDirectoryAdministratorAdd": { + "type": "object", + "properties": { + "properties": { + "$ref": "#/definitions/AdministratorPropertiesForAdd", + "x-ms-client-flatten": true, + "description": "Properties of the active directory administrator." + } + }, + "description": "Represents an Active Directory administrator." + }, + "AdministratorPropertiesForAdd": { + "type": "object", + "properties": { + "principalType": { + "type": "string", + "description": "The principal type used to represent the type of Active Directory Administrator.", + "enum": [ + "Unknown", + "User", + "Group", + "ServicePrincipal" + ], + "x-ms-enum": { + "name": "PrincipalType", + "modelAsString": true + }, + "x-ms-mutability": [ + "create", + "update", + "read" + ] + }, + "principalName": { + "type": "string", + "description": "Active Directory administrator principal name.", + "x-ms-mutability": [ + "create", + "update", + "read" + ] + }, + "tenantId": { + "type": "string", + "description": "The tenantId of the Active Directory administrator.", + "x-ms-mutability": [ + "create", + "update" + ] + } + }, + "description": "The properties of an Active Directory administrator." + }, + "AdministratorProperties": { + "type": "object", + "properties": { + "principalType": { + "type": "string", + "description": "The principal type used to represent the type of Active Directory Administrator.", + "enum": [ + "Unknown", + "User", + "Group", + "ServicePrincipal" + ], + "x-ms-enum": { + "name": "PrincipalType", + "modelAsString": true + }, + "x-ms-mutability": [ + "create", + "update", + "read" + ] + }, + "principalName": { + "type": "string", + "description": "Active Directory administrator principal name.", + "x-ms-mutability": [ + "create", + "update", + "read" + ] + }, + "objectId": { + "type": "string", + "description": "The objectId of the Active Directory administrator.", + "x-ms-mutability": [ + "create", + "update", + "read" + ] + }, + "tenantId": { + "type": "string", + "description": "The tenantId of the Active Directory administrator.", + "x-ms-mutability": [ + "create", + "update", + "read" + ] + } + }, + "description": "The properties of an Active Directory administrator." + }, + "ActiveDirectoryAdministrator": { + "type": "object", + "properties": { + "properties": { + "$ref": "#/definitions/AdministratorProperties", + "x-ms-client-flatten": true, + "description": "Properties of the active directory administrator." + } + }, + "allOf": [ + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ProxyResource" + } + ], + "required": [ + "properties" + ], + "description": "Represents an Active Directory administrator." + }, + "AdministratorListResult": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/ActiveDirectoryAdministrator" + }, + "description": "The list of active directory administrators" + }, + "nextLink": { + "description": "The link used to get the next page of active directory.", + "type": "string" + } + }, + "description": "A list of active directory administrators." + } + }, + "parameters": { + "ObjectIdParameter": { + "name": "objectId", + "in": "path", + "required": true, + "type": "string", + "description": "Guid of the objectId for the administrator.", + "x-ms-parameter-location": "method" + } + } +} diff --git a/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2024-11-01-preview/Backups.json b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2024-11-01-preview/Backups.json new file mode 100644 index 000000000000..af4a3d1377fc --- /dev/null +++ b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2024-11-01-preview/Backups.json @@ -0,0 +1,315 @@ +{ + "swagger": "2.0", + "info": { + "title": "PostgreSQLServerManagementClient", + "description": "The Microsoft Azure management API provides create, read, update, and delete functionality for Azure PostgreSQL resources including servers, databases, firewall rules, VNET rules, security alert policies, log files and configurations with new business model.", + "version": "2024-11-01-preview" + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "security": [ + { + "azure_auth": [ + "user_impersonation" + ] + } + ], + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "flow": "implicit", + "description": "Azure Active Directory OAuth2 Flow", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + }, + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/backups/{backupName}": { + "put": { + "tags": [ + "Backups" + ], + "operationId": "Backups_Create", + "x-ms-examples": { + "Create a new Backup for a flexible server": { + "$ref": "./examples/BackupCreate.json" + } + }, + "description": "Create a specific backup for PostgreSQL flexible server.", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "../../../types/common-types.json#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/BackupNameParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/ServerBackup" + } + }, + "201": { + "description": "Successfully created backup", + "schema": { + "$ref": "#/definitions/ServerBackup" + } + }, + "202": { + "description": "Accepted", + "headers": { + "Location": { + "type": "string" + } + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "azure-async-operation" + } + }, + "delete": { + "tags": [ + "Backups" + ], + "operationId": "Backups_Delete", + "x-ms-examples": { + "Delete a specific backup": { + "$ref": "./examples/BackupDelete.json" + } + }, + "description": "Deletes a specific backup.", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "../../../types/common-types.json#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/BackupNameParameter" + } + ], + "responses": { + "202": { + "description": "Accepted", + "headers": { + "Location": { + "type": "string" + } + } + }, + "204": { + "description": "NoContent" + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + } + }, + "get": { + "tags": [ + "Backups" + ], + "operationId": "Backups_Get", + "x-ms-examples": { + "Get a backup for a server": { + "$ref": "./examples/BackupGet.json" + } + }, + "description": "Get specific backup for a given server.", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "../../../types/common-types.json#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/BackupNameParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/ServerBackup" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/backups": { + "get": { + "tags": [ + "Backups" + ], + "operationId": "Backups_ListByServer", + "x-ms-examples": { + "List backups for a server": { + "$ref": "./examples/BackupListByServer.json" + } + }, + "description": "List all the backups for a given server.", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "../../../types/common-types.json#/parameters/ServerNameParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/ServerBackupListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + } + }, + "definitions": { + "ServerBackupProperties": { + "type": "object", + "properties": { + "backupType": { + "type": "string", + "description": "Backup type.", + "enum": [ + "Full", + "Customer On-Demand" + ], + "x-ms-enum": { + "name": "Origin", + "modelAsString": true + } + }, + "completedTime": { + "type": "string", + "format": "date-time", + "description": "Backup completed time (ISO8601 format)." + }, + "source": { + "type": "string", + "description": "Backup source" + } + }, + "description": "The properties of a server backup." + }, + "ServerBackup": { + "type": "object", + "properties": { + "properties": { + "$ref": "#/definitions/ServerBackupProperties", + "x-ms-client-flatten": true, + "description": "The properties of a server backup." + } + }, + "allOf": [ + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ProxyResource" + } + ], + "description": "Server backup properties" + }, + "ServerBackupListResult": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/ServerBackup" + }, + "description": "The list of backups of a server." + }, + "nextLink": { + "description": "The link used to get the next page of operations.", + "type": "string" + } + }, + "description": "A list of server backups." + } + }, + "parameters": { + "BackupNameParameter": { + "name": "backupName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the backup.", + "minLength": 1, + "pattern": "^[-\\w\\._]+$", + "x-ms-parameter-location": "method" + } + } +} diff --git a/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2024-11-01-preview/Capabilities.json b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2024-11-01-preview/Capabilities.json new file mode 100644 index 000000000000..49dd9d4816a7 --- /dev/null +++ b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2024-11-01-preview/Capabilities.json @@ -0,0 +1,650 @@ +{ + "swagger": "2.0", + "info": { + "title": "PostgreSQLServerManagementClient", + "description": "The Microsoft Azure management API provides create, read, update, and delete functionality for Azure PostgreSQL resources including servers, databases, firewall rules, VNET rules, security alert policies, log files and configurations with new business model.", + "version": "2024-11-01-preview" + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "security": [ + { + "azure_auth": [ + "user_impersonation" + ] + } + ], + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "flow": "implicit", + "description": "Azure Active Directory OAuth2 Flow", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + }, + "paths": { + "/subscriptions/{subscriptionId}/providers/Microsoft.DBforPostgreSQL/locations/{locationName}/capabilities": { + "get": { + "tags": [ + "LocationBasedCapabilities" + ], + "operationId": "LocationBasedCapabilities_Execute", + "x-ms-examples": { + "CapabilitiesList": { + "$ref": "./examples/CapabilitiesByLocation.json" + } + }, + "description": "Get capabilities at specified location in a given subscription.", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../types/common-types.json#/parameters/LocationNameParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/CapabilitiesListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/capabilities": { + "get": { + "tags": [ + "FlexibleServerCapabilities" + ], + "operationId": "ServerCapabilities_List", + "x-ms-examples": { + "ServerCapabilitiesList": { + "$ref": "./examples/ServerCapabilities.json" + } + }, + "description": "Get capabilities for a flexible server.", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "../../../types/common-types.json#/parameters/ServerNameParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/CapabilitiesListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + } + }, + "definitions": { + "StorageTierCapability": { + "type": "object", + "description": "Represents capability of a storage tier", + "properties": { + "name": { + "type": "string", + "description": "Name to represent Storage tier capability", + "readOnly": true + }, + "iops": { + "type": "integer", + "format": "int32", + "description": "Supported IOPS for this storage tier", + "readOnly": true + } + }, + "allOf": [ + { + "$ref": "../../../types/common-types.json#/definitions/CapabilityBase" + } + ] + }, + "StorageMbCapability": { + "type": "object", + "properties": { + "supportedIops": { + "type": "integer", + "format": "int32", + "description": "Supported IOPS", + "readOnly": true + }, + "supportedMaximumIops": { + "type": "integer", + "format": "int32", + "description": "Maximum IOPS supported by this #Vcores or PremiumV2_LRS Storage Size", + "readOnly": true + }, + "storageSizeMb": { + "type": "integer", + "format": "int64", + "description": "Storage size in MB", + "readOnly": true + }, + "maximumStorageSizeMb": { + "type": "integer", + "format": "int64", + "description": "Maximum value of Storage size in MB", + "readOnly": true + }, + "supportedThroughput": { + "type": "integer", + "format": "int32", + "description": "Values of throughput in MB/s", + "readOnly": true + }, + "supportedMaximumThroughput": { + "type": "integer", + "format": "int32", + "description": "Maximum values of throughput in MB/s", + "readOnly": true + }, + "defaultIopsTier": { + "type": "string", + "description": "Default tier for IOPS", + "readOnly": true + }, + "supportedIopsTiers": { + "type": "array", + "description": "List of available options to upgrade the storage performance", + "items": { + "$ref": "#/definitions/StorageTierCapability" + }, + "x-ms-identifiers": [ + "name" + ], + "readOnly": true + } + }, + "allOf": [ + { + "$ref": "../../../types/common-types.json#/definitions/CapabilityBase" + } + ], + "description": "storage size in MB capability" + }, + "ServerSkuCapability": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Sku name", + "readOnly": true + }, + "vCores": { + "type": "integer", + "format": "int32", + "description": "Supported vCores", + "readOnly": true + }, + "supportedIops": { + "type": "integer", + "format": "int32", + "description": "Supported IOPS", + "readOnly": true + }, + "supportedMemoryPerVcoreMb": { + "type": "integer", + "format": "int64", + "description": "Supported memory per vCore in MB", + "readOnly": true + }, + "supportedZones": { + "type": "array", + "description": "List of supported Availability Zones. E.g. \"1\", \"2\", \"3\"", + "items": { + "type": "string" + }, + "readOnly": true + }, + "supportedHaMode": { + "type": "array", + "items": { + "type": "string", + "description": "HA mode supported for a server.", + "enum": [ + "SameZone", + "ZoneRedundant" + ], + "x-ms-enum": { + "name": "HaMode", + "modelAsString": true + } + }, + "description": "Supported high availability mode", + "readOnly": true + }, + "supportedFeatures": { + "type": "array", + "description": "The supported features.", + "items": { + "$ref": "#/definitions/SupportedFeature" + }, + "x-ms-identifiers": [ + "name" + ], + "readOnly": true + }, + "securityProfile": { + "type": "string", + "description": "The value of security profile indicating if its confidential vm", + "readOnly": true + } + }, + "allOf": [ + { + "$ref": "../../../types/common-types.json#/definitions/CapabilityBase" + } + ], + "description": "Sku capability" + }, + "ServerVersion": { + "type": "string", + "description": "The version of a server.", + "enum": [ + "17", + "16", + "15", + "14", + "13", + "12", + "11" + ], + "x-ms-enum": { + "name": "ServerVersion", + "modelAsString": true + } + }, + "ServerVersionCapability": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Server version", + "readOnly": true + }, + "supportedVersionsToUpgrade": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Supported servers versions to upgrade", + "readOnly": true + }, + "supportedFeatures": { + "type": "array", + "description": "The supported features.", + "items": { + "$ref": "#/definitions/SupportedFeature" + }, + "x-ms-identifiers": [ + "name" + ], + "readOnly": true + } + }, + "allOf": [ + { + "$ref": "../../../types/common-types.json#/definitions/CapabilityBase" + } + ], + "description": "Server version capabilities." + }, + "StorageEditionCapability": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Storage edition name", + "readOnly": true + }, + "defaultStorageSizeMb": { + "type": "integer", + "format": "int64", + "description": "Default storage size in MB for storage edition", + "readOnly": true + }, + "supportedStorageMb": { + "type": "array", + "description": "Flexible server supported storage range in MB", + "items": { + "$ref": "#/definitions/StorageMbCapability" + }, + "x-ms-identifiers": [ + "storageSizeMb" + ], + "readOnly": true + } + }, + "allOf": [ + { + "$ref": "../../../types/common-types.json#/definitions/CapabilityBase" + } + ], + "description": "Storage edition capability" + }, + "SupportedFeature": { + "type": "object", + "description": "The supported features.", + "properties": { + "name": { + "type": "string", + "description": "Name of feature", + "readOnly": true + }, + "status": { + "type": "string", + "description": "Status of feature ", + "readOnly": true, + "enum": [ + "Enabled", + "Disabled" + ], + "x-ms-enum": { + "name": "supportedFeatureStatusEnum", + "modelAsString": true + } + } + } + }, + "FastProvisioningEditionCapability": { + "type": "object", + "description": "Represents capability of a fast provisioning edition", + "properties": { + "supportedTier": { + "type": "string", + "description": "Fast provisioning supported tier name", + "readOnly": true + }, + "supportedSku": { + "type": "string", + "description": "Fast provisioning supported sku name", + "readOnly": true + }, + "supportedStorageGb": { + "type": "integer", + "format": "int32", + "description": "Fast provisioning supported storage in Gb", + "readOnly": true + }, + "supportedServerVersions": { + "type": "string", + "description": "Fast provisioning supported version", + "readOnly": true + }, + "serverCount": { + "type": "integer", + "description": "Count of servers in cache matching the spec", + "format": "int32", + "readOnly": true + } + }, + "allOf": [ + { + "$ref": "../../../types/common-types.json#/definitions/CapabilityBase" + } + ] + }, + "FlexibleServerEditionCapability": { + "type": "object", + "allOf": [ + { + "$ref": "../../../types/common-types.json#/definitions/CapabilityBase" + } + ], + "properties": { + "name": { + "type": "string", + "description": "Server edition name", + "readOnly": true + }, + "defaultSkuName": { + "type": "string", + "description": "Default sku name for the server edition", + "readOnly": true + }, + "supportedStorageEditions": { + "type": "array", + "items": { + "$ref": "#/definitions/StorageEditionCapability" + }, + "description": "The list of editions supported by this server edition.", + "readOnly": true, + "x-ms-identifiers": [ + "name" + ] + }, + "supportedServerSkus": { + "type": "array", + "description": "List of supported server SKUs.", + "items": { + "$ref": "#/definitions/ServerSkuCapability" + }, + "x-ms-identifiers": [ + "name" + ], + "readOnly": true + } + }, + "description": "Flexible server edition capabilities." + }, + "FlexibleServerCapability": { + "type": "object", + "allOf": [ + { + "$ref": "../../../types/common-types.json#/definitions/CapabilityBase" + } + ], + "properties": { + "name": { + "type": "string", + "description": "Name of flexible servers capability" + }, + "supportedServerEditions": { + "type": "array", + "items": { + "$ref": "#/definitions/FlexibleServerEditionCapability" + }, + "x-ms-identifiers": [ + "name" + ], + "readOnly": true, + "description": "List of supported flexible server editions" + }, + "supportedServerVersions": { + "type": "array", + "items": { + "$ref": "#/definitions/ServerVersionCapability" + }, + "x-ms-identifiers": [ + "name" + ], + "description": "The list of server versions supported for this capability.", + "readOnly": true + }, + "supportedFeatures": { + "type": "array", + "description": "The supported features.", + "items": { + "$ref": "#/definitions/SupportedFeature" + }, + "x-ms-identifiers": [ + "name" + ], + "readOnly": true + }, + "fastProvisioningSupported": { + "type": "string", + "description": "Gets a value indicating whether fast provisioning is supported. \"Enabled\" means fast provisioning is supported. \"Disabled\" stands for fast provisioning is not supported. Will be deprecated in future, please look to Supported Features for \"FastProvisioning\".", + "readOnly": true, + "enum": [ + "Enabled", + "Disabled" + ], + "x-ms-enum": { + "name": "fastProvisioningSupportedEnum", + "modelAsString": true + } + }, + "supportedFastProvisioningEditions": { + "type": "array", + "description": "List of supported server editions for fast provisioning", + "items": { + "$ref": "#/definitions/FastProvisioningEditionCapability" + }, + "x-ms-identifiers": [ + "supportedSku" + ], + "readOnly": true + }, + "geoBackupSupported": { + "type": "string", + "description": "Determines if geo-backup is supported in this region. \"Enabled\" means geo-backup is supported. \"Disabled\" stands for geo-back is not supported. Will be deprecated in future, please look to Supported Features for \"GeoBackup\".", + "readOnly": true, + "enum": [ + "Enabled", + "Disabled" + ], + "x-ms-enum": { + "name": "geoBackupSupportedEnum", + "modelAsString": true + } + }, + "zoneRedundantHaSupported": { + "type": "string", + "description": "A value indicating whether Zone Redundant HA is supported in this region. \"Enabled\" means zone redundant HA is supported. \"Disabled\" stands for zone redundant HA is not supported. Will be deprecated in future, please look to Supported Features for \"ZoneRedundantHa\".", + "readOnly": true, + "enum": [ + "Enabled", + "Disabled" + ], + "x-ms-enum": { + "name": "zoneRedundantHaSupportedEnum", + "modelAsString": true + } + }, + "zoneRedundantHaAndGeoBackupSupported": { + "type": "string", + "description": "A value indicating whether Zone Redundant HA and Geo-backup is supported in this region. \"Enabled\" means zone redundant HA and geo-backup is supported. \"Disabled\" stands for zone redundant HA and geo-backup is not supported. Will be deprecated in future, please look to Supported Features for \"ZoneRedundantHaAndGeoBackup\".", + "readOnly": true, + "enum": [ + "Enabled", + "Disabled" + ], + "x-ms-enum": { + "name": "zoneRedundantHaAndGeoBackupSupportedEnum", + "modelAsString": true + } + }, + "storageAutoGrowthSupported": { + "type": "string", + "description": "A value indicating whether storage auto-grow is supported in this region. \"Enabled\" means storage auto-grow is supported. \"Disabled\" stands for storage auto-grow is not supported. Will be deprecated in future, please look to Supported Features for \"StorageAutoGrowth\".", + "readOnly": true, + "enum": [ + "Enabled", + "Disabled" + ], + "x-ms-enum": { + "name": "storageAutoGrowthSupportedEnum", + "modelAsString": true + } + }, + "onlineResizeSupported": { + "type": "string", + "description": "A value indicating whether online resize is supported in this region for the given subscription. \"Enabled\" means storage online resize is supported. \"Disabled\" means storage online resize is not supported. Will be deprecated in future, please look to Supported Features for \"OnlineResize\".", + "readOnly": true, + "enum": [ + "Enabled", + "Disabled" + ], + "x-ms-enum": { + "name": "onlineResizeSupportedEnum", + "modelAsString": true + } + }, + "restricted": { + "type": "string", + "description": "A value indicating whether this region is restricted. \"Enabled\" means region is restricted. \"Disabled\" stands for region is not restricted. Will be deprecated in future, please look to Supported Features for \"Restricted\".", + "readOnly": true, + "enum": [ + "Enabled", + "Disabled" + ], + "x-ms-enum": { + "name": "restrictedEnum", + "modelAsString": true + } + } + }, + "description": "Capability for the PostgreSQL server" + }, + "CapabilitiesListResult": { + "type": "object", + "properties": { + "value": { + "description": "A list of supported capabilities.", + "type": "array", + "items": { + "$ref": "#/definitions/FlexibleServerCapability" + }, + "x-ms-identifiers": [ + "name" + ], + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + }, + "description": "Capability for the PostgreSQL server" + } + }, + "parameters": {} +} diff --git a/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2024-11-01-preview/CheckNameAvailability.json b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2024-11-01-preview/CheckNameAvailability.json new file mode 100644 index 000000000000..728264371170 --- /dev/null +++ b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2024-11-01-preview/CheckNameAvailability.json @@ -0,0 +1,155 @@ +{ + "swagger": "2.0", + "info": { + "title": "PostgreSQLServerManagementClient", + "description": "The Microsoft Azure management API provides create, read, update, and delete functionality for Azure PostgreSQL resources including servers, databases, firewall rules, VNET rules, security alert policies, log files and configurations with new business model.", + "version": "2024-11-01-preview" + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "security": [ + { + "azure_auth": [ + "user_impersonation" + ] + } + ], + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "flow": "implicit", + "description": "Azure Active Directory OAuth2 Flow", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + }, + "paths": { + "/subscriptions/{subscriptionId}/providers/Microsoft.DBforPostgreSQL/checkNameAvailability": { + "post": { + "tags": [ + "CheckNameAvailability" + ], + "operationId": "CheckNameAvailability_Execute", + "x-ms-examples": { + "NameAvailability": { + "$ref": "./examples/CheckNameAvailability.json" + } + }, + "description": "Check the availability of name for resource", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + }, + { + "name": "nameAvailabilityRequest", + "in": "body", + "required": true, + "schema": { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/CheckNameAvailabilityRequest" + }, + "description": "The required parameters for checking if resource name is available." + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/NameAvailability" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.DBforPostgreSQL/locations/{locationName}/checkNameAvailability": { + "post": { + "tags": [ + "CheckNameAvailability" + ], + "operationId": "CheckNameAvailabilityWithLocation_Execute", + "x-ms-examples": { + "NameAvailability": { + "$ref": "./examples/CheckNameAvailabilityLocationBased.json" + } + }, + "description": "Check the availability of name for resource", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../types/common-types.json#/parameters/LocationNameParameter" + }, + { + "name": "nameAvailabilityRequest", + "in": "body", + "required": true, + "schema": { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/CheckNameAvailabilityRequest" + }, + "description": "The required parameters for checking if resource name is available." + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/NameAvailability" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + } + } + } + }, + "definitions": { + "NameAvailability": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "name of the PostgreSQL server.", + "readOnly": true + }, + "type": { + "type": "string", + "description": "type of the server", + "readOnly": true + } + }, + "description": "Represents a resource name availability.", + "allOf": [ + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/CheckNameAvailabilityResponse" + } + ] + } + }, + "parameters": {} +} diff --git a/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2024-11-01-preview/Configuration.json b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2024-11-01-preview/Configuration.json new file mode 100644 index 000000000000..e25c9b380825 --- /dev/null +++ b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2024-11-01-preview/Configuration.json @@ -0,0 +1,395 @@ +{ + "swagger": "2.0", + "info": { + "title": "PostgreSQLServerManagementClient", + "description": "The Microsoft Azure management API provides create, read, update, and delete functionality for Azure PostgreSQL resources including servers, databases, firewall rules, VNET rules, security alert policies, log files and configurations with new business model.", + "version": "2024-11-01-preview" + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "security": [ + { + "azure_auth": [ + "user_impersonation" + ] + } + ], + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "flow": "implicit", + "description": "Azure Active Directory OAuth2 Flow", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + }, + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/configurations": { + "get": { + "tags": [ + "Configurations" + ], + "operationId": "Configurations_ListByServer", + "x-ms-examples": { + "ConfigurationList": { + "$ref": "./examples/ConfigurationListByServer.json" + } + }, + "description": "List all the configurations in a given server.", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "../../../types/common-types.json#/parameters/ServerNameParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/ConfigurationListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/configurations/{configurationName}": { + "get": { + "tags": [ + "Configurations" + ], + "operationId": "Configurations_Get", + "x-ms-examples": { + "ConfigurationGet": { + "$ref": "./examples/ConfigurationGet.json" + } + }, + "description": "Gets information about a configuration of server.", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "../../../types/common-types.json#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/ConfigurationNameParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/Configuration" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + } + }, + "patch": { + "tags": [ + "Configurations" + ], + "operationId": "Configurations_Update", + "x-ms-examples": { + "Update a user configuration": { + "$ref": "./examples/ConfigurationUpdate.json" + } + }, + "description": "Updates a configuration of a server.", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "../../../types/common-types.json#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/ConfigurationNameParameter" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/ConfigurationForUpdate" + }, + "description": "The required parameters for updating a server configuration." + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/Configuration" + } + }, + "201": { + "description": "Created", + "schema": { + "$ref": "#/definitions/Configuration" + } + }, + "202": { + "description": "Accepted", + "headers": { + "Location": { + "type": "string" + } + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "azure-async-operation" + } + }, + "put": { + "tags": [ + "Configurations" + ], + "operationId": "Configurations_Put", + "x-ms-examples": { + "Update a user configuration": { + "$ref": "./examples/ConfigurationUpdate.json" + } + }, + "description": "Updates a configuration of a server.", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "../../../types/common-types.json#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/ConfigurationNameParameter" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/Configuration" + }, + "description": "The required parameters for updating a server configuration." + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/Configuration" + } + }, + "201": { + "description": "Created", + "schema": { + "$ref": "#/definitions/Configuration" + } + }, + "202": { + "description": "Accepted", + "headers": { + "Location": { + "type": "string" + } + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + } + } + } + }, + "definitions": { + "ConfigurationProperties": { + "type": "object", + "properties": { + "value": { + "type": "string", + "description": "Value of the configuration. Required to update the configuration." + }, + "description": { + "type": "string", + "readOnly": true, + "description": "Description of the configuration." + }, + "defaultValue": { + "type": "string", + "readOnly": true, + "description": "Default value of the configuration." + }, + "dataType": { + "type": "string", + "readOnly": true, + "description": "Data type of the configuration.", + "enum": [ + "Boolean", + "Numeric", + "Integer", + "Enumeration" + ], + "x-ms-enum": { + "name": "ConfigurationDataType", + "modelAsString": true + } + }, + "allowedValues": { + "type": "string", + "readOnly": true, + "description": "Allowed values of the configuration." + }, + "source": { + "type": "string", + "description": "Source of the configuration. Required to update the configuration." + }, + "isDynamicConfig": { + "type": "boolean", + "readOnly": true, + "description": "Configuration dynamic or static." + }, + "isReadOnly": { + "type": "boolean", + "readOnly": true, + "description": "Configuration read-only or not." + }, + "isConfigPendingRestart": { + "type": "boolean", + "readOnly": true, + "description": "Configuration is pending restart or not." + }, + "unit": { + "type": "string", + "readOnly": true, + "description": "Configuration unit." + }, + "documentationLink": { + "type": "string", + "readOnly": true, + "description": "Configuration documentation link." + } + }, + "description": "The properties of a configuration." + }, + "Configuration": { + "type": "object", + "properties": { + "properties": { + "$ref": "#/definitions/ConfigurationProperties", + "x-ms-client-flatten": true, + "description": "The properties of a configuration." + } + }, + "allOf": [ + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ProxyResource" + } + ], + "description": "Represents a Configuration." + }, + "ConfigurationForUpdate": { + "type": "object", + "properties": { + "properties": { + "$ref": "#/definitions/ConfigurationProperties", + "x-ms-client-flatten": true, + "description": "The properties of a configuration." + } + }, + "description": "Represents a Configuration." + }, + "ConfigurationListResult": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/Configuration" + }, + "description": "The list of server configurations." + }, + "nextLink": { + "description": "The link used to get the next page of operations.", + "type": "string" + } + }, + "description": "A list of server configurations." + } + }, + "parameters": { + "ConfigurationNameParameter": { + "name": "configurationName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the server configuration.", + "minLength": 1, + "pattern": "^[-\\w\\._]+$", + "x-ms-parameter-location": "method" + } + } +} diff --git a/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2024-11-01-preview/Databases.json b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2024-11-01-preview/Databases.json new file mode 100644 index 000000000000..5445a7b9e73e --- /dev/null +++ b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2024-11-01-preview/Databases.json @@ -0,0 +1,317 @@ +{ + "swagger": "2.0", + "info": { + "title": "PostgreSQLServerManagementClient", + "description": "The Microsoft Azure management API provides create, read, update, and delete functionality for Azure PostgreSQL resources including servers, databases, firewall rules, VNET rules, security alert policies, log files and configurations with new business model.", + "version": "2024-11-01-preview" + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "security": [ + { + "azure_auth": [ + "user_impersonation" + ] + } + ], + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "flow": "implicit", + "description": "Azure Active Directory OAuth2 Flow", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + }, + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/databases/{databaseName}": { + "put": { + "tags": [ + "Databases" + ], + "operationId": "Databases_Create", + "x-ms-examples": { + "Create a database": { + "$ref": "./examples/DatabaseCreate.json" + } + }, + "description": "Creates a new database or updates an existing database.", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "../../../types/common-types.json#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/Database" + }, + "description": "The required parameters for creating or updating a database." + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/Database" + } + }, + "201": { + "description": "Created", + "schema": { + "$ref": "#/definitions/Database" + } + }, + "202": { + "description": "Accepted", + "headers": { + "Location": { + "type": "string" + } + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "azure-async-operation" + } + }, + "delete": { + "tags": [ + "Databases" + ], + "operationId": "Databases_Delete", + "x-ms-examples": { + "Delete a database": { + "$ref": "./examples/DatabaseDelete.json" + } + }, + "description": "Deletes a database.", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "../../../types/common-types.json#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + } + ], + "responses": { + "200": { + "description": "OK" + }, + "202": { + "description": "Accepted", + "headers": { + "Location": { + "type": "string" + } + } + }, + "204": { + "description": "NoContent" + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + } + }, + "get": { + "tags": [ + "Databases" + ], + "operationId": "Databases_Get", + "x-ms-examples": { + "Get a database": { + "$ref": "./examples/DatabaseGet.json" + } + }, + "description": "Gets information about a database.", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "../../../types/common-types.json#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/Database" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/databases": { + "get": { + "tags": [ + "Databases" + ], + "operationId": "Databases_ListByServer", + "x-ms-examples": { + "List databases in a server": { + "$ref": "./examples/DatabasesListByServer.json" + } + }, + "description": "List all the databases in a given server.", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "../../../types/common-types.json#/parameters/ServerNameParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/DatabaseListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + } + }, + "definitions": { + "DatabaseProperties": { + "type": "object", + "properties": { + "charset": { + "type": "string", + "description": "The charset of the database.", + "pattern": "^[a-zA-Z]+\\w*$" + }, + "collation": { + "type": "string", + "description": "The collation of the database.", + "pattern": "^[a-zA-Z\\-]+([. ]|\\w)*$" + } + }, + "description": "The properties of a database." + }, + "Database": { + "type": "object", + "properties": { + "properties": { + "$ref": "#/definitions/DatabaseProperties", + "x-ms-client-flatten": true, + "description": "The properties of a database." + } + }, + "allOf": [ + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ProxyResource" + } + ], + "description": "Represents a Database." + }, + "DatabaseListResult": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/Database" + }, + "description": "The list of databases housed in a server" + }, + "nextLink": { + "description": "The link used to get the next page of databases.", + "type": "string", + "format": "uri" + } + }, + "description": "A List of databases." + } + }, + "parameters": { + "DatabaseNameParameter": { + "name": "databaseName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the database.", + "minLength": 1, + "pattern": "^[-\\w\\._]+$", + "x-ms-parameter-location": "method" + } + } +} diff --git a/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2024-11-01-preview/FirewallRules.json b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2024-11-01-preview/FirewallRules.json new file mode 100644 index 000000000000..4ad58977172b --- /dev/null +++ b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2024-11-01-preview/FirewallRules.json @@ -0,0 +1,323 @@ +{ + "swagger": "2.0", + "info": { + "title": "PostgreSQLServerManagementClient", + "description": "The Microsoft Azure management API provides create, read, update, and delete functionality for Azure PostgreSQL resources including servers, databases, firewall rules, VNET rules, security alert policies, log files and configurations with new business model.", + "version": "2024-11-01-preview" + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "security": [ + { + "azure_auth": [ + "user_impersonation" + ] + } + ], + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "flow": "implicit", + "description": "Azure Active Directory OAuth2 Flow", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + }, + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/firewallRules/{firewallRuleName}": { + "put": { + "tags": [ + "FirewallRules" + ], + "operationId": "FirewallRules_CreateOrUpdate", + "x-ms-examples": { + "FirewallRuleCreate": { + "$ref": "./examples/FirewallRuleCreate.json" + } + }, + "description": "Creates a new firewall rule or updates an existing firewall rule.", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "../../../types/common-types.json#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/FirewallRuleNameParameter" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/FirewallRule" + }, + "description": "The required parameters for creating or updating a firewall rule." + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/FirewallRule" + } + }, + "201": { + "description": "Created", + "schema": { + "$ref": "#/definitions/FirewallRule" + } + }, + "202": { + "description": "Accepted", + "headers": { + "Location": { + "type": "string" + } + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "azure-async-operation" + } + }, + "delete": { + "tags": [ + "FirewallRules" + ], + "operationId": "FirewallRules_Delete", + "x-ms-examples": { + "FirewallRuleDelete": { + "$ref": "./examples/FirewallRuleDelete.json" + } + }, + "description": "Deletes a PostgreSQL server firewall rule.", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "../../../types/common-types.json#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/FirewallRuleNameParameter" + } + ], + "responses": { + "200": { + "description": "OK" + }, + "202": { + "description": "Accepted", + "headers": { + "Location": { + "type": "string" + } + } + }, + "204": { + "description": "NoContent" + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + } + }, + "get": { + "tags": [ + "FirewallRules" + ], + "operationId": "FirewallRules_Get", + "x-ms-examples": { + "FirewallRuleList": { + "$ref": "./examples/FirewallRuleGet.json" + } + }, + "description": "List all the firewall rules in a given server.", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "../../../types/common-types.json#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/FirewallRuleNameParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/FirewallRule" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/firewallRules": { + "get": { + "tags": [ + "FirewallRules" + ], + "operationId": "FirewallRules_ListByServer", + "x-ms-examples": { + "FirewallRuleList": { + "$ref": "./examples/FirewallRuleListByServer.json" + } + }, + "description": "List all the firewall rules in a given PostgreSQL server.", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "../../../types/common-types.json#/parameters/ServerNameParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/FirewallRuleListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + } + }, + "definitions": { + "FirewallRuleProperties": { + "type": "object", + "properties": { + "startIpAddress": { + "type": "string", + "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])$", + "description": "The start IP address of the server firewall rule. Must be IPv4 format." + }, + "endIpAddress": { + "type": "string", + "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])$", + "description": "The end IP address of the server firewall rule. Must be IPv4 format." + } + }, + "required": [ + "startIpAddress", + "endIpAddress" + ], + "description": "The properties of a server firewall rule." + }, + "FirewallRule": { + "type": "object", + "properties": { + "properties": { + "$ref": "#/definitions/FirewallRuleProperties", + "x-ms-client-flatten": true, + "description": "The properties of a firewall rule." + } + }, + "allOf": [ + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ProxyResource" + } + ], + "required": [ + "properties" + ], + "description": "Represents a server firewall rule." + }, + "FirewallRuleListResult": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/FirewallRule" + }, + "description": "The list of firewall rules in a server." + }, + "nextLink": { + "description": "The link used to get the next page of operations.", + "type": "string" + } + }, + "description": "A list of firewall rules." + } + }, + "parameters": { + "FirewallRuleNameParameter": { + "name": "firewallRuleName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the server firewall rule.", + "minLength": 1, + "pattern": "^[-\\w\\._]+$", + "x-ms-parameter-location": "method" + } + } +} diff --git a/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2024-11-01-preview/FlexibleServers.json b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2024-11-01-preview/FlexibleServers.json new file mode 100644 index 000000000000..1f13ea9ea94c --- /dev/null +++ b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2024-11-01-preview/FlexibleServers.json @@ -0,0 +1,1239 @@ +{ + "swagger": "2.0", + "info": { + "title": "PostgreSQLServerManagementClient", + "description": "The Microsoft Azure management API provides create, read, update, and delete functionality for Azure PostgreSQL resources including servers, databases, firewall rules, VNET rules, security alert policies, log files and configurations with new business model.", + "version": "2024-11-01-preview" + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "security": [ + { + "azure_auth": [ + "user_impersonation" + ] + } + ], + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "flow": "implicit", + "description": "Azure Active Directory OAuth2 Flow", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + }, + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}": { + "put": { + "tags": [ + "Servers" + ], + "operationId": "Servers_Create", + "x-ms-examples": { + "Create a new server": { + "$ref": "./examples/ServerCreate.json" + }, + "Create a new server with active directory authentication enabled": { + "$ref": "./examples/ServerCreateWithAadAuthEnabled.json" + }, + "ServerCreateWithDataEncryptionEnabled": { + "$ref": "./examples/ServerCreateWithDataEncryptionEnabled.json" + }, + "Create a database as a point in time restore": { + "$ref": "./examples/ServerCreatePointInTimeRestore.json" + }, + "Create a database as a geo-restore in geo-paired location": { + "$ref": "./examples/ServerCreateGeoRestoreWithDataEncryptionEnabled.json" + }, + "ServerCreateReplica": { + "$ref": "./examples/ServerCreateReplica.json" + }, + "ServerCreateReviveDropped": { + "$ref": "./examples/ServerCreateReviveDropped.json" + }, + "ClusterCreate": { + "$ref": "./examples/ClusterCreate.json" + } + }, + "description": "Creates a new server.", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "../../../types/common-types.json#/parameters/ServerNameParameter" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/Server" + }, + "description": "The required parameters for creating or updating a server." + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/Server" + } + }, + "201": { + "description": "Created", + "schema": { + "$ref": "#/definitions/Server" + } + }, + "202": { + "description": "Accepted", + "headers": { + "Location": { + "type": "string" + } + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "azure-async-operation" + } + }, + "patch": { + "tags": [ + "Servers" + ], + "operationId": "Servers_Update", + "x-ms-examples": { + "ServerUpdate": { + "$ref": "./examples/ServerUpdate.json" + }, + "ServerUpdateWithAadAuthEnabled": { + "$ref": "./examples/ServerUpdateWithAadAuthEnabled.json" + }, + "ServerUpdateWithDataEncryptionEnabled": { + "$ref": "./examples/ServerUpdateWithDataEncryptionEnabled.json" + }, + "ServerUpdateWithCustomerMaintenanceWindow": { + "$ref": "./examples/ServerUpdateWithCustomerMaintenanceWindow.json" + }, + "ServerUpdateWithMajorVersionUpgrade": { + "$ref": "./examples/ServerUpdateWithMajorVersionUpgrade.json" + }, + "Promote a replica server as a Standalone server as planned, i.e. it will wait for replication to complete.": { + "$ref": "./examples/PromoteReplicaAsPlannedStandaloneServer.json" + }, + "Promote a replica server as a Standalone server as forced, i.e. it will promote a replica server immediately without waiting for primary and replica to be in sync.": { + "$ref": "./examples/PromoteReplicaAsForcedStandaloneServer.json" + }, + "SwitchOver a replica server as planned, i.e. it will wait for replication to complete before promoting replica as Primary and original primary as replica.": { + "$ref": "./examples/PromoteReplicaAsPlannedSwitchover.json" + }, + "SwitchOver a replica server as forced, i.e. it will replica as Primary and original primary as replica immediately without waiting for primary and replica to be in sync.": { + "$ref": "./examples/PromoteReplicaAsForcedSwitchover.json" + } + }, + "description": "Updates an existing server. The request body can contain one to many of the properties present in the normal server definition.", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "../../../types/common-types.json#/parameters/ServerNameParameter" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/ServerForUpdate" + }, + "description": "The required parameters for updating a server." + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/Server" + } + }, + "202": { + "description": "Accepted", + "headers": { + "Location": { + "type": "string" + } + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "azure-async-operation" + } + }, + "delete": { + "tags": [ + "Servers" + ], + "operationId": "Servers_Delete", + "x-ms-examples": { + "ServerDelete": { + "$ref": "./examples/ServerDelete.json" + } + }, + "description": "Deletes a server.", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "../../../types/common-types.json#/parameters/ServerNameParameter" + } + ], + "responses": { + "200": { + "description": "OK" + }, + "202": { + "description": "Accepted", + "headers": { + "Location": { + "type": "string" + } + } + }, + "204": { + "description": "NoContent" + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + } + }, + "get": { + "tags": [ + "Servers" + ], + "operationId": "Servers_Get", + "x-ms-examples": { + "ServerGet": { + "$ref": "./examples/ServerGet.json" + }, + "ServerGetWithVnet": { + "$ref": "./examples/ServerGetWithVnet.json" + }, + "ServerGetWithPrivateEndpoints": { + "$ref": "./examples/ServerGetWithPrivateEndpoints.json" + } + }, + "description": "Gets information about a server.", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "../../../types/common-types.json#/parameters/ServerNameParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/Server" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers": { + "get": { + "tags": [ + "Servers" + ], + "operationId": "Servers_ListByResourceGroup", + "x-ms-examples": { + "ServerListByResourceGroup": { + "$ref": "./examples/ServerListByResourceGroup.json" + } + }, + "description": "List all the servers in a given resource group.", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/ServerListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.DBforPostgreSQL/flexibleServers": { + "get": { + "tags": [ + "Servers" + ], + "operationId": "Servers_List", + "x-ms-examples": { + "ServerList": { + "$ref": "./examples/ServerList.json" + } + }, + "description": "List all the servers in a given subscription.", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/ServerListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + } + }, + "definitions": { + "ServerVersion": { + "type": "string", + "description": "The version of a server.", + "enum": [ + "17", + "16", + "15", + "14", + "13", + "12", + "11" + ], + "x-ms-enum": { + "name": "ServerVersion", + "modelAsString": true + } + }, + "Replica": { + "type": "object", + "description": "Replica properties of a server", + "properties": { + "role": { + "$ref": "#/definitions/ReplicationRole", + "description": "Used to indicate role of the server in replication set." + }, + "capacity": { + "type": "integer", + "format": "int32", + "description": "Replicas allowed for a server.", + "readOnly": true + }, + "replicationState": { + "type": "string", + "enum": [ + "Active", + "Catchup", + "Provisioning", + "Updating", + "Broken", + "Reconfiguring" + ], + "x-ms-enum": { + "name": "ReplicationState", + "modelAsString": true + }, + "description": "Gets the replication state of a replica server. This property is returned only for replicas api call. Supported values are Active, Catchup, Provisioning, Updating, Broken, Reconfiguring", + "readOnly": true + }, + "promoteMode": { + "type": "string", + "description": "Sets the promote mode for a replica server. This is a write only property.", + "enum": [ + "standalone", + "switchover" + ], + "x-ms-enum": { + "name": "ReadReplicaPromoteMode", + "modelAsString": true + }, + "x-ms-mutability": [ + "update" + ] + }, + "promoteOption": { + "type": "string", + "description": "Sets the promote options for a replica server. This is a write only property.", + "enum": [ + "planned", + "forced" + ], + "x-ms-enum": { + "name": "ReplicationPromoteOption", + "modelAsString": true + }, + "x-ms-mutability": [ + "update" + ] + } + } + }, + "ServerProperties": { + "type": "object", + "properties": { + "administratorLogin": { + "type": "string", + "description": "The administrator's login name of a server. Can only be specified when the server is being created (and is required for creation).", + "x-ms-mutability": [ + "create", + "read" + ] + }, + "administratorLoginPassword": { + "type": "string", + "description": "The administrator login password (required for server creation).", + "x-ms-secret": true, + "format": "password", + "x-ms-mutability": [ + "create", + "update" + ] + }, + "version": { + "$ref": "#/definitions/ServerVersion", + "description": "PostgreSQL Server version." + }, + "minorVersion": { + "type": "string", + "description": "The minor version of the server.", + "readOnly": true + }, + "state": { + "type": "string", + "description": "A state of a server that is visible to user.", + "readOnly": true, + "enum": [ + "Ready", + "Dropping", + "Disabled", + "Starting", + "Stopping", + "Stopped", + "Updating" + ], + "x-ms-enum": { + "name": "ServerState", + "modelAsString": true + } + }, + "fullyQualifiedDomainName": { + "type": "string", + "description": "The fully qualified domain name of a server.", + "readOnly": true + }, + "storage": { + "$ref": "#/definitions/Storage", + "default": null, + "description": "Storage properties of a server." + }, + "authConfig": { + "$ref": "#/definitions/AuthConfig", + "default": null, + "description": "AuthConfig properties of a server." + }, + "dataEncryption": { + "$ref": "#/definitions/DataEncryption", + "default": null, + "description": "Data encryption properties of a server." + }, + "backup": { + "$ref": "#/definitions/Backup", + "default": null, + "description": "Backup properties of a server." + }, + "network": { + "$ref": "#/definitions/Network", + "default": null, + "description": "Network properties of a server. This Network property is required to be passed only in case you want the server to be Private access server." + }, + "highAvailability": { + "$ref": "#/definitions/HighAvailability", + "default": null, + "description": "High availability properties of a server." + }, + "maintenanceWindow": { + "$ref": "#/definitions/MaintenanceWindow", + "default": null, + "description": "Maintenance window properties of a server.", + "x-ms-mutability": [ + "update", + "read" + ] + }, + "sourceServerResourceId": { + "type": "string", + "x-ms-arm-id-details": { + "allowedResources": [ + { + "type": "Microsoft.DBforPostgreSQL/flexibleServers" + } + ] + }, + "description": "The source server resource ID to restore from. It's required when 'createMode' is 'PointInTimeRestore' or 'GeoRestore' or 'Replica' or 'ReviveDropped'. This property is returned only for Replica server", + "x-ms-mutability": [ + "create", + "read" + ] + }, + "pointInTimeUTC": { + "type": "string", + "format": "date-time", + "description": "Restore point creation time (ISO8601 format), specifying the time to restore from. It's required when 'createMode' is 'PointInTimeRestore' or 'GeoRestore' or 'ReviveDropped'.", + "x-ms-mutability": [ + "create" + ] + }, + "availabilityZone": { + "type": "string", + "default": "", + "description": "availability zone information of the server.", + "x-ms-mutability": [ + "create", + "read" + ] + }, + "replicationRole": { + "$ref": "#/definitions/ReplicationRole", + "description": "Replication role of the server" + }, + "replicaCapacity": { + "type": "integer", + "format": "int32", + "description": "Replicas allowed for a server.", + "readOnly": true + }, + "replica": { + "$ref": "#/definitions/Replica", + "description": "Replica properties of a server. These Replica properties are required to be passed only in case you want to Promote a server.", + "x-ms-mutability": [ + "read", + "update" + ] + }, + "createMode": { + "type": "string", + "description": "The mode to create a new PostgreSQL server.", + "enum": [ + "Default", + "Create", + "Update", + "PointInTimeRestore", + "GeoRestore", + "Replica", + "ReviveDropped" + ], + "x-ms-enum": { + "name": "CreateMode", + "modelAsString": true + }, + "x-ms-mutability": [ + "create", + "update" + ] + }, + "privateEndpointConnections": { + "type": "array", + "items": { + "$ref": "../../../../../common-types/resource-management/v5/privatelinks.json#/definitions/PrivateEndpointConnection" + }, + "description": "List of private endpoint connections associated with the specified resource.", + "readOnly": true + }, + "cluster": { + "$ref": "#/definitions/Cluster", + "default": null, + "description": "Cluster properties of a server.", + "x-ms-mutability": [ + "create", + "read", + "update" + ] + } + }, + "description": "The properties of a server." + }, + "Server": { + "type": "object", + "properties": { + "sku": { + "$ref": "#/definitions/Sku", + "description": "The SKU (pricing tier) of the server." + }, + "identity": { + "$ref": "#/definitions/UserAssignedIdentity", + "description": "Describes the identity of the application." + }, + "properties": { + "$ref": "#/definitions/ServerProperties", + "x-ms-client-flatten": true, + "description": "Properties of the server." + } + }, + "allOf": [ + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/TrackedResource" + } + ], + "description": "Represents a server." + }, + "ServerPropertiesForUpdate": { + "type": "object", + "properties": { + "administratorLogin": { + "type": "string", + "description": "The administrator's login name of a server. Can only be specified when the server is trying to switch to password authentication and does not have default administrator login.", + "x-ms-mutability": [ + "update", + "read" + ] + }, + "administratorLoginPassword": { + "type": "string", + "x-ms-secret": true, + "format": "password", + "description": "The password of the administrator login.", + "x-ms-mutability": [ + "update" + ] + }, + "version": { + "$ref": "#/definitions/ServerVersion", + "description": "PostgreSQL Server version. Version 16 is currently not supported for MVU." + }, + "storage": { + "$ref": "#/definitions/Storage", + "default": null, + "description": "Storage properties of a server." + }, + "backup": { + "$ref": "#/definitions/Backup", + "default": null, + "description": "Backup properties of a server." + }, + "highAvailability": { + "$ref": "#/definitions/HighAvailability", + "default": null, + "description": "High availability properties of a server." + }, + "maintenanceWindow": { + "$ref": "#/definitions/MaintenanceWindow", + "default": null, + "description": "Maintenance window properties of a server.", + "x-ms-mutability": [ + "update", + "read" + ] + }, + "authConfig": { + "$ref": "#/definitions/AuthConfig", + "default": null, + "description": "AuthConfig properties of a server." + }, + "dataEncryption": { + "$ref": "#/definitions/DataEncryption", + "default": null, + "description": "Data encryption properties of a server." + }, + "createMode": { + "type": "string", + "description": "The mode to update a new PostgreSQL server.", + "enum": [ + "Default", + "Update" + ], + "x-ms-enum": { + "name": "CreateModeForUpdate", + "modelAsString": true + }, + "x-ms-mutability": [ + "update" + ] + }, + "replicationRole": { + "$ref": "#/definitions/ReplicationRole", + "description": "Replication role of the server" + }, + "replica": { + "$ref": "#/definitions/Replica", + "description": "Replica properties of a server. These Replica properties are required to be passed only in case you want to Promote a server.", + "x-ms-mutability": [ + "read", + "update" + ] + }, + "network": { + "$ref": "#/definitions/Network", + "default": null, + "description": "Network properties of a server. These are required to be passed only in case if server is a private access server." + } + } + }, + "ServerForUpdate": { + "type": "object", + "properties": { + "sku": { + "$ref": "#/definitions/Sku", + "description": "The SKU (pricing tier) of the server." + }, + "identity": { + "$ref": "#/definitions/UserAssignedIdentity", + "description": "Describes the identity of the application." + }, + "properties": { + "$ref": "#/definitions/ServerPropertiesForUpdate", + "x-ms-client-flatten": true, + "description": "Properties of the server." + }, + "tags": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Application-specific metadata in the form of key-value pairs." + } + }, + "description": "Represents a server to be updated." + }, + "ServerListResult": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/Server" + }, + "description": "The list of flexible servers" + }, + "nextLink": { + "description": "The link used to get the next page of operations.", + "type": "string" + } + }, + "description": "A list of servers." + }, + "Sku": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The name of the sku, typically, tier + family + cores, e.g. Standard_D4s_v3." + }, + "tier": { + "type": "string", + "description": "The tier of the particular SKU, e.g. Burstable.", + "enum": [ + "Burstable", + "GeneralPurpose", + "MemoryOptimized" + ], + "x-ms-enum": { + "name": "SkuTier", + "modelAsString": true + } + } + }, + "required": [ + "name", + "tier" + ], + "description": "Sku information related properties of a server." + }, + "Storage": { + "type": "object", + "properties": { + "storageSizeGB": { + "type": "integer", + "format": "int32", + "description": "Max storage allowed for a server." + }, + "autoGrow": { + "type": "string", + "description": "Flag to enable / disable Storage Auto grow for flexible server.", + "enum": [ + "Enabled", + "Disabled" + ], + "x-ms-enum": { + "name": "StorageAutoGrow", + "modelAsString": true + } + }, + "tier": { + "type": "string", + "description": "Name of storage tier for IOPS.", + "enum": [ + "P1", + "P2", + "P3", + "P4", + "P6", + "P10", + "P15", + "P20", + "P30", + "P40", + "P50", + "P60", + "P70", + "P80" + ], + "x-ms-enum": { + "name": "AzureManagedDiskPerformanceTiers", + "modelAsString": true + } + }, + "iops": { + "type": "integer", + "format": "int32", + "description": "Storage tier IOPS quantity. This property is required to be set for storage Type PremiumV2_LRS and UltraSSD_LRS." + }, + "throughput": { + "type": "integer", + "format": "int32", + "description": "Storage throughput for the server. This is required to be set for storage Type PremiumV2_LRS and UltraSSD_LRS." + }, + "type": { + "type": "string", + "enum": [ + "Premium_LRS", + "PremiumV2_LRS", + "UltraSSD_LRS" + ], + "x-ms-enum": { + "name": "StorageType", + "modelAsString": true + }, + "description": "Storage type for the server. Allowed values are Premium_LRS, PremiumV2_LRS, and UltraSSD_LRS. Default is Premium_LRS if not specified" + } + }, + "description": "Storage properties of a server" + }, + "AuthConfig": { + "type": "object", + "properties": { + "activeDirectoryAuth": { + "type": "string", + "description": "If Enabled, Azure Active Directory authentication is enabled.", + "enum": [ + "Enabled", + "Disabled" + ], + "x-ms-enum": { + "name": "activeDirectoryAuthEnum", + "modelAsString": true + } + }, + "passwordAuth": { + "type": "string", + "default": "Enabled", + "description": "If Enabled, Password authentication is enabled.", + "enum": [ + "Enabled", + "Disabled" + ], + "x-ms-enum": { + "name": "passwordAuthEnum", + "modelAsString": true + } + }, + "tenantId": { + "type": "string", + "default": "", + "description": "Tenant id of the server." + } + }, + "description": "Authentication configuration properties of a server" + }, + "DataEncryption": { + "type": "object", + "properties": { + "primaryKeyURI": { + "type": "string", + "description": "URI for the key in keyvault for data encryption of the primary server." + }, + "primaryUserAssignedIdentityId": { + "type": "string", + "description": "Resource Id for the User assigned identity to be used for data encryption of the primary server." + }, + "geoBackupKeyURI": { + "type": "string", + "description": "URI for the key in keyvault for data encryption for geo-backup of server." + }, + "geoBackupUserAssignedIdentityId": { + "type": "string", + "description": "Resource Id for the User assigned identity to be used for data encryption for geo-backup of server." + }, + "type": { + "type": "string", + "description": "Data encryption type to depict if it is System Managed vs Azure Key vault.", + "enum": [ + "SystemManaged", + "AzureKeyVault" + ], + "x-ms-enum": { + "name": "ArmServerKeyType", + "modelAsString": true + } + }, + "primaryEncryptionKeyStatus": { + "type": "string", + "description": "Primary encryption key status for Data encryption enabled server.", + "x-ms-mutability": [ + "read" + ], + "enum": [ + "Valid", + "Invalid" + ], + "x-ms-enum": { + "name": "keyStatusEnum", + "modelAsString": true + } + }, + "geoBackupEncryptionKeyStatus": { + "type": "string", + "description": "Geo-backup encryption key status for Data encryption enabled server.", + "x-ms-mutability": [ + "read" + ], + "enum": [ + "Valid", + "Invalid" + ], + "x-ms-enum": { + "name": "keyStatusEnum", + "modelAsString": true + } + } + }, + "description": "Data encryption properties of a server" + }, + "UserIdentity": { + "description": "Describes a single user-assigned identity associated with the application.", + "type": "object", + "properties": { + "principalId": { + "type": "string", + "description": "the object identifier of the Service Principal which this identity represents." + }, + "clientId": { + "type": "string", + "description": "the client identifier of the Service Principal which this identity represents." + } + } + }, + "UserAssignedIdentityMap": { + "type": "object", + "description": "Defines a map that contains user assigned identities.", + "additionalProperties": { + "$ref": "#/definitions/UserIdentity" + } + }, + "UserAssignedIdentity": { + "type": "object", + "properties": { + "userAssignedIdentities": { + "$ref": "#/definitions/UserAssignedIdentityMap", + "description": "represents user assigned identities map." + }, + "type": { + "type": "string", + "description": "the types of identities associated with this resource", + "enum": [ + "None", + "UserAssigned", + "SystemAssigned" + ], + "x-ms-enum": { + "name": "IdentityType", + "modelAsString": true + } + }, + "tenantId": { + "type": "string", + "description": "Tenant id of the server.", + "readOnly": true + } + }, + "required": [ + "type" + ], + "description": "Information describing the identities associated with this application." + }, + "ReplicationRole": { + "type": "string", + "description": "Used to indicate role of the server in replication set.", + "enum": [ + "None", + "Primary", + "AsyncReplica", + "GeoAsyncReplica" + ], + "x-ms-enum": { + "name": "ReplicationRole", + "modelAsString": true + } + }, + "Backup": { + "type": "object", + "properties": { + "backupRetentionDays": { + "type": "integer", + "format": "int32", + "default": 7, + "description": "Backup retention days for the server." + }, + "geoRedundantBackup": { + "type": "string", + "default": "Disabled", + "description": "A value indicating whether Geo-Redundant backup is enabled on the server.", + "enum": [ + "Enabled", + "Disabled" + ], + "x-ms-enum": { + "name": "GeoRedundantBackupEnum", + "modelAsString": true + }, + "x-ms-mutability": [ + "create", + "read" + ] + }, + "earliestRestoreDate": { + "type": "string", + "format": "date-time", + "description": "The earliest restore point time (ISO8601 format) for server.", + "readOnly": true + } + }, + "description": "Backup properties of a server" + }, + "Network": { + "type": "object", + "properties": { + "publicNetworkAccess": { + "type": "string", + "description": "public network access is enabled or not", + "enum": [ + "Enabled", + "Disabled" + ], + "x-ms-enum": { + "name": "ServerPublicNetworkAccessState", + "modelAsString": true + } + }, + "delegatedSubnetResourceId": { + "type": "string", + "x-ms-arm-id-details": { + "allowedResources": [ + { + "type": "Microsoft.Network/virtualNetworks/subnets" + } + ] + }, + "description": "Delegated subnet arm resource id. This is required to be passed during create, in case we want the server to be VNET injected, i.e. Private access server. During update, pass this only if we want to update the value for Private DNS zone." + }, + "privateDnsZoneArmResourceId": { + "type": "string", + "x-ms-arm-id-details": { + "allowedResources": [ + { + "type": "Microsoft.Network/privateDnsZones" + } + ] + }, + "description": "Private dns zone arm resource id. This is required to be passed during create, in case we want the server to be VNET injected, i.e. Private access server. During update, pass this only if we want to update the value for Private DNS zone." + } + }, + "description": "Network properties of a server." + }, + "HighAvailability": { + "type": "object", + "properties": { + "mode": { + "type": "string", + "default": "Disabled", + "description": "The HA mode for the server.", + "enum": [ + "Disabled", + "ZoneRedundant", + "SameZone" + ], + "x-ms-enum": { + "name": "HighAvailabilityMode", + "modelAsString": true + } + }, + "state": { + "type": "string", + "description": "A state of a HA server that is visible to user.", + "enum": [ + "NotEnabled", + "CreatingStandby", + "ReplicatingData", + "FailingOver", + "Healthy", + "RemovingStandby" + ], + "x-ms-enum": { + "name": "ServerHAState", + "modelAsString": true + }, + "readOnly": true + }, + "standbyAvailabilityZone": { + "type": "string", + "default": "", + "description": "availability zone information of the standby." + } + }, + "description": "High availability properties of a server" + }, + "MaintenanceWindow": { + "type": "object", + "description": "Maintenance window properties of a server.", + "properties": { + "customWindow": { + "type": "string", + "default": "Disabled", + "description": "indicates whether custom window is enabled or disabled" + }, + "startHour": { + "type": "integer", + "format": "int32", + "default": 0, + "description": "start hour for maintenance window" + }, + "startMinute": { + "type": "integer", + "format": "int32", + "default": 0, + "description": "start minute for maintenance window" + }, + "dayOfWeek": { + "type": "integer", + "format": "int32", + "default": 0, + "description": "day of week for maintenance window" + } + } + }, + "Cluster": { + "type": "object", + "description": "Cluster properties of a server.", + "properties": { + "clusterSize": { + "type": "integer", + "format": "int32", + "default": 0, + "description": "The node count for the cluster." + } + } + } + }, + "parameters": {} +} diff --git a/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2024-11-01-preview/LongTermRetentionOperation.json b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2024-11-01-preview/LongTermRetentionOperation.json new file mode 100644 index 000000000000..3becc5761709 --- /dev/null +++ b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2024-11-01-preview/LongTermRetentionOperation.json @@ -0,0 +1,524 @@ +{ + "swagger": "2.0", + "info": { + "title": "PostgreSQLServerManagementClient", + "description": "The Microsoft Azure management API provides create, read, update, and delete functionality for Azure PostgreSQL resources including servers, databases, firewall rules, VNET rules, security alert policies, log files and configurations with new business model.", + "version": "2024-11-01-preview" + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "security": [ + { + "azure_auth": [ + "user_impersonation" + ] + } + ], + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "flow": "implicit", + "description": "Azure Active Directory OAuth2 Flow", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + }, + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/ltrPreBackup": { + "post": { + "description": "PreBackup operation performs all the checks that are needed for the subsequent long term retention backup operation to succeed.", + "tags": [ + "LongTermRetentionBackup" + ], + "operationId": "FlexibleServer_TriggerLtrPreBackup", + "produces": [ + "application/json" + ], + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "../../../types/common-types.json#/parameters/ServerNameParameter" + }, + { + "name": "parameters", + "in": "body", + "description": "Request body for operation", + "required": true, + "schema": { + "$ref": "#/definitions/LtrPreBackupRequest" + } + } + ], + "responses": { + "200": { + "description": "Ok. API finished synchronously with Success.", + "schema": { + "$ref": "#/definitions/LtrPreBackupResponse" + }, + "headers": { + "x-ms-request-id": { + "description": "A unique ID for the current operation, service generated. All the resource providers must return this value in the response headers to facilitate debugging.", + "type": "string" + } + } + }, + "default": { + "description": "Error Scenario 4xx/5xx", + "schema": { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + }, + "headers": { + "x-ms-error-code": { + "description": "ErrorCode string in the event of a failure.", + "type": "string" + }, + "x-ms-request-id": { + "description": "A unique ID for the current operation, service generated. All the resource providers must return this value in the response headers to facilitate debugging.", + "type": "string" + } + } + } + }, + "x-ms-examples": { + "Sample_Prebackup": { + "$ref": "./examples/LongTermRetentionPreBackup.json" + } + }, + "deprecated": false + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/startLtrBackup": { + "post": { + "description": "Start the Long Term Retention Backup operation", + "tags": [ + "LongTermRetentionBackup" + ], + "operationId": "FlexibleServer_StartLtrBackup", + "produces": [ + "application/json" + ], + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "../../../types/common-types.json#/parameters/ServerNameParameter" + }, + { + "name": "parameters", + "in": "body", + "description": "Request body for operation", + "required": true, + "schema": { + "$ref": "#/definitions/LtrBackupRequest" + } + } + ], + "responses": { + "200": { + "description": "Ok. API finished synchronously with Success.", + "schema": { + "$ref": "#/definitions/LtrBackupResponse" + }, + "headers": { + "x-ms-request-id": { + "description": "A unique ID for the current operation, service generated. All the resource providers must return this value in the response headers to facilitate debugging.", + "type": "string" + } + } + }, + "202": { + "description": "Accepted.", + "headers": { + "Retry-After": { + "description": "The number of seconds to wait before checking the status of the asynchronous operation.", + "type": "integer", + "format": "int32" + }, + "x-ms-request-id": { + "description": "A unique ID for the current operation, service generated. All the resource providers must return this value in the response headers to facilitate debugging.", + "type": "string" + }, + "Location": { + "description": "URL to retrieve the final result after operation completes.", + "type": "string" + }, + "Azure-AsyncOperation": { + "description": "URL for checking the ongoing status of the operation.", + "type": "string" + } + } + }, + "default": { + "description": "Error Scenario 4xx/5xx", + "schema": { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + }, + "headers": { + "x-ms-error-code": { + "description": "ErrorCode string in the event of a failure.", + "type": "string" + }, + "x-ms-request-id": { + "description": "A unique ID for the current operation, service generated. All the resource providers must return this value in the response headers to facilitate debugging.", + "type": "string" + } + } + } + }, + "x-ms-examples": { + "Sample_ExecuteBackup": { + "$ref": "./examples/LongTermRetentionBackup.json" + } + }, + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/ltrBackupOperations/{backupName}": { + "get": { + "tags": [ + "LongTermRetentionBackup" + ], + "operationId": "ltrBackupOperations_Get", + "x-ms-examples": { + "Sample": { + "$ref": "./examples/LongTermRetentionOperationGet.json" + } + }, + "description": "Gets the result of the give long term retention backup operation for the flexible server.", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "../../../types/common-types.json#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/BackupNameParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/LtrServerBackupOperation" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/ltrBackupOperations": { + "get": { + "tags": [ + "LongTermRetentionBackup" + ], + "operationId": "ltrBackupOperations_ListByServer", + "x-ms-examples": { + "Sample List of Long Tern Retention Operations by Flexible Server": { + "$ref": "./examples/LongTermRetentionOperationListByServer.json" + } + }, + "description": "Gets the result of the give long term retention backup operations for the flexible server.", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "../../../types/common-types.json#/parameters/ServerNameParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/LtrServerBackupOperationList" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + } + }, + "definitions": { + "BackupRequestBase": { + "description": "BackupRequestBase is the base for all backup request.", + "required": [ + "backupSettings" + ], + "type": "object", + "properties": { + "backupSettings": { + "$ref": "#/definitions/BackupSettings", + "description": "Backup Settings" + } + } + }, + "LtrBackupRequest": { + "description": "The request that is made for a long term retention backup.", + "type": "object", + "properties": { + "targetDetails": { + "$ref": "#/definitions/BackupStoreDetails", + "description": "Backup store detail for target server" + } + }, + "allOf": [ + { + "$ref": "#/definitions/BackupRequestBase" + } + ], + "required": [ + "targetDetails" + ] + }, + "LtrPreBackupRequest": { + "description": "A request that is made for pre-backup.", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/BackupRequestBase" + } + ] + }, + "BackupSettings": { + "description": "The settings for the long term backup.", + "type": "object", + "required": [ + "backupName" + ], + "properties": { + "backupName": { + "type": "string", + "description": "Backup Name for the current backup" + } + } + }, + "BackupStoreDetails": { + "description": "Details about the target where the backup content will be stored.", + "required": [ + "sasUriList" + ], + "type": "object", + "properties": { + "sasUriList": { + "description": "List of SAS uri of storage containers where backup data is to be streamed/copied.", + "type": "array", + "items": { + "type": "string", + "description": "SAS URI of Azure Storage Account Container.", + "x-ms-secret": true + } + } + } + }, + "LtrPreBackupResponseProperties": { + "description": "Response for the pre-backup request.", + "type": "object", + "required": [ + "numberOfContainers" + ], + "properties": { + "numberOfContainers": { + "format": "int32", + "description": "Number of storage containers the plugin will use during backup. More than one containers may be used for size limitations, parallelism, or redundancy etc.", + "type": "integer" + } + } + }, + "LtrBackupOperationResponseProperties": { + "description": "Response for the backup request.", + "type": "object", + "required": [ + "status", + "startTime" + ], + "properties": { + "datasourceSizeInBytes": { + "format": "int64", + "description": "Size of datasource in bytes", + "type": "integer" + }, + "dataTransferredInBytes": { + "format": "int64", + "description": "Data transferred in bytes", + "type": "integer" + }, + "backupName": { + "description": "Name of Backup operation", + "type": "string" + }, + "backupMetadata": { + "description": "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", + "type": "string" + }, + "status": { + "description": "Service-set extensible enum indicating the status of operation", + "enum": [ + "Running", + "Cancelled", + "Failed", + "Succeeded" + ], + "type": "string", + "x-ms-enum": { + "name": "ExecutionStatus", + "modelAsString": true + } + }, + "startTime": { + "description": "Start time of the operation.", + "format": "date-time", + "type": "string" + }, + "endTime": { + "description": "End time of the operation.", + "format": "date-time", + "type": "string" + }, + "percentComplete": { + "description": "PercentageCompleted", + "format": "double", + "type": "number", + "minimum": 0, + "maximum": 100 + }, + "errorCode": { + "readOnly": true, + "type": "string", + "description": "The error code." + }, + "errorMessage": { + "readOnly": true, + "type": "string", + "description": "The error message." + } + } + }, + "LtrBackupResponse": { + "description": "Response for the LTR backup API call", + "type": "object", + "properties": { + "properties": { + "description": "Long Term Retention Backup Operation Resource Properties", + "x-ms-client-flatten": true, + "$ref": "#/definitions/LtrBackupOperationResponseProperties" + } + } + }, + "LtrServerBackupOperation": { + "description": "Response for the LTR backup Operation API call", + "type": "object", + "required": [ + "id", + "name" + ], + "properties": { + "properties": { + "description": "Long Term Retention Backup Operation Resource Properties", + "x-ms-client-flatten": true, + "$ref": "#/definitions/LtrBackupOperationResponseProperties" + } + }, + "allOf": [ + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ProxyResource" + } + ] + }, + "LtrServerBackupOperationList": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/LtrServerBackupOperation" + }, + "description": "The list of long term retention server backup operations" + }, + "nextLink": { + "description": "The link used to get the next page of operations.", + "type": "string" + } + }, + "description": "A list of long term retention backup operations for server." + }, + "LtrPreBackupResponse": { + "description": "Response for the LTR pre-backup API call", + "type": "object", + "required": [ + "properties" + ], + "properties": { + "properties": { + "description": "Additional Properties for the pre backup response", + "x-ms-client-flatten": true, + "$ref": "#/definitions/LtrPreBackupResponseProperties" + } + } + } + }, + "parameters": { + "BackupNameParameter": { + "name": "backupName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the backup.", + "x-ms-parameter-location": "method", + "pattern": "^[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*" + } + } +} diff --git a/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2024-11-01-preview/Migrations.json b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2024-11-01-preview/Migrations.json new file mode 100644 index 000000000000..daf0484448bf --- /dev/null +++ b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2024-11-01-preview/Migrations.json @@ -0,0 +1,1311 @@ +{ + "swagger": "2.0", + "info": { + "title": "PostgreSQLServerManagementClient", + "description": "The Microsoft Azure management API provides create, read, update, and delete functionality for Azure PostgreSQL resources including servers, databases, firewall rules, VNET rules, security alert policies, log files and configurations with new business model.", + "version": "2024-11-01-preview" + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "security": [ + { + "azure_auth": [ + "user_impersonation" + ] + } + ], + "securityDefinitions": { + "azure_auth": { + "description": "Azure Active Directory OAuth2 Flow", + "type": "oauth2", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "flow": "implicit", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + }, + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{targetDbServerName}/migrations/{migrationName}": { + "put": { + "tags": [ + "Migrations" + ], + "operationId": "Migrations_Create", + "x-ms-examples": { + "Migrations_Create": { + "$ref": "./examples/Migrations_Create.json" + }, + "Migrations Create by passing user names": { + "$ref": "./examples/Migrations_Create_With_Other_Users.json" + }, + "Migrations Create with roles": { + "$ref": "./examples/Migrations_Create_With_Roles.json" + }, + "Migrations Create with private endpoint": { + "$ref": "./examples/Migrations_Create_With_PrivateEndpoint_Servers.json" + }, + "Create Migration with other source types for Validate and Migrate": { + "$ref": "./examples/Migrations_Create_Other_SourceTypes_Validate_Migrate.json" + }, + "Create Pre-migration Validation": { + "$ref": "./examples/Migrations_Create_Validate_Only.json" + }, + "Migrations Create with fully qualified domain name": { + "$ref": "./examples/Migrations_Create_With_FullyQualifiedDomainName.json" + } + }, + "description": "Creates a new migration.", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/TargetDbServerSubscriptionIdParameter" + }, + { + "$ref": "#/parameters/TargetDbServerResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/TargetDbServerNameParameter" + }, + { + "$ref": "#/parameters/MigrationNameParameter" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/MigrationResource" + }, + "description": "The required parameters for creating a migration." + } + ], + "responses": { + "200": { + "description": "Successfully set or update the Migration for a server", + "schema": { + "$ref": "#/definitions/MigrationResource" + } + }, + "201": { + "description": "Created", + "schema": { + "$ref": "#/definitions/MigrationResource" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + } + }, + "get": { + "tags": [ + "Migrations" + ], + "operationId": "Migrations_Get", + "x-ms-examples": { + "Migrations_Get": { + "$ref": "./examples/Migrations_Get.json" + }, + "Migrations_GetMigrationWithValidationFailures": { + "$ref": "./examples/Migrations_GetMigrationWithValidationFailures.json" + }, + "Migrations_GetMigrationWithSuccessfulValidationOnly": { + "$ref": "./examples/Migrations_GetMigrationWithSuccessfulValidationOnly.json" + }, + "Migrations_GetMigrationWithSuccessfulValidationButMigrationFailure": { + "$ref": "./examples/Migrations_GetMigrationWithSuccessfulValidationButMigrationFailure.json" + }, + "Migrations_GetMigrationWithSuccessfulValidationAndMigration": { + "$ref": "./examples/Migrations_GetMigrationWithSuccessfulValidationAndMigration.json" + } + }, + "description": "Gets details of a migration.", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/TargetDbServerSubscriptionIdParameter" + }, + { + "$ref": "#/parameters/TargetDbServerResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/TargetDbServerNameParameter" + }, + { + "$ref": "#/parameters/MigrationNameParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/MigrationResource" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + } + }, + "patch": { + "tags": [ + "Migrations" + ], + "operationId": "Migrations_Update", + "x-ms-examples": { + "Migrations_Update": { + "$ref": "./examples/Migrations_Update.json" + }, + "Cancel migration": { + "$ref": "./examples/Migrations_Cancel.json" + } + }, + "description": "Updates an existing migration. The request body can contain one to many of the mutable properties present in the migration definition. Certain property updates initiate migration state transitions.", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/TargetDbServerSubscriptionIdParameter" + }, + { + "$ref": "#/parameters/TargetDbServerResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/TargetDbServerNameParameter" + }, + { + "$ref": "#/parameters/MigrationNameParameter" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/MigrationResourceForPatch" + }, + "description": "The required parameters for updating a migration." + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/MigrationResource" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + } + }, + "delete": { + "tags": [ + "Migrations" + ], + "operationId": "Migrations_Delete", + "x-ms-examples": { + "Migrations_Delete": { + "$ref": "./examples/Migrations_Delete.json" + } + }, + "description": "Deletes a migration.", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/TargetDbServerSubscriptionIdParameter" + }, + { + "$ref": "#/parameters/TargetDbServerResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/TargetDbServerNameParameter" + }, + { + "$ref": "#/parameters/MigrationNameParameter" + } + ], + "responses": { + "200": { + "description": "OK" + }, + "204": { + "description": "NoContent" + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{targetDbServerName}/migrations": { + "get": { + "tags": [ + "Migrations" + ], + "operationId": "Migrations_ListByTargetServer", + "x-ms-examples": { + "Migrations_ListByTargetServer": { + "$ref": "./examples/Migrations_ListByTargetServer.json" + } + }, + "description": "List all the migrations on a given target server.", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/TargetDbServerSubscriptionIdParameter" + }, + { + "$ref": "#/parameters/TargetDbServerResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/TargetDbServerNameParameter" + }, + { + "$ref": "#/parameters/MigrationListFilter" + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/MigrationResourceListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{targetDbServerName}/checkMigrationNameAvailability": { + "post": { + "summary": "Check migration name validity and availability", + "description": "This method checks whether a proposed migration name is valid and available.", + "tags": [ + "Custom operation", + "POST" + ], + "operationId": "CheckMigrationNameAvailability", + "x-ms-examples": { + "CheckMigrationNameAvailability": { + "$ref": "./examples/CheckMigrationNameAvailability.json" + } + }, + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/TargetDbServerSubscriptionIdParameter" + }, + { + "$ref": "#/parameters/TargetDbServerResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/TargetDbServerNameParameter" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/MigrationNameAvailabilityResource" + }, + "description": "The required parameters for checking if a migration name is available." + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/MigrationNameAvailabilityResource" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + } + } + } + }, + "definitions": { + "MigrationResource": { + "type": "object", + "properties": { + "properties": { + "$ref": "#/definitions/MigrationResourceProperties", + "description": "Migration resource properties.", + "x-ms-client-flatten": true + } + }, + "allOf": [ + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/TrackedResource" + } + ], + "description": "Represents a migration resource." + }, + "MigrationResourceProperties": { + "type": "object", + "properties": { + "migrationId": { + "type": "string", + "readOnly": true, + "description": "ID for migration, a GUID." + }, + "currentStatus": { + "$ref": "#/definitions/MigrationStatus", + "readOnly": true, + "description": "Current status of migration" + }, + "migrationInstanceResourceId": { + "type": "string", + "format": "arm-id", + "description": "ResourceId of the private endpoint migration instance" + }, + "migrationMode": { + "$ref": "#/definitions/MigrationMode", + "description": "There are two types of migration modes Online and Offline" + }, + "migrationOption": { + "$ref": "#/definitions/MigrationOption", + "description": "This indicates the supported Migration option for the migration" + }, + "sourceType": { + "$ref": "#/definitions/SourceType", + "description": "migration source server type : OnPremises, AWS, GCP, AzureVM, PostgreSQLSingleServer, AWS_RDS, AWS_AURORA, AWS_EC2, GCP_CloudSQL, GCP_AlloyDB, GCP_Compute, EDB, EDB_Oracle_Server, EDB_PostgreSQL, PostgreSQLFlexibleServer, PostgreSQLCosmosDB, Huawei_RDS, Huawei_Compute, Heroku_PostgreSQL, Crunchy_PostgreSQL, ApsaraDB_RDS, Digital_Ocean_Droplets, Digital_Ocean_PostgreSQL, or Supabase_PostgreSQL" + }, + "sslMode": { + "$ref": "#/definitions/SslMode", + "description": "SSL modes for migration. Default SSL mode for PostgreSQLSingleServer is VerifyFull and Prefer for other source types" + }, + "sourceDbServerMetadata": { + "$ref": "#/definitions/DbServerMetadata", + "readOnly": true, + "description": "Metadata of the source database server" + }, + "targetDbServerMetadata": { + "$ref": "#/definitions/DbServerMetadata", + "readOnly": true, + "description": "Metadata of the target database server" + }, + "sourceDbServerResourceId": { + "type": "string", + "description": "ResourceId of the source database server in case the sourceType is PostgreSQLSingleServer. For other source types this should be ipaddress:port@username or hostname:port@username" + }, + "sourceDbServerFullyQualifiedDomainName": { + "type": "string", + "description": "Source server fully qualified domain name (FQDN) or IP address. It is a optional value, if customer provide it, migration service will always use it for connection" + }, + "targetDbServerResourceId": { + "type": "string", + "readOnly": true, + "description": "ResourceId of the source database server" + }, + "targetDbServerFullyQualifiedDomainName": { + "type": "string", + "description": "Target server fully qualified domain name (FQDN) or IP address. It is a optional value, if customer provide it, migration service will always use it for connection" + }, + "secretParameters": { + "$ref": "#/definitions/MigrationSecretParameters", + "description": "Migration secret parameters" + }, + "dbsToMigrate": { + "maxItems": 50, + "type": "array", + "items": { + "type": "string" + }, + "description": "Number of databases to migrate", + "x-ms-identifiers": [] + }, + "setupLogicalReplicationOnSourceDbIfNeeded": { + "type": "string", + "enum": [ + "True", + "False" + ], + "x-ms-enum": { + "name": "LogicalReplicationOnSourceDbEnum", + "modelAsString": true + }, + "description": "Indicates whether to setup LogicalReplicationOnSourceDb, if needed" + }, + "overwriteDbsInTarget": { + "type": "string", + "enum": [ + "True", + "False" + ], + "x-ms-enum": { + "name": "OverwriteDbsInTargetEnum", + "modelAsString": true + }, + "description": "Indicates whether the databases on the target server can be overwritten, if already present. If set to False, the migration workflow will wait for a confirmation, if it detects that the database already exists." + }, + "migrationWindowStartTimeInUtc": { + "format": "date-time", + "type": "string", + "description": "Start time in UTC for migration window" + }, + "migrationWindowEndTimeInUtc": { + "format": "date-time", + "type": "string", + "description": "End time in UTC for migration window" + }, + "migrateRoles": { + "type": "string", + "enum": [ + "True", + "False" + ], + "x-ms-enum": { + "name": "MigrateRolesEnum", + "modelAsString": true + }, + "description": "To migrate roles and permissions we need to send this flag as True" + }, + "startDataMigration": { + "type": "string", + "enum": [ + "True", + "False" + ], + "x-ms-enum": { + "name": "StartDataMigrationEnum", + "modelAsString": true + }, + "description": "Indicates whether the data migration should start right away" + }, + "triggerCutover": { + "type": "string", + "enum": [ + "True", + "False" + ], + "x-ms-enum": { + "name": "TriggerCutoverEnum", + "modelAsString": true + }, + "description": "To trigger cutover for entire migration we need to send this flag as True" + }, + "dbsToTriggerCutoverOn": { + "type": "array", + "items": { + "type": "string" + }, + "description": "When you want to trigger cutover for specific databases send triggerCutover flag as True and database names in this array", + "x-ms-identifiers": [] + }, + "cancel": { + "type": "string", + "enum": [ + "True", + "False" + ], + "x-ms-enum": { + "name": "CancelEnum", + "modelAsString": true + }, + "description": "To trigger cancel for entire migration we need to send this flag as True" + }, + "dbsToCancelMigrationOn": { + "type": "array", + "items": { + "type": "string" + }, + "description": "When you want to trigger cancel for specific databases send cancel flag as True and database names in this array", + "x-ms-identifiers": [] + } + }, + "description": "Migration resource properties." + }, + "MigrationResourceListResult": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/MigrationResource" + }, + "readOnly": true, + "description": "A list of migration resources.", + "x-ms-identifiers": [] + }, + "nextLink": { + "description": "The link used to get the next page of migrations.", + "type": "string", + "readOnly": true + } + }, + "description": "A list of migration resources." + }, + "MigrationResourceForPatch": { + "type": "object", + "properties": { + "properties": { + "$ref": "#/definitions/MigrationResourcePropertiesForPatch", + "description": "Migration resource properties.", + "x-ms-client-flatten": true + }, + "tags": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Application-specific metadata in the form of key-value pairs." + } + }, + "description": "Represents a migration resource for patch." + }, + "MigrationResourcePropertiesForPatch": { + "type": "object", + "properties": { + "sourceDbServerResourceId": { + "type": "string", + "description": "ResourceId of the source database server" + }, + "sourceDbServerFullyQualifiedDomainName": { + "type": "string", + "description": "Source server fully qualified domain name (FQDN) or IP address. It is a optional value, if customer provide it, migration service will always use it for connection" + }, + "targetDbServerFullyQualifiedDomainName": { + "type": "string", + "description": "Target server fully qualified domain name (FQDN) or IP address. It is a optional value, if customer provide it, migration service will always use it for connection" + }, + "secretParameters": { + "$ref": "#/definitions/MigrationSecretParameters", + "description": "Migration secret parameters" + }, + "dbsToMigrate": { + "maxItems": 50, + "type": "array", + "items": { + "type": "string" + }, + "description": "Number of databases to migrate", + "x-ms-identifiers": [] + }, + "setupLogicalReplicationOnSourceDbIfNeeded": { + "type": "string", + "enum": [ + "True", + "False" + ], + "x-ms-enum": { + "name": "LogicalReplicationOnSourceDbEnum", + "modelAsString": true + }, + "description": "Indicates whether to setup LogicalReplicationOnSourceDb, if needed" + }, + "overwriteDbsInTarget": { + "type": "string", + "enum": [ + "True", + "False" + ], + "x-ms-enum": { + "name": "OverwriteDbsInTargetEnum", + "modelAsString": true + }, + "description": "Indicates whether the databases on the target server can be overwritten, if already present. If set to False, the migration workflow will wait for a confirmation, if it detects that the database already exists." + }, + "migrationWindowStartTimeInUtc": { + "format": "date-time", + "type": "string", + "description": "Start time in UTC for migration window" + }, + "migrateRoles": { + "type": "string", + "enum": [ + "True", + "False" + ], + "x-ms-enum": { + "name": "MigrateRolesEnum", + "modelAsString": true + }, + "description": "To migrate roles and permissions we need to send this flag as True" + }, + "startDataMigration": { + "type": "string", + "enum": [ + "True", + "False" + ], + "x-ms-enum": { + "name": "StartDataMigrationEnum", + "modelAsString": true + }, + "description": "Indicates whether the data migration should start right away" + }, + "triggerCutover": { + "type": "string", + "enum": [ + "True", + "False" + ], + "x-ms-enum": { + "name": "TriggerCutoverEnum", + "modelAsString": true + }, + "description": "To trigger cutover for entire migration we need to send this flag as True" + }, + "dbsToTriggerCutoverOn": { + "type": "array", + "items": { + "type": "string" + }, + "description": "When you want to trigger cutover for specific databases send triggerCutover flag as True and database names in this array", + "x-ms-identifiers": [] + }, + "cancel": { + "type": "string", + "enum": [ + "True", + "False" + ], + "x-ms-enum": { + "name": "CancelEnum", + "modelAsString": true + }, + "description": "To trigger cancel for entire migration we need to send this flag as True" + }, + "dbsToCancelMigrationOn": { + "type": "array", + "items": { + "type": "string" + }, + "description": "When you want to trigger cancel for specific databases send cancel flag as True and database names in this array", + "x-ms-identifiers": [] + }, + "migrationMode": { + "$ref": "#/definitions/MigrationMode", + "description": "There are two types of migration modes Online and Offline" + } + }, + "description": "Migration resource properties for patch." + }, + "MigrationSecretParameters": { + "required": [ + "adminCredentials" + ], + "type": "object", + "properties": { + "adminCredentials": { + "x-ms-secret": true, + "x-ms-external": true, + "$ref": "#/definitions/AdminCredentials", + "description": "Admin credentials for source and target servers" + }, + "sourceServerUsername": { + "type": "string", + "x-ms-mutability": [ + "create", + "update" + ], + "description": "Gets or sets the username for the source server. This user need not be an admin." + }, + "targetServerUsername": { + "type": "string", + "x-ms-mutability": [ + "create", + "update" + ], + "description": "Gets or sets the username for the target server. This user need not be an admin." + } + }, + "description": "Migration secret parameters." + }, + "AdminCredentials": { + "type": "object", + "required": [ + "sourceServerPassword", + "targetServerPassword" + ], + "properties": { + "sourceServerPassword": { + "type": "string", + "x-ms-secret": true, + "x-ms-external": true, + "x-ms-mutability": [ + "create", + "update" + ], + "description": "Password for source server." + }, + "targetServerPassword": { + "type": "string", + "x-ms-secret": true, + "x-ms-external": true, + "x-ms-mutability": [ + "create", + "update" + ], + "description": "Password for target server." + } + }, + "description": "Server admin credentials." + }, + "DbServerMetadata": { + "type": "object", + "properties": { + "location": { + "type": "string", + "description": "Location of database server", + "x-ms-mutability": [ + "read" + ], + "readOnly": true + }, + "version": { + "type": "string", + "description": "Version for database engine" + }, + "storageMb": { + "format": "int32", + "type": "integer", + "description": "Storage size in MB for database server" + }, + "sku": { + "$ref": "#/definitions/ServerSku", + "description": "SKU for the database server. This object is empty for PG single server" + } + }, + "description": "Database server metadata." + }, + "MigrationDetailsLevel": { + "enum": [ + "Default", + "Summary", + "Full" + ], + "type": "string", + "description": "Migration details level.", + "x-ms-enum": { + "name": "MigrationDetailsLevel", + "modelAsString": true + } + }, + "MigrationMode": { + "enum": [ + "Offline", + "Online" + ], + "type": "string", + "description": "There are two types of migration modes Online and Offline", + "x-ms-enum": { + "name": "MigrationMode", + "modelAsString": true + } + }, + "MigrationOption": { + "enum": [ + "Validate", + "Migrate", + "ValidateAndMigrate" + ], + "type": "string", + "description": "Supported types of migration request include Validate, Migrate and ValidateAndMigrate", + "x-ms-enum": { + "name": "MigrationOption", + "modelAsString": true + } + }, + "MigrationState": { + "enum": [ + "InProgress", + "WaitingForUserAction", + "Canceled", + "Failed", + "Succeeded", + "ValidationFailed", + "CleaningUp" + ], + "type": "string", + "description": "Migration state.", + "x-ms-enum": { + "name": "MigrationState", + "modelAsString": true + } + }, + "MigrationStatus": { + "type": "object", + "properties": { + "state": { + "$ref": "#/definitions/MigrationState", + "readOnly": true, + "description": "State of migration" + }, + "error": { + "type": "string", + "readOnly": true, + "description": "Error message, if any, for the migration state" + }, + "currentSubStateDetails": { + "$ref": "#/definitions/MigrationSubStateDetails", + "readOnly": true, + "description": "Current Migration sub state details." + } + }, + "description": "Migration status." + }, + "MigrationSubState": { + "enum": [ + "PerformingPreRequisiteSteps", + "WaitingForLogicalReplicationSetupRequestOnSourceDB", + "WaitingForDBsToMigrateSpecification", + "WaitingForTargetDBOverwriteConfirmation", + "WaitingForDataMigrationScheduling", + "WaitingForDataMigrationWindow", + "MigratingData", + "WaitingForCutoverTrigger", + "CompletingMigration", + "Completed", + "CancelingRequestedDBMigrations", + "ValidationInProgress" + ], + "type": "string", + "description": "Migration sub state.", + "x-ms-enum": { + "name": "MigrationSubState", + "modelAsString": true + } + }, + "MigrationSubStateDetails": { + "type": "object", + "properties": { + "currentSubState": { + "$ref": "#/definitions/MigrationSubState", + "readOnly": true + }, + "dbDetails": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/DbMigrationStatus" + } + }, + "validationDetails": { + "$ref": "#/definitions/ValidationDetails" + } + }, + "description": "Migration sub state details." + }, + "DbMigrationStatus": { + "type": "object", + "description": "Migration status of an individual database", + "properties": { + "databaseName": { + "type": "string", + "description": "Name of the database" + }, + "migrationState": { + "type": "string", + "description": "Migration db state of an individual database", + "enum": [ + "InProgress", + "WaitingForCutoverTrigger", + "Failed", + "Canceled", + "Succeeded", + "Canceling" + ], + "x-ms-enum": { + "name": "MigrationDbState", + "modelAsString": true + } + }, + "migrationOperation": { + "type": "string", + "description": "Migration operation of an individual database" + }, + "startedOn": { + "type": "string", + "format": "date-time", + "description": "Start date-time of a migration state" + }, + "endedOn": { + "type": "string", + "format": "date-time", + "description": "End date-time of a migration state" + }, + "fullLoadQueuedTables": { + "format": "int32", + "type": "integer", + "description": "Number of tables queued for the migration of a DB" + }, + "fullLoadErroredTables": { + "format": "int32", + "type": "integer", + "description": "Number of tables errored out during the migration of a DB" + }, + "fullLoadLoadingTables": { + "format": "int32", + "type": "integer", + "description": "Number of tables loading during the migration of a DB" + }, + "fullLoadCompletedTables": { + "format": "int32", + "type": "integer", + "description": "Number of tables loaded during the migration of a DB" + }, + "cdcUpdateCounter": { + "format": "int32", + "type": "integer", + "description": "CDC update counter" + }, + "cdcDeleteCounter": { + "format": "int32", + "type": "integer", + "description": "CDC delete counter" + }, + "cdcInsertCounter": { + "format": "int32", + "type": "integer", + "description": "CDC insert counter" + }, + "appliedChanges": { + "format": "int32", + "type": "integer", + "description": "CDC applied changes counter" + }, + "incomingChanges": { + "format": "int32", + "type": "integer", + "description": "CDC incoming changes counter" + }, + "latency": { + "format": "int32", + "type": "integer", + "description": "Lag in seconds between source and target during online phase" + }, + "message": { + "type": "string", + "description": "Error message, if any, for the migration state" + } + } + }, + "ValidationDetails": { + "type": "object", + "description": "Details for the validation for migration", + "properties": { + "status": { + "$ref": "#/definitions/ValidationState" + }, + "validationStartTimeInUtc": { + "type": "string", + "format": "date-time", + "description": "Validation Start date-time in UTC" + }, + "validationEndTimeInUtc": { + "type": "string", + "format": "date-time", + "description": "Validation End date-time in UTC" + }, + "serverLevelValidationDetails": { + "type": "array", + "items": { + "$ref": "#/definitions/ValidationSummaryItem" + }, + "description": "Details of server level validations", + "x-ms-identifiers": [] + }, + "dbLevelValidationDetails": { + "type": "array", + "items": { + "$ref": "#/definitions/DbLevelValidationStatus" + }, + "description": "Details of server level validations", + "x-ms-identifiers": [ + "databaseName" + ] + } + } + }, + "DbLevelValidationStatus": { + "type": "object", + "description": "Validation status summary for an individual database", + "properties": { + "databaseName": { + "type": "string", + "description": "Name of the database" + }, + "startedOn": { + "type": "string", + "format": "date-time", + "description": "Start date-time of a database level validation" + }, + "endedOn": { + "type": "string", + "format": "date-time", + "description": "End date-time of a database level validation" + }, + "summary": { + "type": "array", + "items": { + "$ref": "#/definitions/ValidationSummaryItem" + }, + "description": "Summary of database level validations", + "x-ms-identifiers": [] + } + } + }, + "ValidationSummaryItem": { + "type": "object", + "description": "Validation summary object", + "properties": { + "type": { + "type": "string", + "description": "Validation type" + }, + "state": { + "$ref": "#/definitions/ValidationState" + }, + "messages": { + "type": "array", + "items": { + "$ref": "#/definitions/ValidationMessage" + }, + "description": "Validation messages", + "x-ms-identifiers": [] + } + } + }, + "ValidationMessage": { + "type": "object", + "description": "Validation message object", + "properties": { + "state": { + "$ref": "#/definitions/ValidationState", + "description": "Severity of validation message" + }, + "message": { + "type": "string", + "description": "Validation message string" + } + } + }, + "ValidationState": { + "type": "string", + "description": "Validation status for migration", + "enum": [ + "Failed", + "Succeeded", + "Warning" + ], + "x-ms-enum": { + "name": "ValidationState", + "modelAsString": true + } + }, + "SourceType": { + "enum": [ + "OnPremises", + "AWS", + "GCP", + "AzureVM", + "PostgreSQLSingleServer", + "AWS_RDS", + "AWS_AURORA", + "AWS_EC2", + "GCP_CloudSQL", + "GCP_AlloyDB", + "GCP_Compute", + "EDB", + "EDB_Oracle_Server", + "EDB_PostgreSQL", + "PostgreSQLFlexibleServer", + "PostgreSQLCosmosDB", + "Huawei_RDS", + "Huawei_Compute", + "Heroku_PostgreSQL", + "Crunchy_PostgreSQL", + "ApsaraDB_RDS", + "Digital_Ocean_Droplets", + "Digital_Ocean_PostgreSQL", + "Supabase_PostgreSQL" + ], + "type": "string", + "description": "Migration source server type : OnPremises, AWS, GCP, AzureVM, PostgreSQLSingleServer, AWS_RDS, AWS_AURORA, AWS_EC2, GCP_CloudSQL, GCP_AlloyDB, GCP_Compute, EDB, EDB_Oracle_Server, EDB_PostgreSQL, PostgreSQLFlexibleServer, PostgreSQLCosmosDB, Huawei_RDS, Huawei_Compute, Heroku_PostgreSQL, Crunchy_PostgreSQL, ApsaraDB_RDS, Digital_Ocean_Droplets, Digital_Ocean_PostgreSQL, or Supabase_PostgreSQL", + "x-ms-enum": { + "name": "SourceType", + "modelAsString": true + } + }, + "SslMode": { + "enum": [ + "Prefer", + "Require", + "VerifyCA", + "VerifyFull" + ], + "type": "string", + "description": "Supported SSL modes for migration. VerifyFull is the recommended SSL mode for Single server migration. Prefer, Require are recommended SSL modes for other source types", + "x-ms-enum": { + "name": "SslMode", + "modelAsString": true + } + }, + "ServerSku": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The name of the sku, typically, tier + family + cores, e.g. Standard_D4s_v3." + }, + "tier": { + "type": "string", + "description": "The tier of the particular SKU, e.g. Burstable.", + "enum": [ + "Burstable", + "GeneralPurpose", + "MemoryOptimized" + ], + "x-ms-enum": { + "name": "SkuTier", + "modelAsString": true + } + } + }, + "description": "Sku information related properties of a server." + }, + "MigrationNameAvailabilityReason": { + "enum": [ + "Invalid", + "AlreadyExists" + ], + "type": "string", + "description": "Migration name availability reason.", + "x-ms-enum": { + "name": "MigrationNameAvailabilityReason", + "modelAsString": true + } + }, + "MigrationNameAvailabilityResource": { + "required": [ + "name", + "type" + ], + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The resource name to verify." + }, + "type": { + "type": "string", + "description": "The type of the resource." + }, + "nameAvailable": { + "type": "boolean", + "description": "Indicates whether the resource name is available.", + "readOnly": true + }, + "reason": { + "$ref": "#/definitions/MigrationNameAvailabilityReason", + "description": "Migration name availability reason", + "readOnly": true + }, + "message": { + "type": "string", + "description": "Migration name availability message.", + "readOnly": true + } + }, + "description": "Represents a migration name's availability." + } + }, + "parameters": { + "TargetDbServerSubscriptionIdParameter": { + "name": "subscriptionId", + "in": "path", + "required": true, + "type": "string", + "description": "The subscription ID of the target database server.", + "pattern": "([a-z0-9]){8,8}[-]([a-z0-9]){4,4}[-]([a-z0-9]){4,4}[-]([a-z0-9]){4,4}[-]([a-z0-9]){12,12}", + "x-ms-parameter-location": "method" + }, + "TargetDbServerResourceGroupNameParameter": { + "name": "resourceGroupName", + "in": "path", + "required": true, + "type": "string", + "description": "The resource group name of the target database server.", + "pattern": "^[-a-z0-9A-Z._()]+[^.]$", + "x-ms-parameter-location": "method" + }, + "TargetDbServerNameParameter": { + "name": "targetDbServerName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the target database server.", + "pattern": "([-a-z0-9]){3,63}", + "x-ms-parameter-location": "method" + }, + "MigrationNameParameter": { + "name": "migrationName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the migration.", + "pattern": "^[a-z][a-z0-9]*$", + "x-ms-parameter-location": "method" + }, + "MigrationListFilter": { + "name": "migrationListFilter", + "in": "query", + "required": false, + "enum": [ + "Active", + "All" + ], + "type": "string", + "description": "Migration list filter. Retrieves either active migrations or all migrations.", + "x-ms-enum": { + "name": "MigrationListFilter", + "modelAsString": true + }, + "x-ms-parameter-location": "method" + } + } +} diff --git a/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2024-11-01-preview/Operations.json b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2024-11-01-preview/Operations.json new file mode 100644 index 000000000000..fddf513e6167 --- /dev/null +++ b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2024-11-01-preview/Operations.json @@ -0,0 +1,164 @@ +{ + "swagger": "2.0", + "info": { + "title": "PostgreSQLServerManagementClient", + "description": "The Microsoft Azure management API provides create, read, update, and delete functionality for Azure PostgreSQL resources including servers, databases, firewall rules, VNET rules, security alert policies, log files and configurations with new business model.", + "version": "2024-11-01-preview" + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "security": [ + { + "azure_auth": [ + "user_impersonation" + ] + } + ], + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "flow": "implicit", + "description": "Azure Active Directory OAuth2 Flow", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + }, + "paths": { + "/providers/Microsoft.DBforPostgreSQL/operations": { + "get": { + "tags": [ + "Operations" + ], + "operationId": "Operations_List", + "x-ms-examples": { + "OperationList": { + "$ref": "./examples/OperationList.json" + } + }, + "description": "Lists all of the available REST API operations.", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/OperationListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + } + } + } + }, + "definitions": { + "OperationDisplay": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "readOnly": true, + "description": "Operation resource provider name." + }, + "resource": { + "type": "string", + "readOnly": true, + "description": "Resource on which the operation is performed." + }, + "operation": { + "type": "string", + "readOnly": true, + "description": "Localized friendly name for the operation." + }, + "description": { + "type": "string", + "readOnly": true, + "description": "Operation description." + } + }, + "description": "Display metadata associated with the operation." + }, + "Operation": { + "type": "object", + "properties": { + "name": { + "type": "string", + "readOnly": true, + "description": "The name of the operation being performed on this particular object." + }, + "display": { + "$ref": "#/definitions/OperationDisplay", + "readOnly": true, + "description": "The localized display information for this particular operation or action." + }, + "isDataAction": { + "description": "Indicates whether the operation is a data action", + "type": "boolean" + }, + "origin": { + "type": "string", + "readOnly": true, + "description": "The intended executor of the operation.", + "enum": [ + "NotSpecified", + "user", + "system" + ], + "x-ms-enum": { + "name": "OperationOrigin", + "modelAsString": true + } + }, + "properties": { + "type": "object", + "additionalProperties": { + "type": "object" + }, + "readOnly": true, + "x-ms-client-flatten": false, + "description": "Additional descriptions for the operation." + } + }, + "description": "REST API operation definition." + }, + "OperationListResult": { + "description": "A list of resource provider operations.", + "type": "object", + "properties": { + "value": { + "description": "Collection of available operation details", + "uniqueItems": false, + "type": "array", + "items": { + "$ref": "#/definitions/Operation" + }, + "x-ms-identifiers": [ + "name" + ] + }, + "nextLink": { + "description": "URL client should use to fetch the next page (per server side paging).\r\nIt's null for now, added for future use.", + "type": "string" + } + } + } + }, + "parameters": {} +} diff --git a/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2024-11-01-preview/PrivateDnsZone.json b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2024-11-01-preview/PrivateDnsZone.json new file mode 100644 index 000000000000..7d5ceb2cf9ef --- /dev/null +++ b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2024-11-01-preview/PrivateDnsZone.json @@ -0,0 +1,77 @@ +{ + "swagger": "2.0", + "info": { + "version": "2024-11-01-preview", + "title": "PostgreSQLServerManagementClient", + "description": "The Microsoft Azure management API provides create, read, update, and delete functionality for Azure PostgreSQL resources including servers, databases, firewall rules, VNET rules, security alert policies, log files and configurations with new business model." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "security": [ + { + "azure_auth": [ + "user_impersonation" + ] + } + ], + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "flow": "implicit", + "description": "Azure Active Directory OAuth2 Flow", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + }, + "paths": { + "/providers/Microsoft.DBforPostgreSQL/getPrivateDnsZoneSuffix": { + "post": { + "tags": [ + "GetPrivateDnsZoneSuffix" + ], + "operationId": "GetPrivateDnsZoneSuffix_Execute", + "x-ms-examples": { + "GetPrivateDnsZoneSuffix": { + "$ref": "./examples/GetPrivateDnsZoneSuffix.json" + } + }, + "description": "Get private DNS zone suffix in the cloud", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/PrivateDnsZoneSuffix" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + } + } + } + }, + "definitions": { + "PrivateDnsZoneSuffix": { + "type": "string", + "description": "Represents a resource name availability." + } + } +} diff --git a/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2024-11-01-preview/PrivateEndpointConnections.json b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2024-11-01-preview/PrivateEndpointConnections.json new file mode 100644 index 000000000000..450c3c00c69d --- /dev/null +++ b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2024-11-01-preview/PrivateEndpointConnections.json @@ -0,0 +1,270 @@ +{ + "swagger": "2.0", + "info": { + "title": "PostgreSQLServerManagementClient", + "description": "The Microsoft Azure management API provides create, read, update, and delete functionality for Azure PostgreSQL resources including servers, databases, firewall rules, VNET rules, security alert policies, log files and configurations with new business model.", + "version": "2024-11-01-preview" + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "security": [ + { + "azure_auth": [ + "user_impersonation" + ] + } + ], + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "flow": "implicit", + "description": "Azure Active Directory OAuth2 Flow", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + }, + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/privateEndpointConnections/{privateEndpointConnectionName}": { + "get": { + "tags": [ + "PrivateEndpointConnections" + ], + "description": "Gets a private endpoint connection.", + "operationId": "PrivateEndpointConnections_Get", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "../../../types/common-types.json#/parameters/ServerNameParameter" + }, + { + "$ref": "../../../types/common-types.json#/parameters/PrivateEndpointConnectionNameParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved a specified private endpoint connection.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v5/privatelinks.json#/definitions/PrivateEndpointConnection" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Gets private endpoint connection.": { + "$ref": "./examples/PrivateEndpointConnectionGet.json" + } + } + }, + "put": { + "tags": [ + "PrivateEndpointConnections" + ], + "description": "Approve or reject a private endpoint connection with a given name.", + "operationId": "PrivateEndpointConnection_Update", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "../../../types/common-types.json#/parameters/ServerNameParameter" + }, + { + "$ref": "../../../types/common-types.json#/parameters/PrivateEndpointConnectionNameParameter" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "../../../../../common-types/resource-management/v5/privatelinks.json#/definitions/PrivateEndpointConnection" + }, + "description": "The required parameters for updating private endpoint connection." + } + ], + "responses": { + "200": { + "description": "Successfully approved or rejected private endpoint connection.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v5/privatelinks.json#/definitions/PrivateEndpointConnection" + } + }, + "201": { + "description": "Successfully approved or rejected private endpoint connection.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v5/privatelinks.json#/definitions/PrivateEndpointConnection" + } + }, + "202": { + "description": "Accepted", + "headers": { + "Location": { + "type": "string" + } + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Approve or reject a private endpoint connection with a given name.": { + "$ref": "./examples/PrivateEndpointConnectionUpdate.json" + } + } + }, + "delete": { + "tags": [ + "PrivateEndpointConnections" + ], + "description": "Deletes a private endpoint connection with a given name.", + "operationId": "PrivateEndpointConnection_Delete", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "../../../types/common-types.json#/parameters/ServerNameParameter" + }, + { + "$ref": "../../../types/common-types.json#/parameters/PrivateEndpointConnectionNameParameter" + } + ], + "responses": { + "202": { + "description": "Accepted and the operation will complete asynchronously.", + "headers": { + "Location": { + "type": "string" + } + } + }, + "204": { + "description": "Private endpoint connection does not exist." + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "azure-async-operation" + }, + "x-ms-examples": { + "Deletes a private endpoint connection with a given name.": { + "$ref": "./examples/PrivateEndpointConnectionDelete.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/privateEndpointConnections": { + "get": { + "tags": [ + "PrivateEndpointConnections" + ], + "description": "Gets all private endpoint connections on a server.", + "operationId": "PrivateEndpointConnections_ListByServer", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "../../../types/common-types.json#/parameters/ServerNameParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved private endpoint connections.", + "schema": { + "$ref": "#/definitions/PrivateEndpointConnectionListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Gets list of private endpoint connections on a server.": { + "$ref": "./examples/PrivateEndpointConnectionList.json" + } + } + } + } + }, + "definitions": { + "PrivateEndpointConnectionListResult": { + "description": "A list of private endpoint connections.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "../../../../../common-types/resource-management/v5/privatelinks.json#/definitions/PrivateEndpointConnection" + }, + "readOnly": true + }, + "nextLink": { + "description": "The URL to get the next set of results.", + "type": "string", + "format": "uri", + "readOnly": true + } + } + } + }, + "parameters": {} +} diff --git a/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2024-11-01-preview/PrivateLinkResources.json b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2024-11-01-preview/PrivateLinkResources.json new file mode 100644 index 000000000000..bc9bf02d0702 --- /dev/null +++ b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2024-11-01-preview/PrivateLinkResources.json @@ -0,0 +1,155 @@ +{ + "swagger": "2.0", + "info": { + "title": "PostgreSQLServerManagementClient", + "description": "The Microsoft Azure management API provides create, read, update, and delete functionality for Azure PostgreSQL resources including servers, databases, firewall rules, VNET rules, security alert policies, log files and configurations with new business model.", + "version": "2024-11-01-preview" + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "security": [ + { + "azure_auth": [ + "user_impersonation" + ] + } + ], + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "flow": "implicit", + "description": "Azure Active Directory OAuth2 Flow", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + }, + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/privateLinkResources": { + "get": { + "tags": [ + "PrivateLinkResources" + ], + "description": "Gets the private link resources for PostgreSQL server.", + "operationId": "PrivateLinkResources_ListByServer", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "../../../types/common-types.json#/parameters/ServerNameParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved private link resources.", + "schema": { + "$ref": "#/definitions/PrivateLinkResourceListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Gets private link resources for PostgreSQL.": { + "$ref": "./examples/PrivateLinkResourcesList.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/privateLinkResources/{groupName}": { + "get": { + "tags": [ + "PrivateLinkResources" + ], + "description": "Gets a private link resource for PostgreSQL server.", + "operationId": "PrivateLinkResources_Get", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "../../../types/common-types.json#/parameters/ServerNameParameter" + }, + { + "name": "groupName", + "in": "path", + "description": "The name of the private link resource.", + "required": true, + "type": "string", + "pattern": "^.*$" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved private link resources.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v5/privatelinks.json#/definitions/PrivateLinkResource" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Gets a private link resource for PostgreSQL.": { + "$ref": "./examples/PrivateLinkResourcesGet.json" + } + } + } + } + }, + "definitions": { + "PrivateLinkResourceListResult": { + "description": "A list of private link resources", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "../../../../../common-types/resource-management/v5/privatelinks.json#/definitions/PrivateLinkResource" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + } + }, + "parameters": {} +} diff --git a/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2024-11-01-preview/QuotaUsages.json b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2024-11-01-preview/QuotaUsages.json new file mode 100644 index 000000000000..7b8772eb28a5 --- /dev/null +++ b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2024-11-01-preview/QuotaUsages.json @@ -0,0 +1,148 @@ +{ + "swagger": "2.0", + "info": { + "title": "PostgreSQLServerManagementClient", + "description": "The Microsoft Azure management API provides create, read, update, and delete functionality for Azure PostgreSQL resources including servers, databases, firewall rules, VNET rules, security alert policies, log files and configurations with new business model.", + "version": "2024-11-01-preview" + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "security": [ + { + "azure_auth": [ + "user_impersonation" + ] + } + ], + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "flow": "implicit", + "description": "Azure Active Directory OAuth2 Flow", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + }, + "paths": { + "/subscriptions/{subscriptionId}/providers/Microsoft.DBforPostgreSQL/locations/{locationName}/resourceType/flexibleServers/usages": { + "get": { + "tags": [ + "QuotaUsagesForFlexibleServers" + ], + "operationId": "QuotaUsages_List", + "x-ms-examples": { + "List of quota usages for flexible servers": { + "$ref": "./examples/QuotaUsagesForFlexibleServers.json" + } + }, + "description": "Get quota usages at specified location in a given subscription.", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../types/common-types.json#/parameters/LocationNameParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/QuotaUsagesListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + } + }, + "definitions": { + "QuotaUsage": { + "type": "object", + "properties": { + "name": { + "$ref": "#/definitions/NameProperty", + "description": "Name of quota usage for flexible servers" + }, + "limit": { + "type": "integer", + "format": "int64", + "description": "Quota limit" + }, + "unit": { + "type": "string", + "description": "Quota unit", + "default": "Count" + }, + "currentValue": { + "type": "integer", + "format": "int64", + "description": "Current Quota usage value" + }, + "id": { + "type": "string", + "description": "Fully qualified ARM resource Id" + } + }, + "description": "Quota usage for flexible servers" + }, + "NameProperty": { + "type": "object", + "properties": { + "value": { + "type": "string", + "description": "Name value" + }, + "localizedValue": { + "type": "string", + "description": "Localized name" + } + }, + "description": "Name property for quota usage" + }, + "QuotaUsagesListResult": { + "type": "object", + "properties": { + "value": { + "description": "A list of quota usages.", + "type": "array", + "items": { + "$ref": "#/definitions/QuotaUsage" + }, + "x-ms-identifiers": [ + "name" + ], + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + }, + "description": "Capability for the PostgreSQL server" + } + }, + "parameters": {} +} diff --git a/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2024-11-01-preview/Replicas.json b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2024-11-01-preview/Replicas.json new file mode 100644 index 000000000000..5322a043856c --- /dev/null +++ b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2024-11-01-preview/Replicas.json @@ -0,0 +1,83 @@ +{ + "swagger": "2.0", + "info": { + "title": "PostgreSQLServerManagementClient", + "description": "The Microsoft Azure management API provides create, read, update, and delete functionality for Azure PostgreSQL resources including servers, databases, firewall rules, VNET rules, security alert policies, log files and configurations with new business model.", + "version": "2024-11-01-preview" + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "security": [ + { + "azure_auth": [ + "user_impersonation" + ] + } + ], + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "flow": "implicit", + "description": "Azure Active Directory OAuth2 Flow", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + }, + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/replicas": { + "get": { + "tags": [ + "Replicas" + ], + "operationId": "Replicas_ListByServer", + "x-ms-examples": { + "ReplicasListByServer": { + "$ref": "./examples/ReplicasListByServer.json" + } + }, + "description": "List all the replicas for a given server.", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "../../../types/common-types.json#/parameters/ServerNameParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "./FlexibleServers.json#/definitions/ServerListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": null + } + } + } + } +} diff --git a/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2024-11-01-preview/ServerLogs.json b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2024-11-01-preview/ServerLogs.json new file mode 100644 index 000000000000..84144901a8e2 --- /dev/null +++ b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2024-11-01-preview/ServerLogs.json @@ -0,0 +1,148 @@ +{ + "swagger": "2.0", + "info": { + "title": "PostgreSQLServerManagementClient", + "description": "The Microsoft Azure management API provides create, read, update, and delete functionality for Azure PostgreSQL resources including servers, databases, firewall rules, VNET rules, security alert policies, log files and configurations with new business model.", + "version": "2024-11-01-preview" + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "security": [ + { + "azure_auth": [ + "user_impersonation" + ] + } + ], + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "flow": "implicit", + "description": "Azure Active Directory OAuth2 Flow", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + }, + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/logFiles": { + "get": { + "tags": [ + "LogFiles" + ], + "operationId": "LogFiles_ListByServer", + "x-ms-examples": { + "List all server log files for a server": { + "$ref": "./examples/LogFilesListByServer.json" + } + }, + "description": "List all the server log files in a given server.", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "../../../types/common-types.json#/parameters/ServerNameParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/LogFileListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + } + }, + "definitions": { + "LogFileProperties": { + "type": "object", + "properties": { + "createdTime": { + "type": "string", + "format": "date-time", + "description": "Creation timestamp of the log file." + }, + "lastModifiedTime": { + "type": "string", + "format": "date-time", + "description": "Last modified timestamp of the log file." + }, + "sizeInKb": { + "type": "integer", + "format": "int64", + "description": "The size in kb of the logFile." + }, + "type": { + "type": "string", + "description": "Type of the log file." + }, + "url": { + "type": "string", + "description": "The url to download the log file from." + } + }, + "description": "The properties of a logFile." + }, + "LogFile": { + "type": "object", + "properties": { + "properties": { + "$ref": "#/definitions/LogFileProperties", + "x-ms-client-flatten": true, + "description": "The properties of a logFile." + } + }, + "allOf": [ + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ProxyResource" + } + ], + "description": "Represents a logFile." + }, + "LogFileListResult": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/LogFile" + }, + "description": "The list of logFiles in a server" + }, + "nextLink": { + "description": "The link used to get the next page of operations.", + "type": "string" + } + }, + "description": "A List of logFiles." + } + }, + "parameters": {} +} diff --git a/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2024-11-01-preview/ServerStartStopRestart.json b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2024-11-01-preview/ServerStartStopRestart.json new file mode 100644 index 000000000000..13949c914e62 --- /dev/null +++ b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2024-11-01-preview/ServerStartStopRestart.json @@ -0,0 +1,229 @@ +{ + "swagger": "2.0", + "info": { + "title": "PostgreSQLServerManagementClient", + "description": "The Microsoft Azure management API provides create, read, update, and delete functionality for Azure PostgreSQL resources including servers, databases, firewall rules, VNET rules, security alert policies, log files and configurations with new business model.", + "version": "2024-11-01-preview" + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "security": [ + { + "azure_auth": [ + "user_impersonation" + ] + } + ], + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "flow": "implicit", + "description": "Azure Active Directory OAuth2 Flow", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + }, + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/restart": { + "post": { + "tags": [ + "ServerRestart" + ], + "operationId": "Servers_Restart", + "x-ms-examples": { + "ServerRestart": { + "$ref": "./examples/ServerRestart.json" + }, + "ServerRestartWithFailover": { + "$ref": "./examples/ServerRestartWithFailover.json" + } + }, + "description": "Restarts a server.", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "../../../types/common-types.json#/parameters/ServerNameParameter" + }, + { + "name": "parameters", + "in": "body", + "schema": { + "$ref": "#/definitions/RestartParameter" + }, + "description": "The parameters for restarting a server." + } + ], + "responses": { + "200": { + "description": "OK" + }, + "202": { + "description": "Accepted", + "headers": { + "Location": { + "type": "string" + } + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/start": { + "post": { + "tags": [ + "ServerStart" + ], + "operationId": "Servers_Start", + "x-ms-examples": { + "ServerStart": { + "$ref": "./examples/ServerStart.json" + } + }, + "description": "Starts a server.", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "../../../types/common-types.json#/parameters/ServerNameParameter" + } + ], + "responses": { + "200": { + "description": "OK" + }, + "202": { + "description": "Accepted", + "headers": { + "Location": { + "type": "string" + } + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/stop": { + "post": { + "tags": [ + "ServerStop" + ], + "operationId": "Servers_Stop", + "x-ms-examples": { + "ServerStop": { + "$ref": "./examples/ServerStop.json" + } + }, + "description": "Stops a server.", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "../../../types/common-types.json#/parameters/ServerNameParameter" + } + ], + "responses": { + "200": { + "description": "OK" + }, + "202": { + "description": "Accepted", + "headers": { + "Location": { + "type": "string" + } + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + } + } + } + }, + "definitions": { + "RestartParameter": { + "type": "object", + "properties": { + "restartWithFailover": { + "type": "boolean", + "description": "Indicates whether to restart the server with failover." + }, + "failoverMode": { + "type": "string", + "description": "Failover mode.", + "enum": [ + "PlannedFailover", + "ForcedFailover", + "PlannedSwitchover", + "ForcedSwitchover" + ], + "x-ms-enum": { + "name": "FailoverMode", + "modelAsString": true + } + } + }, + "description": "Represents server restart parameters." + } + }, + "parameters": {} +} diff --git a/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2024-11-01-preview/ThreatProtection.json b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2024-11-01-preview/ThreatProtection.json new file mode 100644 index 000000000000..b63e9b75cc75 --- /dev/null +++ b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2024-11-01-preview/ThreatProtection.json @@ -0,0 +1,280 @@ +{ + "swagger": "2.0", + "info": { + "title": "PostgreSQLServerManagementClient", + "description": "The Microsoft Azure management API provides create, read, update, and delete functionality for Azure PostgreSQL resources including servers, databases, firewall rules, administrators, log files, configurations, migrations, advanced threat protection settings with new business model.", + "version": "2024-11-01-preview" + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "security": [ + { + "azure_auth": [ + "user_impersonation" + ] + } + ], + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "flow": "implicit", + "description": "Azure Active Directory OAuth2 Flow", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + }, + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/advancedThreatProtectionSettings": { + "get": { + "tags": [ + "AdvancedThreatProtectionSettings" + ], + "description": "Get a list of server's Threat Protection state.", + "operationId": "ServerThreatProtectionSettings_ListByServer", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "../../../types/common-types.json#/parameters/ServerNameParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the server threat detection policy.", + "schema": { + "$ref": "#/definitions/ServerThreatProtectionListResult" + } + }, + "default": { + "description": "Error response describing why the operation of advanced threat protection on the flexible server failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Get a server's Advanced Threat Protection settings": { + "$ref": "./examples/ServerThreatProtectionSettingsListByServer.json" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/advancedThreatProtectionSettings/{threatProtectionName}": { + "get": { + "tags": [ + "AdvancedThreatProtectionSettings" + ], + "description": "Get a server's Advanced Threat Protection settings.", + "operationId": "ServerThreatProtectionSettings_Get", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "../../../types/common-types.json#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/ThreatProtectionNameParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the server advanced threat protection settings.", + "schema": { + "$ref": "#/definitions/ServerThreatProtectionSettingsModel" + } + }, + "default": { + "description": "Error response describing why the operation of threat protection on the flexible server failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Get a server's Threat Protection settings": { + "$ref": "./examples/ServerThreatProtectionSettingsGet.json" + } + } + }, + "put": { + "tags": [ + "AdvancedThreatProtectionSettings" + ], + "description": "Creates or updates a server's Advanced Threat Protection settings.", + "operationId": "ServerThreatProtectionSettings_CreateOrUpdate", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "../../../types/common-types.json#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/ThreatProtectionNameParameter" + }, + { + "name": "parameters", + "in": "body", + "description": "The Advanced Threat Protection state for the flexible server.", + "required": true, + "schema": { + "$ref": "#/definitions/ServerThreatProtectionSettingsModel" + } + } + ], + "responses": { + "200": { + "description": "Successfully set or update the server Threat Protection settings.", + "schema": { + "$ref": "#/definitions/ServerThreatProtectionSettingsModel" + } + }, + "default": { + "description": "Error response describing why the operation of setting Threat Protection failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + }, + "201": { + "description": "Successfully created the server Threat Protection settings.", + "schema": { + "$ref": "#/definitions/ServerThreatProtectionSettingsModel" + } + }, + "202": { + "description": "Accepted", + "headers": { + "Location": { + "type": "string" + } + } + } + }, + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "azure-async-operation" + }, + "x-ms-examples": { + "Update a server's Threat Protection settings": { + "$ref": "./examples/ServerThreatProtectionSettingsCreateOrUpdate.json" + } + } + } + } + }, + "definitions": { + "ServerThreatProtectionProperties": { + "description": "Properties of server Threat Protection state.", + "required": [ + "state" + ], + "type": "object", + "properties": { + "state": { + "description": "Specifies the state of the Threat Protection, whether it is enabled or disabled or a state has not been applied yet on the specific server.", + "enum": [ + "Enabled", + "Disabled" + ], + "type": "string", + "x-ms-enum": { + "name": "ThreatProtectionState", + "modelAsString": false + } + }, + "creationTime": { + "format": "date-time", + "description": "Specifies the UTC creation time of the policy.", + "type": "string", + "readOnly": true + } + } + }, + "ServerThreatProtectionSettingsModel": { + "description": "Server's Advanced Threat Protection settings.", + "type": "object", + "allOf": [ + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/ServerThreatProtectionProperties", + "description": "Advanced Threat Protection properties.", + "x-ms-client-flatten": true + } + } + }, + "ServerThreatProtectionListResult": { + "description": "A list of the server's Advanced Threat Protection settings.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/ServerThreatProtectionSettingsModel" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + } + }, + "parameters": { + "ThreatProtectionNameParameter": { + "name": "threatProtectionName", + "in": "path", + "description": "The name of the Threat Protection state.", + "required": true, + "type": "string", + "enum": [ + "Default" + ], + "x-ms-enum": { + "name": "ThreatProtectionName", + "modelAsString": true + }, + "pattern": "^[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*", + "x-ms-parameter-location": "method" + } + } +} diff --git a/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2024-11-01-preview/TuningOptions.json b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2024-11-01-preview/TuningOptions.json new file mode 100644 index 000000000000..e82355dcdbca --- /dev/null +++ b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2024-11-01-preview/TuningOptions.json @@ -0,0 +1,433 @@ +{ + "swagger": "2.0", + "info": { + "title": "PostgreSQLServerManagementClient", + "description": "The Microsoft Azure management API provides create, read, update, and delete functionality for Azure PostgreSQL resources including servers, databases, firewall rules, VNET rules, security alert policies, log files and configurations with new business model.", + "version": "2024-11-01-preview" + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "security": [ + { + "azure_auth": [ + "user_impersonation" + ] + } + ], + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "flow": "implicit", + "description": "Azure Active Directory OAuth2 Flow", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + }, + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/tuningOptions/{tuningOption}": { + "get": { + "tags": [ + "TuningOptions" + ], + "operationId": "TuningOptions_Get", + "x-ms-examples": { + "TuningOptions_Get": { + "$ref": "./examples/Tuning_GetTuningOption.json" + } + }, + "description": "Retrieve the tuning option on a server.", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "../../../types/common-types.json#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/TuningOptionParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/TuningOptionsResource" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/tuningOptions/{tuningOption}/recommendations": { + "get": { + "tags": [ + "TuningOptions" + ], + "operationId": "TuningOptions_ListRecommendations", + "x-ms-examples": { + "TuningOptions_ListRecommendations": { + "$ref": "./examples/Tuning_GetRecommendedIndexes.json" + }, + "TuningOptions_ListFilteredRecommendations": { + "$ref": "./examples/Tuning_GetFilteredRecommendedIndexes.json" + } + }, + "description": "Retrieve the list of available tuning index recommendations.", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "../../../types/common-types.json#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/TuningOptionParameter" + }, + { + "$ref": "#/parameters/RecommendationTypeParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/IndexRecommendationListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/tuningOptions": { + "get": { + "tags": [ + "TuningOptions" + ], + "operationId": "TuningOptions_ListByServer", + "x-ms-examples": { + "TuningOptions_ListByServer": { + "$ref": "./examples/Tuning_ListTuningOptions.json" + } + }, + "description": "Retrieve the list of available tuning options.", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "../../../types/common-types.json#/parameters/ServerNameParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/TuningOptionsListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + } + }, + "definitions": { + "ImpactRecord": { + "type": "object", + "properties": { + "dimensionName": { + "type": "string", + "description": "Dimension name" + }, + "unit": { + "type": "string", + "description": "Dimension unit" + }, + "queryId": { + "type": "integer", + "format": "int64", + "description": "Optional property that can be used to store the QueryId if the metric is for a specific query." + }, + "absoluteValue": { + "type": "number", + "format": "double", + "description": "Absolute value" + } + }, + "description": "Stores property that features impact on some metric if this recommended action is applied." + }, + "IndexRecommendationDetails": { + "type": "object", + "properties": { + "databaseName": { + "type": "string", + "description": "Database name." + }, + "schema": { + "type": "string", + "description": "Schema name." + }, + "table": { + "type": "string", + "description": "Table name." + }, + "indexType": { + "type": "string", + "description": "Index type." + }, + "indexName": { + "type": "string", + "description": "Index name." + }, + "indexColumns": { + "type": "string", + "description": "Index columns. These will be semi-column separated." + } + }, + "description": "Recommendation details for the recommended action." + }, + "IndexRecommendationResourceProperties": { + "type": "object", + "properties": { + "initialRecommendedTime": { + "type": "string", + "format": "date-time", + "description": "Creation time of this recommendation in UTC date-time string format." + }, + "lastRecommendedTime": { + "type": "string", + "format": "date-time", + "description": "The last refresh of this recommendation in UTC date-time string format." + }, + "timesRecommended": { + "format": "int32", + "type": "integer", + "description": "The number of times this recommendation has encountered." + }, + "improvedQueryIds": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "The ImprovedQueryIds. The list will only be populated for CREATE INDEX recommendations." + }, + "recommendationReason": { + "type": "string", + "description": "Reason for this recommendation." + }, + "recommendationType": { + "type": "string", + "enum": [ + "CreateIndex", + "DropIndex" + ], + "x-ms-enum": { + "name": "RecommendationTypeEnum", + "modelAsString": true + }, + "description": "Type for this recommendation." + }, + "implementationDetails": { + "type": "object", + "properties": { + "method": { + "type": "string", + "description": "Method of implementation for recommended action" + }, + "script": { + "type": "string", + "description": "Implementation script for the recommended action" + } + }, + "description": "Stores implementation details for the recommended action." + }, + "analyzedWorkload": { + "type": "object", + "properties": { + "startTime": { + "type": "string", + "format": "date-time", + "description": "Workload start time in UTC date-time string format." + }, + "endTime": { + "type": "string", + "format": "date-time", + "description": "Workload end time in UTC date-time string format." + }, + "queryCount": { + "format": "int32", + "type": "integer", + "description": "Workload query examined count. For DROP INDEX will be 0." + } + }, + "description": "Stores workload information for the recommended action." + }, + "estimatedImpact": { + "type": "array", + "items": { + "$ref": "#/definitions/ImpactRecord" + }, + "x-ms-identifiers": [ + "dimensionName" + ], + "readOnly": true, + "description": "The estimated impact of this recommended action" + }, + "details": { + "$ref": "#/definitions/IndexRecommendationDetails", + "description": "Stores recommendation details for the recommended action." + } + }, + "description": "Index recommendation properties." + }, + "IndexRecommendationResource": { + "type": "object", + "properties": { + "properties": { + "$ref": "#/definitions/IndexRecommendationResourceProperties", + "x-ms-client-flatten": true, + "description": "Properties of IndexRecommendationResource." + } + }, + "allOf": [ + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ProxyResource" + } + ], + "description": "Index recommendation properties." + }, + "IndexRecommendationListResult": { + "description": "A list of available index recommendations.", + "type": "object", + "properties": { + "value": { + "description": "A list of available index recommendations.", + "uniqueItems": false, + "type": "array", + "items": { + "$ref": "#/definitions/IndexRecommendationResource" + }, + "x-ms-identifiers": [ + "name" + ] + }, + "nextLink": { + "description": "URL client should use to fetch the next page (per server side paging).\r\nIt's null for now, added for future use.", + "type": "string" + } + } + }, + "TuningOptionsResource": { + "type": "object", + "allOf": [ + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ProxyResource" + } + ], + "description": "Stores property that features impact on some metric if this recommended action is applied." + }, + "TuningOptionsListResult": { + "description": "A list of server tuning options.", + "type": "object", + "properties": { + "value": { + "description": "A list of available tuning options.", + "uniqueItems": false, + "type": "array", + "items": { + "$ref": "#/definitions/TuningOptionsResource" + }, + "x-ms-identifiers": [ + "name" + ] + }, + "nextLink": { + "description": "URL client should use to fetch the next page (per server side paging).\r\nIt's null for now, added for future use.", + "type": "string" + } + } + } + }, + "parameters": { + "TuningOptionParameter": { + "name": "tuningOption", + "in": "path", + "required": true, + "type": "string", + "enum": [ + "index" + ], + "description": "The name of the tuning option.", + "x-ms-enum": { + "name": "TuningOptionEnum", + "modelAsString": true + }, + "x-ms-parameter-location": "method" + }, + "RecommendationTypeParameter": { + "name": "$recommendationType", + "in": "query", + "required": false, + "type": "string", + "enum": [ + "CreateIndex", + "DropIndex" + ], + "description": "Recommendations list filter. Retrieves recommendations based on type.", + "x-ms-enum": { + "name": "RecommendationType", + "modelAsString": true + }, + "x-ms-parameter-location": "method" + } + } +} diff --git a/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2024-11-01-preview/VirtualEndpoints.json b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2024-11-01-preview/VirtualEndpoints.json new file mode 100644 index 000000000000..685a1059fe43 --- /dev/null +++ b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2024-11-01-preview/VirtualEndpoints.json @@ -0,0 +1,403 @@ +{ + "swagger": "2.0", + "info": { + "title": "PostgreSQLServerManagementClient", + "description": "The Microsoft Azure management API provides create, read, update, and delete functionality for Azure PostgreSQL resources including servers, databases, firewall rules, VNET rules, security alert policies, log files and configurations with new business model.", + "version": "2024-11-01-preview" + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "security": [ + { + "azure_auth": [ + "user_impersonation" + ] + } + ], + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "flow": "implicit", + "description": "Azure Active Directory OAuth2 Flow", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + }, + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/virtualendpoints/{virtualEndpointName}": { + "put": { + "tags": [ + "VirtualEndpoints" + ], + "operationId": "VirtualEndpoints_Create", + "x-ms-examples": { + "Create a new virtual endpoint for a flexible server": { + "$ref": "./examples/VirtualEndpointCreate.json" + } + }, + "description": "Creates a new virtual endpoint for PostgreSQL flexible server.", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "../../../types/common-types.json#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/VirtualEndpointNameParameter" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/VirtualEndpointResource" + }, + "description": "The required parameters for creating or updating virtual endpoints." + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/VirtualEndpointResource" + } + }, + "201": { + "description": "Created", + "schema": { + "$ref": "#/definitions/VirtualEndpointResource" + } + }, + "202": { + "description": "Accepted", + "headers": { + "Location": { + "type": "string" + } + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "azure-async-operation" + } + }, + "patch": { + "tags": [ + "VirtualEndpoints" + ], + "operationId": "VirtualEndpoints_Update", + "x-ms-examples": { + "Update a virtual endpoint for a server to update the ": { + "$ref": "./examples/VirtualEndpointUpdate.json" + } + }, + "description": "Updates an existing virtual endpoint. The request body can contain one to many of the properties present in the normal virtual endpoint definition.", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "../../../types/common-types.json#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/VirtualEndpointNameParameter" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/VirtualEndpointResourceForPatch" + }, + "description": "The required parameters for updating a server." + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/VirtualEndpointResource" + } + }, + "202": { + "description": "Accepted", + "headers": { + "Location": { + "type": "string" + } + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "azure-async-operation" + } + }, + "delete": { + "tags": [ + "VirtualEndpoints" + ], + "operationId": "VirtualEndpoints_Delete", + "x-ms-examples": { + "Delete a virtual endpoint": { + "$ref": "./examples/VirtualEndpointDelete.json" + } + }, + "description": "Deletes a virtual endpoint.", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "../../../types/common-types.json#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/VirtualEndpointNameParameter" + } + ], + "responses": { + "202": { + "description": "Accepted", + "headers": { + "Location": { + "type": "string" + } + } + }, + "204": { + "description": "NoContent" + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + } + }, + "get": { + "tags": [ + "VirtualEndpoints" + ], + "operationId": "VirtualEndpoints_Get", + "x-ms-examples": { + "Get a virtual endpoint": { + "$ref": "./examples/VirtualEndpointsGet.json" + } + }, + "description": "Gets information about a virtual endpoint.", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "../../../types/common-types.json#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/VirtualEndpointNameParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/VirtualEndpointResource" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/virtualendpoints": { + "get": { + "tags": [ + "VirtualEndpoints" + ], + "operationId": "VirtualEndpoints_ListByServer", + "x-ms-examples": { + "VirtualEndpointListByServer": { + "$ref": "./examples/VirtualEndpointsListByServer.json" + } + }, + "description": "List all the servers in a given resource group.", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "../../../types/common-types.json#/parameters/ServerNameParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/VirtualEndpointsListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + } + }, + "definitions": { + "VirtualEndpointResourceProperties": { + "type": "object", + "properties": { + "endpointType": { + "type": "string", + "description": "The endpoint type for the virtual endpoint.", + "enum": [ + "ReadWrite" + ], + "x-ms-enum": { + "name": "VirtualEndpointType", + "modelAsString": true + } + }, + "members": { + "type": "array", + "items": { + "type": "string", + "description": "Member for the virtual endpoint." + }, + "description": "List of members for a virtual endpoint" + }, + "virtualEndpoints": { + "type": "array", + "items": { + "type": "string", + "description": "Virtual endpoint for a server." + }, + "description": "List of virtual endpoints for a server", + "readOnly": true + } + }, + "description": "The properties of a virtual endpoint." + }, + "VirtualEndpointResource": { + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/VirtualEndpointResourceForPatch" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/Resource" + } + ], + "description": "Represents a virtual endpoint for a server." + }, + "VirtualEndpointResourceForPatch": { + "type": "object", + "properties": { + "properties": { + "$ref": "#/definitions/VirtualEndpointResourceProperties", + "x-ms-client-flatten": true, + "description": "Properties of the virtual endpoint resource." + } + }, + "description": "Represents a virtual endpoint for a server." + }, + "VirtualEndpointsListResult": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/VirtualEndpointResource" + }, + "description": "The list of virtual endpoints" + }, + "nextLink": { + "description": "The link used to get the next page of operations.", + "type": "string" + } + }, + "description": "A list of virtual endpoints." + } + }, + "parameters": { + "VirtualEndpointNameParameter": { + "name": "virtualEndpointName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the virtual endpoint.", + "pattern": "^[A-Za-z0-9][A-Za-z0-9-]{0,62}(?