@azure/arm-mysql 5.1.1-alpha.20250618.1 → 5.1.1-alpha.20250718.2
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 +11 -3
- package/dist/browser/lroImpl.js.map +1 -1
- package/dist/browser/models/mappers.js +265 -121
- package/dist/browser/models/mappers.js.map +1 -1
- package/dist/browser/mySQLManagementClient.js +48 -11
- package/dist/browser/mySQLManagementClient.js.map +1 -1
- package/dist/browser/operations/advisors.js +23 -40
- package/dist/browser/operations/advisors.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/configurations.js +21 -33
- package/dist/browser/operations/configurations.js.map +1 -1
- package/dist/browser/operations/databases.js +32 -39
- package/dist/browser/operations/databases.js.map +1 -1
- package/dist/browser/operations/firewallRules.js +32 -39
- package/dist/browser/operations/firewallRules.js.map +1 -1
- package/dist/browser/operations/locationBasedPerformanceTier.js +10 -27
- package/dist/browser/operations/locationBasedPerformanceTier.js.map +1 -1
- package/dist/browser/operations/locationBasedRecommendedActionSessionsOperationStatus.js +1 -0
- package/dist/browser/operations/locationBasedRecommendedActionSessionsOperationStatus.js.map +1 -1
- package/dist/browser/operations/locationBasedRecommendedActionSessionsResult.js +23 -40
- package/dist/browser/operations/locationBasedRecommendedActionSessionsResult.js.map +1 -1
- package/dist/browser/operations/logFiles.js +10 -27
- package/dist/browser/operations/logFiles.js.map +1 -1
- package/dist/browser/operations/operations.js +1 -0
- package/dist/browser/operations/operations.js.map +1 -1
- package/dist/browser/operations/privateEndpointConnections.js +56 -58
- 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/queryTexts.js +23 -40
- package/dist/browser/operations/queryTexts.js.map +1 -1
- package/dist/browser/operations/recommendedActions.js +23 -40
- package/dist/browser/operations/recommendedActions.js.map +1 -1
- package/dist/browser/operations/recoverableServers.js +1 -0
- package/dist/browser/operations/recoverableServers.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/serverAdministrators.js +32 -39
- package/dist/browser/operations/serverAdministrators.js.map +1 -1
- package/dist/browser/operations/serverBasedPerformanceTier.js +10 -27
- package/dist/browser/operations/serverBasedPerformanceTier.js.map +1 -1
- package/dist/browser/operations/serverKeys.js +45 -52
- package/dist/browser/operations/serverKeys.js.map +1 -1
- package/dist/browser/operations/serverParameters.js +12 -6
- package/dist/browser/operations/serverParameters.js.map +1 -1
- package/dist/browser/operations/serverSecurityAlertPolicies.js +34 -46
- package/dist/browser/operations/serverSecurityAlertPolicies.js.map +1 -1
- package/dist/browser/operations/servers.js +96 -95
- package/dist/browser/operations/servers.js.map +1 -1
- package/dist/browser/operations/topQueryStatistics.js +23 -40
- package/dist/browser/operations/topQueryStatistics.js.map +1 -1
- package/dist/browser/operations/virtualNetworkRules.js +45 -52
- package/dist/browser/operations/virtualNetworkRules.js.map +1 -1
- package/dist/browser/operations/waitStatistics.js +23 -40
- package/dist/browser/operations/waitStatistics.js.map +1 -1
- package/dist/browser/pagingHelper.js +2 -4
- package/dist/browser/pagingHelper.js.map +1 -1
- package/dist/commonjs/lroImpl.js +11 -3
- package/dist/commonjs/lroImpl.js.map +1 -1
- package/dist/commonjs/models/mappers.js +265 -121
- package/dist/commonjs/models/mappers.js.map +1 -1
- package/dist/commonjs/mySQLManagementClient.js +48 -11
- package/dist/commonjs/mySQLManagementClient.js.map +1 -1
- package/dist/commonjs/operations/advisors.js +23 -39
- package/dist/commonjs/operations/advisors.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/configurations.js +21 -32
- package/dist/commonjs/operations/configurations.js.map +1 -1
- package/dist/commonjs/operations/databases.js +32 -38
- package/dist/commonjs/operations/databases.js.map +1 -1
- package/dist/commonjs/operations/firewallRules.js +32 -38
- package/dist/commonjs/operations/firewallRules.js.map +1 -1
- package/dist/commonjs/operations/locationBasedPerformanceTier.js +10 -26
- package/dist/commonjs/operations/locationBasedPerformanceTier.js.map +1 -1
- package/dist/commonjs/operations/locationBasedRecommendedActionSessionsOperationStatus.js +1 -0
- package/dist/commonjs/operations/locationBasedRecommendedActionSessionsOperationStatus.js.map +1 -1
- package/dist/commonjs/operations/locationBasedRecommendedActionSessionsResult.js +23 -39
- package/dist/commonjs/operations/locationBasedRecommendedActionSessionsResult.js.map +1 -1
- package/dist/commonjs/operations/logFiles.js +10 -26
- package/dist/commonjs/operations/logFiles.js.map +1 -1
- package/dist/commonjs/operations/operations.js +1 -0
- package/dist/commonjs/operations/operations.js.map +1 -1
- package/dist/commonjs/operations/privateEndpointConnections.js +56 -57
- 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/queryTexts.js +23 -39
- package/dist/commonjs/operations/queryTexts.js.map +1 -1
- package/dist/commonjs/operations/recommendedActions.js +23 -39
- package/dist/commonjs/operations/recommendedActions.js.map +1 -1
- package/dist/commonjs/operations/recoverableServers.js +1 -0
- package/dist/commonjs/operations/recoverableServers.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/serverAdministrators.js +32 -38
- package/dist/commonjs/operations/serverAdministrators.js.map +1 -1
- package/dist/commonjs/operations/serverBasedPerformanceTier.js +10 -26
- package/dist/commonjs/operations/serverBasedPerformanceTier.js.map +1 -1
- package/dist/commonjs/operations/serverKeys.js +45 -51
- package/dist/commonjs/operations/serverKeys.js.map +1 -1
- package/dist/commonjs/operations/serverParameters.js +12 -6
- package/dist/commonjs/operations/serverParameters.js.map +1 -1
- package/dist/commonjs/operations/serverSecurityAlertPolicies.js +34 -45
- package/dist/commonjs/operations/serverSecurityAlertPolicies.js.map +1 -1
- package/dist/commonjs/operations/servers.js +96 -94
- package/dist/commonjs/operations/servers.js.map +1 -1
- package/dist/commonjs/operations/topQueryStatistics.js +23 -39
- package/dist/commonjs/operations/topQueryStatistics.js.map +1 -1
- package/dist/commonjs/operations/virtualNetworkRules.js +45 -51
- package/dist/commonjs/operations/virtualNetworkRules.js.map +1 -1
- package/dist/commonjs/operations/waitStatistics.js +23 -39
- package/dist/commonjs/operations/waitStatistics.js.map +1 -1
- package/dist/commonjs/pagingHelper.js +2 -4
- package/dist/commonjs/pagingHelper.js.map +1 -1
- package/dist/commonjs/tsdoc-metadata.json +11 -11
- package/dist/esm/lroImpl.js +11 -3
- package/dist/esm/lroImpl.js.map +1 -1
- package/dist/esm/models/mappers.js +265 -121
- package/dist/esm/models/mappers.js.map +1 -1
- package/dist/esm/mySQLManagementClient.js +48 -11
- package/dist/esm/mySQLManagementClient.js.map +1 -1
- package/dist/esm/operations/advisors.js +23 -40
- package/dist/esm/operations/advisors.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/configurations.js +21 -33
- package/dist/esm/operations/configurations.js.map +1 -1
- package/dist/esm/operations/databases.js +32 -39
- package/dist/esm/operations/databases.js.map +1 -1
- package/dist/esm/operations/firewallRules.js +32 -39
- package/dist/esm/operations/firewallRules.js.map +1 -1
- package/dist/esm/operations/locationBasedPerformanceTier.js +10 -27
- package/dist/esm/operations/locationBasedPerformanceTier.js.map +1 -1
- package/dist/esm/operations/locationBasedRecommendedActionSessionsOperationStatus.js +1 -0
- package/dist/esm/operations/locationBasedRecommendedActionSessionsOperationStatus.js.map +1 -1
- package/dist/esm/operations/locationBasedRecommendedActionSessionsResult.js +23 -40
- package/dist/esm/operations/locationBasedRecommendedActionSessionsResult.js.map +1 -1
- package/dist/esm/operations/logFiles.js +10 -27
- package/dist/esm/operations/logFiles.js.map +1 -1
- package/dist/esm/operations/operations.js +1 -0
- package/dist/esm/operations/operations.js.map +1 -1
- package/dist/esm/operations/privateEndpointConnections.js +56 -58
- 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/queryTexts.js +23 -40
- package/dist/esm/operations/queryTexts.js.map +1 -1
- package/dist/esm/operations/recommendedActions.js +23 -40
- package/dist/esm/operations/recommendedActions.js.map +1 -1
- package/dist/esm/operations/recoverableServers.js +1 -0
- package/dist/esm/operations/recoverableServers.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/serverAdministrators.js +32 -39
- package/dist/esm/operations/serverAdministrators.js.map +1 -1
- package/dist/esm/operations/serverBasedPerformanceTier.js +10 -27
- package/dist/esm/operations/serverBasedPerformanceTier.js.map +1 -1
- package/dist/esm/operations/serverKeys.js +45 -52
- package/dist/esm/operations/serverKeys.js.map +1 -1
- package/dist/esm/operations/serverParameters.js +12 -6
- package/dist/esm/operations/serverParameters.js.map +1 -1
- package/dist/esm/operations/serverSecurityAlertPolicies.js +34 -46
- package/dist/esm/operations/serverSecurityAlertPolicies.js.map +1 -1
- package/dist/esm/operations/servers.js +96 -95
- package/dist/esm/operations/servers.js.map +1 -1
- package/dist/esm/operations/topQueryStatistics.js +23 -40
- package/dist/esm/operations/topQueryStatistics.js.map +1 -1
- package/dist/esm/operations/virtualNetworkRules.js +45 -52
- package/dist/esm/operations/virtualNetworkRules.js.map +1 -1
- package/dist/esm/operations/waitStatistics.js +23 -40
- package/dist/esm/operations/waitStatistics.js.map +1 -1
- package/dist/esm/pagingHelper.js +2 -4
- package/dist/esm/pagingHelper.js.map +1 -1
- package/dist/react-native/lroImpl.js +11 -3
- package/dist/react-native/lroImpl.js.map +1 -1
- package/dist/react-native/models/mappers.js +265 -121
- package/dist/react-native/models/mappers.js.map +1 -1
- package/dist/react-native/mySQLManagementClient.js +48 -11
- package/dist/react-native/mySQLManagementClient.js.map +1 -1
- package/dist/react-native/operations/advisors.js +23 -40
- package/dist/react-native/operations/advisors.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/configurations.js +21 -33
- package/dist/react-native/operations/configurations.js.map +1 -1
- package/dist/react-native/operations/databases.js +32 -39
- package/dist/react-native/operations/databases.js.map +1 -1
- package/dist/react-native/operations/firewallRules.js +32 -39
- package/dist/react-native/operations/firewallRules.js.map +1 -1
- package/dist/react-native/operations/locationBasedPerformanceTier.js +10 -27
- package/dist/react-native/operations/locationBasedPerformanceTier.js.map +1 -1
- package/dist/react-native/operations/locationBasedRecommendedActionSessionsOperationStatus.js +1 -0
- package/dist/react-native/operations/locationBasedRecommendedActionSessionsOperationStatus.js.map +1 -1
- package/dist/react-native/operations/locationBasedRecommendedActionSessionsResult.js +23 -40
- package/dist/react-native/operations/locationBasedRecommendedActionSessionsResult.js.map +1 -1
- package/dist/react-native/operations/logFiles.js +10 -27
- package/dist/react-native/operations/logFiles.js.map +1 -1
- package/dist/react-native/operations/operations.js +1 -0
- package/dist/react-native/operations/operations.js.map +1 -1
- package/dist/react-native/operations/privateEndpointConnections.js +56 -58
- 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/queryTexts.js +23 -40
- package/dist/react-native/operations/queryTexts.js.map +1 -1
- package/dist/react-native/operations/recommendedActions.js +23 -40
- package/dist/react-native/operations/recommendedActions.js.map +1 -1
- package/dist/react-native/operations/recoverableServers.js +1 -0
- package/dist/react-native/operations/recoverableServers.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/serverAdministrators.js +32 -39
- package/dist/react-native/operations/serverAdministrators.js.map +1 -1
- package/dist/react-native/operations/serverBasedPerformanceTier.js +10 -27
- package/dist/react-native/operations/serverBasedPerformanceTier.js.map +1 -1
- package/dist/react-native/operations/serverKeys.js +45 -52
- package/dist/react-native/operations/serverKeys.js.map +1 -1
- package/dist/react-native/operations/serverParameters.js +12 -6
- package/dist/react-native/operations/serverParameters.js.map +1 -1
- package/dist/react-native/operations/serverSecurityAlertPolicies.js +34 -46
- package/dist/react-native/operations/serverSecurityAlertPolicies.js.map +1 -1
- package/dist/react-native/operations/servers.js +96 -95
- package/dist/react-native/operations/servers.js.map +1 -1
- package/dist/react-native/operations/topQueryStatistics.js +23 -40
- package/dist/react-native/operations/topQueryStatistics.js.map +1 -1
- package/dist/react-native/operations/virtualNetworkRules.js +45 -52
- package/dist/react-native/operations/virtualNetworkRules.js.map +1 -1
- package/dist/react-native/operations/waitStatistics.js +23 -40
- package/dist/react-native/operations/waitStatistics.js.map +1 -1
- package/dist/react-native/pagingHelper.js +2 -4
- package/dist/react-native/pagingHelper.js.map +1 -1
- package/package.json +2 -2
- /package/review/{arm-mysql.api.md → arm-mysql-node.api.md} +0 -0
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
6
6
|
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
7
7
|
*/
|
|
8
|
-
import { __asyncDelegator, __asyncGenerator, __asyncValues, __await } from "tslib";
|
|
9
8
|
import { setContinuationToken } from "../pagingHelper.js";
|
|
10
9
|
import * as coreClient from "@azure/core-client";
|
|
11
10
|
import * as Mappers from "../models/mappers.js";
|
|
@@ -15,6 +14,7 @@ import { LroImpl } from "../lroImpl.js";
|
|
|
15
14
|
/// <reference lib="esnext.asynciterable" />
|
|
16
15
|
/** Class containing ServerSecurityAlertPolicies operations. */
|
|
17
16
|
export class ServerSecurityAlertPoliciesImpl {
|
|
17
|
+
client;
|
|
18
18
|
/**
|
|
19
19
|
* Initialize a new instance of the class ServerSecurityAlertPolicies class.
|
|
20
20
|
* @param client Reference to the service client
|
|
@@ -38,52 +38,35 @@ export class ServerSecurityAlertPoliciesImpl {
|
|
|
38
38
|
return this;
|
|
39
39
|
},
|
|
40
40
|
byPage: (settings) => {
|
|
41
|
-
if (settings
|
|
41
|
+
if (settings?.maxPageSize) {
|
|
42
42
|
throw new Error("maxPageSize is not supported by this operation.");
|
|
43
43
|
}
|
|
44
44
|
return this.listByServerPagingPage(resourceGroupName, serverName, options, settings);
|
|
45
45
|
}
|
|
46
46
|
};
|
|
47
47
|
}
|
|
48
|
-
listByServerPagingPage(resourceGroupName, serverName, options, settings) {
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
}
|
|
66
|
-
});
|
|
48
|
+
async *listByServerPagingPage(resourceGroupName, serverName, options, settings) {
|
|
49
|
+
let result;
|
|
50
|
+
let continuationToken = settings?.continuationToken;
|
|
51
|
+
if (!continuationToken) {
|
|
52
|
+
result = await this._listByServer(resourceGroupName, serverName, options);
|
|
53
|
+
let page = result.value || [];
|
|
54
|
+
continuationToken = result.nextLink;
|
|
55
|
+
setContinuationToken(page, continuationToken);
|
|
56
|
+
yield page;
|
|
57
|
+
}
|
|
58
|
+
while (continuationToken) {
|
|
59
|
+
result = await this._listByServerNext(resourceGroupName, serverName, continuationToken, options);
|
|
60
|
+
continuationToken = result.nextLink;
|
|
61
|
+
let page = result.value || [];
|
|
62
|
+
setContinuationToken(page, continuationToken);
|
|
63
|
+
yield page;
|
|
64
|
+
}
|
|
67
65
|
}
|
|
68
|
-
listByServerPagingAll(resourceGroupName, serverName, options) {
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
for (var _d = true, _e = __asyncValues(this.listByServerPagingPage(resourceGroupName, serverName, options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
|
|
73
|
-
_c = _f.value;
|
|
74
|
-
_d = false;
|
|
75
|
-
const page = _c;
|
|
76
|
-
yield __await(yield* __asyncDelegator(__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 __await(_b.call(_e));
|
|
83
|
-
}
|
|
84
|
-
finally { if (e_1) throw e_1.error; }
|
|
85
|
-
}
|
|
86
|
-
});
|
|
66
|
+
async *listByServerPagingAll(resourceGroupName, serverName, options) {
|
|
67
|
+
for await (const page of this.listByServerPagingPage(resourceGroupName, serverName, options)) {
|
|
68
|
+
yield* page;
|
|
69
|
+
}
|
|
87
70
|
}
|
|
88
71
|
/**
|
|
89
72
|
* Get a server's security alert policy.
|
|
@@ -108,14 +91,19 @@ export class ServerSecurityAlertPoliciesImpl {
|
|
|
108
91
|
return this.client.sendOperationRequest(args, spec);
|
|
109
92
|
};
|
|
110
93
|
const sendOperation = async (args, spec) => {
|
|
111
|
-
var _a;
|
|
112
94
|
let currentRawResponse = undefined;
|
|
113
|
-
const providedCallback =
|
|
95
|
+
const providedCallback = args.options?.onResponse;
|
|
114
96
|
const callback = (rawResponse, flatResponse) => {
|
|
115
97
|
currentRawResponse = rawResponse;
|
|
116
|
-
providedCallback
|
|
98
|
+
providedCallback?.(rawResponse, flatResponse);
|
|
99
|
+
};
|
|
100
|
+
const updatedArgs = {
|
|
101
|
+
...args,
|
|
102
|
+
options: {
|
|
103
|
+
...args.options,
|
|
104
|
+
onResponse: callback
|
|
105
|
+
}
|
|
117
106
|
};
|
|
118
|
-
const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
|
|
119
107
|
const flatResponse = await directSendOperation(updatedArgs, spec);
|
|
120
108
|
return {
|
|
121
109
|
flatResponse,
|
|
@@ -134,8 +122,8 @@ export class ServerSecurityAlertPoliciesImpl {
|
|
|
134
122
|
options
|
|
135
123
|
}, createOrUpdateOperationSpec);
|
|
136
124
|
const poller = new LroEngine(lro, {
|
|
137
|
-
resumeFrom: options
|
|
138
|
-
intervalInMs: options
|
|
125
|
+
resumeFrom: options?.resumeFrom,
|
|
126
|
+
intervalInMs: options?.updateIntervalInMs
|
|
139
127
|
});
|
|
140
128
|
await poller.poll();
|
|
141
129
|
return poller;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"serverSecurityAlertPolicies.js","sourceRoot":"","sources":["../../../src/operations/serverSecurityAlertPolicies.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAGH,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAE1D,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAC;AAChD,OAAO,KAAK,UAAU,MAAM,yBAAyB,CAAC;AAEtD,OAAO,EAAkC,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5E,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAcxC,4CAA4C;AAC5C,+DAA+D;AAC/D,MAAM,OAAO,+BAA+B;IAI1C;;;OAGG;IACH,YAAY,MAA6B;QACvC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;OAKG;IACI,YAAY,CACjB,iBAAyB,EACzB,UAAkB,EAClB,OAA+D;QAE/D,MAAM,IAAI,GAAG,IAAI,CAAC,qBAAqB,CACrC,iBAAiB,EACjB,UAAU,EACV,OAAO,CACR,CAAC;QACF,OAAO;YACL,IAAI;gBACF,OAAO,IAAI,CAAC,IAAI,EAAE,CAAC;YACrB,CAAC;Y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AQ;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 { PagedAsyncIterableIterator, PageSettings } from \"@azure/core-paging\";\nimport { setContinuationToken } from \"../pagingHelper.js\";\nimport { ServerSecurityAlertPolicies } 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 { MySQLManagementClient } from \"../mySQLManagementClient.js\";\nimport { PollerLike, PollOperationState, LroEngine } from \"@azure/core-lro\";\nimport { LroImpl } from \"../lroImpl.js\";\nimport {\n ServerSecurityAlertPolicy,\n ServerSecurityAlertPoliciesListByServerNextOptionalParams,\n ServerSecurityAlertPoliciesListByServerOptionalParams,\n ServerSecurityAlertPoliciesListByServerResponse,\n SecurityAlertPolicyName,\n ServerSecurityAlertPoliciesGetOptionalParams,\n ServerSecurityAlertPoliciesGetResponse,\n ServerSecurityAlertPoliciesCreateOrUpdateOptionalParams,\n ServerSecurityAlertPoliciesCreateOrUpdateResponse,\n ServerSecurityAlertPoliciesListByServerNextResponse\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing ServerSecurityAlertPolicies operations. */\nexport class ServerSecurityAlertPoliciesImpl\n implements ServerSecurityAlertPolicies {\n private readonly client: MySQLManagementClient;\n\n /**\n * Initialize a new instance of the class ServerSecurityAlertPolicies class.\n * @param client Reference to the service client\n */\n constructor(client: MySQLManagementClient) {\n this.client = client;\n }\n\n /**\n * Get the server's threat detection policies.\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?: ServerSecurityAlertPoliciesListByServerOptionalParams\n ): PagedAsyncIterableIterator<ServerSecurityAlertPolicy> {\n const iter = this.listByServerPagingAll(\n resourceGroupName,\n serverName,\n options\n );\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(\n resourceGroupName,\n serverName,\n options,\n settings\n );\n }\n };\n }\n\n private async *listByServerPagingPage(\n resourceGroupName: string,\n serverName: string,\n options?: ServerSecurityAlertPoliciesListByServerOptionalParams,\n settings?: PageSettings\n ): AsyncIterableIterator<ServerSecurityAlertPolicy[]> {\n let result: ServerSecurityAlertPoliciesListByServerResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._listByServer(resourceGroupName, serverName, options);\n let 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 let 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?: ServerSecurityAlertPoliciesListByServerOptionalParams\n ): AsyncIterableIterator<ServerSecurityAlertPolicy> {\n for await (const page of this.listByServerPagingPage(\n resourceGroupName,\n serverName,\n options\n )) {\n yield* page;\n }\n }\n\n /**\n * Get a server's security alert policy.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param serverName The name of the server.\n * @param securityAlertPolicyName The name of the security alert policy.\n * @param options The options parameters.\n */\n get(\n resourceGroupName: string,\n serverName: string,\n securityAlertPolicyName: SecurityAlertPolicyName,\n options?: ServerSecurityAlertPoliciesGetOptionalParams\n ): Promise<ServerSecurityAlertPoliciesGetResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, serverName, securityAlertPolicyName, options },\n getOperationSpec\n );\n }\n\n /**\n * Creates or updates a threat detection policy.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param serverName The name of the server.\n * @param securityAlertPolicyName The name of the threat detection policy.\n * @param parameters The server security alert policy.\n * @param options The options parameters.\n */\n async beginCreateOrUpdate(\n resourceGroupName: string,\n serverName: string,\n securityAlertPolicyName: SecurityAlertPolicyName,\n parameters: ServerSecurityAlertPolicy,\n options?: ServerSecurityAlertPoliciesCreateOrUpdateOptionalParams\n ): Promise<\n PollerLike<\n PollOperationState<ServerSecurityAlertPoliciesCreateOrUpdateResponse>,\n ServerSecurityAlertPoliciesCreateOrUpdateResponse\n >\n > {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec\n ): Promise<ServerSecurityAlertPoliciesCreateOrUpdateResponse> => {\n return this.client.sendOperationRequest(args, spec);\n };\n const sendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec\n ) => {\n let currentRawResponse:\n | coreClient.FullOperationResponse\n | 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 = new LroImpl(\n sendOperation,\n {\n resourceGroupName,\n serverName,\n securityAlertPolicyName,\n parameters,\n options\n },\n createOrUpdateOperationSpec\n );\n const poller = new LroEngine(lro, {\n resumeFrom: options?.resumeFrom,\n intervalInMs: options?.updateIntervalInMs\n });\n await poller.poll();\n return poller;\n }\n\n /**\n * Creates or updates a threat detection policy.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param serverName The name of the server.\n * @param securityAlertPolicyName The name of the threat detection policy.\n * @param parameters The server security alert policy.\n * @param options The options parameters.\n */\n async beginCreateOrUpdateAndWait(\n resourceGroupName: string,\n serverName: string,\n securityAlertPolicyName: SecurityAlertPolicyName,\n parameters: ServerSecurityAlertPolicy,\n options?: ServerSecurityAlertPoliciesCreateOrUpdateOptionalParams\n ): Promise<ServerSecurityAlertPoliciesCreateOrUpdateResponse> {\n const poller = await this.beginCreateOrUpdate(\n resourceGroupName,\n serverName,\n securityAlertPolicyName,\n parameters,\n options\n );\n return poller.pollUntilDone();\n }\n\n /**\n * Get the server's threat detection policies.\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?: ServerSecurityAlertPoliciesListByServerOptionalParams\n ): Promise<ServerSecurityAlertPoliciesListByServerResponse> {\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?: ServerSecurityAlertPoliciesListByServerNextOptionalParams\n ): Promise<ServerSecurityAlertPoliciesListByServerNextResponse> {\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 getOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}/securityAlertPolicies/{securityAlertPolicyName}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ServerSecurityAlertPolicy\n },\n default: {}\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.serverName,\n Parameters.securityAlertPolicyName\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst createOrUpdateOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}/securityAlertPolicies/{securityAlertPolicyName}\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n bodyMapper: Mappers.ServerSecurityAlertPolicy\n },\n 201: {\n bodyMapper: Mappers.ServerSecurityAlertPolicy\n },\n 202: {\n bodyMapper: Mappers.ServerSecurityAlertPolicy\n },\n 204: {\n bodyMapper: Mappers.ServerSecurityAlertPolicy\n },\n default: {}\n },\n requestBody: Parameters.parameters7,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.serverName,\n Parameters.securityAlertPolicyName\n ],\n headerParameters: [Parameters.contentType, Parameters.accept],\n mediaType: \"json\",\n serializer\n};\nconst listByServerOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}/securityAlertPolicies\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ServerSecurityAlertPolicyListResult\n },\n default: {}\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.ServerSecurityAlertPolicyListResult\n },\n default: {}\n },\n queryParameters: [Parameters.apiVersion],\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":"serverSecurityAlertPolicies.js","sourceRoot":"","sources":["../../../src/operations/serverSecurityAlertPolicies.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAE1D,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAC;AAChD,OAAO,KAAK,UAAU,MAAM,yBAAyB,CAAC;AAEtD,OAAO,EAAkC,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5E,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAcxC,4CAA4C;AAC5C,+DAA+D;AAC/D,MAAM,OAAO,+BAA+B;IAEzB,MAAM,CAAwB;IAE/C;;;OAGG;IACH,YAAY,MAA6B;QACvC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;OAKG;IACI,YAAY,CACjB,iBAAyB,EACzB,UAAkB,EAClB,OAA+D;QAE/D,MAAM,IAAI,GAAG,IAAI,CAAC,qBAAqB,CACrC,iBAAiB,EACjB,UAAU,EACV,OAAO,CACR,CAAC;QACF,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,CAChC,iBAAiB,EACjB,UAAU,EACV,OAAO,EAC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AG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,mCAAmC;SACxD;QACD,OAAO,EAAE,EAAE;KACZ;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,mCAAmC;SACxD;QACD,OAAO,EAAE,EAAE;KACZ;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;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 { PagedAsyncIterableIterator, PageSettings } from \"@azure/core-paging\";\nimport { setContinuationToken } from \"../pagingHelper.js\";\nimport { ServerSecurityAlertPolicies } 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 { MySQLManagementClient } from \"../mySQLManagementClient.js\";\nimport { PollerLike, PollOperationState, LroEngine } from \"@azure/core-lro\";\nimport { LroImpl } from \"../lroImpl.js\";\nimport {\n ServerSecurityAlertPolicy,\n ServerSecurityAlertPoliciesListByServerNextOptionalParams,\n ServerSecurityAlertPoliciesListByServerOptionalParams,\n ServerSecurityAlertPoliciesListByServerResponse,\n SecurityAlertPolicyName,\n ServerSecurityAlertPoliciesGetOptionalParams,\n ServerSecurityAlertPoliciesGetResponse,\n ServerSecurityAlertPoliciesCreateOrUpdateOptionalParams,\n ServerSecurityAlertPoliciesCreateOrUpdateResponse,\n ServerSecurityAlertPoliciesListByServerNextResponse\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing ServerSecurityAlertPolicies operations. */\nexport class ServerSecurityAlertPoliciesImpl\n implements ServerSecurityAlertPolicies {\n private readonly client: MySQLManagementClient;\n\n /**\n * Initialize a new instance of the class ServerSecurityAlertPolicies class.\n * @param client Reference to the service client\n */\n constructor(client: MySQLManagementClient) {\n this.client = client;\n }\n\n /**\n * Get the server's threat detection policies.\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?: ServerSecurityAlertPoliciesListByServerOptionalParams\n ): PagedAsyncIterableIterator<ServerSecurityAlertPolicy> {\n const iter = this.listByServerPagingAll(\n resourceGroupName,\n serverName,\n options\n );\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(\n resourceGroupName,\n serverName,\n options,\n settings\n );\n }\n };\n }\n\n private async *listByServerPagingPage(\n resourceGroupName: string,\n serverName: string,\n options?: ServerSecurityAlertPoliciesListByServerOptionalParams,\n settings?: PageSettings\n ): AsyncIterableIterator<ServerSecurityAlertPolicy[]> {\n let result: ServerSecurityAlertPoliciesListByServerResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._listByServer(resourceGroupName, serverName, options);\n let 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 let 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?: ServerSecurityAlertPoliciesListByServerOptionalParams\n ): AsyncIterableIterator<ServerSecurityAlertPolicy> {\n for await (const page of this.listByServerPagingPage(\n resourceGroupName,\n serverName,\n options\n )) {\n yield* page;\n }\n }\n\n /**\n * Get a server's security alert policy.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param serverName The name of the server.\n * @param securityAlertPolicyName The name of the security alert policy.\n * @param options The options parameters.\n */\n get(\n resourceGroupName: string,\n serverName: string,\n securityAlertPolicyName: SecurityAlertPolicyName,\n options?: ServerSecurityAlertPoliciesGetOptionalParams\n ): Promise<ServerSecurityAlertPoliciesGetResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, serverName, securityAlertPolicyName, options },\n getOperationSpec\n );\n }\n\n /**\n * Creates or updates a threat detection policy.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param serverName The name of the server.\n * @param securityAlertPolicyName The name of the threat detection policy.\n * @param parameters The server security alert policy.\n * @param options The options parameters.\n */\n async beginCreateOrUpdate(\n resourceGroupName: string,\n serverName: string,\n securityAlertPolicyName: SecurityAlertPolicyName,\n parameters: ServerSecurityAlertPolicy,\n options?: ServerSecurityAlertPoliciesCreateOrUpdateOptionalParams\n ): Promise<\n PollerLike<\n PollOperationState<ServerSecurityAlertPoliciesCreateOrUpdateResponse>,\n ServerSecurityAlertPoliciesCreateOrUpdateResponse\n >\n > {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec\n ): Promise<ServerSecurityAlertPoliciesCreateOrUpdateResponse> => {\n return this.client.sendOperationRequest(args, spec);\n };\n const sendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec\n ) => {\n let currentRawResponse:\n | coreClient.FullOperationResponse\n | 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 = new LroImpl(\n sendOperation,\n {\n resourceGroupName,\n serverName,\n securityAlertPolicyName,\n parameters,\n options\n },\n createOrUpdateOperationSpec\n );\n const poller = new LroEngine(lro, {\n resumeFrom: options?.resumeFrom,\n intervalInMs: options?.updateIntervalInMs\n });\n await poller.poll();\n return poller;\n }\n\n /**\n * Creates or updates a threat detection policy.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param serverName The name of the server.\n * @param securityAlertPolicyName The name of the threat detection policy.\n * @param parameters The server security alert policy.\n * @param options The options parameters.\n */\n async beginCreateOrUpdateAndWait(\n resourceGroupName: string,\n serverName: string,\n securityAlertPolicyName: SecurityAlertPolicyName,\n parameters: ServerSecurityAlertPolicy,\n options?: ServerSecurityAlertPoliciesCreateOrUpdateOptionalParams\n ): Promise<ServerSecurityAlertPoliciesCreateOrUpdateResponse> {\n const poller = await this.beginCreateOrUpdate(\n resourceGroupName,\n serverName,\n securityAlertPolicyName,\n parameters,\n options\n );\n return poller.pollUntilDone();\n }\n\n /**\n * Get the server's threat detection policies.\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?: ServerSecurityAlertPoliciesListByServerOptionalParams\n ): Promise<ServerSecurityAlertPoliciesListByServerResponse> {\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?: ServerSecurityAlertPoliciesListByServerNextOptionalParams\n ): Promise<ServerSecurityAlertPoliciesListByServerNextResponse> {\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 getOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}/securityAlertPolicies/{securityAlertPolicyName}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ServerSecurityAlertPolicy\n },\n default: {}\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.serverName,\n Parameters.securityAlertPolicyName\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst createOrUpdateOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}/securityAlertPolicies/{securityAlertPolicyName}\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n bodyMapper: Mappers.ServerSecurityAlertPolicy\n },\n 201: {\n bodyMapper: Mappers.ServerSecurityAlertPolicy\n },\n 202: {\n bodyMapper: Mappers.ServerSecurityAlertPolicy\n },\n 204: {\n bodyMapper: Mappers.ServerSecurityAlertPolicy\n },\n default: {}\n },\n requestBody: Parameters.parameters7,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.serverName,\n Parameters.securityAlertPolicyName\n ],\n headerParameters: [Parameters.contentType, Parameters.accept],\n mediaType: \"json\",\n serializer\n};\nconst listByServerOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}/securityAlertPolicies\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ServerSecurityAlertPolicyListResult\n },\n default: {}\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.ServerSecurityAlertPolicyListResult\n },\n default: {}\n },\n queryParameters: [Parameters.apiVersion],\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"]}
|
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
6
6
|
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
7
7
|
*/
|
|
8
|
-
import { __asyncDelegator, __asyncGenerator, __asyncValues, __await } from "tslib";
|
|
9
8
|
import * as coreClient from "@azure/core-client";
|
|
10
9
|
import * as Mappers from "../models/mappers.js";
|
|
11
10
|
import * as Parameters from "../models/parameters.js";
|
|
@@ -14,6 +13,7 @@ import { LroImpl } from "../lroImpl.js";
|
|
|
14
13
|
/// <reference lib="esnext.asynciterable" />
|
|
15
14
|
/** Class containing Servers operations. */
|
|
16
15
|
export class ServersImpl {
|
|
16
|
+
client;
|
|
17
17
|
/**
|
|
18
18
|
* Initialize a new instance of the class Servers class.
|
|
19
19
|
* @param client Reference to the service client
|
|
@@ -36,39 +36,22 @@ export class ServersImpl {
|
|
|
36
36
|
return this;
|
|
37
37
|
},
|
|
38
38
|
byPage: (settings) => {
|
|
39
|
-
if (settings
|
|
39
|
+
if (settings?.maxPageSize) {
|
|
40
40
|
throw new Error("maxPageSize is not supported by this operation.");
|
|
41
41
|
}
|
|
42
42
|
return this.listByResourceGroupPagingPage(resourceGroupName, options, settings);
|
|
43
43
|
}
|
|
44
44
|
};
|
|
45
45
|
}
|
|
46
|
-
listByResourceGroupPagingPage(resourceGroupName, options, _settings) {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
yield yield __await(result.value || []);
|
|
51
|
-
});
|
|
46
|
+
async *listByResourceGroupPagingPage(resourceGroupName, options, _settings) {
|
|
47
|
+
let result;
|
|
48
|
+
result = await this._listByResourceGroup(resourceGroupName, options);
|
|
49
|
+
yield result.value || [];
|
|
52
50
|
}
|
|
53
|
-
listByResourceGroupPagingAll(resourceGroupName, options) {
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
for (var _d = true, _e = __asyncValues(this.listByResourceGroupPagingPage(resourceGroupName, options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
|
|
58
|
-
_c = _f.value;
|
|
59
|
-
_d = false;
|
|
60
|
-
const page = _c;
|
|
61
|
-
yield __await(yield* __asyncDelegator(__asyncValues(page)));
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
65
|
-
finally {
|
|
66
|
-
try {
|
|
67
|
-
if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
|
|
68
|
-
}
|
|
69
|
-
finally { if (e_1) throw e_1.error; }
|
|
70
|
-
}
|
|
71
|
-
});
|
|
51
|
+
async *listByResourceGroupPagingAll(resourceGroupName, options) {
|
|
52
|
+
for await (const page of this.listByResourceGroupPagingPage(resourceGroupName, options)) {
|
|
53
|
+
yield* page;
|
|
54
|
+
}
|
|
72
55
|
}
|
|
73
56
|
/**
|
|
74
57
|
* List all the servers in a given subscription.
|
|
@@ -84,39 +67,22 @@ export class ServersImpl {
|
|
|
84
67
|
return this;
|
|
85
68
|
},
|
|
86
69
|
byPage: (settings) => {
|
|
87
|
-
if (settings
|
|
70
|
+
if (settings?.maxPageSize) {
|
|
88
71
|
throw new Error("maxPageSize is not supported by this operation.");
|
|
89
72
|
}
|
|
90
73
|
return this.listPagingPage(options, settings);
|
|
91
74
|
}
|
|
92
75
|
};
|
|
93
76
|
}
|
|
94
|
-
listPagingPage(options, _settings) {
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
yield yield __await(result.value || []);
|
|
99
|
-
});
|
|
77
|
+
async *listPagingPage(options, _settings) {
|
|
78
|
+
let result;
|
|
79
|
+
result = await this._list(options);
|
|
80
|
+
yield result.value || [];
|
|
100
81
|
}
|
|
101
|
-
listPagingAll(options) {
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
for (var _d = true, _e = __asyncValues(this.listPagingPage(options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
|
|
106
|
-
_c = _f.value;
|
|
107
|
-
_d = false;
|
|
108
|
-
const page = _c;
|
|
109
|
-
yield __await(yield* __asyncDelegator(__asyncValues(page)));
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
|
113
|
-
finally {
|
|
114
|
-
try {
|
|
115
|
-
if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
|
|
116
|
-
}
|
|
117
|
-
finally { if (e_2) throw e_2.error; }
|
|
118
|
-
}
|
|
119
|
-
});
|
|
82
|
+
async *listPagingAll(options) {
|
|
83
|
+
for await (const page of this.listPagingPage(options)) {
|
|
84
|
+
yield* page;
|
|
85
|
+
}
|
|
120
86
|
}
|
|
121
87
|
/**
|
|
122
88
|
* Creates a new server or updates an existing server. The update action will overwrite the existing
|
|
@@ -131,14 +97,19 @@ export class ServersImpl {
|
|
|
131
97
|
return this.client.sendOperationRequest(args, spec);
|
|
132
98
|
};
|
|
133
99
|
const sendOperation = async (args, spec) => {
|
|
134
|
-
var _a;
|
|
135
100
|
let currentRawResponse = undefined;
|
|
136
|
-
const providedCallback =
|
|
101
|
+
const providedCallback = args.options?.onResponse;
|
|
137
102
|
const callback = (rawResponse, flatResponse) => {
|
|
138
103
|
currentRawResponse = rawResponse;
|
|
139
|
-
providedCallback
|
|
104
|
+
providedCallback?.(rawResponse, flatResponse);
|
|
105
|
+
};
|
|
106
|
+
const updatedArgs = {
|
|
107
|
+
...args,
|
|
108
|
+
options: {
|
|
109
|
+
...args.options,
|
|
110
|
+
onResponse: callback
|
|
111
|
+
}
|
|
140
112
|
};
|
|
141
|
-
const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
|
|
142
113
|
const flatResponse = await directSendOperation(updatedArgs, spec);
|
|
143
114
|
return {
|
|
144
115
|
flatResponse,
|
|
@@ -151,8 +122,8 @@ export class ServersImpl {
|
|
|
151
122
|
};
|
|
152
123
|
const lro = new LroImpl(sendOperation, { resourceGroupName, serverName, parameters, options }, createOperationSpec);
|
|
153
124
|
const poller = new LroEngine(lro, {
|
|
154
|
-
resumeFrom: options
|
|
155
|
-
intervalInMs: options
|
|
125
|
+
resumeFrom: options?.resumeFrom,
|
|
126
|
+
intervalInMs: options?.updateIntervalInMs
|
|
156
127
|
});
|
|
157
128
|
await poller.poll();
|
|
158
129
|
return poller;
|
|
@@ -182,14 +153,19 @@ export class ServersImpl {
|
|
|
182
153
|
return this.client.sendOperationRequest(args, spec);
|
|
183
154
|
};
|
|
184
155
|
const sendOperation = async (args, spec) => {
|
|
185
|
-
var _a;
|
|
186
156
|
let currentRawResponse = undefined;
|
|
187
|
-
const providedCallback =
|
|
157
|
+
const providedCallback = args.options?.onResponse;
|
|
188
158
|
const callback = (rawResponse, flatResponse) => {
|
|
189
159
|
currentRawResponse = rawResponse;
|
|
190
|
-
providedCallback
|
|
160
|
+
providedCallback?.(rawResponse, flatResponse);
|
|
161
|
+
};
|
|
162
|
+
const updatedArgs = {
|
|
163
|
+
...args,
|
|
164
|
+
options: {
|
|
165
|
+
...args.options,
|
|
166
|
+
onResponse: callback
|
|
167
|
+
}
|
|
191
168
|
};
|
|
192
|
-
const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
|
|
193
169
|
const flatResponse = await directSendOperation(updatedArgs, spec);
|
|
194
170
|
return {
|
|
195
171
|
flatResponse,
|
|
@@ -202,8 +178,8 @@ export class ServersImpl {
|
|
|
202
178
|
};
|
|
203
179
|
const lro = new LroImpl(sendOperation, { resourceGroupName, serverName, parameters, options }, updateOperationSpec);
|
|
204
180
|
const poller = new LroEngine(lro, {
|
|
205
|
-
resumeFrom: options
|
|
206
|
-
intervalInMs: options
|
|
181
|
+
resumeFrom: options?.resumeFrom,
|
|
182
|
+
intervalInMs: options?.updateIntervalInMs
|
|
207
183
|
});
|
|
208
184
|
await poller.poll();
|
|
209
185
|
return poller;
|
|
@@ -231,14 +207,19 @@ export class ServersImpl {
|
|
|
231
207
|
return this.client.sendOperationRequest(args, spec);
|
|
232
208
|
};
|
|
233
209
|
const sendOperation = async (args, spec) => {
|
|
234
|
-
var _a;
|
|
235
210
|
let currentRawResponse = undefined;
|
|
236
|
-
const providedCallback =
|
|
211
|
+
const providedCallback = args.options?.onResponse;
|
|
237
212
|
const callback = (rawResponse, flatResponse) => {
|
|
238
213
|
currentRawResponse = rawResponse;
|
|
239
|
-
providedCallback
|
|
214
|
+
providedCallback?.(rawResponse, flatResponse);
|
|
215
|
+
};
|
|
216
|
+
const updatedArgs = {
|
|
217
|
+
...args,
|
|
218
|
+
options: {
|
|
219
|
+
...args.options,
|
|
220
|
+
onResponse: callback
|
|
221
|
+
}
|
|
240
222
|
};
|
|
241
|
-
const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
|
|
242
223
|
const flatResponse = await directSendOperation(updatedArgs, spec);
|
|
243
224
|
return {
|
|
244
225
|
flatResponse,
|
|
@@ -251,8 +232,8 @@ export class ServersImpl {
|
|
|
251
232
|
};
|
|
252
233
|
const lro = new LroImpl(sendOperation, { resourceGroupName, serverName, options }, deleteOperationSpec);
|
|
253
234
|
const poller = new LroEngine(lro, {
|
|
254
|
-
resumeFrom: options
|
|
255
|
-
intervalInMs: options
|
|
235
|
+
resumeFrom: options?.resumeFrom,
|
|
236
|
+
intervalInMs: options?.updateIntervalInMs
|
|
256
237
|
});
|
|
257
238
|
await poller.poll();
|
|
258
239
|
return poller;
|
|
@@ -302,14 +283,19 @@ export class ServersImpl {
|
|
|
302
283
|
return this.client.sendOperationRequest(args, spec);
|
|
303
284
|
};
|
|
304
285
|
const sendOperation = async (args, spec) => {
|
|
305
|
-
var _a;
|
|
306
286
|
let currentRawResponse = undefined;
|
|
307
|
-
const providedCallback =
|
|
287
|
+
const providedCallback = args.options?.onResponse;
|
|
308
288
|
const callback = (rawResponse, flatResponse) => {
|
|
309
289
|
currentRawResponse = rawResponse;
|
|
310
|
-
providedCallback
|
|
290
|
+
providedCallback?.(rawResponse, flatResponse);
|
|
291
|
+
};
|
|
292
|
+
const updatedArgs = {
|
|
293
|
+
...args,
|
|
294
|
+
options: {
|
|
295
|
+
...args.options,
|
|
296
|
+
onResponse: callback
|
|
297
|
+
}
|
|
311
298
|
};
|
|
312
|
-
const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
|
|
313
299
|
const flatResponse = await directSendOperation(updatedArgs, spec);
|
|
314
300
|
return {
|
|
315
301
|
flatResponse,
|
|
@@ -322,8 +308,8 @@ export class ServersImpl {
|
|
|
322
308
|
};
|
|
323
309
|
const lro = new LroImpl(sendOperation, { resourceGroupName, serverName, options }, restartOperationSpec);
|
|
324
310
|
const poller = new LroEngine(lro, {
|
|
325
|
-
resumeFrom: options
|
|
326
|
-
intervalInMs: options
|
|
311
|
+
resumeFrom: options?.resumeFrom,
|
|
312
|
+
intervalInMs: options?.updateIntervalInMs
|
|
327
313
|
});
|
|
328
314
|
await poller.poll();
|
|
329
315
|
return poller;
|
|
@@ -349,14 +335,19 @@ export class ServersImpl {
|
|
|
349
335
|
return this.client.sendOperationRequest(args, spec);
|
|
350
336
|
};
|
|
351
337
|
const sendOperation = async (args, spec) => {
|
|
352
|
-
var _a;
|
|
353
338
|
let currentRawResponse = undefined;
|
|
354
|
-
const providedCallback =
|
|
339
|
+
const providedCallback = args.options?.onResponse;
|
|
355
340
|
const callback = (rawResponse, flatResponse) => {
|
|
356
341
|
currentRawResponse = rawResponse;
|
|
357
|
-
providedCallback
|
|
342
|
+
providedCallback?.(rawResponse, flatResponse);
|
|
343
|
+
};
|
|
344
|
+
const updatedArgs = {
|
|
345
|
+
...args,
|
|
346
|
+
options: {
|
|
347
|
+
...args.options,
|
|
348
|
+
onResponse: callback
|
|
349
|
+
}
|
|
358
350
|
};
|
|
359
|
-
const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
|
|
360
351
|
const flatResponse = await directSendOperation(updatedArgs, spec);
|
|
361
352
|
return {
|
|
362
353
|
flatResponse,
|
|
@@ -369,8 +360,8 @@ export class ServersImpl {
|
|
|
369
360
|
};
|
|
370
361
|
const lro = new LroImpl(sendOperation, { resourceGroupName, serverName, options }, startOperationSpec);
|
|
371
362
|
const poller = new LroEngine(lro, {
|
|
372
|
-
resumeFrom: options
|
|
373
|
-
intervalInMs: options
|
|
363
|
+
resumeFrom: options?.resumeFrom,
|
|
364
|
+
intervalInMs: options?.updateIntervalInMs
|
|
374
365
|
});
|
|
375
366
|
await poller.poll();
|
|
376
367
|
return poller;
|
|
@@ -396,14 +387,19 @@ export class ServersImpl {
|
|
|
396
387
|
return this.client.sendOperationRequest(args, spec);
|
|
397
388
|
};
|
|
398
389
|
const sendOperation = async (args, spec) => {
|
|
399
|
-
var _a;
|
|
400
390
|
let currentRawResponse = undefined;
|
|
401
|
-
const providedCallback =
|
|
391
|
+
const providedCallback = args.options?.onResponse;
|
|
402
392
|
const callback = (rawResponse, flatResponse) => {
|
|
403
393
|
currentRawResponse = rawResponse;
|
|
404
|
-
providedCallback
|
|
394
|
+
providedCallback?.(rawResponse, flatResponse);
|
|
395
|
+
};
|
|
396
|
+
const updatedArgs = {
|
|
397
|
+
...args,
|
|
398
|
+
options: {
|
|
399
|
+
...args.options,
|
|
400
|
+
onResponse: callback
|
|
401
|
+
}
|
|
405
402
|
};
|
|
406
|
-
const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
|
|
407
403
|
const flatResponse = await directSendOperation(updatedArgs, spec);
|
|
408
404
|
return {
|
|
409
405
|
flatResponse,
|
|
@@ -416,8 +412,8 @@ export class ServersImpl {
|
|
|
416
412
|
};
|
|
417
413
|
const lro = new LroImpl(sendOperation, { resourceGroupName, serverName, options }, stopOperationSpec);
|
|
418
414
|
const poller = new LroEngine(lro, {
|
|
419
|
-
resumeFrom: options
|
|
420
|
-
intervalInMs: options
|
|
415
|
+
resumeFrom: options?.resumeFrom,
|
|
416
|
+
intervalInMs: options?.updateIntervalInMs
|
|
421
417
|
});
|
|
422
418
|
await poller.poll();
|
|
423
419
|
return poller;
|
|
@@ -444,14 +440,19 @@ export class ServersImpl {
|
|
|
444
440
|
return this.client.sendOperationRequest(args, spec);
|
|
445
441
|
};
|
|
446
442
|
const sendOperation = async (args, spec) => {
|
|
447
|
-
var _a;
|
|
448
443
|
let currentRawResponse = undefined;
|
|
449
|
-
const providedCallback =
|
|
444
|
+
const providedCallback = args.options?.onResponse;
|
|
450
445
|
const callback = (rawResponse, flatResponse) => {
|
|
451
446
|
currentRawResponse = rawResponse;
|
|
452
|
-
providedCallback
|
|
447
|
+
providedCallback?.(rawResponse, flatResponse);
|
|
448
|
+
};
|
|
449
|
+
const updatedArgs = {
|
|
450
|
+
...args,
|
|
451
|
+
options: {
|
|
452
|
+
...args.options,
|
|
453
|
+
onResponse: callback
|
|
454
|
+
}
|
|
453
455
|
};
|
|
454
|
-
const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
|
|
455
456
|
const flatResponse = await directSendOperation(updatedArgs, spec);
|
|
456
457
|
return {
|
|
457
458
|
flatResponse,
|
|
@@ -464,8 +465,8 @@ export class ServersImpl {
|
|
|
464
465
|
};
|
|
465
466
|
const lro = new LroImpl(sendOperation, { resourceGroupName, serverName, parameters, options }, upgradeOperationSpec);
|
|
466
467
|
const poller = new LroEngine(lro, {
|
|
467
|
-
resumeFrom: options
|
|
468
|
-
intervalInMs: options
|
|
468
|
+
resumeFrom: options?.resumeFrom,
|
|
469
|
+
intervalInMs: options?.updateIntervalInMs
|
|
469
470
|
});
|
|
470
471
|
await poller.poll();
|
|
471
472
|
return poller;
|