@azure/arm-postgresql-flexible 8.1.0-alpha.20250718.1 → 8.1.0-alpha.20250721.1
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.
- package/dist/browser/lroImpl.js +7 -3
- package/dist/browser/lroImpl.js.map +1 -1
- package/dist/browser/models/mappers.js +395 -183
- package/dist/browser/models/mappers.js.map +1 -1
- package/dist/browser/operations/administrators.js +45 -52
- package/dist/browser/operations/administrators.js.map +1 -1
- package/dist/browser/operations/backups.js +45 -52
- package/dist/browser/operations/backups.js.map +1 -1
- package/dist/browser/operations/checkNameAvailability.js +1 -0
- package/dist/browser/operations/checkNameAvailability.js.map +1 -1
- package/dist/browser/operations/checkNameAvailabilityWithLocation.js +1 -0
- package/dist/browser/operations/checkNameAvailabilityWithLocation.js.map +1 -1
- package/dist/browser/operations/configurations.js +45 -52
- package/dist/browser/operations/configurations.js.map +1 -1
- package/dist/browser/operations/databases.js +45 -52
- package/dist/browser/operations/databases.js.map +1 -1
- package/dist/browser/operations/firewallRules.js +45 -52
- package/dist/browser/operations/firewallRules.js.map +1 -1
- package/dist/browser/operations/flexibleServer.js +12 -6
- package/dist/browser/operations/flexibleServer.js.map +1 -1
- package/dist/browser/operations/getPrivateDnsZoneSuffix.js +1 -0
- package/dist/browser/operations/getPrivateDnsZoneSuffix.js.map +1 -1
- package/dist/browser/operations/locationBasedCapabilities.js +23 -40
- package/dist/browser/operations/locationBasedCapabilities.js.map +1 -1
- package/dist/browser/operations/logFiles.js +23 -40
- package/dist/browser/operations/logFiles.js.map +1 -1
- package/dist/browser/operations/ltrBackupOperations.js +23 -40
- package/dist/browser/operations/ltrBackupOperations.js.map +1 -1
- package/dist/browser/operations/migrations.js +23 -40
- package/dist/browser/operations/migrations.js.map +1 -1
- package/dist/browser/operations/operations.js +23 -40
- package/dist/browser/operations/operations.js.map +1 -1
- package/dist/browser/operations/privateEndpointConnectionOperations.js +23 -12
- package/dist/browser/operations/privateEndpointConnectionOperations.js.map +1 -1
- package/dist/browser/operations/privateEndpointConnections.js +23 -40
- package/dist/browser/operations/privateEndpointConnections.js.map +1 -1
- package/dist/browser/operations/privateLinkResources.js +23 -40
- package/dist/browser/operations/privateLinkResources.js.map +1 -1
- package/dist/browser/operations/quotaUsages.js +23 -40
- package/dist/browser/operations/quotaUsages.js.map +1 -1
- package/dist/browser/operations/replicas.js +10 -27
- package/dist/browser/operations/replicas.js.map +1 -1
- package/dist/browser/operations/serverCapabilities.js +23 -40
- package/dist/browser/operations/serverCapabilities.js.map +1 -1
- package/dist/browser/operations/serverThreatProtectionSettings.js +34 -46
- package/dist/browser/operations/serverThreatProtectionSettings.js.map +1 -1
- package/dist/browser/operations/servers.js +111 -115
- package/dist/browser/operations/servers.js.map +1 -1
- package/dist/browser/operations/tuningConfiguration.js +89 -103
- package/dist/browser/operations/tuningConfiguration.js.map +1 -1
- package/dist/browser/operations/tuningIndex.js +23 -40
- package/dist/browser/operations/tuningIndex.js.map +1 -1
- package/dist/browser/operations/tuningOptions.js +23 -40
- package/dist/browser/operations/tuningOptions.js.map +1 -1
- package/dist/browser/operations/virtualEndpoints.js +56 -58
- package/dist/browser/operations/virtualEndpoints.js.map +1 -1
- package/dist/browser/operations/virtualNetworkSubnetUsage.js +1 -0
- package/dist/browser/operations/virtualNetworkSubnetUsage.js.map +1 -1
- package/dist/browser/pagingHelper.js +2 -4
- package/dist/browser/pagingHelper.js.map +1 -1
- package/dist/browser/postgreSQLManagementFlexibleServerClient.js +39 -5
- package/dist/browser/postgreSQLManagementFlexibleServerClient.js.map +1 -1
- package/dist/commonjs/lroImpl.js +7 -3
- package/dist/commonjs/lroImpl.js.map +1 -1
- package/dist/commonjs/models/mappers.js +395 -183
- package/dist/commonjs/models/mappers.js.map +1 -1
- package/dist/commonjs/operations/administrators.js +45 -51
- package/dist/commonjs/operations/administrators.js.map +1 -1
- package/dist/commonjs/operations/backups.js +45 -51
- package/dist/commonjs/operations/backups.js.map +1 -1
- package/dist/commonjs/operations/checkNameAvailability.js +1 -0
- package/dist/commonjs/operations/checkNameAvailability.js.map +1 -1
- package/dist/commonjs/operations/checkNameAvailabilityWithLocation.js +1 -0
- package/dist/commonjs/operations/checkNameAvailabilityWithLocation.js.map +1 -1
- package/dist/commonjs/operations/configurations.js +45 -51
- package/dist/commonjs/operations/configurations.js.map +1 -1
- package/dist/commonjs/operations/databases.js +45 -51
- package/dist/commonjs/operations/databases.js.map +1 -1
- package/dist/commonjs/operations/firewallRules.js +45 -51
- package/dist/commonjs/operations/firewallRules.js.map +1 -1
- package/dist/commonjs/operations/flexibleServer.js +12 -6
- package/dist/commonjs/operations/flexibleServer.js.map +1 -1
- package/dist/commonjs/operations/getPrivateDnsZoneSuffix.js +1 -0
- package/dist/commonjs/operations/getPrivateDnsZoneSuffix.js.map +1 -1
- package/dist/commonjs/operations/locationBasedCapabilities.js +23 -39
- package/dist/commonjs/operations/locationBasedCapabilities.js.map +1 -1
- package/dist/commonjs/operations/logFiles.js +23 -39
- package/dist/commonjs/operations/logFiles.js.map +1 -1
- package/dist/commonjs/operations/ltrBackupOperations.js +23 -39
- package/dist/commonjs/operations/ltrBackupOperations.js.map +1 -1
- package/dist/commonjs/operations/migrations.js +23 -39
- package/dist/commonjs/operations/migrations.js.map +1 -1
- package/dist/commonjs/operations/operations.js +23 -39
- package/dist/commonjs/operations/operations.js.map +1 -1
- package/dist/commonjs/operations/privateEndpointConnectionOperations.js +23 -12
- package/dist/commonjs/operations/privateEndpointConnectionOperations.js.map +1 -1
- package/dist/commonjs/operations/privateEndpointConnections.js +23 -39
- package/dist/commonjs/operations/privateEndpointConnections.js.map +1 -1
- package/dist/commonjs/operations/privateLinkResources.js +23 -39
- package/dist/commonjs/operations/privateLinkResources.js.map +1 -1
- package/dist/commonjs/operations/quotaUsages.js +23 -39
- package/dist/commonjs/operations/quotaUsages.js.map +1 -1
- package/dist/commonjs/operations/replicas.js +10 -26
- package/dist/commonjs/operations/replicas.js.map +1 -1
- package/dist/commonjs/operations/serverCapabilities.js +23 -39
- package/dist/commonjs/operations/serverCapabilities.js.map +1 -1
- package/dist/commonjs/operations/serverThreatProtectionSettings.js +34 -45
- package/dist/commonjs/operations/serverThreatProtectionSettings.js.map +1 -1
- package/dist/commonjs/operations/servers.js +111 -114
- package/dist/commonjs/operations/servers.js.map +1 -1
- package/dist/commonjs/operations/tuningConfiguration.js +89 -102
- package/dist/commonjs/operations/tuningConfiguration.js.map +1 -1
- package/dist/commonjs/operations/tuningIndex.js +23 -39
- package/dist/commonjs/operations/tuningIndex.js.map +1 -1
- package/dist/commonjs/operations/tuningOptions.js +23 -39
- package/dist/commonjs/operations/tuningOptions.js.map +1 -1
- package/dist/commonjs/operations/virtualEndpoints.js +56 -57
- package/dist/commonjs/operations/virtualEndpoints.js.map +1 -1
- package/dist/commonjs/operations/virtualNetworkSubnetUsage.js +1 -0
- package/dist/commonjs/operations/virtualNetworkSubnetUsage.js.map +1 -1
- package/dist/commonjs/pagingHelper.js +2 -4
- package/dist/commonjs/pagingHelper.js.map +1 -1
- package/dist/commonjs/postgreSQLManagementFlexibleServerClient.js +39 -5
- package/dist/commonjs/postgreSQLManagementFlexibleServerClient.js.map +1 -1
- package/dist/commonjs/tsdoc-metadata.json +11 -11
- package/dist/esm/lroImpl.js +7 -3
- package/dist/esm/lroImpl.js.map +1 -1
- package/dist/esm/models/mappers.js +395 -183
- package/dist/esm/models/mappers.js.map +1 -1
- package/dist/esm/operations/administrators.js +45 -52
- package/dist/esm/operations/administrators.js.map +1 -1
- package/dist/esm/operations/backups.js +45 -52
- package/dist/esm/operations/backups.js.map +1 -1
- package/dist/esm/operations/checkNameAvailability.js +1 -0
- package/dist/esm/operations/checkNameAvailability.js.map +1 -1
- package/dist/esm/operations/checkNameAvailabilityWithLocation.js +1 -0
- package/dist/esm/operations/checkNameAvailabilityWithLocation.js.map +1 -1
- package/dist/esm/operations/configurations.js +45 -52
- package/dist/esm/operations/configurations.js.map +1 -1
- package/dist/esm/operations/databases.js +45 -52
- package/dist/esm/operations/databases.js.map +1 -1
- package/dist/esm/operations/firewallRules.js +45 -52
- package/dist/esm/operations/firewallRules.js.map +1 -1
- package/dist/esm/operations/flexibleServer.js +12 -6
- package/dist/esm/operations/flexibleServer.js.map +1 -1
- package/dist/esm/operations/getPrivateDnsZoneSuffix.js +1 -0
- package/dist/esm/operations/getPrivateDnsZoneSuffix.js.map +1 -1
- package/dist/esm/operations/locationBasedCapabilities.js +23 -40
- package/dist/esm/operations/locationBasedCapabilities.js.map +1 -1
- package/dist/esm/operations/logFiles.js +23 -40
- package/dist/esm/operations/logFiles.js.map +1 -1
- package/dist/esm/operations/ltrBackupOperations.js +23 -40
- package/dist/esm/operations/ltrBackupOperations.js.map +1 -1
- package/dist/esm/operations/migrations.js +23 -40
- package/dist/esm/operations/migrations.js.map +1 -1
- package/dist/esm/operations/operations.js +23 -40
- package/dist/esm/operations/operations.js.map +1 -1
- package/dist/esm/operations/privateEndpointConnectionOperations.js +23 -12
- package/dist/esm/operations/privateEndpointConnectionOperations.js.map +1 -1
- package/dist/esm/operations/privateEndpointConnections.js +23 -40
- package/dist/esm/operations/privateEndpointConnections.js.map +1 -1
- package/dist/esm/operations/privateLinkResources.js +23 -40
- package/dist/esm/operations/privateLinkResources.js.map +1 -1
- package/dist/esm/operations/quotaUsages.js +23 -40
- package/dist/esm/operations/quotaUsages.js.map +1 -1
- package/dist/esm/operations/replicas.js +10 -27
- package/dist/esm/operations/replicas.js.map +1 -1
- package/dist/esm/operations/serverCapabilities.js +23 -40
- package/dist/esm/operations/serverCapabilities.js.map +1 -1
- package/dist/esm/operations/serverThreatProtectionSettings.js +34 -46
- package/dist/esm/operations/serverThreatProtectionSettings.js.map +1 -1
- package/dist/esm/operations/servers.js +111 -115
- package/dist/esm/operations/servers.js.map +1 -1
- package/dist/esm/operations/tuningConfiguration.js +89 -103
- package/dist/esm/operations/tuningConfiguration.js.map +1 -1
- package/dist/esm/operations/tuningIndex.js +23 -40
- package/dist/esm/operations/tuningIndex.js.map +1 -1
- package/dist/esm/operations/tuningOptions.js +23 -40
- package/dist/esm/operations/tuningOptions.js.map +1 -1
- package/dist/esm/operations/virtualEndpoints.js +56 -58
- package/dist/esm/operations/virtualEndpoints.js.map +1 -1
- package/dist/esm/operations/virtualNetworkSubnetUsage.js +1 -0
- package/dist/esm/operations/virtualNetworkSubnetUsage.js.map +1 -1
- package/dist/esm/pagingHelper.js +2 -4
- package/dist/esm/pagingHelper.js.map +1 -1
- package/dist/esm/postgreSQLManagementFlexibleServerClient.js +39 -5
- package/dist/esm/postgreSQLManagementFlexibleServerClient.js.map +1 -1
- package/dist/react-native/lroImpl.js +7 -3
- package/dist/react-native/lroImpl.js.map +1 -1
- package/dist/react-native/models/mappers.js +395 -183
- package/dist/react-native/models/mappers.js.map +1 -1
- package/dist/react-native/operations/administrators.js +45 -52
- package/dist/react-native/operations/administrators.js.map +1 -1
- package/dist/react-native/operations/backups.js +45 -52
- package/dist/react-native/operations/backups.js.map +1 -1
- package/dist/react-native/operations/checkNameAvailability.js +1 -0
- package/dist/react-native/operations/checkNameAvailability.js.map +1 -1
- package/dist/react-native/operations/checkNameAvailabilityWithLocation.js +1 -0
- package/dist/react-native/operations/checkNameAvailabilityWithLocation.js.map +1 -1
- package/dist/react-native/operations/configurations.js +45 -52
- package/dist/react-native/operations/configurations.js.map +1 -1
- package/dist/react-native/operations/databases.js +45 -52
- package/dist/react-native/operations/databases.js.map +1 -1
- package/dist/react-native/operations/firewallRules.js +45 -52
- package/dist/react-native/operations/firewallRules.js.map +1 -1
- package/dist/react-native/operations/flexibleServer.js +12 -6
- package/dist/react-native/operations/flexibleServer.js.map +1 -1
- package/dist/react-native/operations/getPrivateDnsZoneSuffix.js +1 -0
- package/dist/react-native/operations/getPrivateDnsZoneSuffix.js.map +1 -1
- package/dist/react-native/operations/locationBasedCapabilities.js +23 -40
- package/dist/react-native/operations/locationBasedCapabilities.js.map +1 -1
- package/dist/react-native/operations/logFiles.js +23 -40
- package/dist/react-native/operations/logFiles.js.map +1 -1
- package/dist/react-native/operations/ltrBackupOperations.js +23 -40
- package/dist/react-native/operations/ltrBackupOperations.js.map +1 -1
- package/dist/react-native/operations/migrations.js +23 -40
- package/dist/react-native/operations/migrations.js.map +1 -1
- package/dist/react-native/operations/operations.js +23 -40
- package/dist/react-native/operations/operations.js.map +1 -1
- package/dist/react-native/operations/privateEndpointConnectionOperations.js +23 -12
- package/dist/react-native/operations/privateEndpointConnectionOperations.js.map +1 -1
- package/dist/react-native/operations/privateEndpointConnections.js +23 -40
- package/dist/react-native/operations/privateEndpointConnections.js.map +1 -1
- package/dist/react-native/operations/privateLinkResources.js +23 -40
- package/dist/react-native/operations/privateLinkResources.js.map +1 -1
- package/dist/react-native/operations/quotaUsages.js +23 -40
- package/dist/react-native/operations/quotaUsages.js.map +1 -1
- package/dist/react-native/operations/replicas.js +10 -27
- package/dist/react-native/operations/replicas.js.map +1 -1
- package/dist/react-native/operations/serverCapabilities.js +23 -40
- package/dist/react-native/operations/serverCapabilities.js.map +1 -1
- package/dist/react-native/operations/serverThreatProtectionSettings.js +34 -46
- package/dist/react-native/operations/serverThreatProtectionSettings.js.map +1 -1
- package/dist/react-native/operations/servers.js +111 -115
- package/dist/react-native/operations/servers.js.map +1 -1
- package/dist/react-native/operations/tuningConfiguration.js +89 -103
- package/dist/react-native/operations/tuningConfiguration.js.map +1 -1
- package/dist/react-native/operations/tuningIndex.js +23 -40
- package/dist/react-native/operations/tuningIndex.js.map +1 -1
- package/dist/react-native/operations/tuningOptions.js +23 -40
- package/dist/react-native/operations/tuningOptions.js.map +1 -1
- package/dist/react-native/operations/virtualEndpoints.js +56 -58
- package/dist/react-native/operations/virtualEndpoints.js.map +1 -1
- package/dist/react-native/operations/virtualNetworkSubnetUsage.js +1 -0
- package/dist/react-native/operations/virtualNetworkSubnetUsage.js.map +1 -1
- package/dist/react-native/pagingHelper.js +2 -4
- package/dist/react-native/pagingHelper.js.map +1 -1
- package/dist/react-native/postgreSQLManagementFlexibleServerClient.js +39 -5
- package/dist/react-native/postgreSQLManagementFlexibleServerClient.js.map +1 -1
- package/package.json +2 -2
- package/review/arm-postgresql-flexible-node.api.md +2723 -2723
|
@@ -18,6 +18,7 @@ const lroImpl_js_1 = require("../lroImpl.js");
|
|
|
18
18
|
/// <reference lib="esnext.asynciterable" />
|
|
19
19
|
/** Class containing FirewallRules operations. */
|
|
20
20
|
class FirewallRulesImpl {
|
|
21
|
+
client;
|
|
21
22
|
/**
|
|
22
23
|
* Initialize a new instance of the class FirewallRules class.
|
|
23
24
|
* @param client Reference to the service client
|
|
@@ -41,52 +42,35 @@ class FirewallRulesImpl {
|
|
|
41
42
|
return this;
|
|
42
43
|
},
|
|
43
44
|
byPage: (settings) => {
|
|
44
|
-
if (settings
|
|
45
|
+
if (settings?.maxPageSize) {
|
|
45
46
|
throw new Error("maxPageSize is not supported by this operation.");
|
|
46
47
|
}
|
|
47
48
|
return this.listByServerPagingPage(resourceGroupName, serverName, options, settings);
|
|
48
49
|
},
|
|
49
50
|
};
|
|
50
51
|
}
|
|
51
|
-
listByServerPagingPage(resourceGroupName, serverName, options, settings) {
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
}
|
|
69
|
-
});
|
|
52
|
+
async *listByServerPagingPage(resourceGroupName, serverName, options, settings) {
|
|
53
|
+
let result;
|
|
54
|
+
let continuationToken = settings?.continuationToken;
|
|
55
|
+
if (!continuationToken) {
|
|
56
|
+
result = await this._listByServer(resourceGroupName, serverName, options);
|
|
57
|
+
const page = result.value || [];
|
|
58
|
+
continuationToken = result.nextLink;
|
|
59
|
+
(0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
|
|
60
|
+
yield page;
|
|
61
|
+
}
|
|
62
|
+
while (continuationToken) {
|
|
63
|
+
result = await this._listByServerNext(resourceGroupName, serverName, continuationToken, options);
|
|
64
|
+
continuationToken = result.nextLink;
|
|
65
|
+
const page = result.value || [];
|
|
66
|
+
(0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
|
|
67
|
+
yield page;
|
|
68
|
+
}
|
|
70
69
|
}
|
|
71
|
-
listByServerPagingAll(resourceGroupName, serverName, options) {
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
for (var _d = true, _e = tslib_1.__asyncValues(this.listByServerPagingPage(resourceGroupName, serverName, options)), _f; _f = yield tslib_1.__await(_e.next()), _a = _f.done, !_a; _d = true) {
|
|
76
|
-
_c = _f.value;
|
|
77
|
-
_d = false;
|
|
78
|
-
const page = _c;
|
|
79
|
-
yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues(page)));
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
83
|
-
finally {
|
|
84
|
-
try {
|
|
85
|
-
if (!_d && !_a && (_b = _e.return)) yield tslib_1.__await(_b.call(_e));
|
|
86
|
-
}
|
|
87
|
-
finally { if (e_1) throw e_1.error; }
|
|
88
|
-
}
|
|
89
|
-
});
|
|
70
|
+
async *listByServerPagingAll(resourceGroupName, serverName, options) {
|
|
71
|
+
for await (const page of this.listByServerPagingPage(resourceGroupName, serverName, options)) {
|
|
72
|
+
yield* page;
|
|
73
|
+
}
|
|
90
74
|
}
|
|
91
75
|
/**
|
|
92
76
|
* Creates a new firewall rule or updates an existing firewall rule.
|
|
@@ -101,14 +85,19 @@ class FirewallRulesImpl {
|
|
|
101
85
|
return this.client.sendOperationRequest(args, spec);
|
|
102
86
|
};
|
|
103
87
|
const sendOperationFn = async (args, spec) => {
|
|
104
|
-
var _a;
|
|
105
88
|
let currentRawResponse = undefined;
|
|
106
|
-
const providedCallback =
|
|
89
|
+
const providedCallback = args.options?.onResponse;
|
|
107
90
|
const callback = (rawResponse, flatResponse) => {
|
|
108
91
|
currentRawResponse = rawResponse;
|
|
109
|
-
providedCallback
|
|
92
|
+
providedCallback?.(rawResponse, flatResponse);
|
|
93
|
+
};
|
|
94
|
+
const updatedArgs = {
|
|
95
|
+
...args,
|
|
96
|
+
options: {
|
|
97
|
+
...args.options,
|
|
98
|
+
onResponse: callback,
|
|
99
|
+
},
|
|
110
100
|
};
|
|
111
|
-
const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
|
|
112
101
|
const flatResponse = await directSendOperation(updatedArgs, spec);
|
|
113
102
|
return {
|
|
114
103
|
flatResponse,
|
|
@@ -131,8 +120,8 @@ class FirewallRulesImpl {
|
|
|
131
120
|
spec: createOrUpdateOperationSpec,
|
|
132
121
|
});
|
|
133
122
|
const poller = await (0, core_lro_1.createHttpPoller)(lro, {
|
|
134
|
-
restoreFrom: options
|
|
135
|
-
intervalInMs: options
|
|
123
|
+
restoreFrom: options?.resumeFrom,
|
|
124
|
+
intervalInMs: options?.updateIntervalInMs,
|
|
136
125
|
resourceLocationConfig: "azure-async-operation",
|
|
137
126
|
});
|
|
138
127
|
await poller.poll();
|
|
@@ -162,14 +151,19 @@ class FirewallRulesImpl {
|
|
|
162
151
|
return this.client.sendOperationRequest(args, spec);
|
|
163
152
|
};
|
|
164
153
|
const sendOperationFn = async (args, spec) => {
|
|
165
|
-
var _a;
|
|
166
154
|
let currentRawResponse = undefined;
|
|
167
|
-
const providedCallback =
|
|
155
|
+
const providedCallback = args.options?.onResponse;
|
|
168
156
|
const callback = (rawResponse, flatResponse) => {
|
|
169
157
|
currentRawResponse = rawResponse;
|
|
170
|
-
providedCallback
|
|
158
|
+
providedCallback?.(rawResponse, flatResponse);
|
|
159
|
+
};
|
|
160
|
+
const updatedArgs = {
|
|
161
|
+
...args,
|
|
162
|
+
options: {
|
|
163
|
+
...args.options,
|
|
164
|
+
onResponse: callback,
|
|
165
|
+
},
|
|
171
166
|
};
|
|
172
|
-
const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
|
|
173
167
|
const flatResponse = await directSendOperation(updatedArgs, spec);
|
|
174
168
|
return {
|
|
175
169
|
flatResponse,
|
|
@@ -186,8 +180,8 @@ class FirewallRulesImpl {
|
|
|
186
180
|
spec: deleteOperationSpec,
|
|
187
181
|
});
|
|
188
182
|
const poller = await (0, core_lro_1.createHttpPoller)(lro, {
|
|
189
|
-
restoreFrom: options
|
|
190
|
-
intervalInMs: options
|
|
183
|
+
restoreFrom: options?.resumeFrom,
|
|
184
|
+
intervalInMs: options?.updateIntervalInMs,
|
|
191
185
|
resourceLocationConfig: "location",
|
|
192
186
|
});
|
|
193
187
|
await poller.poll();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"firewallRules.js","sourceRoot":"","sources":["../../../src/operations/firewallRules.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAGH,wDAA0D;AAE1D,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAGtD,8CAAmD;AACnD,8CAA8C;AAc9C,4CAA4C;AAC5C,iDAAiD;AACjD,MAAa,iBAAiB;IAG5B;;;OAGG;IACH,YAAY,MAAgD;QAC1D,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;OAKG;IACI,YAAY,CACjB,iBAAyB,EACzB,UAAkB,EAClB,OAAiD;QAEjD,MAAM,IAAI,GAAG,IAAI,CAAC,qBAAqB,CAAC,iBAAiB,EAAE,UAAU,EAAE,OAAO,CAAC,CAAC;QAChF,OAAO;YACL,IAAI;gBACF,OAAO,IAAI,CAAC,IAAI,EAAE,CAAC;YACrB,CAAC;YACD,CAAC,MAAM,CAAC,aAAa,CAAC;gBACpB,OAAO,IAAI,CAAC;YACd,CAAC;YACD,MAAM,EAAE,CAAC,QAAuB,EAAE,EAAE;gBAClC,IAAI,QAAQ,aAAR,QAAQ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Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport type { PagedAsyncIterableIterator, PageSettings } from \"@azure/core-paging\";\nimport { setContinuationToken } from \"../pagingHelper.js\";\nimport type { FirewallRules } from \"../operationsInterfaces/index.js\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers.js\";\nimport * as Parameters from \"../models/parameters.js\";\nimport type { PostgreSQLManagementFlexibleServerClient } from \"../postgreSQLManagementFlexibleServerClient.js\";\nimport type { SimplePollerLike, OperationState } from \"@azure/core-lro\";\nimport { createHttpPoller } from \"@azure/core-lro\";\nimport { createLroSpec } from \"../lroImpl.js\";\nimport type {\n FirewallRule,\n FirewallRulesListByServerNextOptionalParams,\n FirewallRulesListByServerOptionalParams,\n FirewallRulesListByServerResponse,\n FirewallRulesCreateOrUpdateOptionalParams,\n FirewallRulesCreateOrUpdateResponse,\n FirewallRulesDeleteOptionalParams,\n FirewallRulesGetOptionalParams,\n FirewallRulesGetResponse,\n FirewallRulesListByServerNextResponse,\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing FirewallRules operations. */\nexport class FirewallRulesImpl implements FirewallRules {\n private readonly client: PostgreSQLManagementFlexibleServerClient;\n\n /**\n * Initialize a new instance of the class FirewallRules class.\n * @param client Reference to the service client\n */\n constructor(client: PostgreSQLManagementFlexibleServerClient) {\n this.client = client;\n }\n\n /**\n * List all the firewall rules in a given PostgreSQL server.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param serverName The name of the server.\n * @param options The options parameters.\n */\n public listByServer(\n resourceGroupName: string,\n serverName: string,\n options?: FirewallRulesListByServerOptionalParams,\n ): PagedAsyncIterableIterator<FirewallRule> {\n const iter = this.listByServerPagingAll(resourceGroupName, serverName, options);\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: (settings?: PageSettings) => {\n if (settings?.maxPageSize) {\n throw new Error(\"maxPageSize is not supported by this operation.\");\n }\n return this.listByServerPagingPage(resourceGroupName, serverName, options, settings);\n },\n };\n }\n\n private async *listByServerPagingPage(\n resourceGroupName: string,\n serverName: string,\n options?: FirewallRulesListByServerOptionalParams,\n settings?: PageSettings,\n ): AsyncIterableIterator<FirewallRule[]> {\n let result: FirewallRulesListByServerResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._listByServer(resourceGroupName, serverName, options);\n const page = result.value || [];\n continuationToken = result.nextLink;\n setContinuationToken(page, continuationToken);\n yield page;\n }\n while (continuationToken) {\n result = await this._listByServerNext(\n resourceGroupName,\n serverName,\n continuationToken,\n options,\n );\n continuationToken = result.nextLink;\n const page = result.value || [];\n setContinuationToken(page, continuationToken);\n yield page;\n }\n }\n\n private async *listByServerPagingAll(\n resourceGroupName: string,\n serverName: string,\n options?: FirewallRulesListByServerOptionalParams,\n ): AsyncIterableIterator<FirewallRule> {\n for await (const page of this.listByServerPagingPage(resourceGroupName, serverName, options)) {\n yield* page;\n }\n }\n\n /**\n * Creates a new firewall rule or updates an existing firewall rule.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param serverName The name of the server.\n * @param firewallRuleName The name of the server firewall rule.\n * @param parameters The required parameters for creating or updating a firewall rule.\n * @param options The options parameters.\n */\n async beginCreateOrUpdate(\n resourceGroupName: string,\n serverName: string,\n firewallRuleName: string,\n parameters: FirewallRule,\n options?: FirewallRulesCreateOrUpdateOptionalParams,\n ): Promise<\n SimplePollerLike<\n OperationState<FirewallRulesCreateOrUpdateResponse>,\n FirewallRulesCreateOrUpdateResponse\n >\n > {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ): Promise<FirewallRulesCreateOrUpdateResponse> => {\n return this.client.sendOperationRequest(args, spec);\n };\n const sendOperationFn = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ) => {\n let currentRawResponse: coreClient.FullOperationResponse | undefined = undefined;\n const providedCallback = args.options?.onResponse;\n const callback: coreClient.RawResponseCallback = (\n rawResponse: coreClient.FullOperationResponse,\n flatResponse: unknown,\n ) => {\n currentRawResponse = rawResponse;\n providedCallback?.(rawResponse, flatResponse);\n };\n const updatedArgs = {\n ...args,\n options: {\n ...args.options,\n onResponse: callback,\n },\n };\n const flatResponse = await directSendOperation(updatedArgs, spec);\n return {\n flatResponse,\n rawResponse: {\n statusCode: currentRawResponse!.status,\n body: currentRawResponse!.parsedBody,\n headers: currentRawResponse!.headers.toJSON(),\n },\n };\n };\n\n const lro = createLroSpec({\n sendOperationFn,\n args: {\n resourceGroupName,\n serverName,\n firewallRuleName,\n parameters,\n options,\n },\n spec: createOrUpdateOperationSpec,\n });\n const poller = await createHttpPoller<\n FirewallRulesCreateOrUpdateResponse,\n OperationState<FirewallRulesCreateOrUpdateResponse>\n >(lro, {\n restoreFrom: options?.resumeFrom,\n intervalInMs: options?.updateIntervalInMs,\n resourceLocationConfig: \"azure-async-operation\",\n });\n await poller.poll();\n return poller;\n }\n\n /**\n * Creates a new firewall rule or updates an existing firewall rule.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param serverName The name of the server.\n * @param firewallRuleName The name of the server firewall rule.\n * @param parameters The required parameters for creating or updating a firewall rule.\n * @param options The options parameters.\n */\n async beginCreateOrUpdateAndWait(\n resourceGroupName: string,\n serverName: string,\n firewallRuleName: string,\n parameters: FirewallRule,\n options?: FirewallRulesCreateOrUpdateOptionalParams,\n ): Promise<FirewallRulesCreateOrUpdateResponse> {\n const poller = await this.beginCreateOrUpdate(\n resourceGroupName,\n serverName,\n firewallRuleName,\n parameters,\n options,\n );\n return poller.pollUntilDone();\n }\n\n /**\n * Deletes a PostgreSQL server firewall rule.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param serverName The name of the server.\n * @param firewallRuleName The name of the server firewall rule.\n * @param options The options parameters.\n */\n async beginDelete(\n resourceGroupName: string,\n serverName: string,\n firewallRuleName: string,\n options?: FirewallRulesDeleteOptionalParams,\n ): Promise<SimplePollerLike<OperationState<void>, void>> {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ): Promise<void> => {\n return this.client.sendOperationRequest(args, spec);\n };\n const sendOperationFn = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ) => {\n let currentRawResponse: coreClient.FullOperationResponse | undefined = undefined;\n const providedCallback = args.options?.onResponse;\n const callback: coreClient.RawResponseCallback = (\n rawResponse: coreClient.FullOperationResponse,\n flatResponse: unknown,\n ) => {\n currentRawResponse = rawResponse;\n providedCallback?.(rawResponse, flatResponse);\n };\n const updatedArgs = {\n ...args,\n options: {\n ...args.options,\n onResponse: callback,\n },\n };\n const flatResponse = await directSendOperation(updatedArgs, spec);\n return {\n flatResponse,\n rawResponse: {\n statusCode: currentRawResponse!.status,\n body: currentRawResponse!.parsedBody,\n headers: currentRawResponse!.headers.toJSON(),\n },\n };\n };\n\n const lro = createLroSpec({\n sendOperationFn,\n args: { resourceGroupName, serverName, firewallRuleName, options },\n spec: deleteOperationSpec,\n });\n const poller = await createHttpPoller<void, OperationState<void>>(lro, {\n restoreFrom: options?.resumeFrom,\n intervalInMs: options?.updateIntervalInMs,\n resourceLocationConfig: \"location\",\n });\n await poller.poll();\n return poller;\n }\n\n /**\n * Deletes a PostgreSQL server firewall rule.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param serverName The name of the server.\n * @param firewallRuleName The name of the server firewall rule.\n * @param options The options parameters.\n */\n async beginDeleteAndWait(\n resourceGroupName: string,\n serverName: string,\n firewallRuleName: string,\n options?: FirewallRulesDeleteOptionalParams,\n ): Promise<void> {\n const poller = await this.beginDelete(resourceGroupName, serverName, firewallRuleName, options);\n return poller.pollUntilDone();\n }\n\n /**\n * List all the firewall rules in a given server.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param serverName The name of the server.\n * @param firewallRuleName The name of the server firewall rule.\n * @param options The options parameters.\n */\n get(\n resourceGroupName: string,\n serverName: string,\n firewallRuleName: string,\n options?: FirewallRulesGetOptionalParams,\n ): Promise<FirewallRulesGetResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, serverName, firewallRuleName, options },\n getOperationSpec,\n );\n }\n\n /**\n * List all the firewall rules in a given PostgreSQL server.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param serverName The name of the server.\n * @param options The options parameters.\n */\n private _listByServer(\n resourceGroupName: string,\n serverName: string,\n options?: FirewallRulesListByServerOptionalParams,\n ): Promise<FirewallRulesListByServerResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, serverName, options },\n listByServerOperationSpec,\n );\n }\n\n /**\n * ListByServerNext\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param serverName The name of the server.\n * @param nextLink The nextLink from the previous successful call to the ListByServer method.\n * @param options The options parameters.\n */\n private _listByServerNext(\n resourceGroupName: string,\n serverName: string,\n nextLink: string,\n options?: FirewallRulesListByServerNextOptionalParams,\n ): Promise<FirewallRulesListByServerNextResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, serverName, nextLink, options },\n listByServerNextOperationSpec,\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst createOrUpdateOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/firewallRules/{firewallRuleName}\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n bodyMapper: Mappers.FirewallRule,\n },\n 201: {\n bodyMapper: Mappers.FirewallRule,\n },\n 202: {\n bodyMapper: Mappers.FirewallRule,\n },\n 204: {\n bodyMapper: Mappers.FirewallRule,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n requestBody: Parameters.parameters4,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.serverName,\n Parameters.firewallRuleName,\n ],\n headerParameters: [Parameters.contentType, Parameters.accept],\n mediaType: \"json\",\n serializer,\n};\nconst deleteOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/firewallRules/{firewallRuleName}\",\n httpMethod: \"DELETE\",\n responses: {\n 200: {},\n 201: {},\n 202: {},\n 204: {},\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.serverName,\n Parameters.firewallRuleName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst getOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/firewallRules/{firewallRuleName}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.FirewallRule,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.serverName,\n Parameters.firewallRuleName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst listByServerOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/firewallRules\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.FirewallRuleListResult,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.serverName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst listByServerNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.FirewallRuleListResult,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.serverName,\n Parameters.nextLink,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\n"]}
|
|
1
|
+
{"version":3,"file":"firewallRules.js","sourceRoot":"","sources":["../../../src/operations/firewallRules.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAGH,wDAA0D;AAE1D,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAGtD,8CAAmD;AACnD,8CAA8C;AAc9C,4CAA4C;AAC5C,iDAAiD;AACjD,MAAa,iBAAiB;IACX,MAAM,CAA2C;IAElE;;;OAGG;IACH,YAAY,MAAgD;QAC1D,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;OAKG;IACI,YAAY,CACjB,iBAAyB,EACzB,UAAkB,EAClB,OAAiD;QAEjD,MAAM,IAAI,GAAG,IAAI,CAAC,qBAAqB,CAAC,iBAAiB,EAAE,UAAU,EAAE,OAAO,CAAC,CAAC;QAChF,OAAO;YACL,IAAI;gBACF,OAAO,IAAI,CAAC,IAAI,EAAE,CAAC;YACrB,CAAC;YACD,CAAC,MAAM,CAAC,aAAa,CAAC;gBACpB,OAAO,IAAI,CAAC;YACd,CAAC;YACD,MAAM,EAAE,CAAC,QAAuB,EAAE,EAAE;gBAClC,IAAI,QAAQ,EAAE,WAAW,EAAE,CAAC;oBAC1B,MAAM,IAAI,KAAK,CAAC,iDAAiD,CAAC,CAAC;gBACrE,CAAC;gBACD,OAAO,IAAI,CAAC,sBAAsB,CAAC,iBAAiB,EAAE,UAAU,EAAE,OAAO,EAAE,QAAQ,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QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,iBAAiB;QAC5B,UAAU,CAAC,UAAU;KACtB;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC;AACF,MAAM,6BAA6B,GAA6B;IAC9D,IAAI,EAAE,YAAY;IAClB,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,sBAAsB;SAC3C;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,iBAAiB;QAC5B,UAAU,CAAC,UAAU;QACrB,UAAU,CAAC,QAAQ;KACpB;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport type { PagedAsyncIterableIterator, PageSettings } from \"@azure/core-paging\";\nimport { setContinuationToken } from \"../pagingHelper.js\";\nimport type { FirewallRules } from \"../operationsInterfaces/index.js\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers.js\";\nimport * as Parameters from \"../models/parameters.js\";\nimport type { PostgreSQLManagementFlexibleServerClient } from \"../postgreSQLManagementFlexibleServerClient.js\";\nimport type { SimplePollerLike, OperationState } from \"@azure/core-lro\";\nimport { createHttpPoller } from \"@azure/core-lro\";\nimport { createLroSpec } from \"../lroImpl.js\";\nimport type {\n FirewallRule,\n FirewallRulesListByServerNextOptionalParams,\n FirewallRulesListByServerOptionalParams,\n FirewallRulesListByServerResponse,\n FirewallRulesCreateOrUpdateOptionalParams,\n FirewallRulesCreateOrUpdateResponse,\n FirewallRulesDeleteOptionalParams,\n FirewallRulesGetOptionalParams,\n FirewallRulesGetResponse,\n FirewallRulesListByServerNextResponse,\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing FirewallRules operations. */\nexport class FirewallRulesImpl implements FirewallRules {\n private readonly client: PostgreSQLManagementFlexibleServerClient;\n\n /**\n * Initialize a new instance of the class FirewallRules class.\n * @param client Reference to the service client\n */\n constructor(client: PostgreSQLManagementFlexibleServerClient) {\n this.client = client;\n }\n\n /**\n * List all the firewall rules in a given PostgreSQL server.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param serverName The name of the server.\n * @param options The options parameters.\n */\n public listByServer(\n resourceGroupName: string,\n serverName: string,\n options?: FirewallRulesListByServerOptionalParams,\n ): PagedAsyncIterableIterator<FirewallRule> {\n const iter = this.listByServerPagingAll(resourceGroupName, serverName, options);\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: (settings?: PageSettings) => {\n if (settings?.maxPageSize) {\n throw new Error(\"maxPageSize is not supported by this operation.\");\n }\n return this.listByServerPagingPage(resourceGroupName, serverName, options, settings);\n },\n };\n }\n\n private async *listByServerPagingPage(\n resourceGroupName: string,\n serverName: string,\n options?: FirewallRulesListByServerOptionalParams,\n settings?: PageSettings,\n ): AsyncIterableIterator<FirewallRule[]> {\n let result: FirewallRulesListByServerResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._listByServer(resourceGroupName, serverName, options);\n const page = result.value || [];\n continuationToken = result.nextLink;\n setContinuationToken(page, continuationToken);\n yield page;\n }\n while (continuationToken) {\n result = await this._listByServerNext(\n resourceGroupName,\n serverName,\n continuationToken,\n options,\n );\n continuationToken = result.nextLink;\n const page = result.value || [];\n setContinuationToken(page, continuationToken);\n yield page;\n }\n }\n\n private async *listByServerPagingAll(\n resourceGroupName: string,\n serverName: string,\n options?: FirewallRulesListByServerOptionalParams,\n ): AsyncIterableIterator<FirewallRule> {\n for await (const page of this.listByServerPagingPage(resourceGroupName, serverName, options)) {\n yield* page;\n }\n }\n\n /**\n * Creates a new firewall rule or updates an existing firewall rule.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param serverName The name of the server.\n * @param firewallRuleName The name of the server firewall rule.\n * @param parameters The required parameters for creating or updating a firewall rule.\n * @param options The options parameters.\n */\n async beginCreateOrUpdate(\n resourceGroupName: string,\n serverName: string,\n firewallRuleName: string,\n parameters: FirewallRule,\n options?: FirewallRulesCreateOrUpdateOptionalParams,\n ): Promise<\n SimplePollerLike<\n OperationState<FirewallRulesCreateOrUpdateResponse>,\n FirewallRulesCreateOrUpdateResponse\n >\n > {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ): Promise<FirewallRulesCreateOrUpdateResponse> => {\n return this.client.sendOperationRequest(args, spec);\n };\n const sendOperationFn = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ) => {\n let currentRawResponse: coreClient.FullOperationResponse | undefined = undefined;\n const providedCallback = args.options?.onResponse;\n const callback: coreClient.RawResponseCallback = (\n rawResponse: coreClient.FullOperationResponse,\n flatResponse: unknown,\n ) => {\n currentRawResponse = rawResponse;\n providedCallback?.(rawResponse, flatResponse);\n };\n const updatedArgs = {\n ...args,\n options: {\n ...args.options,\n onResponse: callback,\n },\n };\n const flatResponse = await directSendOperation(updatedArgs, spec);\n return {\n flatResponse,\n rawResponse: {\n statusCode: currentRawResponse!.status,\n body: currentRawResponse!.parsedBody,\n headers: currentRawResponse!.headers.toJSON(),\n },\n };\n };\n\n const lro = createLroSpec({\n sendOperationFn,\n args: {\n resourceGroupName,\n serverName,\n firewallRuleName,\n parameters,\n options,\n },\n spec: createOrUpdateOperationSpec,\n });\n const poller = await createHttpPoller<\n FirewallRulesCreateOrUpdateResponse,\n OperationState<FirewallRulesCreateOrUpdateResponse>\n >(lro, {\n restoreFrom: options?.resumeFrom,\n intervalInMs: options?.updateIntervalInMs,\n resourceLocationConfig: \"azure-async-operation\",\n });\n await poller.poll();\n return poller;\n }\n\n /**\n * Creates a new firewall rule or updates an existing firewall rule.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param serverName The name of the server.\n * @param firewallRuleName The name of the server firewall rule.\n * @param parameters The required parameters for creating or updating a firewall rule.\n * @param options The options parameters.\n */\n async beginCreateOrUpdateAndWait(\n resourceGroupName: string,\n serverName: string,\n firewallRuleName: string,\n parameters: FirewallRule,\n options?: FirewallRulesCreateOrUpdateOptionalParams,\n ): Promise<FirewallRulesCreateOrUpdateResponse> {\n const poller = await this.beginCreateOrUpdate(\n resourceGroupName,\n serverName,\n firewallRuleName,\n parameters,\n options,\n );\n return poller.pollUntilDone();\n }\n\n /**\n * Deletes a PostgreSQL server firewall rule.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param serverName The name of the server.\n * @param firewallRuleName The name of the server firewall rule.\n * @param options The options parameters.\n */\n async beginDelete(\n resourceGroupName: string,\n serverName: string,\n firewallRuleName: string,\n options?: FirewallRulesDeleteOptionalParams,\n ): Promise<SimplePollerLike<OperationState<void>, void>> {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ): Promise<void> => {\n return this.client.sendOperationRequest(args, spec);\n };\n const sendOperationFn = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ) => {\n let currentRawResponse: coreClient.FullOperationResponse | undefined = undefined;\n const providedCallback = args.options?.onResponse;\n const callback: coreClient.RawResponseCallback = (\n rawResponse: coreClient.FullOperationResponse,\n flatResponse: unknown,\n ) => {\n currentRawResponse = rawResponse;\n providedCallback?.(rawResponse, flatResponse);\n };\n const updatedArgs = {\n ...args,\n options: {\n ...args.options,\n onResponse: callback,\n },\n };\n const flatResponse = await directSendOperation(updatedArgs, spec);\n return {\n flatResponse,\n rawResponse: {\n statusCode: currentRawResponse!.status,\n body: currentRawResponse!.parsedBody,\n headers: currentRawResponse!.headers.toJSON(),\n },\n };\n };\n\n const lro = createLroSpec({\n sendOperationFn,\n args: { resourceGroupName, serverName, firewallRuleName, options },\n spec: deleteOperationSpec,\n });\n const poller = await createHttpPoller<void, OperationState<void>>(lro, {\n restoreFrom: options?.resumeFrom,\n intervalInMs: options?.updateIntervalInMs,\n resourceLocationConfig: \"location\",\n });\n await poller.poll();\n return poller;\n }\n\n /**\n * Deletes a PostgreSQL server firewall rule.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param serverName The name of the server.\n * @param firewallRuleName The name of the server firewall rule.\n * @param options The options parameters.\n */\n async beginDeleteAndWait(\n resourceGroupName: string,\n serverName: string,\n firewallRuleName: string,\n options?: FirewallRulesDeleteOptionalParams,\n ): Promise<void> {\n const poller = await this.beginDelete(resourceGroupName, serverName, firewallRuleName, options);\n return poller.pollUntilDone();\n }\n\n /**\n * List all the firewall rules in a given server.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param serverName The name of the server.\n * @param firewallRuleName The name of the server firewall rule.\n * @param options The options parameters.\n */\n get(\n resourceGroupName: string,\n serverName: string,\n firewallRuleName: string,\n options?: FirewallRulesGetOptionalParams,\n ): Promise<FirewallRulesGetResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, serverName, firewallRuleName, options },\n getOperationSpec,\n );\n }\n\n /**\n * List all the firewall rules in a given PostgreSQL server.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param serverName The name of the server.\n * @param options The options parameters.\n */\n private _listByServer(\n resourceGroupName: string,\n serverName: string,\n options?: FirewallRulesListByServerOptionalParams,\n ): Promise<FirewallRulesListByServerResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, serverName, options },\n listByServerOperationSpec,\n );\n }\n\n /**\n * ListByServerNext\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param serverName The name of the server.\n * @param nextLink The nextLink from the previous successful call to the ListByServer method.\n * @param options The options parameters.\n */\n private _listByServerNext(\n resourceGroupName: string,\n serverName: string,\n nextLink: string,\n options?: FirewallRulesListByServerNextOptionalParams,\n ): Promise<FirewallRulesListByServerNextResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, serverName, nextLink, options },\n listByServerNextOperationSpec,\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst createOrUpdateOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/firewallRules/{firewallRuleName}\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n bodyMapper: Mappers.FirewallRule,\n },\n 201: {\n bodyMapper: Mappers.FirewallRule,\n },\n 202: {\n bodyMapper: Mappers.FirewallRule,\n },\n 204: {\n bodyMapper: Mappers.FirewallRule,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n requestBody: Parameters.parameters4,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.serverName,\n Parameters.firewallRuleName,\n ],\n headerParameters: [Parameters.contentType, Parameters.accept],\n mediaType: \"json\",\n serializer,\n};\nconst deleteOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/firewallRules/{firewallRuleName}\",\n httpMethod: \"DELETE\",\n responses: {\n 200: {},\n 201: {},\n 202: {},\n 204: {},\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.serverName,\n Parameters.firewallRuleName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst getOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/firewallRules/{firewallRuleName}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.FirewallRule,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.serverName,\n Parameters.firewallRuleName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst listByServerOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/firewallRules\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.FirewallRuleListResult,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.serverName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst listByServerNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.FirewallRuleListResult,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.serverName,\n Parameters.nextLink,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\n"]}
|
|
@@ -16,6 +16,7 @@ const core_lro_1 = require("@azure/core-lro");
|
|
|
16
16
|
const lroImpl_js_1 = require("../lroImpl.js");
|
|
17
17
|
/** Class containing FlexibleServer operations. */
|
|
18
18
|
class FlexibleServerImpl {
|
|
19
|
+
client;
|
|
19
20
|
/**
|
|
20
21
|
* Initialize a new instance of the class FlexibleServer class.
|
|
21
22
|
* @param client Reference to the service client
|
|
@@ -46,14 +47,19 @@ class FlexibleServerImpl {
|
|
|
46
47
|
return this.client.sendOperationRequest(args, spec);
|
|
47
48
|
};
|
|
48
49
|
const sendOperationFn = async (args, spec) => {
|
|
49
|
-
var _a;
|
|
50
50
|
let currentRawResponse = undefined;
|
|
51
|
-
const providedCallback =
|
|
51
|
+
const providedCallback = args.options?.onResponse;
|
|
52
52
|
const callback = (rawResponse, flatResponse) => {
|
|
53
53
|
currentRawResponse = rawResponse;
|
|
54
|
-
providedCallback
|
|
54
|
+
providedCallback?.(rawResponse, flatResponse);
|
|
55
|
+
};
|
|
56
|
+
const updatedArgs = {
|
|
57
|
+
...args,
|
|
58
|
+
options: {
|
|
59
|
+
...args.options,
|
|
60
|
+
onResponse: callback,
|
|
61
|
+
},
|
|
55
62
|
};
|
|
56
|
-
const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
|
|
57
63
|
const flatResponse = await directSendOperation(updatedArgs, spec);
|
|
58
64
|
return {
|
|
59
65
|
flatResponse,
|
|
@@ -70,8 +76,8 @@ class FlexibleServerImpl {
|
|
|
70
76
|
spec: startLtrBackupOperationSpec,
|
|
71
77
|
});
|
|
72
78
|
const poller = await (0, core_lro_1.createHttpPoller)(lro, {
|
|
73
|
-
restoreFrom: options
|
|
74
|
-
intervalInMs: options
|
|
79
|
+
restoreFrom: options?.resumeFrom,
|
|
80
|
+
intervalInMs: options?.updateIntervalInMs,
|
|
75
81
|
resourceLocationConfig: "location",
|
|
76
82
|
});
|
|
77
83
|
await poller.poll();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flexibleServer.js","sourceRoot":"","sources":["../../../src/operations/flexibleServer.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAGH,uEAAiD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,CAAC,cAAc;QACzB,UAAU,CAAC,iBAAiB;QAC5B,UAAU,CAAC,UAAU;KACtB;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,WAAW,EAAE,UAAU,CAAC,MAAM,CAAC;IAC7D,SAAS,EAAE,MAAM;IACjB,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport type { FlexibleServer } from \"../operationsInterfaces/index.js\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers.js\";\nimport * as Parameters from \"../models/parameters.js\";\nimport type { PostgreSQLManagementFlexibleServerClient } from \"../postgreSQLManagementFlexibleServerClient.js\";\nimport type { SimplePollerLike, OperationState } from \"@azure/core-lro\";\nimport { createHttpPoller } from \"@azure/core-lro\";\nimport { createLroSpec } from \"../lroImpl.js\";\nimport type {\n LtrPreBackupRequest,\n FlexibleServerTriggerLtrPreBackupOptionalParams,\n FlexibleServerTriggerLtrPreBackupResponse,\n LtrBackupRequest,\n FlexibleServerStartLtrBackupOptionalParams,\n FlexibleServerStartLtrBackupResponse,\n} from \"../models/index.js\";\n\n/** Class containing FlexibleServer operations. */\nexport class FlexibleServerImpl implements FlexibleServer {\n private readonly client: PostgreSQLManagementFlexibleServerClient;\n\n /**\n * Initialize a new instance of the class FlexibleServer class.\n * @param client Reference to the service client\n */\n constructor(client: PostgreSQLManagementFlexibleServerClient) {\n this.client = client;\n }\n\n /**\n * PreBackup operation performs all the checks that are needed for the subsequent long term retention\n * backup operation to succeed.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param serverName The name of the server.\n * @param parameters Request body for operation\n * @param options The options parameters.\n */\n triggerLtrPreBackup(\n resourceGroupName: string,\n serverName: string,\n parameters: LtrPreBackupRequest,\n options?: FlexibleServerTriggerLtrPreBackupOptionalParams,\n ): Promise<FlexibleServerTriggerLtrPreBackupResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, serverName, parameters, options },\n triggerLtrPreBackupOperationSpec,\n );\n }\n\n /**\n * Start the Long Term Retention Backup operation\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param serverName The name of the server.\n * @param parameters Request body for operation\n * @param options The options parameters.\n */\n async beginStartLtrBackup(\n resourceGroupName: string,\n serverName: string,\n parameters: LtrBackupRequest,\n options?: FlexibleServerStartLtrBackupOptionalParams,\n ): Promise<\n SimplePollerLike<\n OperationState<FlexibleServerStartLtrBackupResponse>,\n FlexibleServerStartLtrBackupResponse\n >\n > {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ): Promise<FlexibleServerStartLtrBackupResponse> => {\n return this.client.sendOperationRequest(args, spec);\n };\n const sendOperationFn = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ) => {\n let currentRawResponse: coreClient.FullOperationResponse | undefined = undefined;\n const providedCallback = args.options?.onResponse;\n const callback: coreClient.RawResponseCallback = (\n rawResponse: coreClient.FullOperationResponse,\n flatResponse: unknown,\n ) => {\n currentRawResponse = rawResponse;\n providedCallback?.(rawResponse, flatResponse);\n };\n const updatedArgs = {\n ...args,\n options: {\n ...args.options,\n onResponse: callback,\n },\n };\n const flatResponse = await directSendOperation(updatedArgs, spec);\n return {\n flatResponse,\n rawResponse: {\n statusCode: currentRawResponse!.status,\n body: currentRawResponse!.parsedBody,\n headers: currentRawResponse!.headers.toJSON(),\n },\n };\n };\n\n const lro = createLroSpec({\n sendOperationFn,\n args: { resourceGroupName, serverName, parameters, options },\n spec: startLtrBackupOperationSpec,\n });\n const poller = await createHttpPoller<\n FlexibleServerStartLtrBackupResponse,\n OperationState<FlexibleServerStartLtrBackupResponse>\n >(lro, {\n restoreFrom: options?.resumeFrom,\n intervalInMs: options?.updateIntervalInMs,\n resourceLocationConfig: \"location\",\n });\n await poller.poll();\n return poller;\n }\n\n /**\n * Start the Long Term Retention Backup operation\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param serverName The name of the server.\n * @param parameters Request body for operation\n * @param options The options parameters.\n */\n async beginStartLtrBackupAndWait(\n resourceGroupName: string,\n serverName: string,\n parameters: LtrBackupRequest,\n options?: FlexibleServerStartLtrBackupOptionalParams,\n ): Promise<FlexibleServerStartLtrBackupResponse> {\n const poller = await this.beginStartLtrBackup(\n resourceGroupName,\n serverName,\n parameters,\n options,\n );\n return poller.pollUntilDone();\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst triggerLtrPreBackupOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/ltrPreBackup\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.LtrPreBackupResponse,\n headersMapper: Mappers.FlexibleServerTriggerLtrPreBackupHeaders,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n headersMapper: Mappers.FlexibleServerTriggerLtrPreBackupExceptionHeaders,\n },\n },\n requestBody: Parameters.parameters8,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.serverName,\n ],\n headerParameters: [Parameters.contentType, Parameters.accept],\n mediaType: \"json\",\n serializer,\n};\nconst startLtrBackupOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/startLtrBackup\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.LtrBackupResponse,\n headersMapper: Mappers.FlexibleServerStartLtrBackupHeaders,\n },\n 201: {\n bodyMapper: Mappers.LtrBackupResponse,\n headersMapper: Mappers.FlexibleServerStartLtrBackupHeaders,\n },\n 202: {\n bodyMapper: Mappers.LtrBackupResponse,\n headersMapper: Mappers.FlexibleServerStartLtrBackupHeaders,\n },\n 204: {\n bodyMapper: Mappers.LtrBackupResponse,\n headersMapper: Mappers.FlexibleServerStartLtrBackupHeaders,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n headersMapper: Mappers.FlexibleServerStartLtrBackupExceptionHeaders,\n },\n },\n requestBody: Parameters.parameters9,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.serverName,\n ],\n headerParameters: [Parameters.contentType, Parameters.accept],\n mediaType: \"json\",\n serializer,\n};\n"]}
|
|
1
|
+
{"version":3,"file":"flexibleServer.js","sourceRoot":"","sources":["../../../src/operations/flexibleServer.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAGH,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAGtD,8CAAmD;AACnD,8CAA8C;AAU9C,kDAAkD;AAClD,MAAa,kBAAkB;IACZ,MAAM,CAA2C;IAElE;;;OAGG;IACH,YAAY,MAAgD;QAC1D,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;;;OAOG;IACH,mBAAmB,CACjB,iBAAyB,EACzB,UAAkB,EAClB,UAA+B,EAC/B,OAAyD;QAEzD,OAAO,IAAI,CAAC,MAAM,CAAC,oBAAoB,CACrC,EAAE,iBAAiB,EAAE,UAAU,EAAE,UAAU,EAAE,OAAO,EAAE,EACtD,gCAAgC,CACjC,CAAC;IACJ,CAAC;IAED;;;;;;OAMG;IACH,KAAK,CAAC,mBAAmB,CACvB,iBAAyB,EACzB,UAAkB,EAClB,UAA4B,EAC5B,OAAoD;QAOpD,MAAM,mBAAmB,GAAG,KAAK,EAC/B,IAAmC,EACnC,IAA8B,EACiB,EAAE;YACjD,OAAO,IAAI,CAAC,MAAM,CAAC,oBAAoB,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;QACtD,CAAC,CAAC;QAC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AAiB;YACrC,aAAa,EAAE,OAAO,CAAC,mCAAmC;SAC3D;QACD,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,iBAAiB;YACrC,aAAa,EAAE,OAAO,CAAC,mCAAmC;SAC3D;QACD,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,iBAAiB;YACrC,aAAa,EAAE,OAAO,CAAC,mCAAmC;SAC3D;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;YACjC,aAAa,EAAE,OAAO,CAAC,4CAA4C;SACpE;KACF;IACD,WAAW,EAAE,UAAU,CAAC,WAAW;IACnC,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,iBAAiB;QAC5B,UAAU,CAAC,UAAU;KACtB;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,WAAW,EAAE,UAAU,CAAC,MAAM,CAAC;IAC7D,SAAS,EAAE,MAAM;IACjB,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport type { FlexibleServer } from \"../operationsInterfaces/index.js\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers.js\";\nimport * as Parameters from \"../models/parameters.js\";\nimport type { PostgreSQLManagementFlexibleServerClient } from \"../postgreSQLManagementFlexibleServerClient.js\";\nimport type { SimplePollerLike, OperationState } from \"@azure/core-lro\";\nimport { createHttpPoller } from \"@azure/core-lro\";\nimport { createLroSpec } from \"../lroImpl.js\";\nimport type {\n LtrPreBackupRequest,\n FlexibleServerTriggerLtrPreBackupOptionalParams,\n FlexibleServerTriggerLtrPreBackupResponse,\n LtrBackupRequest,\n FlexibleServerStartLtrBackupOptionalParams,\n FlexibleServerStartLtrBackupResponse,\n} from \"../models/index.js\";\n\n/** Class containing FlexibleServer operations. */\nexport class FlexibleServerImpl implements FlexibleServer {\n private readonly client: PostgreSQLManagementFlexibleServerClient;\n\n /**\n * Initialize a new instance of the class FlexibleServer class.\n * @param client Reference to the service client\n */\n constructor(client: PostgreSQLManagementFlexibleServerClient) {\n this.client = client;\n }\n\n /**\n * PreBackup operation performs all the checks that are needed for the subsequent long term retention\n * backup operation to succeed.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param serverName The name of the server.\n * @param parameters Request body for operation\n * @param options The options parameters.\n */\n triggerLtrPreBackup(\n resourceGroupName: string,\n serverName: string,\n parameters: LtrPreBackupRequest,\n options?: FlexibleServerTriggerLtrPreBackupOptionalParams,\n ): Promise<FlexibleServerTriggerLtrPreBackupResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, serverName, parameters, options },\n triggerLtrPreBackupOperationSpec,\n );\n }\n\n /**\n * Start the Long Term Retention Backup operation\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param serverName The name of the server.\n * @param parameters Request body for operation\n * @param options The options parameters.\n */\n async beginStartLtrBackup(\n resourceGroupName: string,\n serverName: string,\n parameters: LtrBackupRequest,\n options?: FlexibleServerStartLtrBackupOptionalParams,\n ): Promise<\n SimplePollerLike<\n OperationState<FlexibleServerStartLtrBackupResponse>,\n FlexibleServerStartLtrBackupResponse\n >\n > {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ): Promise<FlexibleServerStartLtrBackupResponse> => {\n return this.client.sendOperationRequest(args, spec);\n };\n const sendOperationFn = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ) => {\n let currentRawResponse: coreClient.FullOperationResponse | undefined = undefined;\n const providedCallback = args.options?.onResponse;\n const callback: coreClient.RawResponseCallback = (\n rawResponse: coreClient.FullOperationResponse,\n flatResponse: unknown,\n ) => {\n currentRawResponse = rawResponse;\n providedCallback?.(rawResponse, flatResponse);\n };\n const updatedArgs = {\n ...args,\n options: {\n ...args.options,\n onResponse: callback,\n },\n };\n const flatResponse = await directSendOperation(updatedArgs, spec);\n return {\n flatResponse,\n rawResponse: {\n statusCode: currentRawResponse!.status,\n body: currentRawResponse!.parsedBody,\n headers: currentRawResponse!.headers.toJSON(),\n },\n };\n };\n\n const lro = createLroSpec({\n sendOperationFn,\n args: { resourceGroupName, serverName, parameters, options },\n spec: startLtrBackupOperationSpec,\n });\n const poller = await createHttpPoller<\n FlexibleServerStartLtrBackupResponse,\n OperationState<FlexibleServerStartLtrBackupResponse>\n >(lro, {\n restoreFrom: options?.resumeFrom,\n intervalInMs: options?.updateIntervalInMs,\n resourceLocationConfig: \"location\",\n });\n await poller.poll();\n return poller;\n }\n\n /**\n * Start the Long Term Retention Backup operation\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param serverName The name of the server.\n * @param parameters Request body for operation\n * @param options The options parameters.\n */\n async beginStartLtrBackupAndWait(\n resourceGroupName: string,\n serverName: string,\n parameters: LtrBackupRequest,\n options?: FlexibleServerStartLtrBackupOptionalParams,\n ): Promise<FlexibleServerStartLtrBackupResponse> {\n const poller = await this.beginStartLtrBackup(\n resourceGroupName,\n serverName,\n parameters,\n options,\n );\n return poller.pollUntilDone();\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst triggerLtrPreBackupOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/ltrPreBackup\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.LtrPreBackupResponse,\n headersMapper: Mappers.FlexibleServerTriggerLtrPreBackupHeaders,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n headersMapper: Mappers.FlexibleServerTriggerLtrPreBackupExceptionHeaders,\n },\n },\n requestBody: Parameters.parameters8,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.serverName,\n ],\n headerParameters: [Parameters.contentType, Parameters.accept],\n mediaType: \"json\",\n serializer,\n};\nconst startLtrBackupOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/startLtrBackup\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.LtrBackupResponse,\n headersMapper: Mappers.FlexibleServerStartLtrBackupHeaders,\n },\n 201: {\n bodyMapper: Mappers.LtrBackupResponse,\n headersMapper: Mappers.FlexibleServerStartLtrBackupHeaders,\n },\n 202: {\n bodyMapper: Mappers.LtrBackupResponse,\n headersMapper: Mappers.FlexibleServerStartLtrBackupHeaders,\n },\n 204: {\n bodyMapper: Mappers.LtrBackupResponse,\n headersMapper: Mappers.FlexibleServerStartLtrBackupHeaders,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n headersMapper: Mappers.FlexibleServerStartLtrBackupExceptionHeaders,\n },\n },\n requestBody: Parameters.parameters9,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.serverName,\n ],\n headerParameters: [Parameters.contentType, Parameters.accept],\n mediaType: \"json\",\n serializer,\n};\n"]}
|
|
@@ -14,6 +14,7 @@ const Mappers = tslib_1.__importStar(require("../models/mappers.js"));
|
|
|
14
14
|
const Parameters = tslib_1.__importStar(require("../models/parameters.js"));
|
|
15
15
|
/** Class containing GetPrivateDnsZoneSuffix operations. */
|
|
16
16
|
class GetPrivateDnsZoneSuffixImpl {
|
|
17
|
+
client;
|
|
17
18
|
/**
|
|
18
19
|
* Initialize a new instance of the class GetPrivateDnsZoneSuffix class.
|
|
19
20
|
* @param client Reference to the service client
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getPrivateDnsZoneSuffix.js","sourceRoot":"","sources":["../../../src/operations/getPrivateDnsZoneSuffix.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAGH,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAOtD,2DAA2D;AAC3D,MAAa,2BAA2B;
|
|
1
|
+
{"version":3,"file":"getPrivateDnsZoneSuffix.js","sourceRoot":"","sources":["../../../src/operations/getPrivateDnsZoneSuffix.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAGH,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAOtD,2DAA2D;AAC3D,MAAa,2BAA2B;IACrB,MAAM,CAA2C;IAElE;;;OAGG;IACH,YAAY,MAAgD;QAC1D,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;OAGG;IACH,OAAO,CACL,OAAsD;QAEtD,OAAO,IAAI,CAAC,MAAM,CAAC,oBAAoB,CAAC,EAAE,OAAO,EAAE,EAAE,oBAAoB,CAAC,CAAC;IAC7E,CAAC;CACF;AApBD,kEAoBC;AACD,2BAA2B;AAC3B,MAAM,UAAU,GAAG,UAAU,CAAC,gBAAgB,CAAC,OAAO,EAAE,WAAW,CAAC,KAAK,CAAC,CAAC;AAE3E,MAAM,oBAAoB,GAA6B;IACrD,IAAI,EAAE,8DAA8D;IACpE,UAAU,EAAE,MAAM;IAClB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,EAAE,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE;SACzC;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE,CAAC,UAAU,CAAC,KAAK,CAAC;IACjC,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport type { GetPrivateDnsZoneSuffix } from \"../operationsInterfaces/index.js\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers.js\";\nimport * as Parameters from \"../models/parameters.js\";\nimport type { PostgreSQLManagementFlexibleServerClient } from \"../postgreSQLManagementFlexibleServerClient.js\";\nimport type {\n GetPrivateDnsZoneSuffixExecuteOptionalParams,\n GetPrivateDnsZoneSuffixExecuteResponse,\n} from \"../models/index.js\";\n\n/** Class containing GetPrivateDnsZoneSuffix operations. */\nexport class GetPrivateDnsZoneSuffixImpl implements GetPrivateDnsZoneSuffix {\n private readonly client: PostgreSQLManagementFlexibleServerClient;\n\n /**\n * Initialize a new instance of the class GetPrivateDnsZoneSuffix class.\n * @param client Reference to the service client\n */\n constructor(client: PostgreSQLManagementFlexibleServerClient) {\n this.client = client;\n }\n\n /**\n * Get private DNS zone suffix in the cloud\n * @param options The options parameters.\n */\n execute(\n options?: GetPrivateDnsZoneSuffixExecuteOptionalParams,\n ): Promise<GetPrivateDnsZoneSuffixExecuteResponse> {\n return this.client.sendOperationRequest({ options }, executeOperationSpec);\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst executeOperationSpec: coreClient.OperationSpec = {\n path: \"/providers/Microsoft.DBforPostgreSQL/getPrivateDnsZoneSuffix\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: { type: { name: \"String\" } },\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host],\n headerParameters: [Parameters.accept],\n serializer,\n};\n"]}
|
|
@@ -16,6 +16,7 @@ const Parameters = tslib_1.__importStar(require("../models/parameters.js"));
|
|
|
16
16
|
/// <reference lib="esnext.asynciterable" />
|
|
17
17
|
/** Class containing LocationBasedCapabilities operations. */
|
|
18
18
|
class LocationBasedCapabilitiesImpl {
|
|
19
|
+
client;
|
|
19
20
|
/**
|
|
20
21
|
* Initialize a new instance of the class LocationBasedCapabilities class.
|
|
21
22
|
* @param client Reference to the service client
|
|
@@ -38,52 +39,35 @@ class LocationBasedCapabilitiesImpl {
|
|
|
38
39
|
return this;
|
|
39
40
|
},
|
|
40
41
|
byPage: (settings) => {
|
|
41
|
-
if (settings
|
|
42
|
+
if (settings?.maxPageSize) {
|
|
42
43
|
throw new Error("maxPageSize is not supported by this operation.");
|
|
43
44
|
}
|
|
44
45
|
return this.executePagingPage(locationName, options, settings);
|
|
45
46
|
},
|
|
46
47
|
};
|
|
47
48
|
}
|
|
48
|
-
executePagingPage(locationName, options, settings) {
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
}
|
|
66
|
-
});
|
|
49
|
+
async *executePagingPage(locationName, options, settings) {
|
|
50
|
+
let result;
|
|
51
|
+
let continuationToken = settings?.continuationToken;
|
|
52
|
+
if (!continuationToken) {
|
|
53
|
+
result = await this._execute(locationName, options);
|
|
54
|
+
const page = result.value || [];
|
|
55
|
+
continuationToken = result.nextLink;
|
|
56
|
+
(0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
|
|
57
|
+
yield page;
|
|
58
|
+
}
|
|
59
|
+
while (continuationToken) {
|
|
60
|
+
result = await this._executeNext(locationName, continuationToken, options);
|
|
61
|
+
continuationToken = result.nextLink;
|
|
62
|
+
const page = result.value || [];
|
|
63
|
+
(0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
|
|
64
|
+
yield page;
|
|
65
|
+
}
|
|
67
66
|
}
|
|
68
|
-
executePagingAll(locationName, options) {
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
for (var _d = true, _e = tslib_1.__asyncValues(this.executePagingPage(locationName, options)), _f; _f = yield tslib_1.__await(_e.next()), _a = _f.done, !_a; _d = true) {
|
|
73
|
-
_c = _f.value;
|
|
74
|
-
_d = false;
|
|
75
|
-
const page = _c;
|
|
76
|
-
yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues(page)));
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
80
|
-
finally {
|
|
81
|
-
try {
|
|
82
|
-
if (!_d && !_a && (_b = _e.return)) yield tslib_1.__await(_b.call(_e));
|
|
83
|
-
}
|
|
84
|
-
finally { if (e_1) throw e_1.error; }
|
|
85
|
-
}
|
|
86
|
-
});
|
|
67
|
+
async *executePagingAll(locationName, options) {
|
|
68
|
+
for await (const page of this.executePagingPage(locationName, options)) {
|
|
69
|
+
yield* page;
|
|
70
|
+
}
|
|
87
71
|
}
|
|
88
72
|
/**
|
|
89
73
|
* Get capabilities at specified location in a given subscription.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"locationBasedCapabilities.js","sourceRoot":"","sources":["../../../src/operations/locationBasedCapabilities.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAGH,wDAA0D;AAE1D,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAUtD,4CAA4C;AAC5C,6DAA6D;AAC7D,MAAa,6BAA6B;
|
|
1
|
+
{"version":3,"file":"locationBasedCapabilities.js","sourceRoot":"","sources":["../../../src/operations/locationBasedCapabilities.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAGH,wDAA0D;AAE1D,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAUtD,4CAA4C;AAC5C,6DAA6D;AAC7D,MAAa,6BAA6B;IACvB,MAAM,CAA2C;IAElE;;;OAGG;IACH,YAAY,MAAgD;QAC1D,IAA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AE,UAAU,CAAC,YAAY,CAAC;IACrF,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC;AACF,MAAM,wBAAwB,GAA6B;IACzD,IAAI,EAAE,YAAY;IAClB,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,sBAAsB;SAC3C;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,QAAQ;QACnB,UAAU,CAAC,YAAY;KACxB;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport type { PagedAsyncIterableIterator, PageSettings } from \"@azure/core-paging\";\nimport { setContinuationToken } from \"../pagingHelper.js\";\nimport type { LocationBasedCapabilities } from \"../operationsInterfaces/index.js\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers.js\";\nimport * as Parameters from \"../models/parameters.js\";\nimport type { PostgreSQLManagementFlexibleServerClient } from \"../postgreSQLManagementFlexibleServerClient.js\";\nimport type {\n FlexibleServerCapability,\n LocationBasedCapabilitiesExecuteNextOptionalParams,\n LocationBasedCapabilitiesExecuteOptionalParams,\n LocationBasedCapabilitiesExecuteResponse,\n LocationBasedCapabilitiesExecuteNextResponse,\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing LocationBasedCapabilities operations. */\nexport class LocationBasedCapabilitiesImpl implements LocationBasedCapabilities {\n private readonly client: PostgreSQLManagementFlexibleServerClient;\n\n /**\n * Initialize a new instance of the class LocationBasedCapabilities class.\n * @param client Reference to the service client\n */\n constructor(client: PostgreSQLManagementFlexibleServerClient) {\n this.client = client;\n }\n\n /**\n * Get capabilities at specified location in a given subscription.\n * @param locationName The name of the location.\n * @param options The options parameters.\n */\n public listExecute(\n locationName: string,\n options?: LocationBasedCapabilitiesExecuteOptionalParams,\n ): PagedAsyncIterableIterator<FlexibleServerCapability> {\n const iter = this.executePagingAll(locationName, options);\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: (settings?: PageSettings) => {\n if (settings?.maxPageSize) {\n throw new Error(\"maxPageSize is not supported by this operation.\");\n }\n return this.executePagingPage(locationName, options, settings);\n },\n };\n }\n\n private async *executePagingPage(\n locationName: string,\n options?: LocationBasedCapabilitiesExecuteOptionalParams,\n settings?: PageSettings,\n ): AsyncIterableIterator<FlexibleServerCapability[]> {\n let result: LocationBasedCapabilitiesExecuteResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._execute(locationName, options);\n const page = result.value || [];\n continuationToken = result.nextLink;\n setContinuationToken(page, continuationToken);\n yield page;\n }\n while (continuationToken) {\n result = await this._executeNext(locationName, continuationToken, options);\n continuationToken = result.nextLink;\n const page = result.value || [];\n setContinuationToken(page, continuationToken);\n yield page;\n }\n }\n\n private async *executePagingAll(\n locationName: string,\n options?: LocationBasedCapabilitiesExecuteOptionalParams,\n ): AsyncIterableIterator<FlexibleServerCapability> {\n for await (const page of this.executePagingPage(locationName, options)) {\n yield* page;\n }\n }\n\n /**\n * Get capabilities at specified location in a given subscription.\n * @param locationName The name of the location.\n * @param options The options parameters.\n */\n private _execute(\n locationName: string,\n options?: LocationBasedCapabilitiesExecuteOptionalParams,\n ): Promise<LocationBasedCapabilitiesExecuteResponse> {\n return this.client.sendOperationRequest({ locationName, options }, executeOperationSpec);\n }\n\n /**\n * ExecuteNext\n * @param locationName The name of the location.\n * @param nextLink The nextLink from the previous successful call to the Execute method.\n * @param options The options parameters.\n */\n private _executeNext(\n locationName: string,\n nextLink: string,\n options?: LocationBasedCapabilitiesExecuteNextOptionalParams,\n ): Promise<LocationBasedCapabilitiesExecuteNextResponse> {\n return this.client.sendOperationRequest(\n { locationName, nextLink, options },\n executeNextOperationSpec,\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst executeOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/providers/Microsoft.DBforPostgreSQL/locations/{locationName}/capabilities\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.CapabilitiesListResult,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host, Parameters.subscriptionId, Parameters.locationName],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst executeNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.CapabilitiesListResult,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.nextLink,\n Parameters.locationName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\n"]}
|
|
@@ -16,6 +16,7 @@ const Parameters = tslib_1.__importStar(require("../models/parameters.js"));
|
|
|
16
16
|
/// <reference lib="esnext.asynciterable" />
|
|
17
17
|
/** Class containing LogFiles operations. */
|
|
18
18
|
class LogFilesImpl {
|
|
19
|
+
client;
|
|
19
20
|
/**
|
|
20
21
|
* Initialize a new instance of the class LogFiles class.
|
|
21
22
|
* @param client Reference to the service client
|
|
@@ -39,52 +40,35 @@ class LogFilesImpl {
|
|
|
39
40
|
return this;
|
|
40
41
|
},
|
|
41
42
|
byPage: (settings) => {
|
|
42
|
-
if (settings
|
|
43
|
+
if (settings?.maxPageSize) {
|
|
43
44
|
throw new Error("maxPageSize is not supported by this operation.");
|
|
44
45
|
}
|
|
45
46
|
return this.listByServerPagingPage(resourceGroupName, serverName, options, settings);
|
|
46
47
|
},
|
|
47
48
|
};
|
|
48
49
|
}
|
|
49
|
-
listByServerPagingPage(resourceGroupName, serverName, options, settings) {
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
}
|
|
67
|
-
});
|
|
50
|
+
async *listByServerPagingPage(resourceGroupName, serverName, options, settings) {
|
|
51
|
+
let result;
|
|
52
|
+
let continuationToken = settings?.continuationToken;
|
|
53
|
+
if (!continuationToken) {
|
|
54
|
+
result = await this._listByServer(resourceGroupName, serverName, options);
|
|
55
|
+
const page = result.value || [];
|
|
56
|
+
continuationToken = result.nextLink;
|
|
57
|
+
(0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
|
|
58
|
+
yield page;
|
|
59
|
+
}
|
|
60
|
+
while (continuationToken) {
|
|
61
|
+
result = await this._listByServerNext(resourceGroupName, serverName, continuationToken, options);
|
|
62
|
+
continuationToken = result.nextLink;
|
|
63
|
+
const page = result.value || [];
|
|
64
|
+
(0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
|
|
65
|
+
yield page;
|
|
66
|
+
}
|
|
68
67
|
}
|
|
69
|
-
listByServerPagingAll(resourceGroupName, serverName, options) {
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
for (var _d = true, _e = tslib_1.__asyncValues(this.listByServerPagingPage(resourceGroupName, serverName, options)), _f; _f = yield tslib_1.__await(_e.next()), _a = _f.done, !_a; _d = true) {
|
|
74
|
-
_c = _f.value;
|
|
75
|
-
_d = false;
|
|
76
|
-
const page = _c;
|
|
77
|
-
yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues(page)));
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
81
|
-
finally {
|
|
82
|
-
try {
|
|
83
|
-
if (!_d && !_a && (_b = _e.return)) yield tslib_1.__await(_b.call(_e));
|
|
84
|
-
}
|
|
85
|
-
finally { if (e_1) throw e_1.error; }
|
|
86
|
-
}
|
|
87
|
-
});
|
|
68
|
+
async *listByServerPagingAll(resourceGroupName, serverName, options) {
|
|
69
|
+
for await (const page of this.listByServerPagingPage(resourceGroupName, serverName, options)) {
|
|
70
|
+
yield* page;
|
|
71
|
+
}
|
|
88
72
|
}
|
|
89
73
|
/**
|
|
90
74
|
* List all the server log files in a given server.
|