@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
@@ -0,0 +1,243 @@
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
+
9
+ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging";
10
+ import { setContinuationToken } from "../pagingHelper";
11
+ import { PrivateEndpointConnections } from "../operationsInterfaces";
12
+ import * as coreClient from "@azure/core-client";
13
+ import * as Mappers from "../models/mappers";
14
+ import * as Parameters from "../models/parameters";
15
+ import { PostgreSQLManagementFlexibleServerClient } from "../postgreSQLManagementFlexibleServerClient";
16
+ import {
17
+ PrivateEndpointConnection,
18
+ PrivateEndpointConnectionsListByServerNextOptionalParams,
19
+ PrivateEndpointConnectionsListByServerOptionalParams,
20
+ PrivateEndpointConnectionsListByServerResponse,
21
+ PrivateEndpointConnectionsGetOptionalParams,
22
+ PrivateEndpointConnectionsGetResponse,
23
+ PrivateEndpointConnectionsListByServerNextResponse
24
+ } from "../models";
25
+
26
+ /// <reference lib="esnext.asynciterable" />
27
+ /** Class containing PrivateEndpointConnections operations. */
28
+ export class PrivateEndpointConnectionsImpl
29
+ implements PrivateEndpointConnections {
30
+ private readonly client: PostgreSQLManagementFlexibleServerClient;
31
+
32
+ /**
33
+ * Initialize a new instance of the class PrivateEndpointConnections class.
34
+ * @param client Reference to the service client
35
+ */
36
+ constructor(client: PostgreSQLManagementFlexibleServerClient) {
37
+ this.client = client;
38
+ }
39
+
40
+ /**
41
+ * Gets all private endpoint connections on a server.
42
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
43
+ * @param serverName The name of the server.
44
+ * @param options The options parameters.
45
+ */
46
+ public listByServer(
47
+ resourceGroupName: string,
48
+ serverName: string,
49
+ options?: PrivateEndpointConnectionsListByServerOptionalParams
50
+ ): PagedAsyncIterableIterator<PrivateEndpointConnection> {
51
+ const iter = this.listByServerPagingAll(
52
+ resourceGroupName,
53
+ serverName,
54
+ options
55
+ );
56
+ return {
57
+ next() {
58
+ return iter.next();
59
+ },
60
+ [Symbol.asyncIterator]() {
61
+ return this;
62
+ },
63
+ byPage: (settings?: PageSettings) => {
64
+ if (settings?.maxPageSize) {
65
+ throw new Error("maxPageSize is not supported by this operation.");
66
+ }
67
+ return this.listByServerPagingPage(
68
+ resourceGroupName,
69
+ serverName,
70
+ options,
71
+ settings
72
+ );
73
+ }
74
+ };
75
+ }
76
+
77
+ private async *listByServerPagingPage(
78
+ resourceGroupName: string,
79
+ serverName: string,
80
+ options?: PrivateEndpointConnectionsListByServerOptionalParams,
81
+ settings?: PageSettings
82
+ ): AsyncIterableIterator<PrivateEndpointConnection[]> {
83
+ let result: PrivateEndpointConnectionsListByServerResponse;
84
+ let continuationToken = settings?.continuationToken;
85
+ if (!continuationToken) {
86
+ result = await this._listByServer(resourceGroupName, serverName, options);
87
+ let page = result.value || [];
88
+ continuationToken = result.nextLink;
89
+ setContinuationToken(page, continuationToken);
90
+ yield page;
91
+ }
92
+ while (continuationToken) {
93
+ result = await this._listByServerNext(
94
+ resourceGroupName,
95
+ serverName,
96
+ continuationToken,
97
+ options
98
+ );
99
+ continuationToken = result.nextLink;
100
+ let page = result.value || [];
101
+ setContinuationToken(page, continuationToken);
102
+ yield page;
103
+ }
104
+ }
105
+
106
+ private async *listByServerPagingAll(
107
+ resourceGroupName: string,
108
+ serverName: string,
109
+ options?: PrivateEndpointConnectionsListByServerOptionalParams
110
+ ): AsyncIterableIterator<PrivateEndpointConnection> {
111
+ for await (const page of this.listByServerPagingPage(
112
+ resourceGroupName,
113
+ serverName,
114
+ options
115
+ )) {
116
+ yield* page;
117
+ }
118
+ }
119
+
120
+ /**
121
+ * Gets a private endpoint connection.
122
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
123
+ * @param serverName The name of the server.
124
+ * @param privateEndpointConnectionName The name of the private endpoint connection.
125
+ * @param options The options parameters.
126
+ */
127
+ get(
128
+ resourceGroupName: string,
129
+ serverName: string,
130
+ privateEndpointConnectionName: string,
131
+ options?: PrivateEndpointConnectionsGetOptionalParams
132
+ ): Promise<PrivateEndpointConnectionsGetResponse> {
133
+ return this.client.sendOperationRequest(
134
+ { resourceGroupName, serverName, privateEndpointConnectionName, options },
135
+ getOperationSpec
136
+ );
137
+ }
138
+
139
+ /**
140
+ * Gets all private endpoint connections on a server.
141
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
142
+ * @param serverName The name of the server.
143
+ * @param options The options parameters.
144
+ */
145
+ private _listByServer(
146
+ resourceGroupName: string,
147
+ serverName: string,
148
+ options?: PrivateEndpointConnectionsListByServerOptionalParams
149
+ ): Promise<PrivateEndpointConnectionsListByServerResponse> {
150
+ return this.client.sendOperationRequest(
151
+ { resourceGroupName, serverName, options },
152
+ listByServerOperationSpec
153
+ );
154
+ }
155
+
156
+ /**
157
+ * ListByServerNext
158
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
159
+ * @param serverName The name of the server.
160
+ * @param nextLink The nextLink from the previous successful call to the ListByServer method.
161
+ * @param options The options parameters.
162
+ */
163
+ private _listByServerNext(
164
+ resourceGroupName: string,
165
+ serverName: string,
166
+ nextLink: string,
167
+ options?: PrivateEndpointConnectionsListByServerNextOptionalParams
168
+ ): Promise<PrivateEndpointConnectionsListByServerNextResponse> {
169
+ return this.client.sendOperationRequest(
170
+ { resourceGroupName, serverName, nextLink, options },
171
+ listByServerNextOperationSpec
172
+ );
173
+ }
174
+ }
175
+ // Operation Specifications
176
+ const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
177
+
178
+ const getOperationSpec: coreClient.OperationSpec = {
179
+ path:
180
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/privateEndpointConnections/{privateEndpointConnectionName}",
181
+ httpMethod: "GET",
182
+ responses: {
183
+ 200: {
184
+ bodyMapper: Mappers.PrivateEndpointConnection
185
+ },
186
+ default: {
187
+ bodyMapper: Mappers.ErrorResponse
188
+ }
189
+ },
190
+ queryParameters: [Parameters.apiVersion],
191
+ urlParameters: [
192
+ Parameters.$host,
193
+ Parameters.subscriptionId,
194
+ Parameters.resourceGroupName,
195
+ Parameters.serverName,
196
+ Parameters.privateEndpointConnectionName
197
+ ],
198
+ headerParameters: [Parameters.accept],
199
+ serializer
200
+ };
201
+ const listByServerOperationSpec: coreClient.OperationSpec = {
202
+ path:
203
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/privateEndpointConnections",
204
+ httpMethod: "GET",
205
+ responses: {
206
+ 200: {
207
+ bodyMapper: Mappers.PrivateEndpointConnectionListResult
208
+ },
209
+ default: {
210
+ bodyMapper: Mappers.ErrorResponse
211
+ }
212
+ },
213
+ queryParameters: [Parameters.apiVersion],
214
+ urlParameters: [
215
+ Parameters.$host,
216
+ Parameters.subscriptionId,
217
+ Parameters.resourceGroupName,
218
+ Parameters.serverName
219
+ ],
220
+ headerParameters: [Parameters.accept],
221
+ serializer
222
+ };
223
+ const listByServerNextOperationSpec: coreClient.OperationSpec = {
224
+ path: "{nextLink}",
225
+ httpMethod: "GET",
226
+ responses: {
227
+ 200: {
228
+ bodyMapper: Mappers.PrivateEndpointConnectionListResult
229
+ },
230
+ default: {
231
+ bodyMapper: Mappers.ErrorResponse
232
+ }
233
+ },
234
+ urlParameters: [
235
+ Parameters.$host,
236
+ Parameters.subscriptionId,
237
+ Parameters.resourceGroupName,
238
+ Parameters.serverName,
239
+ Parameters.nextLink
240
+ ],
241
+ headerParameters: [Parameters.accept],
242
+ serializer
243
+ };
@@ -0,0 +1,242 @@
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
+
9
+ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging";
10
+ import { setContinuationToken } from "../pagingHelper";
11
+ import { PrivateLinkResources } from "../operationsInterfaces";
12
+ import * as coreClient from "@azure/core-client";
13
+ import * as Mappers from "../models/mappers";
14
+ import * as Parameters from "../models/parameters";
15
+ import { PostgreSQLManagementFlexibleServerClient } from "../postgreSQLManagementFlexibleServerClient";
16
+ import {
17
+ PrivateLinkResource,
18
+ PrivateLinkResourcesListByServerNextOptionalParams,
19
+ PrivateLinkResourcesListByServerOptionalParams,
20
+ PrivateLinkResourcesListByServerResponse,
21
+ PrivateLinkResourcesGetOptionalParams,
22
+ PrivateLinkResourcesGetResponse,
23
+ PrivateLinkResourcesListByServerNextResponse
24
+ } from "../models";
25
+
26
+ /// <reference lib="esnext.asynciterable" />
27
+ /** Class containing PrivateLinkResources operations. */
28
+ export class PrivateLinkResourcesImpl implements PrivateLinkResources {
29
+ private readonly client: PostgreSQLManagementFlexibleServerClient;
30
+
31
+ /**
32
+ * Initialize a new instance of the class PrivateLinkResources class.
33
+ * @param client Reference to the service client
34
+ */
35
+ constructor(client: PostgreSQLManagementFlexibleServerClient) {
36
+ this.client = client;
37
+ }
38
+
39
+ /**
40
+ * Gets the private link resources for PostgreSQL server.
41
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
42
+ * @param serverName The name of the server.
43
+ * @param options The options parameters.
44
+ */
45
+ public listByServer(
46
+ resourceGroupName: string,
47
+ serverName: string,
48
+ options?: PrivateLinkResourcesListByServerOptionalParams
49
+ ): PagedAsyncIterableIterator<PrivateLinkResource> {
50
+ const iter = this.listByServerPagingAll(
51
+ resourceGroupName,
52
+ serverName,
53
+ options
54
+ );
55
+ return {
56
+ next() {
57
+ return iter.next();
58
+ },
59
+ [Symbol.asyncIterator]() {
60
+ return this;
61
+ },
62
+ byPage: (settings?: PageSettings) => {
63
+ if (settings?.maxPageSize) {
64
+ throw new Error("maxPageSize is not supported by this operation.");
65
+ }
66
+ return this.listByServerPagingPage(
67
+ resourceGroupName,
68
+ serverName,
69
+ options,
70
+ settings
71
+ );
72
+ }
73
+ };
74
+ }
75
+
76
+ private async *listByServerPagingPage(
77
+ resourceGroupName: string,
78
+ serverName: string,
79
+ options?: PrivateLinkResourcesListByServerOptionalParams,
80
+ settings?: PageSettings
81
+ ): AsyncIterableIterator<PrivateLinkResource[]> {
82
+ let result: PrivateLinkResourcesListByServerResponse;
83
+ let continuationToken = settings?.continuationToken;
84
+ if (!continuationToken) {
85
+ result = await this._listByServer(resourceGroupName, serverName, options);
86
+ let page = result.value || [];
87
+ continuationToken = result.nextLink;
88
+ setContinuationToken(page, continuationToken);
89
+ yield page;
90
+ }
91
+ while (continuationToken) {
92
+ result = await this._listByServerNext(
93
+ resourceGroupName,
94
+ serverName,
95
+ continuationToken,
96
+ options
97
+ );
98
+ continuationToken = result.nextLink;
99
+ let page = result.value || [];
100
+ setContinuationToken(page, continuationToken);
101
+ yield page;
102
+ }
103
+ }
104
+
105
+ private async *listByServerPagingAll(
106
+ resourceGroupName: string,
107
+ serverName: string,
108
+ options?: PrivateLinkResourcesListByServerOptionalParams
109
+ ): AsyncIterableIterator<PrivateLinkResource> {
110
+ for await (const page of this.listByServerPagingPage(
111
+ resourceGroupName,
112
+ serverName,
113
+ options
114
+ )) {
115
+ yield* page;
116
+ }
117
+ }
118
+
119
+ /**
120
+ * Gets the private link resources for PostgreSQL server.
121
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
122
+ * @param serverName The name of the server.
123
+ * @param options The options parameters.
124
+ */
125
+ private _listByServer(
126
+ resourceGroupName: string,
127
+ serverName: string,
128
+ options?: PrivateLinkResourcesListByServerOptionalParams
129
+ ): Promise<PrivateLinkResourcesListByServerResponse> {
130
+ return this.client.sendOperationRequest(
131
+ { resourceGroupName, serverName, options },
132
+ listByServerOperationSpec
133
+ );
134
+ }
135
+
136
+ /**
137
+ * Gets a private link resource for PostgreSQL server.
138
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
139
+ * @param serverName The name of the server.
140
+ * @param groupName The name of the private link resource.
141
+ * @param options The options parameters.
142
+ */
143
+ get(
144
+ resourceGroupName: string,
145
+ serverName: string,
146
+ groupName: string,
147
+ options?: PrivateLinkResourcesGetOptionalParams
148
+ ): Promise<PrivateLinkResourcesGetResponse> {
149
+ return this.client.sendOperationRequest(
150
+ { resourceGroupName, serverName, groupName, options },
151
+ getOperationSpec
152
+ );
153
+ }
154
+
155
+ /**
156
+ * ListByServerNext
157
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
158
+ * @param serverName The name of the server.
159
+ * @param nextLink The nextLink from the previous successful call to the ListByServer method.
160
+ * @param options The options parameters.
161
+ */
162
+ private _listByServerNext(
163
+ resourceGroupName: string,
164
+ serverName: string,
165
+ nextLink: string,
166
+ options?: PrivateLinkResourcesListByServerNextOptionalParams
167
+ ): Promise<PrivateLinkResourcesListByServerNextResponse> {
168
+ return this.client.sendOperationRequest(
169
+ { resourceGroupName, serverName, nextLink, options },
170
+ listByServerNextOperationSpec
171
+ );
172
+ }
173
+ }
174
+ // Operation Specifications
175
+ const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
176
+
177
+ const listByServerOperationSpec: coreClient.OperationSpec = {
178
+ path:
179
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/privateLinkResources",
180
+ httpMethod: "GET",
181
+ responses: {
182
+ 200: {
183
+ bodyMapper: Mappers.PrivateLinkResourceListResult
184
+ },
185
+ default: {
186
+ bodyMapper: Mappers.ErrorResponse
187
+ }
188
+ },
189
+ queryParameters: [Parameters.apiVersion],
190
+ urlParameters: [
191
+ Parameters.$host,
192
+ Parameters.subscriptionId,
193
+ Parameters.resourceGroupName,
194
+ Parameters.serverName
195
+ ],
196
+ headerParameters: [Parameters.accept],
197
+ serializer
198
+ };
199
+ const getOperationSpec: coreClient.OperationSpec = {
200
+ path:
201
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/privateLinkResources/{groupName}",
202
+ httpMethod: "GET",
203
+ responses: {
204
+ 200: {
205
+ bodyMapper: Mappers.PrivateLinkResource
206
+ },
207
+ default: {
208
+ bodyMapper: Mappers.ErrorResponse
209
+ }
210
+ },
211
+ queryParameters: [Parameters.apiVersion],
212
+ urlParameters: [
213
+ Parameters.$host,
214
+ Parameters.subscriptionId,
215
+ Parameters.resourceGroupName,
216
+ Parameters.serverName,
217
+ Parameters.groupName
218
+ ],
219
+ headerParameters: [Parameters.accept],
220
+ serializer
221
+ };
222
+ const listByServerNextOperationSpec: coreClient.OperationSpec = {
223
+ path: "{nextLink}",
224
+ httpMethod: "GET",
225
+ responses: {
226
+ 200: {
227
+ bodyMapper: Mappers.PrivateLinkResourceListResult
228
+ },
229
+ default: {
230
+ bodyMapper: Mappers.ErrorResponse
231
+ }
232
+ },
233
+ urlParameters: [
234
+ Parameters.$host,
235
+ Parameters.subscriptionId,
236
+ Parameters.resourceGroupName,
237
+ Parameters.serverName,
238
+ Parameters.nextLink
239
+ ],
240
+ headerParameters: [Parameters.accept],
241
+ serializer
242
+ };
@@ -0,0 +1,170 @@
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
+
9
+ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging";
10
+ import { setContinuationToken } from "../pagingHelper";
11
+ import { QuotaUsages } from "../operationsInterfaces";
12
+ import * as coreClient from "@azure/core-client";
13
+ import * as Mappers from "../models/mappers";
14
+ import * as Parameters from "../models/parameters";
15
+ import { PostgreSQLManagementFlexibleServerClient } from "../postgreSQLManagementFlexibleServerClient";
16
+ import {
17
+ QuotaUsage,
18
+ QuotaUsagesListNextOptionalParams,
19
+ QuotaUsagesListOptionalParams,
20
+ QuotaUsagesListResponse,
21
+ QuotaUsagesListNextResponse
22
+ } from "../models";
23
+
24
+ /// <reference lib="esnext.asynciterable" />
25
+ /** Class containing QuotaUsages operations. */
26
+ export class QuotaUsagesImpl implements QuotaUsages {
27
+ private readonly client: PostgreSQLManagementFlexibleServerClient;
28
+
29
+ /**
30
+ * Initialize a new instance of the class QuotaUsages class.
31
+ * @param client Reference to the service client
32
+ */
33
+ constructor(client: PostgreSQLManagementFlexibleServerClient) {
34
+ this.client = client;
35
+ }
36
+
37
+ /**
38
+ * Get quota usages at specified location in a given subscription.
39
+ * @param locationName The name of the location.
40
+ * @param options The options parameters.
41
+ */
42
+ public list(
43
+ locationName: string,
44
+ options?: QuotaUsagesListOptionalParams
45
+ ): PagedAsyncIterableIterator<QuotaUsage> {
46
+ const iter = this.listPagingAll(locationName, options);
47
+ return {
48
+ next() {
49
+ return iter.next();
50
+ },
51
+ [Symbol.asyncIterator]() {
52
+ return this;
53
+ },
54
+ byPage: (settings?: PageSettings) => {
55
+ if (settings?.maxPageSize) {
56
+ throw new Error("maxPageSize is not supported by this operation.");
57
+ }
58
+ return this.listPagingPage(locationName, options, settings);
59
+ }
60
+ };
61
+ }
62
+
63
+ private async *listPagingPage(
64
+ locationName: string,
65
+ options?: QuotaUsagesListOptionalParams,
66
+ settings?: PageSettings
67
+ ): AsyncIterableIterator<QuotaUsage[]> {
68
+ let result: QuotaUsagesListResponse;
69
+ let continuationToken = settings?.continuationToken;
70
+ if (!continuationToken) {
71
+ result = await this._list(locationName, options);
72
+ let page = result.value || [];
73
+ continuationToken = result.nextLink;
74
+ setContinuationToken(page, continuationToken);
75
+ yield page;
76
+ }
77
+ while (continuationToken) {
78
+ result = await this._listNext(locationName, continuationToken, options);
79
+ continuationToken = result.nextLink;
80
+ let page = result.value || [];
81
+ setContinuationToken(page, continuationToken);
82
+ yield page;
83
+ }
84
+ }
85
+
86
+ private async *listPagingAll(
87
+ locationName: string,
88
+ options?: QuotaUsagesListOptionalParams
89
+ ): AsyncIterableIterator<QuotaUsage> {
90
+ for await (const page of this.listPagingPage(locationName, options)) {
91
+ yield* page;
92
+ }
93
+ }
94
+
95
+ /**
96
+ * Get quota usages at specified location in a given subscription.
97
+ * @param locationName The name of the location.
98
+ * @param options The options parameters.
99
+ */
100
+ private _list(
101
+ locationName: string,
102
+ options?: QuotaUsagesListOptionalParams
103
+ ): Promise<QuotaUsagesListResponse> {
104
+ return this.client.sendOperationRequest(
105
+ { locationName, options },
106
+ listOperationSpec
107
+ );
108
+ }
109
+
110
+ /**
111
+ * ListNext
112
+ * @param locationName The name of the location.
113
+ * @param nextLink The nextLink from the previous successful call to the List method.
114
+ * @param options The options parameters.
115
+ */
116
+ private _listNext(
117
+ locationName: string,
118
+ nextLink: string,
119
+ options?: QuotaUsagesListNextOptionalParams
120
+ ): Promise<QuotaUsagesListNextResponse> {
121
+ return this.client.sendOperationRequest(
122
+ { locationName, nextLink, options },
123
+ listNextOperationSpec
124
+ );
125
+ }
126
+ }
127
+ // Operation Specifications
128
+ const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
129
+
130
+ const listOperationSpec: coreClient.OperationSpec = {
131
+ path:
132
+ "/subscriptions/{subscriptionId}/providers/Microsoft.DBforPostgreSQL/locations/{locationName}/resourceType/flexibleServers/usages",
133
+ httpMethod: "GET",
134
+ responses: {
135
+ 200: {
136
+ bodyMapper: Mappers.QuotaUsagesListResult
137
+ },
138
+ default: {
139
+ bodyMapper: Mappers.ErrorResponse
140
+ }
141
+ },
142
+ queryParameters: [Parameters.apiVersion],
143
+ urlParameters: [
144
+ Parameters.$host,
145
+ Parameters.subscriptionId,
146
+ Parameters.locationName
147
+ ],
148
+ headerParameters: [Parameters.accept],
149
+ serializer
150
+ };
151
+ const listNextOperationSpec: coreClient.OperationSpec = {
152
+ path: "{nextLink}",
153
+ httpMethod: "GET",
154
+ responses: {
155
+ 200: {
156
+ bodyMapper: Mappers.QuotaUsagesListResult
157
+ },
158
+ default: {
159
+ bodyMapper: Mappers.ErrorResponse
160
+ }
161
+ },
162
+ urlParameters: [
163
+ Parameters.$host,
164
+ Parameters.subscriptionId,
165
+ Parameters.nextLink,
166
+ Parameters.locationName
167
+ ],
168
+ headerParameters: [Parameters.accept],
169
+ serializer
170
+ };