@azure/arm-mysql-flexible 3.1.1-alpha.20230511.1 → 4.0.0-beta.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/CHANGELOG.md +96 -8
- package/LICENSE +1 -1
- package/README.md +1 -1
- package/dist/index.js +3646 -1927
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +1 -1
- package/dist/index.min.js.map +1 -1
- package/dist-esm/samples-dev/azureAdAdministratorsCreateOrUpdateSample.d.ts +2 -0
- package/dist-esm/samples-dev/azureAdAdministratorsCreateOrUpdateSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/azureAdAdministratorsCreateOrUpdateSample.js +47 -0
- package/dist-esm/samples-dev/azureAdAdministratorsCreateOrUpdateSample.js.map +1 -0
- package/dist-esm/samples-dev/azureAdAdministratorsDeleteSample.d.ts +2 -0
- package/dist-esm/samples-dev/azureAdAdministratorsDeleteSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/azureAdAdministratorsDeleteSample.js +40 -0
- package/dist-esm/samples-dev/azureAdAdministratorsDeleteSample.js.map +1 -0
- package/dist-esm/samples-dev/azureAdAdministratorsGetSample.d.ts +2 -0
- package/dist-esm/samples-dev/azureAdAdministratorsGetSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/azureAdAdministratorsGetSample.js +40 -0
- package/dist-esm/samples-dev/azureAdAdministratorsGetSample.js.map +1 -0
- package/dist-esm/samples-dev/azureAdAdministratorsListByServerSample.d.ts +2 -0
- package/dist-esm/samples-dev/azureAdAdministratorsListByServerSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/azureAdAdministratorsListByServerSample.js +60 -0
- package/dist-esm/samples-dev/azureAdAdministratorsListByServerSample.js.map +1 -0
- package/dist-esm/samples-dev/backupAndExportCreateSample.d.ts +2 -0
- package/dist-esm/samples-dev/backupAndExportCreateSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/backupAndExportCreateSample.js +46 -0
- package/dist-esm/samples-dev/backupAndExportCreateSample.js.map +1 -0
- package/dist-esm/samples-dev/backupAndExportValidateBackupSample.d.ts +2 -0
- package/dist-esm/samples-dev/backupAndExportValidateBackupSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/backupAndExportValidateBackupSample.js +39 -0
- package/dist-esm/samples-dev/backupAndExportValidateBackupSample.js.map +1 -0
- package/dist-esm/samples-dev/backupsGetSample.js +1 -1
- package/dist-esm/samples-dev/backupsListByServerSample.js +1 -1
- package/dist-esm/samples-dev/backupsPutSample.d.ts +2 -0
- package/dist-esm/samples-dev/backupsPutSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/backupsPutSample.js +40 -0
- package/dist-esm/samples-dev/backupsPutSample.js.map +1 -0
- package/dist-esm/samples-dev/checkNameAvailabilityExecuteSample.js +1 -1
- package/dist-esm/samples-dev/checkNameAvailabilityWithoutLocationExecuteSample.d.ts +2 -0
- package/dist-esm/samples-dev/checkNameAvailabilityWithoutLocationExecuteSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/checkNameAvailabilityWithoutLocationExecuteSample.js +41 -0
- package/dist-esm/samples-dev/checkNameAvailabilityWithoutLocationExecuteSample.js.map +1 -0
- package/dist-esm/samples-dev/checkVirtualNetworkSubnetUsageExecuteSample.js +1 -1
- package/dist-esm/samples-dev/configurationsBatchUpdateSample.js +2 -1
- package/dist-esm/samples-dev/configurationsBatchUpdateSample.js.map +1 -1
- package/dist-esm/samples-dev/configurationsCreateOrUpdateSample.d.ts +2 -0
- package/dist-esm/samples-dev/configurationsCreateOrUpdateSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/configurationsCreateOrUpdateSample.js +41 -0
- package/dist-esm/samples-dev/configurationsCreateOrUpdateSample.js.map +1 -0
- package/dist-esm/samples-dev/configurationsGetSample.js +1 -1
- package/dist-esm/samples-dev/configurationsListByServerSample.js +5 -2
- package/dist-esm/samples-dev/configurationsListByServerSample.js.map +1 -1
- package/dist-esm/samples-dev/configurationsUpdateSample.js +1 -1
- package/dist-esm/samples-dev/databasesCreateOrUpdateSample.js +1 -1
- package/dist-esm/samples-dev/databasesDeleteSample.js +1 -1
- package/dist-esm/samples-dev/databasesGetSample.js +1 -1
- package/dist-esm/samples-dev/databasesListByServerSample.js +1 -1
- package/dist-esm/samples-dev/firewallRulesCreateOrUpdateSample.js +1 -1
- package/dist-esm/samples-dev/firewallRulesDeleteSample.js +1 -1
- package/dist-esm/samples-dev/firewallRulesGetSample.js +1 -1
- package/dist-esm/samples-dev/firewallRulesListByServerSample.js +1 -1
- package/dist-esm/samples-dev/getPrivateDnsZoneSuffixExecuteSample.js +1 -1
- package/dist-esm/samples-dev/locationBasedCapabilitiesListSample.js +1 -1
- package/dist-esm/samples-dev/logFilesListByServerSample.d.ts +2 -0
- package/dist-esm/samples-dev/logFilesListByServerSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/logFilesListByServerSample.js +60 -0
- package/dist-esm/samples-dev/logFilesListByServerSample.js.map +1 -0
- package/dist-esm/samples-dev/operationsListSample.js +1 -1
- package/dist-esm/samples-dev/replicasListByServerSample.js +1 -1
- package/dist-esm/samples-dev/serversCreateSample.js +48 -3
- package/dist-esm/samples-dev/serversCreateSample.js.map +1 -1
- package/dist-esm/samples-dev/serversDeleteSample.js +1 -1
- package/dist-esm/samples-dev/serversFailoverSample.js +1 -1
- package/dist-esm/samples-dev/serversGetSample.js +2 -2
- package/dist-esm/samples-dev/serversListByResourceGroupSample.js +1 -1
- package/dist-esm/samples-dev/serversListSample.js +1 -1
- package/dist-esm/samples-dev/serversResetGtidSample.d.ts +2 -0
- package/dist-esm/samples-dev/serversResetGtidSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/serversResetGtidSample.js +42 -0
- package/dist-esm/samples-dev/serversResetGtidSample.js.map +1 -0
- package/dist-esm/samples-dev/serversRestartSample.js +1 -1
- package/dist-esm/samples-dev/serversStartSample.js +1 -1
- package/dist-esm/samples-dev/serversStopSample.js +1 -1
- package/dist-esm/samples-dev/serversUpdateSample.js +42 -3
- package/dist-esm/samples-dev/serversUpdateSample.js.map +1 -1
- package/dist-esm/src/lroImpl.d.ts +6 -11
- package/dist-esm/src/lroImpl.d.ts.map +1 -1
- package/dist-esm/src/lroImpl.js +12 -20
- package/dist-esm/src/lroImpl.js.map +1 -1
- package/dist-esm/src/models/index.d.ts +767 -378
- package/dist-esm/src/models/index.d.ts.map +1 -1
- package/dist-esm/src/models/index.js +78 -44
- package/dist-esm/src/models/index.js.map +1 -1
- package/dist-esm/src/models/mappers.d.ts +44 -15
- package/dist-esm/src/models/mappers.d.ts.map +1 -1
- package/dist-esm/src/models/mappers.js +1232 -601
- package/dist-esm/src/models/mappers.js.map +1 -1
- package/dist-esm/src/models/parameters.d.ts +14 -5
- package/dist-esm/src/models/parameters.d.ts.map +1 -1
- package/dist-esm/src/models/parameters.js +96 -21
- package/dist-esm/src/models/parameters.js.map +1 -1
- package/dist-esm/src/mySQLManagementFlexibleServerClient.d.ts +9 -8
- package/dist-esm/src/mySQLManagementFlexibleServerClient.d.ts.map +1 -1
- package/dist-esm/src/mySQLManagementFlexibleServerClient.js +10 -36
- package/dist-esm/src/mySQLManagementFlexibleServerClient.js.map +1 -1
- package/dist-esm/src/operations/azureADAdministrators.d.ts +81 -0
- package/dist-esm/src/operations/azureADAdministrators.d.ts.map +1 -0
- package/dist-esm/src/operations/azureADAdministrators.js +368 -0
- package/dist-esm/src/operations/azureADAdministrators.js.map +1 -0
- package/dist-esm/src/operations/backupAndExport.d.ts +37 -0
- package/dist-esm/src/operations/backupAndExport.d.ts.map +1 -0
- package/dist-esm/src/operations/backupAndExport.js +146 -0
- package/dist-esm/src/operations/backupAndExport.js.map +1 -0
- package/dist-esm/src/operations/backups.d.ts +9 -1
- package/dist-esm/src/operations/backups.d.ts.map +1 -1
- package/dist-esm/src/operations/backups.js +34 -2
- package/dist-esm/src/operations/backups.js.map +1 -1
- package/dist-esm/src/operations/checkNameAvailabilityWithoutLocation.d.ts +19 -0
- package/dist-esm/src/operations/checkNameAvailabilityWithoutLocation.d.ts.map +1 -0
- package/dist-esm/src/operations/checkNameAvailabilityWithoutLocation.js +49 -0
- package/dist-esm/src/operations/checkNameAvailabilityWithoutLocation.js.map +1 -0
- package/dist-esm/src/operations/checkVirtualNetworkSubnetUsage.js +1 -1
- package/dist-esm/src/operations/checkVirtualNetworkSubnetUsage.js.map +1 -1
- package/dist-esm/src/operations/configurations.d.ts +22 -4
- package/dist-esm/src/operations/configurations.d.ts.map +1 -1
- package/dist-esm/src/operations/configurations.js +132 -14
- package/dist-esm/src/operations/configurations.js.map +1 -1
- package/dist-esm/src/operations/databases.d.ts +3 -3
- package/dist-esm/src/operations/databases.d.ts.map +1 -1
- package/dist-esm/src/operations/databases.js +24 -10
- package/dist-esm/src/operations/databases.js.map +1 -1
- package/dist-esm/src/operations/firewallRules.d.ts +3 -3
- package/dist-esm/src/operations/firewallRules.d.ts.map +1 -1
- package/dist-esm/src/operations/firewallRules.js +25 -11
- package/dist-esm/src/operations/firewallRules.js.map +1 -1
- package/dist-esm/src/operations/index.d.ts +8 -4
- package/dist-esm/src/operations/index.d.ts.map +1 -1
- package/dist-esm/src/operations/index.js +8 -4
- package/dist-esm/src/operations/index.js.map +1 -1
- package/dist-esm/src/operations/logFiles.d.ts +38 -0
- package/dist-esm/src/operations/logFiles.d.ts.map +1 -0
- package/dist-esm/src/operations/logFiles.js +155 -0
- package/dist-esm/src/operations/logFiles.js.map +1 -0
- package/dist-esm/src/operations/replicas.js +1 -1
- package/dist-esm/src/operations/replicas.js.map +1 -1
- package/dist-esm/src/operations/servers.d.ts +25 -9
- package/dist-esm/src/operations/servers.d.ts.map +1 -1
- package/dist-esm/src/operations/servers.js +155 -44
- package/dist-esm/src/operations/servers.js.map +1 -1
- package/dist-esm/src/operationsInterfaces/azureADAdministrators.d.ts +56 -0
- package/dist-esm/src/operationsInterfaces/azureADAdministrators.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/azureADAdministrators.js +9 -0
- package/dist-esm/src/operationsInterfaces/azureADAdministrators.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/backupAndExport.d.ts +29 -0
- package/dist-esm/src/operationsInterfaces/backupAndExport.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/backupAndExport.js +9 -0
- package/dist-esm/src/operationsInterfaces/backupAndExport.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/backups.d.ts +9 -1
- package/dist-esm/src/operationsInterfaces/backups.d.ts.map +1 -1
- package/dist-esm/src/operationsInterfaces/checkNameAvailabilityWithoutLocation.d.ts +11 -0
- package/dist-esm/src/operationsInterfaces/checkNameAvailabilityWithoutLocation.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/checkNameAvailabilityWithoutLocation.js +9 -0
- package/dist-esm/src/operationsInterfaces/checkNameAvailabilityWithoutLocation.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/configurations.d.ts +22 -4
- package/dist-esm/src/operationsInterfaces/configurations.d.ts.map +1 -1
- package/dist-esm/src/operationsInterfaces/databases.d.ts +3 -3
- package/dist-esm/src/operationsInterfaces/databases.d.ts.map +1 -1
- package/dist-esm/src/operationsInterfaces/firewallRules.d.ts +3 -3
- package/dist-esm/src/operationsInterfaces/firewallRules.d.ts.map +1 -1
- package/dist-esm/src/operationsInterfaces/index.d.ts +8 -4
- package/dist-esm/src/operationsInterfaces/index.d.ts.map +1 -1
- package/dist-esm/src/operationsInterfaces/index.js +8 -4
- package/dist-esm/src/operationsInterfaces/index.js.map +1 -1
- package/dist-esm/src/operationsInterfaces/logFiles.d.ts +13 -0
- package/dist-esm/src/operationsInterfaces/logFiles.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/logFiles.js +9 -0
- package/dist-esm/src/operationsInterfaces/logFiles.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/servers.d.ts +25 -9
- package/dist-esm/src/operationsInterfaces/servers.d.ts.map +1 -1
- package/package.json +6 -6
- package/review/arm-mysql-flexible.api.md +383 -18
- package/src/lroImpl.ts +31 -23
- package/src/models/index.ts +842 -382
- package/src/models/mappers.ts +1315 -622
- package/src/models/parameters.ts +112 -25
- package/src/mySQLManagementFlexibleServerClient.ts +35 -53
- package/src/operations/azureADAdministrators.ts +504 -0
- package/src/operations/backupAndExport.ts +210 -0
- package/src/operations/backups.ts +46 -2
- package/src/operations/checkNameAvailabilityWithoutLocation.ts +69 -0
- package/src/operations/checkVirtualNetworkSubnetUsage.ts +1 -1
- package/src/operations/configurations.ts +190 -26
- package/src/operations/databases.ts +34 -21
- package/src/operations/firewallRules.ts +35 -22
- package/src/operations/index.ts +8 -4
- package/src/operations/logFiles.ts +198 -0
- package/src/operations/replicas.ts +1 -1
- package/src/operations/servers.ts +211 -79
- package/src/operationsInterfaces/azureADAdministrators.ts +110 -0
- package/src/operationsInterfaces/backupAndExport.ts +62 -0
- package/src/operationsInterfaces/backups.ts +15 -0
- package/src/operationsInterfaces/checkNameAvailabilityWithoutLocation.ts +26 -0
- package/src/operationsInterfaces/configurations.ts +42 -5
- package/src/operationsInterfaces/databases.ts +4 -4
- package/src/operationsInterfaces/firewallRules.ts +4 -4
- package/src/operationsInterfaces/index.ts +8 -4
- package/src/operationsInterfaces/logFiles.ts +26 -0
- package/src/operationsInterfaces/servers.ts +43 -9
- package/types/arm-mysql-flexible.d.ts +624 -29
|
@@ -18,6 +18,8 @@ import {
|
|
|
18
18
|
BackupsListByServerNextOptionalParams,
|
|
19
19
|
BackupsListByServerOptionalParams,
|
|
20
20
|
BackupsListByServerResponse,
|
|
21
|
+
BackupsPutOptionalParams,
|
|
22
|
+
BackupsPutResponse,
|
|
21
23
|
BackupsGetOptionalParams,
|
|
22
24
|
BackupsGetResponse,
|
|
23
25
|
BackupsListByServerNextResponse
|
|
@@ -116,6 +118,25 @@ export class BackupsImpl implements Backups {
|
|
|
116
118
|
}
|
|
117
119
|
}
|
|
118
120
|
|
|
121
|
+
/**
|
|
122
|
+
* Create backup for a given server with specified backup name.
|
|
123
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
124
|
+
* @param serverName The name of the server.
|
|
125
|
+
* @param backupName The name of the backup.
|
|
126
|
+
* @param options The options parameters.
|
|
127
|
+
*/
|
|
128
|
+
put(
|
|
129
|
+
resourceGroupName: string,
|
|
130
|
+
serverName: string,
|
|
131
|
+
backupName: string,
|
|
132
|
+
options?: BackupsPutOptionalParams
|
|
133
|
+
): Promise<BackupsPutResponse> {
|
|
134
|
+
return this.client.sendOperationRequest(
|
|
135
|
+
{ resourceGroupName, serverName, backupName, options },
|
|
136
|
+
putOperationSpec
|
|
137
|
+
);
|
|
138
|
+
}
|
|
139
|
+
|
|
119
140
|
/**
|
|
120
141
|
* List all the backups for a given server.
|
|
121
142
|
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
@@ -174,6 +195,29 @@ export class BackupsImpl implements Backups {
|
|
|
174
195
|
// Operation Specifications
|
|
175
196
|
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
|
|
176
197
|
|
|
198
|
+
const putOperationSpec: coreClient.OperationSpec = {
|
|
199
|
+
path:
|
|
200
|
+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/backups/{backupName}",
|
|
201
|
+
httpMethod: "PUT",
|
|
202
|
+
responses: {
|
|
203
|
+
200: {
|
|
204
|
+
bodyMapper: Mappers.ServerBackup
|
|
205
|
+
},
|
|
206
|
+
default: {
|
|
207
|
+
bodyMapper: Mappers.CloudError
|
|
208
|
+
}
|
|
209
|
+
},
|
|
210
|
+
queryParameters: [Parameters.apiVersion1],
|
|
211
|
+
urlParameters: [
|
|
212
|
+
Parameters.$host,
|
|
213
|
+
Parameters.subscriptionId,
|
|
214
|
+
Parameters.resourceGroupName,
|
|
215
|
+
Parameters.serverName,
|
|
216
|
+
Parameters.backupName
|
|
217
|
+
],
|
|
218
|
+
headerParameters: [Parameters.accept],
|
|
219
|
+
serializer
|
|
220
|
+
};
|
|
177
221
|
const getOperationSpec: coreClient.OperationSpec = {
|
|
178
222
|
path:
|
|
179
223
|
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/backups/{backupName}",
|
|
@@ -186,7 +230,7 @@ const getOperationSpec: coreClient.OperationSpec = {
|
|
|
186
230
|
bodyMapper: Mappers.CloudError
|
|
187
231
|
}
|
|
188
232
|
},
|
|
189
|
-
queryParameters: [Parameters.
|
|
233
|
+
queryParameters: [Parameters.apiVersion1],
|
|
190
234
|
urlParameters: [
|
|
191
235
|
Parameters.$host,
|
|
192
236
|
Parameters.subscriptionId,
|
|
@@ -209,7 +253,7 @@ const listByServerOperationSpec: coreClient.OperationSpec = {
|
|
|
209
253
|
bodyMapper: Mappers.CloudError
|
|
210
254
|
}
|
|
211
255
|
},
|
|
212
|
-
queryParameters: [Parameters.
|
|
256
|
+
queryParameters: [Parameters.apiVersion1],
|
|
213
257
|
urlParameters: [
|
|
214
258
|
Parameters.$host,
|
|
215
259
|
Parameters.subscriptionId,
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) Microsoft Corporation.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*
|
|
5
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
6
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
import { CheckNameAvailabilityWithoutLocation } from "../operationsInterfaces";
|
|
10
|
+
import * as coreClient from "@azure/core-client";
|
|
11
|
+
import * as Mappers from "../models/mappers";
|
|
12
|
+
import * as Parameters from "../models/parameters";
|
|
13
|
+
import { MySQLManagementFlexibleServerClient } from "../mySQLManagementFlexibleServerClient";
|
|
14
|
+
import {
|
|
15
|
+
NameAvailabilityRequest,
|
|
16
|
+
CheckNameAvailabilityWithoutLocationExecuteOptionalParams,
|
|
17
|
+
CheckNameAvailabilityWithoutLocationExecuteResponse
|
|
18
|
+
} from "../models";
|
|
19
|
+
|
|
20
|
+
/** Class containing CheckNameAvailabilityWithoutLocation operations. */
|
|
21
|
+
export class CheckNameAvailabilityWithoutLocationImpl
|
|
22
|
+
implements CheckNameAvailabilityWithoutLocation {
|
|
23
|
+
private readonly client: MySQLManagementFlexibleServerClient;
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Initialize a new instance of the class CheckNameAvailabilityWithoutLocation class.
|
|
27
|
+
* @param client Reference to the service client
|
|
28
|
+
*/
|
|
29
|
+
constructor(client: MySQLManagementFlexibleServerClient) {
|
|
30
|
+
this.client = client;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Check the availability of name for server
|
|
35
|
+
* @param nameAvailabilityRequest The required parameters for checking if server name is available.
|
|
36
|
+
* @param options The options parameters.
|
|
37
|
+
*/
|
|
38
|
+
execute(
|
|
39
|
+
nameAvailabilityRequest: NameAvailabilityRequest,
|
|
40
|
+
options?: CheckNameAvailabilityWithoutLocationExecuteOptionalParams
|
|
41
|
+
): Promise<CheckNameAvailabilityWithoutLocationExecuteResponse> {
|
|
42
|
+
return this.client.sendOperationRequest(
|
|
43
|
+
{ nameAvailabilityRequest, options },
|
|
44
|
+
executeOperationSpec
|
|
45
|
+
);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
// Operation Specifications
|
|
49
|
+
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
|
|
50
|
+
|
|
51
|
+
const executeOperationSpec: coreClient.OperationSpec = {
|
|
52
|
+
path:
|
|
53
|
+
"/subscriptions/{subscriptionId}/providers/Microsoft.DBforMySQL/checkNameAvailability",
|
|
54
|
+
httpMethod: "POST",
|
|
55
|
+
responses: {
|
|
56
|
+
200: {
|
|
57
|
+
bodyMapper: Mappers.NameAvailability
|
|
58
|
+
},
|
|
59
|
+
default: {
|
|
60
|
+
bodyMapper: Mappers.CloudError
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
requestBody: Parameters.nameAvailabilityRequest,
|
|
64
|
+
queryParameters: [Parameters.apiVersion],
|
|
65
|
+
urlParameters: [Parameters.$host, Parameters.subscriptionId],
|
|
66
|
+
headerParameters: [Parameters.contentType, Parameters.accept],
|
|
67
|
+
mediaType: "json",
|
|
68
|
+
serializer
|
|
69
|
+
};
|
|
@@ -62,7 +62,7 @@ const executeOperationSpec: coreClient.OperationSpec = {
|
|
|
62
62
|
bodyMapper: Mappers.CloudError
|
|
63
63
|
}
|
|
64
64
|
},
|
|
65
|
-
requestBody: Parameters.
|
|
65
|
+
requestBody: Parameters.parameters10,
|
|
66
66
|
queryParameters: [Parameters.apiVersion],
|
|
67
67
|
urlParameters: [
|
|
68
68
|
Parameters.$host,
|
|
@@ -13,13 +13,19 @@ import * as coreClient from "@azure/core-client";
|
|
|
13
13
|
import * as Mappers from "../models/mappers";
|
|
14
14
|
import * as Parameters from "../models/parameters";
|
|
15
15
|
import { MySQLManagementFlexibleServerClient } from "../mySQLManagementFlexibleServerClient";
|
|
16
|
-
import {
|
|
17
|
-
|
|
16
|
+
import {
|
|
17
|
+
SimplePollerLike,
|
|
18
|
+
OperationState,
|
|
19
|
+
createHttpPoller
|
|
20
|
+
} from "@azure/core-lro";
|
|
21
|
+
import { createLroSpec } from "../lroImpl";
|
|
18
22
|
import {
|
|
19
23
|
Configuration,
|
|
20
24
|
ConfigurationsListByServerNextOptionalParams,
|
|
21
25
|
ConfigurationsListByServerOptionalParams,
|
|
22
26
|
ConfigurationsListByServerResponse,
|
|
27
|
+
ConfigurationsCreateOrUpdateOptionalParams,
|
|
28
|
+
ConfigurationsCreateOrUpdateResponse,
|
|
23
29
|
ConfigurationsUpdateOptionalParams,
|
|
24
30
|
ConfigurationsUpdateResponse,
|
|
25
31
|
ConfigurationsGetOptionalParams,
|
|
@@ -123,6 +129,112 @@ export class ConfigurationsImpl implements Configurations {
|
|
|
123
129
|
}
|
|
124
130
|
}
|
|
125
131
|
|
|
132
|
+
/**
|
|
133
|
+
* Updates a configuration of a server.
|
|
134
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
135
|
+
* @param serverName The name of the server.
|
|
136
|
+
* @param configurationName The name of the server configuration.
|
|
137
|
+
* @param parameters The required parameters for updating a server configuration.
|
|
138
|
+
* @param options The options parameters.
|
|
139
|
+
*/
|
|
140
|
+
async beginCreateOrUpdate(
|
|
141
|
+
resourceGroupName: string,
|
|
142
|
+
serverName: string,
|
|
143
|
+
configurationName: string,
|
|
144
|
+
parameters: Configuration,
|
|
145
|
+
options?: ConfigurationsCreateOrUpdateOptionalParams
|
|
146
|
+
): Promise<
|
|
147
|
+
SimplePollerLike<
|
|
148
|
+
OperationState<ConfigurationsCreateOrUpdateResponse>,
|
|
149
|
+
ConfigurationsCreateOrUpdateResponse
|
|
150
|
+
>
|
|
151
|
+
> {
|
|
152
|
+
const directSendOperation = async (
|
|
153
|
+
args: coreClient.OperationArguments,
|
|
154
|
+
spec: coreClient.OperationSpec
|
|
155
|
+
): Promise<ConfigurationsCreateOrUpdateResponse> => {
|
|
156
|
+
return this.client.sendOperationRequest(args, spec);
|
|
157
|
+
};
|
|
158
|
+
const sendOperationFn = async (
|
|
159
|
+
args: coreClient.OperationArguments,
|
|
160
|
+
spec: coreClient.OperationSpec
|
|
161
|
+
) => {
|
|
162
|
+
let currentRawResponse:
|
|
163
|
+
| coreClient.FullOperationResponse
|
|
164
|
+
| undefined = undefined;
|
|
165
|
+
const providedCallback = args.options?.onResponse;
|
|
166
|
+
const callback: coreClient.RawResponseCallback = (
|
|
167
|
+
rawResponse: coreClient.FullOperationResponse,
|
|
168
|
+
flatResponse: unknown
|
|
169
|
+
) => {
|
|
170
|
+
currentRawResponse = rawResponse;
|
|
171
|
+
providedCallback?.(rawResponse, flatResponse);
|
|
172
|
+
};
|
|
173
|
+
const updatedArgs = {
|
|
174
|
+
...args,
|
|
175
|
+
options: {
|
|
176
|
+
...args.options,
|
|
177
|
+
onResponse: callback
|
|
178
|
+
}
|
|
179
|
+
};
|
|
180
|
+
const flatResponse = await directSendOperation(updatedArgs, spec);
|
|
181
|
+
return {
|
|
182
|
+
flatResponse,
|
|
183
|
+
rawResponse: {
|
|
184
|
+
statusCode: currentRawResponse!.status,
|
|
185
|
+
body: currentRawResponse!.parsedBody,
|
|
186
|
+
headers: currentRawResponse!.headers.toJSON()
|
|
187
|
+
}
|
|
188
|
+
};
|
|
189
|
+
};
|
|
190
|
+
|
|
191
|
+
const lro = createLroSpec({
|
|
192
|
+
sendOperationFn,
|
|
193
|
+
args: {
|
|
194
|
+
resourceGroupName,
|
|
195
|
+
serverName,
|
|
196
|
+
configurationName,
|
|
197
|
+
parameters,
|
|
198
|
+
options
|
|
199
|
+
},
|
|
200
|
+
spec: createOrUpdateOperationSpec
|
|
201
|
+
});
|
|
202
|
+
const poller = await createHttpPoller<
|
|
203
|
+
ConfigurationsCreateOrUpdateResponse,
|
|
204
|
+
OperationState<ConfigurationsCreateOrUpdateResponse>
|
|
205
|
+
>(lro, {
|
|
206
|
+
restoreFrom: options?.resumeFrom,
|
|
207
|
+
intervalInMs: options?.updateIntervalInMs
|
|
208
|
+
});
|
|
209
|
+
await poller.poll();
|
|
210
|
+
return poller;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
/**
|
|
214
|
+
* Updates a configuration of a server.
|
|
215
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
216
|
+
* @param serverName The name of the server.
|
|
217
|
+
* @param configurationName The name of the server configuration.
|
|
218
|
+
* @param parameters The required parameters for updating a server configuration.
|
|
219
|
+
* @param options The options parameters.
|
|
220
|
+
*/
|
|
221
|
+
async beginCreateOrUpdateAndWait(
|
|
222
|
+
resourceGroupName: string,
|
|
223
|
+
serverName: string,
|
|
224
|
+
configurationName: string,
|
|
225
|
+
parameters: Configuration,
|
|
226
|
+
options?: ConfigurationsCreateOrUpdateOptionalParams
|
|
227
|
+
): Promise<ConfigurationsCreateOrUpdateResponse> {
|
|
228
|
+
const poller = await this.beginCreateOrUpdate(
|
|
229
|
+
resourceGroupName,
|
|
230
|
+
serverName,
|
|
231
|
+
configurationName,
|
|
232
|
+
parameters,
|
|
233
|
+
options
|
|
234
|
+
);
|
|
235
|
+
return poller.pollUntilDone();
|
|
236
|
+
}
|
|
237
|
+
|
|
126
238
|
/**
|
|
127
239
|
* Updates a configuration of a server.
|
|
128
240
|
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
@@ -138,8 +250,8 @@ export class ConfigurationsImpl implements Configurations {
|
|
|
138
250
|
parameters: Configuration,
|
|
139
251
|
options?: ConfigurationsUpdateOptionalParams
|
|
140
252
|
): Promise<
|
|
141
|
-
|
|
142
|
-
|
|
253
|
+
SimplePollerLike<
|
|
254
|
+
OperationState<ConfigurationsUpdateResponse>,
|
|
143
255
|
ConfigurationsUpdateResponse
|
|
144
256
|
>
|
|
145
257
|
> {
|
|
@@ -149,7 +261,7 @@ export class ConfigurationsImpl implements Configurations {
|
|
|
149
261
|
): Promise<ConfigurationsUpdateResponse> => {
|
|
150
262
|
return this.client.sendOperationRequest(args, spec);
|
|
151
263
|
};
|
|
152
|
-
const
|
|
264
|
+
const sendOperationFn = async (
|
|
153
265
|
args: coreClient.OperationArguments,
|
|
154
266
|
spec: coreClient.OperationSpec
|
|
155
267
|
) => {
|
|
@@ -182,13 +294,22 @@ export class ConfigurationsImpl implements Configurations {
|
|
|
182
294
|
};
|
|
183
295
|
};
|
|
184
296
|
|
|
185
|
-
const lro =
|
|
186
|
-
|
|
187
|
-
{
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
297
|
+
const lro = createLroSpec({
|
|
298
|
+
sendOperationFn,
|
|
299
|
+
args: {
|
|
300
|
+
resourceGroupName,
|
|
301
|
+
serverName,
|
|
302
|
+
configurationName,
|
|
303
|
+
parameters,
|
|
304
|
+
options
|
|
305
|
+
},
|
|
306
|
+
spec: updateOperationSpec
|
|
307
|
+
});
|
|
308
|
+
const poller = await createHttpPoller<
|
|
309
|
+
ConfigurationsUpdateResponse,
|
|
310
|
+
OperationState<ConfigurationsUpdateResponse>
|
|
311
|
+
>(lro, {
|
|
312
|
+
restoreFrom: options?.resumeFrom,
|
|
192
313
|
intervalInMs: options?.updateIntervalInMs
|
|
193
314
|
});
|
|
194
315
|
await poller.poll();
|
|
@@ -252,8 +373,8 @@ export class ConfigurationsImpl implements Configurations {
|
|
|
252
373
|
parameters: ConfigurationListForBatchUpdate,
|
|
253
374
|
options?: ConfigurationsBatchUpdateOptionalParams
|
|
254
375
|
): Promise<
|
|
255
|
-
|
|
256
|
-
|
|
376
|
+
SimplePollerLike<
|
|
377
|
+
OperationState<ConfigurationsBatchUpdateResponse>,
|
|
257
378
|
ConfigurationsBatchUpdateResponse
|
|
258
379
|
>
|
|
259
380
|
> {
|
|
@@ -263,7 +384,7 @@ export class ConfigurationsImpl implements Configurations {
|
|
|
263
384
|
): Promise<ConfigurationsBatchUpdateResponse> => {
|
|
264
385
|
return this.client.sendOperationRequest(args, spec);
|
|
265
386
|
};
|
|
266
|
-
const
|
|
387
|
+
const sendOperationFn = async (
|
|
267
388
|
args: coreClient.OperationArguments,
|
|
268
389
|
spec: coreClient.OperationSpec
|
|
269
390
|
) => {
|
|
@@ -296,15 +417,18 @@ export class ConfigurationsImpl implements Configurations {
|
|
|
296
417
|
};
|
|
297
418
|
};
|
|
298
419
|
|
|
299
|
-
const lro =
|
|
300
|
-
|
|
301
|
-
{ resourceGroupName, serverName, parameters, options },
|
|
302
|
-
batchUpdateOperationSpec
|
|
303
|
-
);
|
|
304
|
-
const poller =
|
|
305
|
-
|
|
420
|
+
const lro = createLroSpec({
|
|
421
|
+
sendOperationFn,
|
|
422
|
+
args: { resourceGroupName, serverName, parameters, options },
|
|
423
|
+
spec: batchUpdateOperationSpec
|
|
424
|
+
});
|
|
425
|
+
const poller = await createHttpPoller<
|
|
426
|
+
ConfigurationsBatchUpdateResponse,
|
|
427
|
+
OperationState<ConfigurationsBatchUpdateResponse>
|
|
428
|
+
>(lro, {
|
|
429
|
+
restoreFrom: options?.resumeFrom,
|
|
306
430
|
intervalInMs: options?.updateIntervalInMs,
|
|
307
|
-
|
|
431
|
+
resourceLocationConfig: "azure-async-operation"
|
|
308
432
|
});
|
|
309
433
|
await poller.poll();
|
|
310
434
|
return poller;
|
|
@@ -371,6 +495,40 @@ export class ConfigurationsImpl implements Configurations {
|
|
|
371
495
|
// Operation Specifications
|
|
372
496
|
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
|
|
373
497
|
|
|
498
|
+
const createOrUpdateOperationSpec: coreClient.OperationSpec = {
|
|
499
|
+
path:
|
|
500
|
+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/configurations/{configurationName}",
|
|
501
|
+
httpMethod: "PUT",
|
|
502
|
+
responses: {
|
|
503
|
+
200: {
|
|
504
|
+
bodyMapper: Mappers.Configuration
|
|
505
|
+
},
|
|
506
|
+
201: {
|
|
507
|
+
bodyMapper: Mappers.Configuration
|
|
508
|
+
},
|
|
509
|
+
202: {
|
|
510
|
+
bodyMapper: Mappers.Configuration
|
|
511
|
+
},
|
|
512
|
+
204: {
|
|
513
|
+
bodyMapper: Mappers.Configuration
|
|
514
|
+
},
|
|
515
|
+
default: {
|
|
516
|
+
bodyMapper: Mappers.CloudError
|
|
517
|
+
}
|
|
518
|
+
},
|
|
519
|
+
requestBody: Parameters.parameters2,
|
|
520
|
+
queryParameters: [Parameters.apiVersion],
|
|
521
|
+
urlParameters: [
|
|
522
|
+
Parameters.$host,
|
|
523
|
+
Parameters.subscriptionId,
|
|
524
|
+
Parameters.resourceGroupName,
|
|
525
|
+
Parameters.serverName,
|
|
526
|
+
Parameters.configurationName
|
|
527
|
+
],
|
|
528
|
+
headerParameters: [Parameters.contentType, Parameters.accept],
|
|
529
|
+
mediaType: "json",
|
|
530
|
+
serializer
|
|
531
|
+
};
|
|
374
532
|
const updateOperationSpec: coreClient.OperationSpec = {
|
|
375
533
|
path:
|
|
376
534
|
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/configurations/{configurationName}",
|
|
@@ -392,7 +550,7 @@ const updateOperationSpec: coreClient.OperationSpec = {
|
|
|
392
550
|
bodyMapper: Mappers.CloudError
|
|
393
551
|
}
|
|
394
552
|
},
|
|
395
|
-
requestBody: Parameters.
|
|
553
|
+
requestBody: Parameters.parameters2,
|
|
396
554
|
queryParameters: [Parameters.apiVersion],
|
|
397
555
|
urlParameters: [
|
|
398
556
|
Parameters.$host,
|
|
@@ -449,7 +607,7 @@ const batchUpdateOperationSpec: coreClient.OperationSpec = {
|
|
|
449
607
|
bodyMapper: Mappers.CloudError
|
|
450
608
|
}
|
|
451
609
|
},
|
|
452
|
-
requestBody: Parameters.
|
|
610
|
+
requestBody: Parameters.parameters3,
|
|
453
611
|
queryParameters: [Parameters.apiVersion],
|
|
454
612
|
urlParameters: [
|
|
455
613
|
Parameters.$host,
|
|
@@ -473,7 +631,13 @@ const listByServerOperationSpec: coreClient.OperationSpec = {
|
|
|
473
631
|
bodyMapper: Mappers.CloudError
|
|
474
632
|
}
|
|
475
633
|
},
|
|
476
|
-
queryParameters: [
|
|
634
|
+
queryParameters: [
|
|
635
|
+
Parameters.apiVersion,
|
|
636
|
+
Parameters.tags,
|
|
637
|
+
Parameters.keyword,
|
|
638
|
+
Parameters.page,
|
|
639
|
+
Parameters.pageSize
|
|
640
|
+
],
|
|
477
641
|
urlParameters: [
|
|
478
642
|
Parameters.$host,
|
|
479
643
|
Parameters.subscriptionId,
|
|
@@ -13,8 +13,12 @@ import * as coreClient from "@azure/core-client";
|
|
|
13
13
|
import * as Mappers from "../models/mappers";
|
|
14
14
|
import * as Parameters from "../models/parameters";
|
|
15
15
|
import { MySQLManagementFlexibleServerClient } from "../mySQLManagementFlexibleServerClient";
|
|
16
|
-
import {
|
|
17
|
-
|
|
16
|
+
import {
|
|
17
|
+
SimplePollerLike,
|
|
18
|
+
OperationState,
|
|
19
|
+
createHttpPoller
|
|
20
|
+
} from "@azure/core-lro";
|
|
21
|
+
import { createLroSpec } from "../lroImpl";
|
|
18
22
|
import {
|
|
19
23
|
Database,
|
|
20
24
|
DatabasesListByServerNextOptionalParams,
|
|
@@ -136,8 +140,8 @@ export class DatabasesImpl implements Databases {
|
|
|
136
140
|
parameters: Database,
|
|
137
141
|
options?: DatabasesCreateOrUpdateOptionalParams
|
|
138
142
|
): Promise<
|
|
139
|
-
|
|
140
|
-
|
|
143
|
+
SimplePollerLike<
|
|
144
|
+
OperationState<DatabasesCreateOrUpdateResponse>,
|
|
141
145
|
DatabasesCreateOrUpdateResponse
|
|
142
146
|
>
|
|
143
147
|
> {
|
|
@@ -147,7 +151,7 @@ export class DatabasesImpl implements Databases {
|
|
|
147
151
|
): Promise<DatabasesCreateOrUpdateResponse> => {
|
|
148
152
|
return this.client.sendOperationRequest(args, spec);
|
|
149
153
|
};
|
|
150
|
-
const
|
|
154
|
+
const sendOperationFn = async (
|
|
151
155
|
args: coreClient.OperationArguments,
|
|
152
156
|
spec: coreClient.OperationSpec
|
|
153
157
|
) => {
|
|
@@ -180,13 +184,22 @@ export class DatabasesImpl implements Databases {
|
|
|
180
184
|
};
|
|
181
185
|
};
|
|
182
186
|
|
|
183
|
-
const lro =
|
|
184
|
-
|
|
185
|
-
{
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
187
|
+
const lro = createLroSpec({
|
|
188
|
+
sendOperationFn,
|
|
189
|
+
args: {
|
|
190
|
+
resourceGroupName,
|
|
191
|
+
serverName,
|
|
192
|
+
databaseName,
|
|
193
|
+
parameters,
|
|
194
|
+
options
|
|
195
|
+
},
|
|
196
|
+
spec: createOrUpdateOperationSpec
|
|
197
|
+
});
|
|
198
|
+
const poller = await createHttpPoller<
|
|
199
|
+
DatabasesCreateOrUpdateResponse,
|
|
200
|
+
OperationState<DatabasesCreateOrUpdateResponse>
|
|
201
|
+
>(lro, {
|
|
202
|
+
restoreFrom: options?.resumeFrom,
|
|
190
203
|
intervalInMs: options?.updateIntervalInMs
|
|
191
204
|
});
|
|
192
205
|
await poller.poll();
|
|
@@ -230,14 +243,14 @@ export class DatabasesImpl implements Databases {
|
|
|
230
243
|
serverName: string,
|
|
231
244
|
databaseName: string,
|
|
232
245
|
options?: DatabasesDeleteOptionalParams
|
|
233
|
-
): Promise<
|
|
246
|
+
): Promise<SimplePollerLike<OperationState<void>, void>> {
|
|
234
247
|
const directSendOperation = async (
|
|
235
248
|
args: coreClient.OperationArguments,
|
|
236
249
|
spec: coreClient.OperationSpec
|
|
237
250
|
): Promise<void> => {
|
|
238
251
|
return this.client.sendOperationRequest(args, spec);
|
|
239
252
|
};
|
|
240
|
-
const
|
|
253
|
+
const sendOperationFn = async (
|
|
241
254
|
args: coreClient.OperationArguments,
|
|
242
255
|
spec: coreClient.OperationSpec
|
|
243
256
|
) => {
|
|
@@ -270,13 +283,13 @@ export class DatabasesImpl implements Databases {
|
|
|
270
283
|
};
|
|
271
284
|
};
|
|
272
285
|
|
|
273
|
-
const lro =
|
|
274
|
-
|
|
275
|
-
{ resourceGroupName, serverName, databaseName, options },
|
|
276
|
-
deleteOperationSpec
|
|
277
|
-
);
|
|
278
|
-
const poller =
|
|
279
|
-
|
|
286
|
+
const lro = createLroSpec({
|
|
287
|
+
sendOperationFn,
|
|
288
|
+
args: { resourceGroupName, serverName, databaseName, options },
|
|
289
|
+
spec: deleteOperationSpec
|
|
290
|
+
});
|
|
291
|
+
const poller = await createHttpPoller<void, OperationState<void>>(lro, {
|
|
292
|
+
restoreFrom: options?.resumeFrom,
|
|
280
293
|
intervalInMs: options?.updateIntervalInMs
|
|
281
294
|
});
|
|
282
295
|
await poller.poll();
|
|
@@ -13,8 +13,12 @@ import * as coreClient from "@azure/core-client";
|
|
|
13
13
|
import * as Mappers from "../models/mappers";
|
|
14
14
|
import * as Parameters from "../models/parameters";
|
|
15
15
|
import { MySQLManagementFlexibleServerClient } from "../mySQLManagementFlexibleServerClient";
|
|
16
|
-
import {
|
|
17
|
-
|
|
16
|
+
import {
|
|
17
|
+
SimplePollerLike,
|
|
18
|
+
OperationState,
|
|
19
|
+
createHttpPoller
|
|
20
|
+
} from "@azure/core-lro";
|
|
21
|
+
import { createLroSpec } from "../lroImpl";
|
|
18
22
|
import {
|
|
19
23
|
FirewallRule,
|
|
20
24
|
FirewallRulesListByServerNextOptionalParams,
|
|
@@ -136,8 +140,8 @@ export class FirewallRulesImpl implements FirewallRules {
|
|
|
136
140
|
parameters: FirewallRule,
|
|
137
141
|
options?: FirewallRulesCreateOrUpdateOptionalParams
|
|
138
142
|
): Promise<
|
|
139
|
-
|
|
140
|
-
|
|
143
|
+
SimplePollerLike<
|
|
144
|
+
OperationState<FirewallRulesCreateOrUpdateResponse>,
|
|
141
145
|
FirewallRulesCreateOrUpdateResponse
|
|
142
146
|
>
|
|
143
147
|
> {
|
|
@@ -147,7 +151,7 @@ export class FirewallRulesImpl implements FirewallRules {
|
|
|
147
151
|
): Promise<FirewallRulesCreateOrUpdateResponse> => {
|
|
148
152
|
return this.client.sendOperationRequest(args, spec);
|
|
149
153
|
};
|
|
150
|
-
const
|
|
154
|
+
const sendOperationFn = async (
|
|
151
155
|
args: coreClient.OperationArguments,
|
|
152
156
|
spec: coreClient.OperationSpec
|
|
153
157
|
) => {
|
|
@@ -180,13 +184,22 @@ export class FirewallRulesImpl implements FirewallRules {
|
|
|
180
184
|
};
|
|
181
185
|
};
|
|
182
186
|
|
|
183
|
-
const lro =
|
|
184
|
-
|
|
185
|
-
{
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
187
|
+
const lro = createLroSpec({
|
|
188
|
+
sendOperationFn,
|
|
189
|
+
args: {
|
|
190
|
+
resourceGroupName,
|
|
191
|
+
serverName,
|
|
192
|
+
firewallRuleName,
|
|
193
|
+
parameters,
|
|
194
|
+
options
|
|
195
|
+
},
|
|
196
|
+
spec: createOrUpdateOperationSpec
|
|
197
|
+
});
|
|
198
|
+
const poller = await createHttpPoller<
|
|
199
|
+
FirewallRulesCreateOrUpdateResponse,
|
|
200
|
+
OperationState<FirewallRulesCreateOrUpdateResponse>
|
|
201
|
+
>(lro, {
|
|
202
|
+
restoreFrom: options?.resumeFrom,
|
|
190
203
|
intervalInMs: options?.updateIntervalInMs
|
|
191
204
|
});
|
|
192
205
|
await poller.poll();
|
|
@@ -230,14 +243,14 @@ export class FirewallRulesImpl implements FirewallRules {
|
|
|
230
243
|
serverName: string,
|
|
231
244
|
firewallRuleName: string,
|
|
232
245
|
options?: FirewallRulesDeleteOptionalParams
|
|
233
|
-
): Promise<
|
|
246
|
+
): Promise<SimplePollerLike<OperationState<void>, void>> {
|
|
234
247
|
const directSendOperation = async (
|
|
235
248
|
args: coreClient.OperationArguments,
|
|
236
249
|
spec: coreClient.OperationSpec
|
|
237
250
|
): Promise<void> => {
|
|
238
251
|
return this.client.sendOperationRequest(args, spec);
|
|
239
252
|
};
|
|
240
|
-
const
|
|
253
|
+
const sendOperationFn = async (
|
|
241
254
|
args: coreClient.OperationArguments,
|
|
242
255
|
spec: coreClient.OperationSpec
|
|
243
256
|
) => {
|
|
@@ -270,13 +283,13 @@ export class FirewallRulesImpl implements FirewallRules {
|
|
|
270
283
|
};
|
|
271
284
|
};
|
|
272
285
|
|
|
273
|
-
const lro =
|
|
274
|
-
|
|
275
|
-
{ resourceGroupName, serverName, firewallRuleName, options },
|
|
276
|
-
deleteOperationSpec
|
|
277
|
-
);
|
|
278
|
-
const poller =
|
|
279
|
-
|
|
286
|
+
const lro = createLroSpec({
|
|
287
|
+
sendOperationFn,
|
|
288
|
+
args: { resourceGroupName, serverName, firewallRuleName, options },
|
|
289
|
+
spec: deleteOperationSpec
|
|
290
|
+
});
|
|
291
|
+
const poller = await createHttpPoller<void, OperationState<void>>(lro, {
|
|
292
|
+
restoreFrom: options?.resumeFrom,
|
|
280
293
|
intervalInMs: options?.updateIntervalInMs
|
|
281
294
|
});
|
|
282
295
|
await poller.poll();
|
|
@@ -384,7 +397,7 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = {
|
|
|
384
397
|
bodyMapper: Mappers.CloudError
|
|
385
398
|
}
|
|
386
399
|
},
|
|
387
|
-
requestBody: Parameters.
|
|
400
|
+
requestBody: Parameters.parameters5,
|
|
388
401
|
queryParameters: [Parameters.apiVersion],
|
|
389
402
|
urlParameters: [
|
|
390
403
|
Parameters.$host,
|