@azure/arm-postgresql-flexible 8.0.0-beta.3 → 8.0.0-beta.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (252) hide show
  1. package/CHANGELOG.md +501 -0
  2. package/dist/index.js +6142 -3689
  3. package/dist/index.js.map +1 -1
  4. package/dist/index.min.js +1 -1
  5. package/dist/index.min.js.map +1 -1
  6. package/dist-esm/samples-dev/administratorsCreateSample.js +1 -1
  7. package/dist-esm/samples-dev/administratorsDeleteSample.js +1 -1
  8. package/dist-esm/samples-dev/administratorsGetSample.js +1 -1
  9. package/dist-esm/samples-dev/administratorsListByServerSample.js +4 -9
  10. package/dist-esm/samples-dev/administratorsListByServerSample.js.map +1 -1
  11. package/dist-esm/samples-dev/backupsGetSample.js +1 -1
  12. package/dist-esm/samples-dev/backupsListByServerSample.js +4 -9
  13. package/dist-esm/samples-dev/backupsListByServerSample.js.map +1 -1
  14. package/dist-esm/samples-dev/checkMigrationNameAvailabilitySample.js +1 -1
  15. package/dist-esm/samples-dev/checkNameAvailabilityExecuteSample.js +1 -1
  16. package/dist-esm/samples-dev/checkNameAvailabilityWithLocationExecuteSample.js +1 -1
  17. package/dist-esm/samples-dev/configurationsGetSample.js +1 -1
  18. package/dist-esm/samples-dev/configurationsListByServerSample.js +4 -9
  19. package/dist-esm/samples-dev/configurationsListByServerSample.js.map +1 -1
  20. package/dist-esm/samples-dev/configurationsPutSample.js +1 -1
  21. package/dist-esm/samples-dev/configurationsUpdateSample.js +1 -1
  22. package/dist-esm/samples-dev/databasesCreateSample.js +1 -1
  23. package/dist-esm/samples-dev/databasesDeleteSample.js +1 -1
  24. package/dist-esm/samples-dev/databasesGetSample.js +1 -1
  25. package/dist-esm/samples-dev/databasesListByServerSample.js +4 -9
  26. package/dist-esm/samples-dev/databasesListByServerSample.js.map +1 -1
  27. package/dist-esm/samples-dev/firewallRulesCreateOrUpdateSample.js +1 -1
  28. package/dist-esm/samples-dev/firewallRulesDeleteSample.js +1 -1
  29. package/dist-esm/samples-dev/firewallRulesGetSample.js +1 -1
  30. package/dist-esm/samples-dev/firewallRulesListByServerSample.js +4 -9
  31. package/dist-esm/samples-dev/firewallRulesListByServerSample.js.map +1 -1
  32. package/dist-esm/samples-dev/flexibleServerStartLtrBackupSample.js +1 -1
  33. package/dist-esm/samples-dev/flexibleServerTriggerLtrPreBackupSample.js +1 -1
  34. package/dist-esm/samples-dev/getPrivateDnsZoneSuffixExecuteSample.js +1 -1
  35. package/dist-esm/samples-dev/locationBasedCapabilitiesExecuteSample.js +4 -9
  36. package/dist-esm/samples-dev/locationBasedCapabilitiesExecuteSample.js.map +1 -1
  37. package/dist-esm/samples-dev/logFilesListByServerSample.js +4 -9
  38. package/dist-esm/samples-dev/logFilesListByServerSample.js.map +1 -1
  39. package/dist-esm/samples-dev/ltrBackupOperationsGetSample.js +1 -1
  40. package/dist-esm/samples-dev/ltrBackupOperationsListByServerSample.js +4 -9
  41. package/dist-esm/samples-dev/ltrBackupOperationsListByServerSample.js.map +1 -1
  42. package/dist-esm/samples-dev/migrationsCreateSample.js +70 -2
  43. package/dist-esm/samples-dev/migrationsCreateSample.js.map +1 -1
  44. package/dist-esm/samples-dev/migrationsDeleteSample.js +1 -1
  45. package/dist-esm/samples-dev/migrationsGetSample.js +77 -1
  46. package/dist-esm/samples-dev/migrationsGetSample.js.map +1 -1
  47. package/dist-esm/samples-dev/migrationsListByTargetServerSample.js +4 -9
  48. package/dist-esm/samples-dev/migrationsListByTargetServerSample.js.map +1 -1
  49. package/dist-esm/samples-dev/migrationsUpdateSample.js +2 -2
  50. package/dist-esm/samples-dev/operationsListSample.js +1 -1
  51. package/dist-esm/samples-dev/privateEndpointConnectionDeleteSample.d.ts +2 -0
  52. package/dist-esm/samples-dev/privateEndpointConnectionDeleteSample.d.ts.map +1 -0
  53. package/dist-esm/samples-dev/privateEndpointConnectionDeleteSample.js +40 -0
  54. package/dist-esm/samples-dev/privateEndpointConnectionDeleteSample.js.map +1 -0
  55. package/dist-esm/samples-dev/privateEndpointConnectionUpdateSample.d.ts +2 -0
  56. package/dist-esm/samples-dev/privateEndpointConnectionUpdateSample.d.ts.map +1 -0
  57. package/dist-esm/samples-dev/privateEndpointConnectionUpdateSample.js +46 -0
  58. package/dist-esm/samples-dev/privateEndpointConnectionUpdateSample.js.map +1 -0
  59. package/dist-esm/samples-dev/privateEndpointConnectionsGetSample.d.ts +2 -0
  60. package/dist-esm/samples-dev/privateEndpointConnectionsGetSample.d.ts.map +1 -0
  61. package/dist-esm/samples-dev/privateEndpointConnectionsGetSample.js +40 -0
  62. package/dist-esm/samples-dev/privateEndpointConnectionsGetSample.js.map +1 -0
  63. package/dist-esm/samples-dev/privateEndpointConnectionsListByServerSample.d.ts +2 -0
  64. package/dist-esm/samples-dev/privateEndpointConnectionsListByServerSample.d.ts.map +1 -0
  65. package/dist-esm/samples-dev/privateEndpointConnectionsListByServerSample.js +55 -0
  66. package/dist-esm/samples-dev/privateEndpointConnectionsListByServerSample.js.map +1 -0
  67. package/dist-esm/samples-dev/privateLinkResourcesGetSample.d.ts +2 -0
  68. package/dist-esm/samples-dev/privateLinkResourcesGetSample.d.ts.map +1 -0
  69. package/dist-esm/samples-dev/privateLinkResourcesGetSample.js +40 -0
  70. package/dist-esm/samples-dev/privateLinkResourcesGetSample.js.map +1 -0
  71. package/dist-esm/samples-dev/privateLinkResourcesListByServerSample.d.ts +2 -0
  72. package/dist-esm/samples-dev/privateLinkResourcesListByServerSample.d.ts.map +1 -0
  73. package/dist-esm/samples-dev/privateLinkResourcesListByServerSample.js +55 -0
  74. package/dist-esm/samples-dev/privateLinkResourcesListByServerSample.js.map +1 -0
  75. package/dist-esm/samples-dev/quotaUsagesListSample.d.ts +2 -0
  76. package/dist-esm/samples-dev/quotaUsagesListSample.d.ts.map +1 -0
  77. package/dist-esm/samples-dev/quotaUsagesListSample.js +54 -0
  78. package/dist-esm/samples-dev/quotaUsagesListSample.js.map +1 -0
  79. package/dist-esm/samples-dev/replicasListByServerSample.js +4 -9
  80. package/dist-esm/samples-dev/replicasListByServerSample.js.map +1 -1
  81. package/dist-esm/samples-dev/serverCapabilitiesListSample.js +4 -9
  82. package/dist-esm/samples-dev/serverCapabilitiesListSample.js.map +1 -1
  83. package/dist-esm/samples-dev/serverThreatProtectionSettingsCreateOrUpdateSample.d.ts +2 -0
  84. package/dist-esm/samples-dev/serverThreatProtectionSettingsCreateOrUpdateSample.d.ts.map +1 -0
  85. package/dist-esm/samples-dev/serverThreatProtectionSettingsCreateOrUpdateSample.js +41 -0
  86. package/dist-esm/samples-dev/serverThreatProtectionSettingsCreateOrUpdateSample.js.map +1 -0
  87. package/dist-esm/samples-dev/serverThreatProtectionSettingsGetSample.d.ts +2 -0
  88. package/dist-esm/samples-dev/serverThreatProtectionSettingsGetSample.d.ts.map +1 -0
  89. package/dist-esm/samples-dev/serverThreatProtectionSettingsGetSample.js +40 -0
  90. package/dist-esm/samples-dev/serverThreatProtectionSettingsGetSample.js.map +1 -0
  91. package/dist-esm/samples-dev/serverThreatProtectionSettingsListByServerSample.d.ts +2 -0
  92. package/dist-esm/samples-dev/serverThreatProtectionSettingsListByServerSample.d.ts.map +1 -0
  93. package/dist-esm/samples-dev/serverThreatProtectionSettingsListByServerSample.js +55 -0
  94. package/dist-esm/samples-dev/serverThreatProtectionSettingsListByServerSample.js.map +1 -0
  95. package/dist-esm/samples-dev/serversCreateSample.js +7 -7
  96. package/dist-esm/samples-dev/serversDeleteSample.js +1 -1
  97. package/dist-esm/samples-dev/serversGetSample.js +21 -2
  98. package/dist-esm/samples-dev/serversGetSample.js.map +1 -1
  99. package/dist-esm/samples-dev/serversListByResourceGroupSample.js +4 -9
  100. package/dist-esm/samples-dev/serversListByResourceGroupSample.js.map +1 -1
  101. package/dist-esm/samples-dev/serversListSample.js +4 -9
  102. package/dist-esm/samples-dev/serversListSample.js.map +1 -1
  103. package/dist-esm/samples-dev/serversRestartSample.js +2 -2
  104. package/dist-esm/samples-dev/serversStartSample.js +1 -1
  105. package/dist-esm/samples-dev/serversStopSample.js +1 -1
  106. package/dist-esm/samples-dev/serversUpdateSample.js +93 -5
  107. package/dist-esm/samples-dev/serversUpdateSample.js.map +1 -1
  108. package/dist-esm/samples-dev/virtualEndpointsCreateSample.d.ts +2 -0
  109. package/dist-esm/samples-dev/virtualEndpointsCreateSample.d.ts.map +1 -0
  110. package/dist-esm/samples-dev/virtualEndpointsCreateSample.js +44 -0
  111. package/dist-esm/samples-dev/virtualEndpointsCreateSample.js.map +1 -0
  112. package/dist-esm/samples-dev/virtualEndpointsDeleteSample.d.ts +2 -0
  113. package/dist-esm/samples-dev/virtualEndpointsDeleteSample.d.ts.map +1 -0
  114. package/dist-esm/samples-dev/virtualEndpointsDeleteSample.js +40 -0
  115. package/dist-esm/samples-dev/virtualEndpointsDeleteSample.js.map +1 -0
  116. package/dist-esm/samples-dev/virtualEndpointsGetSample.d.ts +2 -0
  117. package/dist-esm/samples-dev/virtualEndpointsGetSample.d.ts.map +1 -0
  118. package/dist-esm/samples-dev/virtualEndpointsGetSample.js +40 -0
  119. package/dist-esm/samples-dev/virtualEndpointsGetSample.js.map +1 -0
  120. package/dist-esm/samples-dev/virtualEndpointsListByServerSample.d.ts +2 -0
  121. package/dist-esm/samples-dev/virtualEndpointsListByServerSample.d.ts.map +1 -0
  122. package/dist-esm/samples-dev/virtualEndpointsListByServerSample.js +55 -0
  123. package/dist-esm/samples-dev/virtualEndpointsListByServerSample.js.map +1 -0
  124. package/dist-esm/samples-dev/virtualEndpointsUpdateSample.d.ts +2 -0
  125. package/dist-esm/samples-dev/virtualEndpointsUpdateSample.d.ts.map +1 -0
  126. package/dist-esm/samples-dev/virtualEndpointsUpdateSample.js +44 -0
  127. package/dist-esm/samples-dev/virtualEndpointsUpdateSample.js.map +1 -0
  128. package/dist-esm/samples-dev/virtualNetworkSubnetUsageExecuteSample.js +1 -1
  129. package/dist-esm/src/models/index.d.ts +825 -118
  130. package/dist-esm/src/models/index.d.ts.map +1 -1
  131. package/dist-esm/src/models/index.js +158 -12
  132. package/dist-esm/src/models/index.js.map +1 -1
  133. package/dist-esm/src/models/mappers.d.ts +33 -7
  134. package/dist-esm/src/models/mappers.d.ts.map +1 -1
  135. package/dist-esm/src/models/mappers.js +1108 -282
  136. package/dist-esm/src/models/mappers.js.map +1 -1
  137. package/dist-esm/src/models/parameters.d.ts +12 -4
  138. package/dist-esm/src/models/parameters.d.ts.map +1 -1
  139. package/dist-esm/src/models/parameters.js +82 -18
  140. package/dist-esm/src/models/parameters.js.map +1 -1
  141. package/dist-esm/src/operations/administrators.js +3 -8
  142. package/dist-esm/src/operations/administrators.js.map +1 -1
  143. package/dist-esm/src/operations/backups.js +3 -8
  144. package/dist-esm/src/operations/backups.js.map +1 -1
  145. package/dist-esm/src/operations/configurations.js +3 -8
  146. package/dist-esm/src/operations/configurations.js.map +1 -1
  147. package/dist-esm/src/operations/databases.js +3 -8
  148. package/dist-esm/src/operations/databases.js.map +1 -1
  149. package/dist-esm/src/operations/firewallRules.js +3 -8
  150. package/dist-esm/src/operations/firewallRules.js.map +1 -1
  151. package/dist-esm/src/operations/flexibleServer.js +2 -2
  152. package/dist-esm/src/operations/flexibleServer.js.map +1 -1
  153. package/dist-esm/src/operations/index.d.ts +8 -2
  154. package/dist-esm/src/operations/index.d.ts.map +1 -1
  155. package/dist-esm/src/operations/index.js +8 -2
  156. package/dist-esm/src/operations/index.js.map +1 -1
  157. package/dist-esm/src/operations/locationBasedCapabilities.js +3 -8
  158. package/dist-esm/src/operations/locationBasedCapabilities.js.map +1 -1
  159. package/dist-esm/src/operations/logFiles.js +3 -8
  160. package/dist-esm/src/operations/logFiles.js.map +1 -1
  161. package/dist-esm/src/operations/ltrBackupOperations.js +3 -8
  162. package/dist-esm/src/operations/ltrBackupOperations.js.map +1 -1
  163. package/dist-esm/src/operations/migrations.js +5 -10
  164. package/dist-esm/src/operations/migrations.js.map +1 -1
  165. package/dist-esm/src/operations/privateEndpointConnectionOperations.d.ts +48 -0
  166. package/dist-esm/src/operations/privateEndpointConnectionOperations.d.ts.map +1 -0
  167. package/dist-esm/src/operations/privateEndpointConnectionOperations.js +218 -0
  168. package/dist-esm/src/operations/privateEndpointConnectionOperations.js.map +1 -0
  169. package/dist-esm/src/operations/privateEndpointConnections.d.ts +46 -0
  170. package/dist-esm/src/operations/privateEndpointConnections.d.ts.map +1 -0
  171. package/dist-esm/src/operations/privateEndpointConnections.js +182 -0
  172. package/dist-esm/src/operations/privateEndpointConnections.js.map +1 -0
  173. package/dist-esm/src/operations/privateLinkResources.d.ts +46 -0
  174. package/dist-esm/src/operations/privateLinkResources.d.ts.map +1 -0
  175. package/dist-esm/src/operations/privateLinkResources.js +182 -0
  176. package/dist-esm/src/operations/privateLinkResources.js.map +1 -0
  177. package/dist-esm/src/operations/quotaUsages.d.ts +35 -0
  178. package/dist-esm/src/operations/quotaUsages.d.ts.map +1 -0
  179. package/dist-esm/src/operations/quotaUsages.js +145 -0
  180. package/dist-esm/src/operations/quotaUsages.js.map +1 -0
  181. package/dist-esm/src/operations/replicas.js +3 -8
  182. package/dist-esm/src/operations/replicas.js.map +1 -1
  183. package/dist-esm/src/operations/serverCapabilities.js +3 -8
  184. package/dist-esm/src/operations/serverCapabilities.js.map +1 -1
  185. package/dist-esm/src/operations/serverThreatProtectionSettings.d.ts +65 -0
  186. package/dist-esm/src/operations/serverThreatProtectionSettings.d.ts.map +1 -0
  187. package/dist-esm/src/operations/serverThreatProtectionSettings.js +283 -0
  188. package/dist-esm/src/operations/serverThreatProtectionSettings.js.map +1 -0
  189. package/dist-esm/src/operations/servers.js +6 -16
  190. package/dist-esm/src/operations/servers.js.map +1 -1
  191. package/dist-esm/src/operations/virtualEndpoints.d.ts +101 -0
  192. package/dist-esm/src/operations/virtualEndpoints.d.ts.map +1 -0
  193. package/dist-esm/src/operations/virtualEndpoints.js +473 -0
  194. package/dist-esm/src/operations/virtualEndpoints.js.map +1 -0
  195. package/dist-esm/src/operations/virtualNetworkSubnetUsage.js +1 -1
  196. package/dist-esm/src/operationsInterfaces/index.d.ts +8 -2
  197. package/dist-esm/src/operationsInterfaces/index.d.ts.map +1 -1
  198. package/dist-esm/src/operationsInterfaces/index.js +8 -2
  199. package/dist-esm/src/operationsInterfaces/index.js.map +1 -1
  200. package/dist-esm/src/operationsInterfaces/privateEndpointConnectionOperations.d.ts +40 -0
  201. package/dist-esm/src/operationsInterfaces/privateEndpointConnectionOperations.d.ts.map +1 -0
  202. package/dist-esm/src/operationsInterfaces/privateEndpointConnectionOperations.js +9 -0
  203. package/dist-esm/src/operationsInterfaces/privateEndpointConnectionOperations.js.map +1 -0
  204. package/dist-esm/src/operationsInterfaces/privateEndpointConnections.d.ts +21 -0
  205. package/dist-esm/src/operationsInterfaces/privateEndpointConnections.d.ts.map +1 -0
  206. package/dist-esm/src/operationsInterfaces/privateEndpointConnections.js +9 -0
  207. package/dist-esm/src/operationsInterfaces/privateEndpointConnections.js.map +1 -0
  208. package/dist-esm/src/operationsInterfaces/privateLinkResources.d.ts +21 -0
  209. package/dist-esm/src/operationsInterfaces/privateLinkResources.d.ts.map +1 -0
  210. package/dist-esm/src/operationsInterfaces/privateLinkResources.js +9 -0
  211. package/dist-esm/src/operationsInterfaces/privateLinkResources.js.map +1 -0
  212. package/dist-esm/src/operationsInterfaces/quotaUsages.d.ts +12 -0
  213. package/dist-esm/src/operationsInterfaces/quotaUsages.d.ts.map +1 -0
  214. package/dist-esm/src/operationsInterfaces/quotaUsages.js +9 -0
  215. package/dist-esm/src/operationsInterfaces/quotaUsages.js.map +1 -0
  216. package/dist-esm/src/operationsInterfaces/serverThreatProtectionSettings.d.ts +40 -0
  217. package/dist-esm/src/operationsInterfaces/serverThreatProtectionSettings.d.ts.map +1 -0
  218. package/dist-esm/src/operationsInterfaces/serverThreatProtectionSettings.js +9 -0
  219. package/dist-esm/src/operationsInterfaces/serverThreatProtectionSettings.js.map +1 -0
  220. package/dist-esm/src/operationsInterfaces/virtualEndpoints.d.ts +76 -0
  221. package/dist-esm/src/operationsInterfaces/virtualEndpoints.d.ts.map +1 -0
  222. package/dist-esm/src/operationsInterfaces/virtualEndpoints.js +9 -0
  223. package/dist-esm/src/operationsInterfaces/virtualEndpoints.js.map +1 -0
  224. package/dist-esm/src/postgreSQLManagementFlexibleServerClient.d.ts +10 -4
  225. package/dist-esm/src/postgreSQLManagementFlexibleServerClient.d.ts.map +1 -1
  226. package/dist-esm/src/postgreSQLManagementFlexibleServerClient.js +12 -6
  227. package/dist-esm/src/postgreSQLManagementFlexibleServerClient.js.map +1 -1
  228. package/package.json +9 -7
  229. package/review/arm-postgresql-flexible.api.md +554 -4
  230. package/src/models/index.ts +938 -134
  231. package/src/models/mappers.ts +1252 -373
  232. package/src/models/parameters.ts +96 -20
  233. package/src/operations/flexibleServer.ts +2 -2
  234. package/src/operations/index.ts +8 -2
  235. package/src/operations/migrations.ts +2 -2
  236. package/src/operations/privateEndpointConnectionOperations.ts +316 -0
  237. package/src/operations/privateEndpointConnections.ts +243 -0
  238. package/src/operations/privateLinkResources.ts +242 -0
  239. package/src/operations/quotaUsages.ts +170 -0
  240. package/src/operations/serverThreatProtectionSettings.ts +393 -0
  241. package/src/operations/virtualEndpoints.ts +667 -0
  242. package/src/operations/virtualNetworkSubnetUsage.ts +1 -1
  243. package/src/operationsInterfaces/index.ts +8 -2
  244. package/src/operationsInterfaces/privateEndpointConnectionOperations.ts +86 -0
  245. package/src/operationsInterfaces/privateEndpointConnections.ts +44 -0
  246. package/src/operationsInterfaces/privateLinkResources.ts +44 -0
  247. package/src/operationsInterfaces/quotaUsages.ts +24 -0
  248. package/src/operationsInterfaces/serverThreatProtectionSettings.ts +83 -0
  249. package/src/operationsInterfaces/virtualEndpoints.ts +155 -0
  250. package/src/postgreSQLManagementFlexibleServerClient.ts +42 -14
  251. package/types/arm-postgresql-flexible.d.ts +1027 -25
  252. package/types/tsdoc-metadata.json +1 -1
@@ -16,7 +16,49 @@ dotenv.config();
16
16
  * This sample demonstrates how to Updates an existing server. The request body can contain one to many of the properties present in the normal server definition.
17
17
  *
18
18
  * @summary Updates an existing server. The request body can contain one to many of the properties present in the normal server definition.
19
- * x-ms-original-file: specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-03-01-preview/examples/ServerUpdate.json
19
+ * x-ms-original-file: specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-06-01-preview/examples/PromoteReplicaAsForcedStandaloneServer.json
20
+ */
21
+ function promoteAReplicaServerAsAStandaloneServerAsForcedIEItWillPromoteAReplicaServerImmediatelyWithoutWaitingForPrimaryAndReplicaToBeInSync() {
22
+ return __awaiter(this, void 0, void 0, function* () {
23
+ const subscriptionId = process.env["POSTGRESQL_SUBSCRIPTION_ID"] ||
24
+ "ffffffff-ffff-ffff-ffff-ffffffffffff";
25
+ const resourceGroupName = process.env["POSTGRESQL_RESOURCE_GROUP"] || "testResourceGroup";
26
+ const serverName = "pgtestsvc4-replica";
27
+ const parameters = {
28
+ replica: { promoteMode: "standalone", promoteOption: "forced" }
29
+ };
30
+ const credential = new DefaultAzureCredential();
31
+ const client = new PostgreSQLManagementFlexibleServerClient(credential, subscriptionId);
32
+ const result = yield client.servers.beginUpdateAndWait(resourceGroupName, serverName, parameters);
33
+ console.log(result);
34
+ });
35
+ }
36
+ /**
37
+ * This sample demonstrates how to Updates an existing server. The request body can contain one to many of the properties present in the normal server definition.
38
+ *
39
+ * @summary Updates an existing server. The request body can contain one to many of the properties present in the normal server definition.
40
+ * x-ms-original-file: specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-06-01-preview/examples/PromoteReplicaAsPlannedStandaloneServer.json
41
+ */
42
+ function promoteAReplicaServerAsAStandaloneServerAsPlannedIEItWillWaitForReplicationToComplete() {
43
+ return __awaiter(this, void 0, void 0, function* () {
44
+ const subscriptionId = process.env["POSTGRESQL_SUBSCRIPTION_ID"] ||
45
+ "ffffffff-ffff-ffff-ffff-ffffffffffff";
46
+ const resourceGroupName = process.env["POSTGRESQL_RESOURCE_GROUP"] || "testResourceGroup";
47
+ const serverName = "pgtestsvc4-replica";
48
+ const parameters = {
49
+ replica: { promoteMode: "standalone", promoteOption: "planned" }
50
+ };
51
+ const credential = new DefaultAzureCredential();
52
+ const client = new PostgreSQLManagementFlexibleServerClient(credential, subscriptionId);
53
+ const result = yield client.servers.beginUpdateAndWait(resourceGroupName, serverName, parameters);
54
+ console.log(result);
55
+ });
56
+ }
57
+ /**
58
+ * This sample demonstrates how to Updates an existing server. The request body can contain one to many of the properties present in the normal server definition.
59
+ *
60
+ * @summary Updates an existing server. The request body can contain one to many of the properties present in the normal server definition.
61
+ * x-ms-original-file: specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-06-01-preview/examples/ServerUpdate.json
20
62
  */
21
63
  function serverUpdate() {
22
64
  return __awaiter(this, void 0, void 0, function* () {
@@ -41,7 +83,7 @@ function serverUpdate() {
41
83
  * This sample demonstrates how to Updates an existing server. The request body can contain one to many of the properties present in the normal server definition.
42
84
  *
43
85
  * @summary Updates an existing server. The request body can contain one to many of the properties present in the normal server definition.
44
- * x-ms-original-file: specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-03-01-preview/examples/ServerUpdateWithAadAuthEnabled.json
86
+ * x-ms-original-file: specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-06-01-preview/examples/ServerUpdateWithAadAuthEnabled.json
45
87
  */
46
88
  function serverUpdateWithAadAuthEnabled() {
47
89
  return __awaiter(this, void 0, void 0, function* () {
@@ -71,7 +113,7 @@ function serverUpdateWithAadAuthEnabled() {
71
113
  * This sample demonstrates how to Updates an existing server. The request body can contain one to many of the properties present in the normal server definition.
72
114
  *
73
115
  * @summary Updates an existing server. The request body can contain one to many of the properties present in the normal server definition.
74
- * x-ms-original-file: specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-03-01-preview/examples/ServerUpdateWithCustomerMaintenanceWindow.json
116
+ * x-ms-original-file: specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-06-01-preview/examples/ServerUpdateWithCustomerMaintenanceWindow.json
75
117
  */
76
118
  function serverUpdateWithCustomerMaintenanceWindow() {
77
119
  return __awaiter(this, void 0, void 0, function* () {
@@ -98,7 +140,7 @@ function serverUpdateWithCustomerMaintenanceWindow() {
98
140
  * This sample demonstrates how to Updates an existing server. The request body can contain one to many of the properties present in the normal server definition.
99
141
  *
100
142
  * @summary Updates an existing server. The request body can contain one to many of the properties present in the normal server definition.
101
- * x-ms-original-file: specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-03-01-preview/examples/ServerUpdateWithDataEncryptionEnabled.json
143
+ * x-ms-original-file: specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-06-01-preview/examples/ServerUpdateWithDataEncryptionEnabled.json
102
144
  */
103
145
  function serverUpdateWithDataEncryptionEnabled() {
104
146
  return __awaiter(this, void 0, void 0, function* () {
@@ -136,7 +178,7 @@ function serverUpdateWithDataEncryptionEnabled() {
136
178
  * This sample demonstrates how to Updates an existing server. The request body can contain one to many of the properties present in the normal server definition.
137
179
  *
138
180
  * @summary Updates an existing server. The request body can contain one to many of the properties present in the normal server definition.
139
- * x-ms-original-file: specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-03-01-preview/examples/ServerUpdateWithMajorVersionUpgrade.json
181
+ * x-ms-original-file: specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-06-01-preview/examples/ServerUpdateWithMajorVersionUpgrade.json
140
182
  */
141
183
  function serverUpdateWithMajorVersionUpgrade() {
142
184
  return __awaiter(this, void 0, void 0, function* () {
@@ -151,13 +193,59 @@ function serverUpdateWithMajorVersionUpgrade() {
151
193
  console.log(result);
152
194
  });
153
195
  }
196
+ /**
197
+ * This sample demonstrates how to Updates an existing server. The request body can contain one to many of the properties present in the normal server definition.
198
+ *
199
+ * @summary Updates an existing server. The request body can contain one to many of the properties present in the normal server definition.
200
+ * x-ms-original-file: specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-06-01-preview/examples/PromoteReplicaAsForcedSwitchover.json
201
+ */
202
+ function switchOverAReplicaServerAsForcedIEItWillReplicaAsPrimaryAndOriginalPrimaryAsReplicaImmediatelyWithoutWaitingForPrimaryAndReplicaToBeInSync() {
203
+ return __awaiter(this, void 0, void 0, function* () {
204
+ const subscriptionId = process.env["POSTGRESQL_SUBSCRIPTION_ID"] ||
205
+ "ffffffff-ffff-ffff-ffff-ffffffffffff";
206
+ const resourceGroupName = process.env["POSTGRESQL_RESOURCE_GROUP"] || "testResourceGroup";
207
+ const serverName = "pgtestsvc4-replica";
208
+ const parameters = {
209
+ replica: { promoteMode: "switchover", promoteOption: "forced" }
210
+ };
211
+ const credential = new DefaultAzureCredential();
212
+ const client = new PostgreSQLManagementFlexibleServerClient(credential, subscriptionId);
213
+ const result = yield client.servers.beginUpdateAndWait(resourceGroupName, serverName, parameters);
214
+ console.log(result);
215
+ });
216
+ }
217
+ /**
218
+ * This sample demonstrates how to Updates an existing server. The request body can contain one to many of the properties present in the normal server definition.
219
+ *
220
+ * @summary Updates an existing server. The request body can contain one to many of the properties present in the normal server definition.
221
+ * x-ms-original-file: specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-06-01-preview/examples/PromoteReplicaAsPlannedSwitchover.json
222
+ */
223
+ function switchOverAReplicaServerAsPlannedIEItWillWaitForReplicationToCompleteBeforePromotingReplicaAsPrimaryAndOriginalPrimaryAsReplica() {
224
+ return __awaiter(this, void 0, void 0, function* () {
225
+ const subscriptionId = process.env["POSTGRESQL_SUBSCRIPTION_ID"] ||
226
+ "ffffffff-ffff-ffff-ffff-ffffffffffff";
227
+ const resourceGroupName = process.env["POSTGRESQL_RESOURCE_GROUP"] || "testResourceGroup";
228
+ const serverName = "pgtestsvc4-replica";
229
+ const parameters = {
230
+ replica: { promoteMode: "switchover", promoteOption: "planned" }
231
+ };
232
+ const credential = new DefaultAzureCredential();
233
+ const client = new PostgreSQLManagementFlexibleServerClient(credential, subscriptionId);
234
+ const result = yield client.servers.beginUpdateAndWait(resourceGroupName, serverName, parameters);
235
+ console.log(result);
236
+ });
237
+ }
154
238
  function main() {
155
239
  return __awaiter(this, void 0, void 0, function* () {
240
+ promoteAReplicaServerAsAStandaloneServerAsForcedIEItWillPromoteAReplicaServerImmediatelyWithoutWaitingForPrimaryAndReplicaToBeInSync();
241
+ promoteAReplicaServerAsAStandaloneServerAsPlannedIEItWillWaitForReplicationToComplete();
156
242
  serverUpdate();
157
243
  serverUpdateWithAadAuthEnabled();
158
244
  serverUpdateWithCustomerMaintenanceWindow();
159
245
  serverUpdateWithDataEncryptionEnabled();
160
246
  serverUpdateWithMajorVersionUpgrade();
247
+ switchOverAReplicaServerAsForcedIEItWillReplicaAsPrimaryAndOriginalPrimaryAsReplicaImmediatelyWithoutWaitingForPrimaryAndReplicaToBeInSync();
248
+ switchOverAReplicaServerAsPlannedIEItWillWaitForReplicationToCompleteBeforePromotingReplicaAsPrimaryAndOriginalPrimaryAsReplica();
161
249
  });
162
250
  }
163
251
  main().catch(console.error);
@@ -1 +1 @@
1
- {"version":3,"file":"serversUpdateSample.js","sourceRoot":"","sources":["../../samples-dev/serversUpdateSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAEL,wCAAwC,EACzC,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AAEjC,MAAM,CAAC,MAAM,EAAE,CAAC;AAEhB;;;;;GAKG;AACH,SAAe,YAAY;;QACzB,MAAM,cAAc,GAClB,OAAO,CAAC,GAAG,CAAC,4BAA4B,CAAC;YACzC,sCAAsC,CAAC;QACzC,MAAM,iBAAiB,GACrB,OAAO,CAAC,GAAG,CAAC,2BAA2B,CAAC,IAAI,WAAW,CAAC;QAC1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QAC5E,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,wCAAwC,CACzD,UAAU,EACV,cAAc,CACf,CAAC;QACF,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,OAAO,CAAC,kBAAkB,CACpD,iBAAiB,EACjB,UAAU,EACV,UAAU,CACX,CAAC;QACF,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,CAAC;CAAA;AAED,SAAe,IAAI;;QACjB,YAAY,EAAE,CAAC;QACf,8BAA8B,EAAE,CAAC;QACjC,yCAAyC,EAAE,CAAC;QAC5C,qCAAqC,EAAE,CAAC;QACxC,mCAAmC,EAAE,CAAC;IACxC,CAAC;CAAA;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
1
+ {"version":3,"file":"serversUpdateSample.js","sourceRoot":"","sources":["../../samples-dev/serversUpdateSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAEL,wCAAwC,EACzC,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AAEjC,MAAM,CAAC,MAAM,EAAE,CAAC;AAEhB;;;;;GAKG;AACH,SAAe,oIAAoI;;QACjJ,MAAM,cAAc,GAClB,OAAO,CAAC,GAAG,CAAC,4BAA4B,CAAC;YACzC,sCAAsC,CAAC;QACzC,MAAM,iBAAiB,GACrB,OAAO,CAAC,GAAG,CAAC,2BAA2B,CAAC,IAAI,mBAAmB,CAAC;QAClE,MAAM,UAAU,GAAG,oBAAoB,CAAC;QACxC,MAAM,UAAU,GAAoB;YAClC,OAAO,EAAE,EAAE,WAAW,EAAE,YAAY,EAAE,aAAa,EAAE,QAAQ,EAAE;SAChE,CAAC;QACF,MAAM,UAAU,GAAG,I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,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,wCAAwC,CACzD,UAAU,EACV,cAAc,CACf,CAAC;QACF,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,OAAO,CAAC,kBAAkB,CACpD,iBAAiB,EACjB,UAAU,EACV,UAAU,CACX,CAAC;QACF,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,CAAC;CAAA;AAED,SAAe,IAAI;;QACjB,oIAAoI,EAAE,CAAC;QACvI,qFAAqF,EAAE,CAAC;QACxF,YAAY,EAAE,CAAC;QACf,8BAA8B,EAAE,CAAC;QACjC,yCAAyC,EAAE,CAAC;QAC5C,qCAAqC,EAAE,CAAC;QACxC,mCAAmC,EAAE,CAAC;QACtC,0IAA0I,EAAE,CAAC;QAC7I,+HAA+H,EAAE,CAAC;IACpI,CAAC;CAAA;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=virtualEndpointsCreateSample.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"virtualEndpointsCreateSample.d.ts","sourceRoot":"","sources":["../../samples-dev/virtualEndpointsCreateSample.ts"],"names":[],"mappings":""}
@@ -0,0 +1,44 @@
1
+ /*
2
+ * Copyright (c) Microsoft Corporation.
3
+ * Licensed under the MIT License.
4
+ *
5
+ * Code generated by Microsoft (R) AutoRest Code Generator.
6
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
+ */
8
+ import { __awaiter } from "tslib";
9
+ // Copyright (c) Microsoft Corporation.
10
+ // Licensed under the MIT License.
11
+ import { PostgreSQLManagementFlexibleServerClient } from "@azure/arm-postgresql-flexible";
12
+ import { DefaultAzureCredential } from "@azure/identity";
13
+ import * as dotenv from "dotenv";
14
+ dotenv.config();
15
+ /**
16
+ * This sample demonstrates how to Creates a new virtual endpoint for PostgreSQL flexible server.
17
+ *
18
+ * @summary Creates a new virtual endpoint for PostgreSQL flexible server.
19
+ * x-ms-original-file: specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-06-01-preview/examples/VirtualEndpointCreate.json
20
+ */
21
+ function createANewVirtualEndpointForAFlexibleServer() {
22
+ return __awaiter(this, void 0, void 0, function* () {
23
+ const subscriptionId = process.env["POSTGRESQL_SUBSCRIPTION_ID"] ||
24
+ "ffffffff-ffff-ffff-ffff-ffffffffffff";
25
+ const resourceGroupName = process.env["POSTGRESQL_RESOURCE_GROUP"] || "testrg";
26
+ const serverName = "pgtestsvc4";
27
+ const virtualEndpointName = "pgVirtualEndpoint1";
28
+ const parameters = {
29
+ endpointType: "ReadWrite",
30
+ members: ["testPrimary1"]
31
+ };
32
+ const credential = new DefaultAzureCredential();
33
+ const client = new PostgreSQLManagementFlexibleServerClient(credential, subscriptionId);
34
+ const result = yield client.virtualEndpoints.beginCreateAndWait(resourceGroupName, serverName, virtualEndpointName, parameters);
35
+ console.log(result);
36
+ });
37
+ }
38
+ function main() {
39
+ return __awaiter(this, void 0, void 0, function* () {
40
+ createANewVirtualEndpointForAFlexibleServer();
41
+ });
42
+ }
43
+ main().catch(console.error);
44
+ //# sourceMappingURL=virtualEndpointsCreateSample.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"virtualEndpointsCreateSample.js","sourceRoot":"","sources":["../../samples-dev/virtualEndpointsCreateSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAEL,wCAAwC,EACzC,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AAEjC,MAAM,CAAC,MAAM,EAAE,CAAC;AAEhB;;;;;GAKG;AACH,SAAe,2CAA2C;;QACxD,MAAM,cAAc,GAClB,OAAO,CAAC,GAAG,CAAC,4BAA4B,CAAC;YACzC,sCAAsC,CAAC;QACzC,MAAM,iBAAiB,GACrB,OAAO,CAAC,GAAG,CAAC,2BAA2B,CAAC,IAAI,QAAQ,CAAC;QACvD,MAAM,UAAU,GAAG,YAAY,CAAC;QAChC,MAAM,mBAAmB,GAAG,oBAAoB,CAAC;QACjD,MAAM,UAAU,GAA4B;YAC1C,YAAY,EAAE,WAAW;YACzB,OAAO,EAAE,CAAC,cAAc,CAAC;SAC1B,CAAC;QACF,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,wCAAwC,CACzD,UAAU,EACV,cAAc,CACf,CAAC;QACF,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,gBAAgB,CAAC,kBAAkB,CAC7D,iBAAiB,EACjB,UAAU,EACV,mBAAmB,EACnB,UAAU,CACX,CAAC;QACF,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,CAAC;CAAA;AAED,SAAe,IAAI;;QACjB,2CAA2C,EAAE,CAAC;IAChD,CAAC;CAAA;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=virtualEndpointsDeleteSample.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"virtualEndpointsDeleteSample.d.ts","sourceRoot":"","sources":["../../samples-dev/virtualEndpointsDeleteSample.ts"],"names":[],"mappings":""}
@@ -0,0 +1,40 @@
1
+ /*
2
+ * Copyright (c) Microsoft Corporation.
3
+ * Licensed under the MIT License.
4
+ *
5
+ * Code generated by Microsoft (R) AutoRest Code Generator.
6
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
+ */
8
+ import { __awaiter } from "tslib";
9
+ // Copyright (c) Microsoft Corporation.
10
+ // Licensed under the MIT License.
11
+ import { PostgreSQLManagementFlexibleServerClient } from "@azure/arm-postgresql-flexible";
12
+ import { DefaultAzureCredential } from "@azure/identity";
13
+ import * as dotenv from "dotenv";
14
+ dotenv.config();
15
+ /**
16
+ * This sample demonstrates how to Deletes a virtual endpoint.
17
+ *
18
+ * @summary Deletes a virtual endpoint.
19
+ * x-ms-original-file: specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-06-01-preview/examples/VirtualEndpointDelete.json
20
+ */
21
+ function deleteAVirtualEndpoint() {
22
+ return __awaiter(this, void 0, void 0, function* () {
23
+ const subscriptionId = process.env["POSTGRESQL_SUBSCRIPTION_ID"] ||
24
+ "ffffffff-ffff-ffff-ffff-ffffffffffff";
25
+ const resourceGroupName = process.env["POSTGRESQL_RESOURCE_GROUP"] || "testrg";
26
+ const serverName = "pgtestsvc4";
27
+ const virtualEndpointName = "pgVirtualEndpoint1";
28
+ const credential = new DefaultAzureCredential();
29
+ const client = new PostgreSQLManagementFlexibleServerClient(credential, subscriptionId);
30
+ const result = yield client.virtualEndpoints.beginDeleteAndWait(resourceGroupName, serverName, virtualEndpointName);
31
+ console.log(result);
32
+ });
33
+ }
34
+ function main() {
35
+ return __awaiter(this, void 0, void 0, function* () {
36
+ deleteAVirtualEndpoint();
37
+ });
38
+ }
39
+ main().catch(console.error);
40
+ //# sourceMappingURL=virtualEndpointsDeleteSample.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"virtualEndpointsDeleteSample.js","sourceRoot":"","sources":["../../samples-dev/virtualEndpointsDeleteSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,wCAAwC,EAAE,MAAM,gCAAgC,CAAC;AAC1F,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AAEjC,MAAM,CAAC,MAAM,EAAE,CAAC;AAEhB;;;;;GAKG;AACH,SAAe,sBAAsB;;QACnC,MAAM,cAAc,GAClB,OAAO,CAAC,GAAG,CAAC,4BAA4B,CAAC;YACzC,sCAAsC,CAAC;QACzC,MAAM,iBAAiB,GACrB,OAAO,CAAC,GAAG,CAAC,2BAA2B,CAAC,IAAI,QAAQ,CAAC;QACvD,MAAM,UAAU,GAAG,YAAY,CAAC;QAChC,MAAM,mBAAmB,GAAG,oBAAoB,CAAC;QACjD,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,wCAAwC,CACzD,UAAU,EACV,cAAc,CACf,CAAC;QACF,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,gBAAgB,CAAC,kBAAkB,CAC7D,iBAAiB,EACjB,UAAU,EACV,mBAAmB,CACpB,CAAC;QACF,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,CAAC;CAAA;AAED,SAAe,IAAI;;QACjB,sBAAsB,EAAE,CAAC;IAC3B,CAAC;CAAA;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=virtualEndpointsGetSample.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"virtualEndpointsGetSample.d.ts","sourceRoot":"","sources":["../../samples-dev/virtualEndpointsGetSample.ts"],"names":[],"mappings":""}
@@ -0,0 +1,40 @@
1
+ /*
2
+ * Copyright (c) Microsoft Corporation.
3
+ * Licensed under the MIT License.
4
+ *
5
+ * Code generated by Microsoft (R) AutoRest Code Generator.
6
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
+ */
8
+ import { __awaiter } from "tslib";
9
+ // Copyright (c) Microsoft Corporation.
10
+ // Licensed under the MIT License.
11
+ import { PostgreSQLManagementFlexibleServerClient } from "@azure/arm-postgresql-flexible";
12
+ import { DefaultAzureCredential } from "@azure/identity";
13
+ import * as dotenv from "dotenv";
14
+ dotenv.config();
15
+ /**
16
+ * This sample demonstrates how to Gets information about a virtual endpoint.
17
+ *
18
+ * @summary Gets information about a virtual endpoint.
19
+ * x-ms-original-file: specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-06-01-preview/examples/VirtualEndpointsGet.json
20
+ */
21
+ function getAVirtualEndpoint() {
22
+ return __awaiter(this, void 0, void 0, function* () {
23
+ const subscriptionId = process.env["POSTGRESQL_SUBSCRIPTION_ID"] ||
24
+ "ffffffff-ffff-ffff-ffff-ffffffffffff";
25
+ const resourceGroupName = process.env["POSTGRESQL_RESOURCE_GROUP"] || "testrg";
26
+ const serverName = "pgtestsvc4";
27
+ const virtualEndpointName = "pgVirtualEndpoint1";
28
+ const credential = new DefaultAzureCredential();
29
+ const client = new PostgreSQLManagementFlexibleServerClient(credential, subscriptionId);
30
+ const result = yield client.virtualEndpoints.get(resourceGroupName, serverName, virtualEndpointName);
31
+ console.log(result);
32
+ });
33
+ }
34
+ function main() {
35
+ return __awaiter(this, void 0, void 0, function* () {
36
+ getAVirtualEndpoint();
37
+ });
38
+ }
39
+ main().catch(console.error);
40
+ //# sourceMappingURL=virtualEndpointsGetSample.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"virtualEndpointsGetSample.js","sourceRoot":"","sources":["../../samples-dev/virtualEndpointsGetSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,wCAAwC,EAAE,MAAM,gCAAgC,CAAC;AAC1F,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AAEjC,MAAM,CAAC,MAAM,EAAE,CAAC;AAEhB;;;;;GAKG;AACH,SAAe,mBAAmB;;QAChC,MAAM,cAAc,GAClB,OAAO,CAAC,GAAG,CAAC,4BAA4B,CAAC;YACzC,sCAAsC,CAAC;QACzC,MAAM,iBAAiB,GACrB,OAAO,CAAC,GAAG,CAAC,2BAA2B,CAAC,IAAI,QAAQ,CAAC;QACvD,MAAM,UAAU,GAAG,YAAY,CAAC;QAChC,MAAM,mBAAmB,GAAG,oBAAoB,CAAC;QACjD,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,wCAAwC,CACzD,UAAU,EACV,cAAc,CACf,CAAC;QACF,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,gBAAgB,CAAC,GAAG,CAC9C,iBAAiB,EACjB,UAAU,EACV,mBAAmB,CACpB,CAAC;QACF,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,CAAC;CAAA;AAED,SAAe,IAAI;;QACjB,mBAAmB,EAAE,CAAC;IACxB,CAAC;CAAA;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=virtualEndpointsListByServerSample.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"virtualEndpointsListByServerSample.d.ts","sourceRoot":"","sources":["../../samples-dev/virtualEndpointsListByServerSample.ts"],"names":[],"mappings":""}
@@ -0,0 +1,55 @@
1
+ /*
2
+ * Copyright (c) Microsoft Corporation.
3
+ * Licensed under the MIT License.
4
+ *
5
+ * Code generated by Microsoft (R) AutoRest Code Generator.
6
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
+ */
8
+ import { __asyncValues, __awaiter } from "tslib";
9
+ // Copyright (c) Microsoft Corporation.
10
+ // Licensed under the MIT License.
11
+ import { PostgreSQLManagementFlexibleServerClient } from "@azure/arm-postgresql-flexible";
12
+ import { DefaultAzureCredential } from "@azure/identity";
13
+ import * as dotenv from "dotenv";
14
+ dotenv.config();
15
+ /**
16
+ * This sample demonstrates how to List all the servers in a given resource group.
17
+ *
18
+ * @summary List all the servers in a given resource group.
19
+ * x-ms-original-file: specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-06-01-preview/examples/VirtualEndpointsListByServer.json
20
+ */
21
+ function virtualEndpointListByServer() {
22
+ var _a, e_1, _b, _c;
23
+ return __awaiter(this, void 0, void 0, function* () {
24
+ const subscriptionId = process.env["POSTGRESQL_SUBSCRIPTION_ID"] ||
25
+ "ffffffff-ffff-ffff-ffff-ffffffffffff";
26
+ const resourceGroupName = process.env["POSTGRESQL_RESOURCE_GROUP"] || "testrg";
27
+ const serverName = "pgtestsvc4";
28
+ const credential = new DefaultAzureCredential();
29
+ const client = new PostgreSQLManagementFlexibleServerClient(credential, subscriptionId);
30
+ const resArray = new Array();
31
+ try {
32
+ for (var _d = true, _e = __asyncValues(client.virtualEndpoints.listByServer(resourceGroupName, serverName)), _f; _f = yield _e.next(), _a = _f.done, !_a; _d = true) {
33
+ _c = _f.value;
34
+ _d = false;
35
+ let item = _c;
36
+ resArray.push(item);
37
+ }
38
+ }
39
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
40
+ finally {
41
+ try {
42
+ if (!_d && !_a && (_b = _e.return)) yield _b.call(_e);
43
+ }
44
+ finally { if (e_1) throw e_1.error; }
45
+ }
46
+ console.log(resArray);
47
+ });
48
+ }
49
+ function main() {
50
+ return __awaiter(this, void 0, void 0, function* () {
51
+ virtualEndpointListByServer();
52
+ });
53
+ }
54
+ main().catch(console.error);
55
+ //# sourceMappingURL=virtualEndpointsListByServerSample.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"virtualEndpointsListByServerSample.js","sourceRoot":"","sources":["../../samples-dev/virtualEndpointsListByServerSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,wCAAwC,EAAE,MAAM,gCAAgC,CAAC;AAC1F,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AAEjC,MAAM,CAAC,MAAM,EAAE,CAAC;AAEhB;;;;;GAKG;AACH,SAAe,2BAA2B;;;QACxC,MAAM,cAAc,GAClB,OAAO,CAAC,GAAG,CAAC,4BAA4B,CAAC;YACzC,sCAAsC,CAAC;QACzC,MAAM,iBAAiB,GACrB,OAAO,CAAC,GAAG,CAAC,2BAA2B,CAAC,IAAI,QAAQ,CAAC;QACvD,MAAM,UAAU,GAAG,YAAY,CAAC;QAChC,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,wCAAwC,CACzD,UAAU,EACV,cAAc,CACf,CAAC;QACF,MAAM,QAAQ,GAAG,IAAI,KAAK,EAAE,CAAC;;YAC7B,KAAuB,eAAA,KAAA,cAAA,MAAM,CAAC,gBAAgB,CAAC,YAAY,CACzD,iBAAiB,EACjB,UAAU,CACX,CAAA,IAAA,sDAAE;gBAHoB,cAGtB;gBAHsB,WAGtB;gBAHU,IAAI,IAAI,KAAA,CAAA;gBAIjB,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;aACrB;;;;;;;;;QACD,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;;CACvB;AAED,SAAe,IAAI;;QACjB,2BAA2B,EAAE,CAAC;IAChC,CAAC;CAAA;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=virtualEndpointsUpdateSample.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"virtualEndpointsUpdateSample.d.ts","sourceRoot":"","sources":["../../samples-dev/virtualEndpointsUpdateSample.ts"],"names":[],"mappings":""}
@@ -0,0 +1,44 @@
1
+ /*
2
+ * Copyright (c) Microsoft Corporation.
3
+ * Licensed under the MIT License.
4
+ *
5
+ * Code generated by Microsoft (R) AutoRest Code Generator.
6
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
+ */
8
+ import { __awaiter } from "tslib";
9
+ // Copyright (c) Microsoft Corporation.
10
+ // Licensed under the MIT License.
11
+ import { PostgreSQLManagementFlexibleServerClient } from "@azure/arm-postgresql-flexible";
12
+ import { DefaultAzureCredential } from "@azure/identity";
13
+ import * as dotenv from "dotenv";
14
+ dotenv.config();
15
+ /**
16
+ * This sample demonstrates how to Updates an existing virtual endpoint. The request body can contain one to many of the properties present in the normal virtual endpoint definition.
17
+ *
18
+ * @summary Updates an existing virtual endpoint. The request body can contain one to many of the properties present in the normal virtual endpoint definition.
19
+ * x-ms-original-file: specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-06-01-preview/examples/VirtualEndpointUpdate.json
20
+ */
21
+ function updateAVirtualEndpointForAServerToUpdateThe() {
22
+ return __awaiter(this, void 0, void 0, function* () {
23
+ const subscriptionId = process.env["POSTGRESQL_SUBSCRIPTION_ID"] ||
24
+ "ffffffff-ffff-ffff-ffff-ffffffffffff";
25
+ const resourceGroupName = process.env["POSTGRESQL_RESOURCE_GROUP"] || "testrg";
26
+ const serverName = "pgtestsvc4";
27
+ const virtualEndpointName = "pgVirtualEndpoint1";
28
+ const parameters = {
29
+ endpointType: "ReadWrite",
30
+ members: ["testReplica1"]
31
+ };
32
+ const credential = new DefaultAzureCredential();
33
+ const client = new PostgreSQLManagementFlexibleServerClient(credential, subscriptionId);
34
+ const result = yield client.virtualEndpoints.beginUpdateAndWait(resourceGroupName, serverName, virtualEndpointName, parameters);
35
+ console.log(result);
36
+ });
37
+ }
38
+ function main() {
39
+ return __awaiter(this, void 0, void 0, function* () {
40
+ updateAVirtualEndpointForAServerToUpdateThe();
41
+ });
42
+ }
43
+ main().catch(console.error);
44
+ //# sourceMappingURL=virtualEndpointsUpdateSample.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"virtualEndpointsUpdateSample.js","sourceRoot":"","sources":["../../samples-dev/virtualEndpointsUpdateSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAEL,wCAAwC,EACzC,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AAEjC,MAAM,CAAC,MAAM,EAAE,CAAC;AAEhB;;;;;GAKG;AACH,SAAe,2CAA2C;;QACxD,MAAM,cAAc,GAClB,OAAO,CAAC,GAAG,CAAC,4BAA4B,CAAC;YACzC,sCAAsC,CAAC;QACzC,MAAM,iBAAiB,GACrB,OAAO,CAAC,GAAG,CAAC,2BAA2B,CAAC,IAAI,QAAQ,CAAC;QACvD,MAAM,UAAU,GAAG,YAAY,CAAC;QAChC,MAAM,mBAAmB,GAAG,oBAAoB,CAAC;QACjD,MAAM,UAAU,GAAoC;YAClD,YAAY,EAAE,WAAW;YACzB,OAAO,EAAE,CAAC,cAAc,CAAC;SAC1B,CAAC;QACF,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,wCAAwC,CACzD,UAAU,EACV,cAAc,CACf,CAAC;QACF,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,gBAAgB,CAAC,kBAAkB,CAC7D,iBAAiB,EACjB,UAAU,EACV,mBAAmB,EACnB,UAAU,CACX,CAAC;QACF,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,CAAC;CAAA;AAED,SAAe,IAAI;;QACjB,2CAA2C,EAAE,CAAC;IAChD,CAAC;CAAA;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
@@ -16,7 +16,7 @@ dotenv.config();
16
16
  * This sample demonstrates how to Get virtual network subnet usage for a given vNet resource id.
17
17
  *
18
18
  * @summary Get virtual network subnet usage for a given vNet resource id.
19
- * x-ms-original-file: specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-03-01-preview/examples/VirtualNetworkSubnetUsage.json
19
+ * x-ms-original-file: specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-06-01-preview/examples/VirtualNetworkSubnetUsage.json
20
20
  */
21
21
  function virtualNetworkSubnetUsageList() {
22
22
  return __awaiter(this, void 0, void 0, function* () {