@azure/arm-mysql-flexible 4.0.0-beta.1 → 4.0.0-beta.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/CHANGELOG.md +234 -5
- package/LICENSE +1 -1
- package/dist/index.js +3909 -1522
- 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/advancedThreatProtectionSettingsGetSample.d.ts +2 -0
- package/dist-esm/samples-dev/advancedThreatProtectionSettingsGetSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/advancedThreatProtectionSettingsGetSample.js +40 -0
- package/dist-esm/samples-dev/advancedThreatProtectionSettingsGetSample.js.map +1 -0
- package/dist-esm/samples-dev/advancedThreatProtectionSettingsListSample.d.ts +2 -0
- package/dist-esm/samples-dev/advancedThreatProtectionSettingsListSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/advancedThreatProtectionSettingsListSample.js +55 -0
- package/dist-esm/samples-dev/advancedThreatProtectionSettingsListSample.js.map +1 -0
- package/dist-esm/samples-dev/advancedThreatProtectionSettingsUpdatePutSample.d.ts +2 -0
- package/dist-esm/samples-dev/advancedThreatProtectionSettingsUpdatePutSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/advancedThreatProtectionSettingsUpdatePutSample.js +62 -0
- package/dist-esm/samples-dev/advancedThreatProtectionSettingsUpdatePutSample.js.map +1 -0
- package/dist-esm/samples-dev/advancedThreatProtectionSettingsUpdateSample.d.ts +2 -0
- package/dist-esm/samples-dev/advancedThreatProtectionSettingsUpdateSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/advancedThreatProtectionSettingsUpdateSample.js +62 -0
- package/dist-esm/samples-dev/advancedThreatProtectionSettingsUpdateSample.js.map +1 -0
- package/dist-esm/samples-dev/azureAdAdministratorsCreateOrUpdateSample.js +3 -3
- package/dist-esm/samples-dev/azureAdAdministratorsCreateOrUpdateSample.js.map +1 -1
- package/dist-esm/samples-dev/azureAdAdministratorsDeleteSample.js +1 -1
- package/dist-esm/samples-dev/azureAdAdministratorsGetSample.js +1 -1
- package/dist-esm/samples-dev/azureAdAdministratorsListByServerSample.js +5 -10
- package/dist-esm/samples-dev/azureAdAdministratorsListByServerSample.js.map +1 -1
- package/dist-esm/samples-dev/backupAndExportCreateSample.js +4 -4
- package/dist-esm/samples-dev/backupAndExportCreateSample.js.map +1 -1
- package/dist-esm/samples-dev/backupAndExportValidateBackupSample.js +1 -1
- package/dist-esm/samples-dev/backupsGetSample.js +1 -1
- package/dist-esm/samples-dev/backupsListByServerSample.js +5 -10
- package/dist-esm/samples-dev/backupsListByServerSample.js.map +1 -1
- package/dist-esm/samples-dev/backupsPutSample.js +1 -1
- package/dist-esm/samples-dev/checkNameAvailabilityExecuteSample.js +3 -3
- package/dist-esm/samples-dev/checkNameAvailabilityExecuteSample.js.map +1 -1
- package/dist-esm/samples-dev/checkNameAvailabilityWithoutLocationExecuteSample.js +3 -3
- package/dist-esm/samples-dev/checkNameAvailabilityWithoutLocationExecuteSample.js.map +1 -1
- package/dist-esm/samples-dev/checkVirtualNetworkSubnetUsageExecuteSample.js +3 -3
- package/dist-esm/samples-dev/checkVirtualNetworkSubnetUsageExecuteSample.js.map +1 -1
- package/dist-esm/samples-dev/configurationsBatchUpdateSample.js +4 -4
- package/dist-esm/samples-dev/configurationsBatchUpdateSample.js.map +1 -1
- package/dist-esm/samples-dev/configurationsCreateOrUpdateSample.js +2 -2
- package/dist-esm/samples-dev/configurationsCreateOrUpdateSample.js.map +1 -1
- package/dist-esm/samples-dev/configurationsGetSample.js +1 -1
- package/dist-esm/samples-dev/configurationsListByServerSample.js +6 -11
- package/dist-esm/samples-dev/configurationsListByServerSample.js.map +1 -1
- package/dist-esm/samples-dev/configurationsUpdateSample.js +2 -2
- package/dist-esm/samples-dev/configurationsUpdateSample.js.map +1 -1
- package/dist-esm/samples-dev/databasesCreateOrUpdateSample.js +3 -3
- package/dist-esm/samples-dev/databasesCreateOrUpdateSample.js.map +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 +5 -10
- package/dist-esm/samples-dev/databasesListByServerSample.js.map +1 -1
- package/dist-esm/samples-dev/firewallRulesCreateOrUpdateSample.js +3 -3
- package/dist-esm/samples-dev/firewallRulesCreateOrUpdateSample.js.map +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 +5 -10
- package/dist-esm/samples-dev/firewallRulesListByServerSample.js.map +1 -1
- package/dist-esm/samples-dev/getPrivateDnsZoneSuffixExecuteSample.js +2 -4
- package/dist-esm/samples-dev/getPrivateDnsZoneSuffixExecuteSample.js.map +1 -1
- package/dist-esm/samples-dev/locationBasedCapabilitiesListSample.js +5 -10
- package/dist-esm/samples-dev/locationBasedCapabilitiesListSample.js.map +1 -1
- package/dist-esm/samples-dev/locationBasedCapabilitySetGetSample.d.ts +2 -0
- package/dist-esm/samples-dev/locationBasedCapabilitySetGetSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/locationBasedCapabilitySetGetSample.js +39 -0
- package/dist-esm/samples-dev/locationBasedCapabilitySetGetSample.js.map +1 -0
- package/dist-esm/samples-dev/locationBasedCapabilitySetListSample.d.ts +2 -0
- package/dist-esm/samples-dev/locationBasedCapabilitySetListSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/locationBasedCapabilitySetListSample.js +54 -0
- package/dist-esm/samples-dev/locationBasedCapabilitySetListSample.js.map +1 -0
- package/dist-esm/samples-dev/logFilesListByServerSample.js +5 -10
- package/dist-esm/samples-dev/logFilesListByServerSample.js.map +1 -1
- package/dist-esm/samples-dev/longRunningBackupCreateSample.d.ts +2 -0
- package/dist-esm/samples-dev/longRunningBackupCreateSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/longRunningBackupCreateSample.js +40 -0
- package/dist-esm/samples-dev/longRunningBackupCreateSample.js.map +1 -0
- package/dist-esm/samples-dev/longRunningBackupsGetSample.d.ts +2 -0
- package/dist-esm/samples-dev/longRunningBackupsGetSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/longRunningBackupsGetSample.js +40 -0
- package/dist-esm/samples-dev/longRunningBackupsGetSample.js.map +1 -0
- package/dist-esm/samples-dev/longRunningBackupsListSample.d.ts +2 -0
- package/dist-esm/samples-dev/longRunningBackupsListSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/longRunningBackupsListSample.js +55 -0
- package/dist-esm/samples-dev/longRunningBackupsListSample.js.map +1 -0
- package/dist-esm/samples-dev/maintenancesListSample.d.ts +2 -0
- package/dist-esm/samples-dev/maintenancesListSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/maintenancesListSample.js +55 -0
- package/dist-esm/samples-dev/maintenancesListSample.js.map +1 -0
- package/dist-esm/samples-dev/maintenancesReadSample.d.ts +2 -0
- package/dist-esm/samples-dev/maintenancesReadSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/maintenancesReadSample.js +40 -0
- package/dist-esm/samples-dev/maintenancesReadSample.js.map +1 -0
- package/dist-esm/samples-dev/maintenancesUpdateSample.d.ts +2 -0
- package/dist-esm/samples-dev/maintenancesUpdateSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/maintenancesUpdateSample.js +44 -0
- package/dist-esm/samples-dev/maintenancesUpdateSample.js.map +1 -0
- package/dist-esm/samples-dev/operationProgressGetSample.d.ts +2 -0
- package/dist-esm/samples-dev/operationProgressGetSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/operationProgressGetSample.js +58 -0
- package/dist-esm/samples-dev/operationProgressGetSample.js.map +1 -0
- package/dist-esm/samples-dev/operationResultsGetSample.d.ts +2 -0
- package/dist-esm/samples-dev/operationResultsGetSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/operationResultsGetSample.js +39 -0
- package/dist-esm/samples-dev/operationResultsGetSample.js.map +1 -0
- package/dist-esm/samples-dev/operationsListSample.js +5 -10
- package/dist-esm/samples-dev/operationsListSample.js.map +1 -1
- package/dist-esm/samples-dev/replicasListByServerSample.js +5 -10
- package/dist-esm/samples-dev/replicasListByServerSample.js.map +1 -1
- package/dist-esm/samples-dev/serversCreateSample.js +22 -14
- 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 +5 -10
- package/dist-esm/samples-dev/serversListByResourceGroupSample.js.map +1 -1
- package/dist-esm/samples-dev/serversListSample.js +5 -10
- package/dist-esm/samples-dev/serversListSample.js.map +1 -1
- package/dist-esm/samples-dev/serversMigrationCutoverMigrationSample.d.ts +2 -0
- package/dist-esm/samples-dev/serversMigrationCutoverMigrationSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/serversMigrationCutoverMigrationSample.js +39 -0
- package/dist-esm/samples-dev/serversMigrationCutoverMigrationSample.js.map +1 -0
- package/dist-esm/samples-dev/serversResetGtidSample.js +3 -3
- package/dist-esm/samples-dev/serversResetGtidSample.js.map +1 -1
- package/dist-esm/samples-dev/serversRestartSample.js +3 -3
- package/dist-esm/samples-dev/serversRestartSample.js.map +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 +13 -12
- package/dist-esm/samples-dev/serversUpdateSample.js.map +1 -1
- package/dist-esm/samples-dev/serversValidateEstimateHighAvailabilitySample.d.ts +2 -0
- package/dist-esm/samples-dev/serversValidateEstimateHighAvailabilitySample.d.ts.map +1 -0
- package/dist-esm/samples-dev/serversValidateEstimateHighAvailabilitySample.js +42 -0
- package/dist-esm/samples-dev/serversValidateEstimateHighAvailabilitySample.js.map +1 -0
- package/dist-esm/src/lroImpl.js +1 -1
- package/dist-esm/src/models/index.d.ts +820 -94
- package/dist-esm/src/models/index.d.ts.map +1 -1
- package/dist-esm/src/models/index.js +131 -9
- package/dist-esm/src/models/index.js.map +1 -1
- package/dist-esm/src/models/mappers.d.ts +38 -5
- package/dist-esm/src/models/mappers.d.ts.map +1 -1
- package/dist-esm/src/models/mappers.js +1609 -761
- package/dist-esm/src/models/mappers.js.map +1 -1
- package/dist-esm/src/models/parameters.d.ts +16 -5
- package/dist-esm/src/models/parameters.d.ts.map +1 -1
- package/dist-esm/src/models/parameters.js +180 -85
- package/dist-esm/src/models/parameters.js.map +1 -1
- package/dist-esm/src/mySQLManagementFlexibleServerClient.d.ts +12 -3
- package/dist-esm/src/mySQLManagementFlexibleServerClient.d.ts.map +1 -1
- package/dist-esm/src/mySQLManagementFlexibleServerClient.js +27 -18
- package/dist-esm/src/mySQLManagementFlexibleServerClient.js.map +1 -1
- package/dist-esm/src/operations/advancedThreatProtectionSettings.d.ts +83 -0
- package/dist-esm/src/operations/advancedThreatProtectionSettings.d.ts.map +1 -0
- package/dist-esm/src/operations/advancedThreatProtectionSettings.js +382 -0
- package/dist-esm/src/operations/advancedThreatProtectionSettings.js.map +1 -0
- package/dist-esm/src/operations/azureADAdministrators.d.ts.map +1 -1
- package/dist-esm/src/operations/azureADAdministrators.js +41 -46
- package/dist-esm/src/operations/azureADAdministrators.js.map +1 -1
- package/dist-esm/src/operations/backupAndExport.d.ts.map +1 -1
- package/dist-esm/src/operations/backupAndExport.js +18 -18
- package/dist-esm/src/operations/backupAndExport.js.map +1 -1
- package/dist-esm/src/operations/backups.js +24 -29
- package/dist-esm/src/operations/backups.js.map +1 -1
- package/dist-esm/src/operations/checkNameAvailability.js +6 -6
- package/dist-esm/src/operations/checkNameAvailability.js.map +1 -1
- package/dist-esm/src/operations/checkNameAvailabilityWithoutLocation.d.ts.map +1 -1
- package/dist-esm/src/operations/checkNameAvailabilityWithoutLocation.js +5 -5
- package/dist-esm/src/operations/checkNameAvailabilityWithoutLocation.js.map +1 -1
- package/dist-esm/src/operations/checkVirtualNetworkSubnetUsage.d.ts.map +1 -1
- package/dist-esm/src/operations/checkVirtualNetworkSubnetUsage.js +7 -7
- package/dist-esm/src/operations/checkVirtualNetworkSubnetUsage.js.map +1 -1
- package/dist-esm/src/operations/configurations.d.ts.map +1 -1
- package/dist-esm/src/operations/configurations.js +62 -67
- package/dist-esm/src/operations/configurations.js.map +1 -1
- package/dist-esm/src/operations/databases.d.ts.map +1 -1
- package/dist-esm/src/operations/databases.js +42 -47
- package/dist-esm/src/operations/databases.js.map +1 -1
- package/dist-esm/src/operations/firewallRules.d.ts.map +1 -1
- package/dist-esm/src/operations/firewallRules.js +42 -47
- package/dist-esm/src/operations/firewallRules.js.map +1 -1
- package/dist-esm/src/operations/getPrivateDnsZoneSuffix.js +5 -5
- package/dist-esm/src/operations/getPrivateDnsZoneSuffix.js.map +1 -1
- package/dist-esm/src/operations/index.d.ts +8 -0
- package/dist-esm/src/operations/index.d.ts.map +1 -1
- package/dist-esm/src/operations/index.js +8 -0
- package/dist-esm/src/operations/index.js.map +1 -1
- package/dist-esm/src/operations/locationBasedCapabilities.d.ts.map +1 -1
- package/dist-esm/src/operations/locationBasedCapabilities.js +15 -20
- package/dist-esm/src/operations/locationBasedCapabilities.js.map +1 -1
- package/dist-esm/src/operations/locationBasedCapabilitySet.d.ts +42 -0
- package/dist-esm/src/operations/locationBasedCapabilitySet.d.ts.map +1 -0
- package/dist-esm/src/operations/locationBasedCapabilitySet.js +175 -0
- package/dist-esm/src/operations/locationBasedCapabilitySet.js.map +1 -0
- package/dist-esm/src/operations/logFiles.js +14 -19
- package/dist-esm/src/operations/logFiles.js.map +1 -1
- package/dist-esm/src/operations/longRunningBackup.d.ts +30 -0
- package/dist-esm/src/operations/longRunningBackup.d.ts.map +1 -0
- package/dist-esm/src/operations/longRunningBackup.js +117 -0
- package/dist-esm/src/operations/longRunningBackup.js.map +1 -0
- package/dist-esm/src/operations/longRunningBackups.d.ts +46 -0
- package/dist-esm/src/operations/longRunningBackups.d.ts.map +1 -0
- package/dist-esm/src/operations/longRunningBackups.js +182 -0
- package/dist-esm/src/operations/longRunningBackups.js.map +1 -0
- package/dist-esm/src/operations/maintenances.d.ts +63 -0
- package/dist-esm/src/operations/maintenances.d.ts.map +1 -0
- package/dist-esm/src/operations/maintenances.js +274 -0
- package/dist-esm/src/operations/maintenances.js.map +1 -0
- package/dist-esm/src/operations/operationProgress.d.ts +20 -0
- package/dist-esm/src/operations/operationProgress.d.ts.map +1 -0
- package/dist-esm/src/operations/operationProgress.js +53 -0
- package/dist-esm/src/operations/operationProgress.js.map +1 -0
- package/dist-esm/src/operations/operationResults.d.ts +20 -0
- package/dist-esm/src/operations/operationResults.d.ts.map +1 -0
- package/dist-esm/src/operations/operationResults.js +53 -0
- package/dist-esm/src/operations/operationResults.js.map +1 -0
- package/dist-esm/src/operations/operations.js +13 -18
- package/dist-esm/src/operations/operations.js.map +1 -1
- package/dist-esm/src/operations/replicas.js +15 -20
- package/dist-esm/src/operations/replicas.js.map +1 -1
- package/dist-esm/src/operations/servers.d.ts +9 -1
- package/dist-esm/src/operations/servers.d.ts.map +1 -1
- package/dist-esm/src/operations/servers.js +153 -130
- package/dist-esm/src/operations/servers.js.map +1 -1
- package/dist-esm/src/operations/serversMigration.d.ts +28 -0
- package/dist-esm/src/operations/serversMigration.d.ts.map +1 -0
- package/dist-esm/src/operations/serversMigration.js +112 -0
- package/dist-esm/src/operations/serversMigration.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/advancedThreatProtectionSettings.d.ts +58 -0
- package/dist-esm/src/operationsInterfaces/advancedThreatProtectionSettings.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/advancedThreatProtectionSettings.js +9 -0
- package/dist-esm/src/operationsInterfaces/advancedThreatProtectionSettings.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/index.d.ts +8 -0
- package/dist-esm/src/operationsInterfaces/index.d.ts.map +1 -1
- package/dist-esm/src/operationsInterfaces/index.js +8 -0
- package/dist-esm/src/operationsInterfaces/index.js.map +1 -1
- package/dist-esm/src/operationsInterfaces/locationBasedCapabilitySet.d.ts +19 -0
- package/dist-esm/src/operationsInterfaces/locationBasedCapabilitySet.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/locationBasedCapabilitySet.js +9 -0
- package/dist-esm/src/operationsInterfaces/locationBasedCapabilitySet.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/longRunningBackup.d.ts +22 -0
- package/dist-esm/src/operationsInterfaces/longRunningBackup.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/longRunningBackup.js +9 -0
- package/dist-esm/src/operationsInterfaces/longRunningBackup.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/longRunningBackups.d.ts +21 -0
- package/dist-esm/src/operationsInterfaces/longRunningBackups.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/longRunningBackups.js +9 -0
- package/dist-esm/src/operationsInterfaces/longRunningBackups.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/maintenances.d.ts +38 -0
- package/dist-esm/src/operationsInterfaces/maintenances.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/maintenances.js +9 -0
- package/dist-esm/src/operationsInterfaces/maintenances.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/operationProgress.d.ts +12 -0
- package/dist-esm/src/operationsInterfaces/operationProgress.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/operationProgress.js +9 -0
- package/dist-esm/src/operationsInterfaces/operationProgress.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/operationResults.d.ts +12 -0
- package/dist-esm/src/operationsInterfaces/operationResults.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/operationResults.js +9 -0
- package/dist-esm/src/operationsInterfaces/operationResults.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/servers.d.ts +9 -1
- package/dist-esm/src/operationsInterfaces/servers.d.ts.map +1 -1
- package/dist-esm/src/operationsInterfaces/serversMigration.d.ts +20 -0
- package/dist-esm/src/operationsInterfaces/serversMigration.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/serversMigration.js +9 -0
- package/dist-esm/src/operationsInterfaces/serversMigration.js.map +1 -0
- package/dist-esm/src/pagingHelper.js.map +1 -1
- package/dist-esm/test/mysql_operations_test.spec.d.ts +4 -0
- package/dist-esm/test/mysql_operations_test.spec.d.ts.map +1 -0
- package/dist-esm/test/mysql_operations_test.spec.js +125 -0
- package/dist-esm/test/mysql_operations_test.spec.js.map +1 -0
- package/package.json +19 -24
- package/review/arm-mysql-flexible.api.md +596 -40
- package/src/lroImpl.ts +3 -3
- package/src/models/index.ts +954 -116
- package/src/models/mappers.ts +1714 -780
- package/src/models/parameters.ts +197 -86
- package/src/mySQLManagementFlexibleServerClient.ts +71 -23
- package/src/operations/advancedThreatProtectionSettings.ts +528 -0
- package/src/operations/azureADAdministrators.ts +76 -82
- package/src/operations/backupAndExport.ts +33 -36
- package/src/operations/backups.ts +40 -43
- package/src/operations/checkNameAvailability.ts +10 -11
- package/src/operations/checkNameAvailabilityWithoutLocation.ts +11 -11
- package/src/operations/checkVirtualNetworkSubnetUsage.ts +13 -13
- package/src/operations/configurations.ts +108 -116
- package/src/operations/databases.ts +77 -83
- package/src/operations/firewallRules.ts +77 -83
- package/src/operations/getPrivateDnsZoneSuffix.ts +7 -7
- package/src/operations/index.ts +8 -0
- package/src/operations/locationBasedCapabilities.ts +23 -23
- package/src/operations/locationBasedCapabilitySet.ts +211 -0
- package/src/operations/logFiles.ts +24 -25
- package/src/operations/longRunningBackup.ts +167 -0
- package/src/operations/longRunningBackups.ts +236 -0
- package/src/operations/maintenances.ts +371 -0
- package/src/operations/operationProgress.ts +71 -0
- package/src/operations/operationResults.ts +71 -0
- package/src/operations/operations.ts +17 -17
- package/src/operations/replicas.ts +25 -26
- package/src/operations/servers.ts +269 -242
- package/src/operations/serversMigration.ts +159 -0
- package/src/operationsInterfaces/advancedThreatProtectionSettings.ts +121 -0
- package/src/operationsInterfaces/azureADAdministrators.ts +7 -7
- package/src/operationsInterfaces/backupAndExport.ts +4 -4
- package/src/operationsInterfaces/backups.ts +4 -4
- package/src/operationsInterfaces/checkNameAvailability.ts +2 -2
- package/src/operationsInterfaces/checkNameAvailabilityWithoutLocation.ts +2 -2
- package/src/operationsInterfaces/checkVirtualNetworkSubnetUsage.ts +2 -2
- package/src/operationsInterfaces/configurations.ts +9 -9
- package/src/operationsInterfaces/databases.ts +7 -7
- package/src/operationsInterfaces/firewallRules.ts +7 -7
- package/src/operationsInterfaces/getPrivateDnsZoneSuffix.ts +2 -2
- package/src/operationsInterfaces/index.ts +8 -0
- package/src/operationsInterfaces/locationBasedCapabilities.ts +2 -2
- package/src/operationsInterfaces/locationBasedCapabilitySet.ts +40 -0
- package/src/operationsInterfaces/logFiles.ts +1 -1
- package/src/operationsInterfaces/longRunningBackup.ts +48 -0
- package/src/operationsInterfaces/longRunningBackups.ts +44 -0
- package/src/operationsInterfaces/maintenances.ts +78 -0
- package/src/operationsInterfaces/operationProgress.ts +27 -0
- package/src/operationsInterfaces/operationResults.ts +27 -0
- package/src/operationsInterfaces/operations.ts +1 -1
- package/src/operationsInterfaces/replicas.ts +1 -1
- package/src/operationsInterfaces/servers.ts +35 -19
- package/src/operationsInterfaces/serversMigration.ts +44 -0
- package/src/pagingHelper.ts +1 -1
- package/types/arm-mysql-flexible.d.ts +1134 -110
- package/types/tsdoc-metadata.json +1 -1
- package/dist-esm/test/sampleTest.d.ts +0 -2
- package/dist-esm/test/sampleTest.d.ts.map +0 -1
- package/dist-esm/test/sampleTest.js +0 -38
- package/dist-esm/test/sampleTest.js.map +0 -1
- package/rollup.config.js +0 -122
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) Microsoft Corporation.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*
|
|
5
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
6
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging";
|
|
10
|
+
import { setContinuationToken } from "../pagingHelper";
|
|
11
|
+
import { LocationBasedCapabilitySet } from "../operationsInterfaces";
|
|
12
|
+
import * as coreClient from "@azure/core-client";
|
|
13
|
+
import * as Mappers from "../models/mappers";
|
|
14
|
+
import * as Parameters from "../models/parameters";
|
|
15
|
+
import { MySQLManagementFlexibleServerClient } from "../mySQLManagementFlexibleServerClient";
|
|
16
|
+
import {
|
|
17
|
+
Capability,
|
|
18
|
+
LocationBasedCapabilitySetListNextOptionalParams,
|
|
19
|
+
LocationBasedCapabilitySetListOptionalParams,
|
|
20
|
+
LocationBasedCapabilitySetListResponse,
|
|
21
|
+
LocationBasedCapabilitySetGetOptionalParams,
|
|
22
|
+
LocationBasedCapabilitySetGetResponse,
|
|
23
|
+
LocationBasedCapabilitySetListNextResponse,
|
|
24
|
+
} from "../models";
|
|
25
|
+
|
|
26
|
+
/// <reference lib="esnext.asynciterable" />
|
|
27
|
+
/** Class containing LocationBasedCapabilitySet operations. */
|
|
28
|
+
export class LocationBasedCapabilitySetImpl
|
|
29
|
+
implements LocationBasedCapabilitySet
|
|
30
|
+
{
|
|
31
|
+
private readonly client: MySQLManagementFlexibleServerClient;
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Initialize a new instance of the class LocationBasedCapabilitySet class.
|
|
35
|
+
* @param client Reference to the service client
|
|
36
|
+
*/
|
|
37
|
+
constructor(client: MySQLManagementFlexibleServerClient) {
|
|
38
|
+
this.client = client;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Get capabilities at specified location in a given subscription.
|
|
43
|
+
* @param locationName The name of the location.
|
|
44
|
+
* @param options The options parameters.
|
|
45
|
+
*/
|
|
46
|
+
public list(
|
|
47
|
+
locationName: string,
|
|
48
|
+
options?: LocationBasedCapabilitySetListOptionalParams,
|
|
49
|
+
): PagedAsyncIterableIterator<Capability> {
|
|
50
|
+
const iter = this.listPagingAll(locationName, options);
|
|
51
|
+
return {
|
|
52
|
+
next() {
|
|
53
|
+
return iter.next();
|
|
54
|
+
},
|
|
55
|
+
[Symbol.asyncIterator]() {
|
|
56
|
+
return this;
|
|
57
|
+
},
|
|
58
|
+
byPage: (settings?: PageSettings) => {
|
|
59
|
+
if (settings?.maxPageSize) {
|
|
60
|
+
throw new Error("maxPageSize is not supported by this operation.");
|
|
61
|
+
}
|
|
62
|
+
return this.listPagingPage(locationName, options, settings);
|
|
63
|
+
},
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
private async *listPagingPage(
|
|
68
|
+
locationName: string,
|
|
69
|
+
options?: LocationBasedCapabilitySetListOptionalParams,
|
|
70
|
+
settings?: PageSettings,
|
|
71
|
+
): AsyncIterableIterator<Capability[]> {
|
|
72
|
+
let result: LocationBasedCapabilitySetListResponse;
|
|
73
|
+
let continuationToken = settings?.continuationToken;
|
|
74
|
+
if (!continuationToken) {
|
|
75
|
+
result = await this._list(locationName, options);
|
|
76
|
+
let page = result.value || [];
|
|
77
|
+
continuationToken = result.nextLink;
|
|
78
|
+
setContinuationToken(page, continuationToken);
|
|
79
|
+
yield page;
|
|
80
|
+
}
|
|
81
|
+
while (continuationToken) {
|
|
82
|
+
result = await this._listNext(locationName, continuationToken, options);
|
|
83
|
+
continuationToken = result.nextLink;
|
|
84
|
+
let page = result.value || [];
|
|
85
|
+
setContinuationToken(page, continuationToken);
|
|
86
|
+
yield page;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
private async *listPagingAll(
|
|
91
|
+
locationName: string,
|
|
92
|
+
options?: LocationBasedCapabilitySetListOptionalParams,
|
|
93
|
+
): AsyncIterableIterator<Capability> {
|
|
94
|
+
for await (const page of this.listPagingPage(locationName, options)) {
|
|
95
|
+
yield* page;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* Get capabilities at specified location in a given subscription.
|
|
101
|
+
* @param locationName The name of the location.
|
|
102
|
+
* @param options The options parameters.
|
|
103
|
+
*/
|
|
104
|
+
private _list(
|
|
105
|
+
locationName: string,
|
|
106
|
+
options?: LocationBasedCapabilitySetListOptionalParams,
|
|
107
|
+
): Promise<LocationBasedCapabilitySetListResponse> {
|
|
108
|
+
return this.client.sendOperationRequest(
|
|
109
|
+
{ locationName, options },
|
|
110
|
+
listOperationSpec,
|
|
111
|
+
);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* Get capabilities at specified location in a given subscription.
|
|
116
|
+
* @param locationName The name of the location.
|
|
117
|
+
* @param capabilitySetName Name of capability set
|
|
118
|
+
* @param options The options parameters.
|
|
119
|
+
*/
|
|
120
|
+
get(
|
|
121
|
+
locationName: string,
|
|
122
|
+
capabilitySetName: string,
|
|
123
|
+
options?: LocationBasedCapabilitySetGetOptionalParams,
|
|
124
|
+
): Promise<LocationBasedCapabilitySetGetResponse> {
|
|
125
|
+
return this.client.sendOperationRequest(
|
|
126
|
+
{ locationName, capabilitySetName, options },
|
|
127
|
+
getOperationSpec,
|
|
128
|
+
);
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* ListNext
|
|
133
|
+
* @param locationName The name of the location.
|
|
134
|
+
* @param nextLink The nextLink from the previous successful call to the List method.
|
|
135
|
+
* @param options The options parameters.
|
|
136
|
+
*/
|
|
137
|
+
private _listNext(
|
|
138
|
+
locationName: string,
|
|
139
|
+
nextLink: string,
|
|
140
|
+
options?: LocationBasedCapabilitySetListNextOptionalParams,
|
|
141
|
+
): Promise<LocationBasedCapabilitySetListNextResponse> {
|
|
142
|
+
return this.client.sendOperationRequest(
|
|
143
|
+
{ locationName, nextLink, options },
|
|
144
|
+
listNextOperationSpec,
|
|
145
|
+
);
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
// Operation Specifications
|
|
149
|
+
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
|
|
150
|
+
|
|
151
|
+
const listOperationSpec: coreClient.OperationSpec = {
|
|
152
|
+
path: "/subscriptions/{subscriptionId}/providers/Microsoft.DBforMySQL/locations/{locationName}/capabilitySets",
|
|
153
|
+
httpMethod: "GET",
|
|
154
|
+
responses: {
|
|
155
|
+
200: {
|
|
156
|
+
bodyMapper: Mappers.CapabilitySetsList,
|
|
157
|
+
},
|
|
158
|
+
default: {
|
|
159
|
+
bodyMapper: Mappers.ErrorResponse,
|
|
160
|
+
},
|
|
161
|
+
},
|
|
162
|
+
queryParameters: [Parameters.apiVersion2],
|
|
163
|
+
urlParameters: [
|
|
164
|
+
Parameters.$host,
|
|
165
|
+
Parameters.subscriptionId,
|
|
166
|
+
Parameters.locationName,
|
|
167
|
+
],
|
|
168
|
+
headerParameters: [Parameters.accept],
|
|
169
|
+
serializer,
|
|
170
|
+
};
|
|
171
|
+
const getOperationSpec: coreClient.OperationSpec = {
|
|
172
|
+
path: "/subscriptions/{subscriptionId}/providers/Microsoft.DBforMySQL/locations/{locationName}/capabilitySets/{capabilitySetName}",
|
|
173
|
+
httpMethod: "GET",
|
|
174
|
+
responses: {
|
|
175
|
+
200: {
|
|
176
|
+
bodyMapper: Mappers.Capability,
|
|
177
|
+
},
|
|
178
|
+
default: {
|
|
179
|
+
bodyMapper: Mappers.ErrorResponse,
|
|
180
|
+
},
|
|
181
|
+
},
|
|
182
|
+
queryParameters: [Parameters.apiVersion2],
|
|
183
|
+
urlParameters: [
|
|
184
|
+
Parameters.$host,
|
|
185
|
+
Parameters.subscriptionId,
|
|
186
|
+
Parameters.locationName,
|
|
187
|
+
Parameters.capabilitySetName,
|
|
188
|
+
],
|
|
189
|
+
headerParameters: [Parameters.accept],
|
|
190
|
+
serializer,
|
|
191
|
+
};
|
|
192
|
+
const listNextOperationSpec: coreClient.OperationSpec = {
|
|
193
|
+
path: "{nextLink}",
|
|
194
|
+
httpMethod: "GET",
|
|
195
|
+
responses: {
|
|
196
|
+
200: {
|
|
197
|
+
bodyMapper: Mappers.CapabilitySetsList,
|
|
198
|
+
},
|
|
199
|
+
default: {
|
|
200
|
+
bodyMapper: Mappers.ErrorResponse,
|
|
201
|
+
},
|
|
202
|
+
},
|
|
203
|
+
urlParameters: [
|
|
204
|
+
Parameters.$host,
|
|
205
|
+
Parameters.subscriptionId,
|
|
206
|
+
Parameters.nextLink,
|
|
207
|
+
Parameters.locationName,
|
|
208
|
+
],
|
|
209
|
+
headerParameters: [Parameters.accept],
|
|
210
|
+
serializer,
|
|
211
|
+
};
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
LogFilesListByServerNextOptionalParams,
|
|
19
19
|
LogFilesListByServerOptionalParams,
|
|
20
20
|
LogFilesListByServerResponse,
|
|
21
|
-
LogFilesListByServerNextResponse
|
|
21
|
+
LogFilesListByServerNextResponse,
|
|
22
22
|
} from "../models";
|
|
23
23
|
|
|
24
24
|
/// <reference lib="esnext.asynciterable" />
|
|
@@ -43,12 +43,12 @@ export class LogFilesImpl implements LogFiles {
|
|
|
43
43
|
public listByServer(
|
|
44
44
|
resourceGroupName: string,
|
|
45
45
|
serverName: string,
|
|
46
|
-
options?: LogFilesListByServerOptionalParams
|
|
46
|
+
options?: LogFilesListByServerOptionalParams,
|
|
47
47
|
): PagedAsyncIterableIterator<LogFile> {
|
|
48
48
|
const iter = this.listByServerPagingAll(
|
|
49
49
|
resourceGroupName,
|
|
50
50
|
serverName,
|
|
51
|
-
options
|
|
51
|
+
options,
|
|
52
52
|
);
|
|
53
53
|
return {
|
|
54
54
|
next() {
|
|
@@ -65,9 +65,9 @@ export class LogFilesImpl implements LogFiles {
|
|
|
65
65
|
resourceGroupName,
|
|
66
66
|
serverName,
|
|
67
67
|
options,
|
|
68
|
-
settings
|
|
68
|
+
settings,
|
|
69
69
|
);
|
|
70
|
-
}
|
|
70
|
+
},
|
|
71
71
|
};
|
|
72
72
|
}
|
|
73
73
|
|
|
@@ -75,7 +75,7 @@ export class LogFilesImpl implements LogFiles {
|
|
|
75
75
|
resourceGroupName: string,
|
|
76
76
|
serverName: string,
|
|
77
77
|
options?: LogFilesListByServerOptionalParams,
|
|
78
|
-
settings?: PageSettings
|
|
78
|
+
settings?: PageSettings,
|
|
79
79
|
): AsyncIterableIterator<LogFile[]> {
|
|
80
80
|
let result: LogFilesListByServerResponse;
|
|
81
81
|
let continuationToken = settings?.continuationToken;
|
|
@@ -91,7 +91,7 @@ export class LogFilesImpl implements LogFiles {
|
|
|
91
91
|
resourceGroupName,
|
|
92
92
|
serverName,
|
|
93
93
|
continuationToken,
|
|
94
|
-
options
|
|
94
|
+
options,
|
|
95
95
|
);
|
|
96
96
|
continuationToken = result.nextLink;
|
|
97
97
|
let page = result.value || [];
|
|
@@ -103,12 +103,12 @@ export class LogFilesImpl implements LogFiles {
|
|
|
103
103
|
private async *listByServerPagingAll(
|
|
104
104
|
resourceGroupName: string,
|
|
105
105
|
serverName: string,
|
|
106
|
-
options?: LogFilesListByServerOptionalParams
|
|
106
|
+
options?: LogFilesListByServerOptionalParams,
|
|
107
107
|
): AsyncIterableIterator<LogFile> {
|
|
108
108
|
for await (const page of this.listByServerPagingPage(
|
|
109
109
|
resourceGroupName,
|
|
110
110
|
serverName,
|
|
111
|
-
options
|
|
111
|
+
options,
|
|
112
112
|
)) {
|
|
113
113
|
yield* page;
|
|
114
114
|
}
|
|
@@ -123,11 +123,11 @@ export class LogFilesImpl implements LogFiles {
|
|
|
123
123
|
private _listByServer(
|
|
124
124
|
resourceGroupName: string,
|
|
125
125
|
serverName: string,
|
|
126
|
-
options?: LogFilesListByServerOptionalParams
|
|
126
|
+
options?: LogFilesListByServerOptionalParams,
|
|
127
127
|
): Promise<LogFilesListByServerResponse> {
|
|
128
128
|
return this.client.sendOperationRequest(
|
|
129
129
|
{ resourceGroupName, serverName, options },
|
|
130
|
-
listByServerOperationSpec
|
|
130
|
+
listByServerOperationSpec,
|
|
131
131
|
);
|
|
132
132
|
}
|
|
133
133
|
|
|
@@ -142,11 +142,11 @@ export class LogFilesImpl implements LogFiles {
|
|
|
142
142
|
resourceGroupName: string,
|
|
143
143
|
serverName: string,
|
|
144
144
|
nextLink: string,
|
|
145
|
-
options?: LogFilesListByServerNextOptionalParams
|
|
145
|
+
options?: LogFilesListByServerNextOptionalParams,
|
|
146
146
|
): Promise<LogFilesListByServerNextResponse> {
|
|
147
147
|
return this.client.sendOperationRequest(
|
|
148
148
|
{ resourceGroupName, serverName, nextLink, options },
|
|
149
|
-
listByServerNextOperationSpec
|
|
149
|
+
listByServerNextOperationSpec,
|
|
150
150
|
);
|
|
151
151
|
}
|
|
152
152
|
}
|
|
@@ -154,45 +154,44 @@ export class LogFilesImpl implements LogFiles {
|
|
|
154
154
|
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
|
|
155
155
|
|
|
156
156
|
const listByServerOperationSpec: coreClient.OperationSpec = {
|
|
157
|
-
path:
|
|
158
|
-
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/logFiles",
|
|
157
|
+
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/logFiles",
|
|
159
158
|
httpMethod: "GET",
|
|
160
159
|
responses: {
|
|
161
160
|
200: {
|
|
162
|
-
bodyMapper: Mappers.LogFileListResult
|
|
161
|
+
bodyMapper: Mappers.LogFileListResult,
|
|
163
162
|
},
|
|
164
163
|
default: {
|
|
165
|
-
bodyMapper: Mappers.
|
|
166
|
-
}
|
|
164
|
+
bodyMapper: Mappers.ErrorResponse,
|
|
165
|
+
},
|
|
167
166
|
},
|
|
168
167
|
queryParameters: [Parameters.apiVersion],
|
|
169
168
|
urlParameters: [
|
|
170
169
|
Parameters.$host,
|
|
171
170
|
Parameters.subscriptionId,
|
|
172
171
|
Parameters.resourceGroupName,
|
|
173
|
-
Parameters.serverName
|
|
172
|
+
Parameters.serverName,
|
|
174
173
|
],
|
|
175
174
|
headerParameters: [Parameters.accept],
|
|
176
|
-
serializer
|
|
175
|
+
serializer,
|
|
177
176
|
};
|
|
178
177
|
const listByServerNextOperationSpec: coreClient.OperationSpec = {
|
|
179
178
|
path: "{nextLink}",
|
|
180
179
|
httpMethod: "GET",
|
|
181
180
|
responses: {
|
|
182
181
|
200: {
|
|
183
|
-
bodyMapper: Mappers.LogFileListResult
|
|
182
|
+
bodyMapper: Mappers.LogFileListResult,
|
|
184
183
|
},
|
|
185
184
|
default: {
|
|
186
|
-
bodyMapper: Mappers.
|
|
187
|
-
}
|
|
185
|
+
bodyMapper: Mappers.ErrorResponse,
|
|
186
|
+
},
|
|
188
187
|
},
|
|
189
188
|
urlParameters: [
|
|
190
189
|
Parameters.$host,
|
|
191
190
|
Parameters.subscriptionId,
|
|
192
191
|
Parameters.resourceGroupName,
|
|
193
192
|
Parameters.serverName,
|
|
194
|
-
Parameters.nextLink
|
|
193
|
+
Parameters.nextLink,
|
|
195
194
|
],
|
|
196
195
|
headerParameters: [Parameters.accept],
|
|
197
|
-
serializer
|
|
196
|
+
serializer,
|
|
198
197
|
};
|
|
@@ -0,0 +1,167 @@
|
|
|
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 { LongRunningBackup } 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
|
+
SimplePollerLike,
|
|
16
|
+
OperationState,
|
|
17
|
+
createHttpPoller,
|
|
18
|
+
} from "@azure/core-lro";
|
|
19
|
+
import { createLroSpec } from "../lroImpl";
|
|
20
|
+
import {
|
|
21
|
+
LongRunningBackupCreateOptionalParams,
|
|
22
|
+
LongRunningBackupCreateResponse,
|
|
23
|
+
} from "../models";
|
|
24
|
+
|
|
25
|
+
/** Class containing LongRunningBackup operations. */
|
|
26
|
+
export class LongRunningBackupImpl implements LongRunningBackup {
|
|
27
|
+
private readonly client: MySQLManagementFlexibleServerClient;
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Initialize a new instance of the class LongRunningBackup class.
|
|
31
|
+
* @param client Reference to the service client
|
|
32
|
+
*/
|
|
33
|
+
constructor(client: MySQLManagementFlexibleServerClient) {
|
|
34
|
+
this.client = client;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Create backup for a given server with specified backup name.
|
|
39
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
40
|
+
* @param serverName The name of the server.
|
|
41
|
+
* @param backupName The name of the backup.
|
|
42
|
+
* @param options The options parameters.
|
|
43
|
+
*/
|
|
44
|
+
async beginCreate(
|
|
45
|
+
resourceGroupName: string,
|
|
46
|
+
serverName: string,
|
|
47
|
+
backupName: string,
|
|
48
|
+
options?: LongRunningBackupCreateOptionalParams,
|
|
49
|
+
): Promise<
|
|
50
|
+
SimplePollerLike<
|
|
51
|
+
OperationState<LongRunningBackupCreateResponse>,
|
|
52
|
+
LongRunningBackupCreateResponse
|
|
53
|
+
>
|
|
54
|
+
> {
|
|
55
|
+
const directSendOperation = async (
|
|
56
|
+
args: coreClient.OperationArguments,
|
|
57
|
+
spec: coreClient.OperationSpec,
|
|
58
|
+
): Promise<LongRunningBackupCreateResponse> => {
|
|
59
|
+
return this.client.sendOperationRequest(args, spec);
|
|
60
|
+
};
|
|
61
|
+
const sendOperationFn = async (
|
|
62
|
+
args: coreClient.OperationArguments,
|
|
63
|
+
spec: coreClient.OperationSpec,
|
|
64
|
+
) => {
|
|
65
|
+
let currentRawResponse: coreClient.FullOperationResponse | undefined =
|
|
66
|
+
undefined;
|
|
67
|
+
const providedCallback = args.options?.onResponse;
|
|
68
|
+
const callback: coreClient.RawResponseCallback = (
|
|
69
|
+
rawResponse: coreClient.FullOperationResponse,
|
|
70
|
+
flatResponse: unknown,
|
|
71
|
+
) => {
|
|
72
|
+
currentRawResponse = rawResponse;
|
|
73
|
+
providedCallback?.(rawResponse, flatResponse);
|
|
74
|
+
};
|
|
75
|
+
const updatedArgs = {
|
|
76
|
+
...args,
|
|
77
|
+
options: {
|
|
78
|
+
...args.options,
|
|
79
|
+
onResponse: callback,
|
|
80
|
+
},
|
|
81
|
+
};
|
|
82
|
+
const flatResponse = await directSendOperation(updatedArgs, spec);
|
|
83
|
+
return {
|
|
84
|
+
flatResponse,
|
|
85
|
+
rawResponse: {
|
|
86
|
+
statusCode: currentRawResponse!.status,
|
|
87
|
+
body: currentRawResponse!.parsedBody,
|
|
88
|
+
headers: currentRawResponse!.headers.toJSON(),
|
|
89
|
+
},
|
|
90
|
+
};
|
|
91
|
+
};
|
|
92
|
+
|
|
93
|
+
const lro = createLroSpec({
|
|
94
|
+
sendOperationFn,
|
|
95
|
+
args: { resourceGroupName, serverName, backupName, options },
|
|
96
|
+
spec: createOperationSpec,
|
|
97
|
+
});
|
|
98
|
+
const poller = await createHttpPoller<
|
|
99
|
+
LongRunningBackupCreateResponse,
|
|
100
|
+
OperationState<LongRunningBackupCreateResponse>
|
|
101
|
+
>(lro, {
|
|
102
|
+
restoreFrom: options?.resumeFrom,
|
|
103
|
+
intervalInMs: options?.updateIntervalInMs,
|
|
104
|
+
resourceLocationConfig: "azure-async-operation",
|
|
105
|
+
});
|
|
106
|
+
await poller.poll();
|
|
107
|
+
return poller;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* Create backup for a given server with specified backup name.
|
|
112
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
113
|
+
* @param serverName The name of the server.
|
|
114
|
+
* @param backupName The name of the backup.
|
|
115
|
+
* @param options The options parameters.
|
|
116
|
+
*/
|
|
117
|
+
async beginCreateAndWait(
|
|
118
|
+
resourceGroupName: string,
|
|
119
|
+
serverName: string,
|
|
120
|
+
backupName: string,
|
|
121
|
+
options?: LongRunningBackupCreateOptionalParams,
|
|
122
|
+
): Promise<LongRunningBackupCreateResponse> {
|
|
123
|
+
const poller = await this.beginCreate(
|
|
124
|
+
resourceGroupName,
|
|
125
|
+
serverName,
|
|
126
|
+
backupName,
|
|
127
|
+
options,
|
|
128
|
+
);
|
|
129
|
+
return poller.pollUntilDone();
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
// Operation Specifications
|
|
133
|
+
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
|
|
134
|
+
|
|
135
|
+
const createOperationSpec: coreClient.OperationSpec = {
|
|
136
|
+
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/backupsV2/{backupName}",
|
|
137
|
+
httpMethod: "PUT",
|
|
138
|
+
responses: {
|
|
139
|
+
200: {
|
|
140
|
+
bodyMapper: Mappers.ServerBackupV2,
|
|
141
|
+
},
|
|
142
|
+
201: {
|
|
143
|
+
bodyMapper: Mappers.ServerBackupV2,
|
|
144
|
+
},
|
|
145
|
+
202: {
|
|
146
|
+
bodyMapper: Mappers.ServerBackupV2,
|
|
147
|
+
},
|
|
148
|
+
204: {
|
|
149
|
+
bodyMapper: Mappers.ServerBackupV2,
|
|
150
|
+
},
|
|
151
|
+
default: {
|
|
152
|
+
bodyMapper: Mappers.ErrorResponse,
|
|
153
|
+
},
|
|
154
|
+
},
|
|
155
|
+
requestBody: Parameters.parameters2,
|
|
156
|
+
queryParameters: [Parameters.apiVersion1],
|
|
157
|
+
urlParameters: [
|
|
158
|
+
Parameters.$host,
|
|
159
|
+
Parameters.subscriptionId,
|
|
160
|
+
Parameters.resourceGroupName,
|
|
161
|
+
Parameters.serverName,
|
|
162
|
+
Parameters.backupName,
|
|
163
|
+
],
|
|
164
|
+
headerParameters: [Parameters.contentType, Parameters.accept],
|
|
165
|
+
mediaType: "json",
|
|
166
|
+
serializer,
|
|
167
|
+
};
|