[mgmt] mysql-flexible release (#29478)
https://github.com/Azure/sdk-release-request/issues/5151
This commit is contained in:
Родитель
fc95498783
Коммит
b3009def8f
|
@ -15933,7 +15933,7 @@ packages:
|
|||
dev: false
|
||||
|
||||
file:projects/arm-mysql-flexible.tgz:
|
||||
resolution: {integrity: sha512-D92vkLIVvVNfsCD5tV00nDZ1UzywbbuT3idzJNR57wZn46qWIhxHRlCDfO5BUZtC1XCVJlYWQ+imh6yaVj6iIQ==, tarball: file:projects/arm-mysql-flexible.tgz}
|
||||
resolution: {integrity: sha512-McijmAxlBxBqzw1JD4tRq0vCH/CTTdfXODnLpI/7NP+SXQwoBn8ffrBrCLG+DGY78+KNlPSca7quuLGoFwm4Mw==, tarball: file:projects/arm-mysql-flexible.tgz}
|
||||
name: '@rush-temp/arm-mysql-flexible'
|
||||
version: 0.0.0
|
||||
dependencies:
|
||||
|
@ -15953,6 +15953,7 @@ packages:
|
|||
rimraf: 5.0.7
|
||||
ts-node: 10.9.2(@types/node@18.19.37)(typescript@5.4.5)
|
||||
tslib: 2.6.3
|
||||
tsx: 4.15.6
|
||||
typescript: 5.4.5
|
||||
uglify-js: 3.18.0
|
||||
transitivePeerDependencies:
|
||||
|
|
|
@ -1,18 +1,237 @@
|
|||
# Release History
|
||||
|
||||
## 4.0.0-beta.2 (Unreleased)
|
||||
|
||||
|
||||
## 4.0.0-beta.2 (2024-06-28)
|
||||
Compared with version 3.1.0
|
||||
|
||||
### Features Added
|
||||
|
||||
- Added operation group AdvancedThreatProtectionSettings
|
||||
- Added operation group AzureADAdministrators
|
||||
- Added operation group BackupAndExport
|
||||
- Added operation group CheckNameAvailabilityWithoutLocation
|
||||
- Added operation group LocationBasedCapabilitySet
|
||||
- Added operation group LogFiles
|
||||
- Added operation group LongRunningBackup
|
||||
- Added operation group LongRunningBackups
|
||||
- Added operation group Maintenances
|
||||
- Added operation group OperationProgress
|
||||
- Added operation group OperationResults
|
||||
- Added operation group ServersMigration
|
||||
- Added operation Backups.put
|
||||
- Added operation Configurations.beginCreateOrUpdate
|
||||
- Added operation Configurations.beginCreateOrUpdateAndWait
|
||||
- Added operation Servers.beginResetGtid
|
||||
- Added operation Servers.beginResetGtidAndWait
|
||||
- Added operation Servers.validateEstimateHighAvailability
|
||||
- Added Interface AdministratorListResult
|
||||
- Added Interface AdvancedThreatProtection
|
||||
- Added Interface AdvancedThreatProtectionForUpdate
|
||||
- Added Interface AdvancedThreatProtectionListResult
|
||||
- Added Interface AdvancedThreatProtectionSettingsGetOptionalParams
|
||||
- Added Interface AdvancedThreatProtectionSettingsListNextOptionalParams
|
||||
- Added Interface AdvancedThreatProtectionSettingsListOptionalParams
|
||||
- Added Interface AdvancedThreatProtectionSettingsUpdateHeaders
|
||||
- Added Interface AdvancedThreatProtectionSettingsUpdateOptionalParams
|
||||
- Added Interface AdvancedThreatProtectionSettingsUpdatePutHeaders
|
||||
- Added Interface AdvancedThreatProtectionSettingsUpdatePutOptionalParams
|
||||
- Added Interface AzureADAdministrator
|
||||
- Added Interface AzureADAdministratorsCreateOrUpdateOptionalParams
|
||||
- Added Interface AzureADAdministratorsDeleteOptionalParams
|
||||
- Added Interface AzureADAdministratorsGetOptionalParams
|
||||
- Added Interface AzureADAdministratorsListByServerNextOptionalParams
|
||||
- Added Interface AzureADAdministratorsListByServerOptionalParams
|
||||
- Added Interface BackupAndExportCreateHeaders
|
||||
- Added Interface BackupAndExportCreateOptionalParams
|
||||
- Added Interface BackupAndExportRequest
|
||||
- Added Interface BackupAndExportResponse
|
||||
- Added Interface BackupAndExportResponseType
|
||||
- Added Interface BackupAndExportValidateBackupOptionalParams
|
||||
- Added Interface BackupRequestBase
|
||||
- Added Interface BackupSettings
|
||||
- Added Interface BackupsPutOptionalParams
|
||||
- Added Interface BackupStoreDetails
|
||||
- Added Interface Capability
|
||||
- Added Interface CapabilitySetsList
|
||||
- Added Interface CheckNameAvailabilityWithoutLocationExecuteOptionalParams
|
||||
- Added Interface ConfigurationsCreateOrUpdateHeaders
|
||||
- Added Interface ConfigurationsCreateOrUpdateOptionalParams
|
||||
- Added Interface DataEncryption
|
||||
- Added Interface ErrorDetail
|
||||
- Added Interface FullBackupStoreDetails
|
||||
- Added Interface HighAvailabilityValidationEstimation
|
||||
- Added Interface ImportFromStorageResponseType
|
||||
- Added Interface ImportSourceProperties
|
||||
- Added Interface LocationBasedCapabilitySetGetOptionalParams
|
||||
- Added Interface LocationBasedCapabilitySetListNextOptionalParams
|
||||
- Added Interface LocationBasedCapabilitySetListOptionalParams
|
||||
- Added Interface LogFile
|
||||
- Added Interface LogFileListResult
|
||||
- Added Interface LogFilesListByServerNextOptionalParams
|
||||
- Added Interface LogFilesListByServerOptionalParams
|
||||
- Added Interface LongRunningBackupCreateHeaders
|
||||
- Added Interface LongRunningBackupCreateOptionalParams
|
||||
- Added Interface LongRunningBackupsGetOptionalParams
|
||||
- Added Interface LongRunningBackupsListNextOptionalParams
|
||||
- Added Interface LongRunningBackupsListOptionalParams
|
||||
- Added Interface Maintenance
|
||||
- Added Interface MaintenanceListResult
|
||||
- Added Interface MaintenancesListNextOptionalParams
|
||||
- Added Interface MaintenancesListOptionalParams
|
||||
- Added Interface MaintenancesReadOptionalParams
|
||||
- Added Interface MaintenancesUpdateHeaders
|
||||
- Added Interface MaintenancesUpdateOptionalParams
|
||||
- Added Interface MaintenanceUpdate
|
||||
- Added Interface MySQLServerIdentity
|
||||
- Added Interface MySQLServerSku
|
||||
- Added Interface OperationProgressGetOptionalParams
|
||||
- Added Interface OperationProgressResponseType
|
||||
- Added Interface OperationProgressResult
|
||||
- Added Interface OperationResultsGetOptionalParams
|
||||
- Added Interface OperationStatusExtendedResult
|
||||
- Added Interface OperationStatusResult
|
||||
- Added Interface PrivateEndpoint
|
||||
- Added Interface PrivateEndpointConnection
|
||||
- Added Interface PrivateLinkServiceConnectionState
|
||||
- Added Interface Provisioning
|
||||
- Added Interface ServerBackupV2
|
||||
- Added Interface ServerBackupV2ListResult
|
||||
- Added Interface ServerEditionCapabilityV2
|
||||
- Added Interface ServerGtidSetParameter
|
||||
- Added Interface ServersCreateHeaders
|
||||
- Added Interface ServersDeleteHeaders
|
||||
- Added Interface ServersFailoverHeaders
|
||||
- Added Interface ServersMigrationCutoverMigrationHeaders
|
||||
- Added Interface ServersMigrationCutoverMigrationOptionalParams
|
||||
- Added Interface ServersResetGtidHeaders
|
||||
- Added Interface ServersResetGtidOptionalParams
|
||||
- Added Interface ServersRestartHeaders
|
||||
- Added Interface ServersStartHeaders
|
||||
- Added Interface ServersStopHeaders
|
||||
- Added Interface ServersUpdateHeaders
|
||||
- Added Interface ServersValidateEstimateHighAvailabilityOptionalParams
|
||||
- Added Interface ServerVersionCapabilityV2
|
||||
- Added Interface SkuCapabilityV2
|
||||
- Added Interface UserAssignedIdentity
|
||||
- Added Interface ValidateBackupResponse
|
||||
- Added Type Alias AdministratorName
|
||||
- Added Type Alias AdministratorType
|
||||
- Added Type Alias AdvancedThreatProtectionName
|
||||
- Added Type Alias AdvancedThreatProtectionProvisioningState
|
||||
- Added Type Alias AdvancedThreatProtectionSettingsGetResponse
|
||||
- Added Type Alias AdvancedThreatProtectionSettingsListNextResponse
|
||||
- Added Type Alias AdvancedThreatProtectionSettingsListResponse
|
||||
- Added Type Alias AdvancedThreatProtectionSettingsUpdatePutResponse
|
||||
- Added Type Alias AdvancedThreatProtectionSettingsUpdateResponse
|
||||
- Added Type Alias AdvancedThreatProtectionState
|
||||
- Added Type Alias AzureADAdministratorsCreateOrUpdateResponse
|
||||
- Added Type Alias AzureADAdministratorsGetResponse
|
||||
- Added Type Alias AzureADAdministratorsListByServerNextResponse
|
||||
- Added Type Alias AzureADAdministratorsListByServerResponse
|
||||
- Added Type Alias BackupAndExportCreateResponse
|
||||
- Added Type Alias BackupAndExportValidateBackupResponse
|
||||
- Added Type Alias BackupFormat
|
||||
- Added Type Alias BackupsPutResponse
|
||||
- Added Type Alias BackupStoreDetailsUnion
|
||||
- Added Type Alias BackupType
|
||||
- Added Type Alias CheckNameAvailabilityWithoutLocationExecuteResponse
|
||||
- Added Type Alias ConfigurationsCreateOrUpdateResponse
|
||||
- Added Type Alias DataEncryptionType
|
||||
- Added Type Alias ImportSourceStorageType
|
||||
- Added Type Alias LocationBasedCapabilitySetGetResponse
|
||||
- Added Type Alias LocationBasedCapabilitySetListNextResponse
|
||||
- Added Type Alias LocationBasedCapabilitySetListResponse
|
||||
- Added Type Alias LogFilesListByServerNextResponse
|
||||
- Added Type Alias LogFilesListByServerResponse
|
||||
- Added Type Alias LongRunningBackupCreateResponse
|
||||
- Added Type Alias LongRunningBackupsGetResponse
|
||||
- Added Type Alias LongRunningBackupsListNextResponse
|
||||
- Added Type Alias LongRunningBackupsListResponse
|
||||
- Added Type Alias MaintenanceProvisioningState
|
||||
- Added Type Alias MaintenancesListNextResponse
|
||||
- Added Type Alias MaintenancesListResponse
|
||||
- Added Type Alias MaintenancesReadResponse
|
||||
- Added Type Alias MaintenanceState
|
||||
- Added Type Alias MaintenancesUpdateResponse
|
||||
- Added Type Alias MaintenanceType
|
||||
- Added Type Alias ManagedServiceIdentityType
|
||||
- Added Type Alias ObjectType
|
||||
- Added Type Alias OperationProgressGetResponse
|
||||
- Added Type Alias OperationProgressResponseTypeUnion
|
||||
- Added Type Alias OperationResultsGetResponse
|
||||
- Added Type Alias OperationStatus
|
||||
- Added Type Alias PrivateEndpointConnectionProvisioningState
|
||||
- Added Type Alias PrivateEndpointServiceConnectionStatus
|
||||
- Added Type Alias ProvisioningState
|
||||
- Added Type Alias ResetAllToDefault
|
||||
- Added Type Alias ServerSkuTier
|
||||
- Added Type Alias ServersMigrationCutoverMigrationResponse
|
||||
- Added Type Alias ServersValidateEstimateHighAvailabilityResponse
|
||||
- Interface Backup has a new optional parameter backupIntervalHours
|
||||
- Interface Configuration has a new optional parameter currentValue
|
||||
- Interface Configuration has a new optional parameter documentationLink
|
||||
- Interface ConfigurationListForBatchUpdate has a new optional parameter resetAllToDefault
|
||||
- Interface ConfigurationsListByServerOptionalParams has a new optional parameter keyword
|
||||
- Interface ConfigurationsListByServerOptionalParams has a new optional parameter page
|
||||
- Interface ConfigurationsListByServerOptionalParams has a new optional parameter pageSize
|
||||
- Interface ConfigurationsListByServerOptionalParams has a new optional parameter tags
|
||||
- Interface ErrorResponse has a new optional parameter error
|
||||
- Interface Resource has a new optional parameter systemData
|
||||
- Interface Server has a new optional parameter dataEncryption
|
||||
- Interface Server has a new optional parameter identity
|
||||
- Interface Server has a new optional parameter importSourceProperties
|
||||
- Interface Server has a new optional parameter privateEndpointConnections
|
||||
- Interface ServerForUpdate has a new optional parameter dataEncryption
|
||||
- Interface ServerForUpdate has a new optional parameter identity
|
||||
- Interface ServerForUpdate has a new optional parameter network
|
||||
- Interface ServerForUpdate has a new optional parameter version
|
||||
- Interface Storage_2 has a new optional parameter autoIoScaling
|
||||
- Interface Storage_2 has a new optional parameter logOnDisk
|
||||
- Interface StorageEditionCapability has a new optional parameter maxBackupIntervalHours
|
||||
- Interface StorageEditionCapability has a new optional parameter minBackupIntervalHours
|
||||
- Interface VirtualNetworkSubnetUsageResult has a new optional parameter location
|
||||
- Interface VirtualNetworkSubnetUsageResult has a new optional parameter subscriptionId
|
||||
- Added Enum KnownAdministratorName
|
||||
- Added Enum KnownAdministratorType
|
||||
- Added Enum KnownAdvancedThreatProtectionName
|
||||
- Added Enum KnownAdvancedThreatProtectionProvisioningState
|
||||
- Added Enum KnownAdvancedThreatProtectionState
|
||||
- Added Enum KnownBackupFormat
|
||||
- Added Enum KnownBackupType
|
||||
- Added Enum KnownImportSourceStorageType
|
||||
- Added Enum KnownMaintenanceProvisioningState
|
||||
- Added Enum KnownMaintenanceState
|
||||
- Added Enum KnownMaintenanceType
|
||||
- Added Enum KnownManagedServiceIdentityType
|
||||
- Added Enum KnownObjectType
|
||||
- Added Enum KnownPrivateEndpointConnectionProvisioningState
|
||||
- Added Enum KnownPrivateEndpointServiceConnectionStatus
|
||||
- Added Enum KnownProvisioningState
|
||||
- Added Enum KnownResetAllToDefault
|
||||
- Added Enum KnownServerSkuTier
|
||||
|
||||
### Breaking Changes
|
||||
|
||||
### Bugs Fixed
|
||||
|
||||
### Other Changes
|
||||
|
||||
- Class MySQLManagementFlexibleServerClient has a new signature
|
||||
- Interface Configuration no longer has parameter systemData
|
||||
- Interface Database no longer has parameter systemData
|
||||
- Interface ErrorResponse no longer has parameter additionalInfo
|
||||
- Interface ErrorResponse no longer has parameter code
|
||||
- Interface ErrorResponse no longer has parameter details
|
||||
- Interface ErrorResponse no longer has parameter message
|
||||
- Interface ErrorResponse no longer has parameter target
|
||||
- Interface FirewallRule no longer has parameter systemData
|
||||
- Interface MySQLManagementFlexibleServerClientOptionalParams no longer has parameter apiVersion
|
||||
- Interface Server no longer has parameter systemData
|
||||
- Interface ServerBackup no longer has parameter systemData
|
||||
- Type of parameter sku of interface Server is changed from Sku to MySQLServerSku
|
||||
- Type of parameter sku of interface ServerForUpdate is changed from Sku to MySQLServerSku
|
||||
- Class MySQLManagementFlexibleServerClient no longer has parameter apiVersion
|
||||
- Removed Enum KnownSkuTier
|
||||
|
||||
|
||||
## 4.0.0-beta.1 (2023-05-06)
|
||||
|
||||
**Features**
|
||||
### Features Added
|
||||
|
||||
- Added operation group AzureADAdministrators
|
||||
- Added operation group BackupAndExport
|
||||
|
@ -103,14 +322,14 @@
|
|||
- Added Enum KnownResetAllToDefault
|
||||
- Interface MySQLManagementFlexibleServerClientOptionalParams no longer has parameter apiVersion
|
||||
|
||||
**Breaking Changes**
|
||||
### Breaking Changes
|
||||
|
||||
- Class MySQLManagementFlexibleServerClient no longer has parameter apiVersion
|
||||
|
||||
|
||||
## 3.1.0 (2022-12-22)
|
||||
|
||||
**Features**
|
||||
### Features Added
|
||||
|
||||
- Added Interface Configuration
|
||||
- Added Interface Database
|
||||
|
@ -124,7 +343,7 @@
|
|||
|
||||
## 3.0.0 (2022-04-25)
|
||||
|
||||
**Breaking Changes**
|
||||
### Breaking Changes
|
||||
|
||||
- Interface ServerForUpdate no longer has parameter dataEncryption
|
||||
- Interface ServerForUpdate no longer has parameter identity
|
||||
|
@ -140,4 +359,4 @@ To understand the detail of the change, please refer to [Changelog](https://aka.
|
|||
|
||||
To migrate the existing applications to the latest version, please refer to [Migration Guide](https://aka.ms/js-track2-migration-guide).
|
||||
|
||||
To learn more, please refer to our documentation [Quick Start](https://aka.ms/azsdk/js/mgmt/quickstart ).
|
||||
To learn more, please refer to our documentation [Quick Start](https://aka.ms/azsdk/js/mgmt/quickstart).
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2023 Microsoft
|
||||
Copyright (c) 2024 Microsoft
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
{
|
||||
"commit": "3c639105c011765893db51cbb0dda056e34dc994",
|
||||
"commit": "3b4d92c1a4a57aeec9c13f32d5211bff484302b6",
|
||||
"readme": "specification/mysql/resource-manager/readme.md",
|
||||
"autorest_command": "autorest --version=3.9.3 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\Git\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\mysql\\resource-manager\\readme.md --use=@autorest/typescript@6.0.1 --generate-sample=true --tag=package-flexibleserver-2022-09-30-preview --typescript",
|
||||
"autorest_command": "autorest --version=3.9.7 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\Git\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\mysql\\resource-manager\\readme.md --use=@autorest/typescript@6.0.23 --generate-sample=true --tag=package-flexibleserver-2023-12-30",
|
||||
"repository_url": "https://github.com/Azure/azure-rest-api-specs.git",
|
||||
"release_tool": "@azure-tools/js-sdk-release-tools@2.6.2",
|
||||
"use": "@autorest/typescript@6.0.1"
|
||||
"release_tool": "@azure-tools/js-sdk-release-tools@2.7.9",
|
||||
"use": "@autorest/typescript@6.0.23"
|
||||
}
|
|
@ -2,5 +2,5 @@
|
|||
"AssetsRepo": "Azure/azure-sdk-assets",
|
||||
"AssetsRepoPrefixPath": "js",
|
||||
"TagPrefix": "js/mysql/arm-mysql-flexible",
|
||||
"Tag": "js/mysql/arm-mysql-flexible_decf73999f"
|
||||
"Tag": "js/mysql/arm-mysql-flexible_e95d68b4e5"
|
||||
}
|
||||
|
|
|
@ -8,12 +8,12 @@
|
|||
"node": ">=18.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"@azure/core-lro": "^2.5.0",
|
||||
"@azure/core-lro": "^2.5.4",
|
||||
"@azure/abort-controller": "^1.0.0",
|
||||
"@azure/core-paging": "^1.2.0",
|
||||
"@azure/core-client": "^1.7.0",
|
||||
"@azure/core-auth": "^1.3.0",
|
||||
"@azure/core-rest-pipeline": "^1.8.0",
|
||||
"@azure/core-auth": "^1.6.0",
|
||||
"@azure/core-rest-pipeline": "^1.14.0",
|
||||
"tslib": "^2.2.0"
|
||||
},
|
||||
"keywords": [
|
||||
|
@ -32,19 +32,20 @@
|
|||
"mkdirp": "^3.0.1",
|
||||
"typescript": "~5.4.5",
|
||||
"uglify-js": "^3.4.9",
|
||||
"rimraf": "^5.0.5",
|
||||
"rimraf": "^5.0.0",
|
||||
"dotenv": "^16.0.0",
|
||||
"@azure/dev-tool": "^1.0.0",
|
||||
"@azure/identity": "^4.0.1",
|
||||
"@azure-tools/test-recorder": "^3.0.0",
|
||||
"@azure-tools/test-credential": "^1.0.0",
|
||||
"@azure-tools/test-credential": "^1.1.0",
|
||||
"mocha": "^10.0.0",
|
||||
"@types/mocha": "^10.0.0",
|
||||
"tsx": "^4.7.1",
|
||||
"@types/chai": "^4.2.8",
|
||||
"chai": "^4.2.0",
|
||||
"cross-env": "^7.0.2",
|
||||
"@types/node": "^18.0.0",
|
||||
"@azure/dev-tool": "^1.0.0",
|
||||
"ts-node": "^10.0.0",
|
||||
"@types/mocha": "^10.0.0"
|
||||
"ts-node": "^10.0.0"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
@ -77,7 +78,6 @@
|
|||
"pack": "npm pack 2>&1",
|
||||
"extract-api": "dev-tool run extract-api",
|
||||
"lint": "echo skipped",
|
||||
"audit": "echo skipped",
|
||||
"clean": "rimraf --glob dist dist-browser dist-esm test-dist temp types *.tgz *.log",
|
||||
"build:node": "echo skipped",
|
||||
"build:browser": "echo skipped",
|
||||
|
@ -115,4 +115,4 @@
|
|||
"disableDocsMs": true,
|
||||
"apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-mysql-flexible?view=azure-node-preview"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -22,13 +22,100 @@ export type AdministratorName = string;
|
|||
// @public
|
||||
export type AdministratorType = string;
|
||||
|
||||
// @public
|
||||
export interface AdvancedThreatProtection extends ProxyResource {
|
||||
readonly creationTime?: Date;
|
||||
readonly provisioningState?: AdvancedThreatProtectionProvisioningState;
|
||||
state?: AdvancedThreatProtectionState;
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface AdvancedThreatProtectionForUpdate {
|
||||
state?: AdvancedThreatProtectionState;
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface AdvancedThreatProtectionListResult {
|
||||
readonly nextLink?: string;
|
||||
readonly value?: AdvancedThreatProtection[];
|
||||
}
|
||||
|
||||
// @public
|
||||
export type AdvancedThreatProtectionName = string;
|
||||
|
||||
// @public
|
||||
export type AdvancedThreatProtectionProvisioningState = string;
|
||||
|
||||
// @public
|
||||
export interface AdvancedThreatProtectionSettings {
|
||||
beginUpdate(resourceGroupName: string, serverName: string, advancedThreatProtectionName: AdvancedThreatProtectionName, parameters: AdvancedThreatProtectionForUpdate, options?: AdvancedThreatProtectionSettingsUpdateOptionalParams): Promise<SimplePollerLike<OperationState<AdvancedThreatProtectionSettingsUpdateResponse>, AdvancedThreatProtectionSettingsUpdateResponse>>;
|
||||
beginUpdateAndWait(resourceGroupName: string, serverName: string, advancedThreatProtectionName: AdvancedThreatProtectionName, parameters: AdvancedThreatProtectionForUpdate, options?: AdvancedThreatProtectionSettingsUpdateOptionalParams): Promise<AdvancedThreatProtectionSettingsUpdateResponse>;
|
||||
beginUpdatePut(resourceGroupName: string, serverName: string, advancedThreatProtectionName: AdvancedThreatProtectionName, parameters: AdvancedThreatProtection, options?: AdvancedThreatProtectionSettingsUpdatePutOptionalParams): Promise<SimplePollerLike<OperationState<AdvancedThreatProtectionSettingsUpdatePutResponse>, AdvancedThreatProtectionSettingsUpdatePutResponse>>;
|
||||
beginUpdatePutAndWait(resourceGroupName: string, serverName: string, advancedThreatProtectionName: AdvancedThreatProtectionName, parameters: AdvancedThreatProtection, options?: AdvancedThreatProtectionSettingsUpdatePutOptionalParams): Promise<AdvancedThreatProtectionSettingsUpdatePutResponse>;
|
||||
get(resourceGroupName: string, serverName: string, advancedThreatProtectionName: AdvancedThreatProtectionName, options?: AdvancedThreatProtectionSettingsGetOptionalParams): Promise<AdvancedThreatProtectionSettingsGetResponse>;
|
||||
list(resourceGroupName: string, serverName: string, options?: AdvancedThreatProtectionSettingsListOptionalParams): PagedAsyncIterableIterator<AdvancedThreatProtection>;
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface AdvancedThreatProtectionSettingsGetOptionalParams extends coreClient.OperationOptions {
|
||||
}
|
||||
|
||||
// @public
|
||||
export type AdvancedThreatProtectionSettingsGetResponse = AdvancedThreatProtection;
|
||||
|
||||
// @public
|
||||
export interface AdvancedThreatProtectionSettingsListNextOptionalParams extends coreClient.OperationOptions {
|
||||
}
|
||||
|
||||
// @public
|
||||
export type AdvancedThreatProtectionSettingsListNextResponse = AdvancedThreatProtectionListResult;
|
||||
|
||||
// @public
|
||||
export interface AdvancedThreatProtectionSettingsListOptionalParams extends coreClient.OperationOptions {
|
||||
}
|
||||
|
||||
// @public
|
||||
export type AdvancedThreatProtectionSettingsListResponse = AdvancedThreatProtectionListResult;
|
||||
|
||||
// @public
|
||||
export interface AdvancedThreatProtectionSettingsUpdateHeaders {
|
||||
azureAsyncOperation?: string;
|
||||
location?: string;
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface AdvancedThreatProtectionSettingsUpdateOptionalParams extends coreClient.OperationOptions {
|
||||
resumeFrom?: string;
|
||||
updateIntervalInMs?: number;
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface AdvancedThreatProtectionSettingsUpdatePutHeaders {
|
||||
azureAsyncOperation?: string;
|
||||
location?: string;
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface AdvancedThreatProtectionSettingsUpdatePutOptionalParams extends coreClient.OperationOptions {
|
||||
resumeFrom?: string;
|
||||
updateIntervalInMs?: number;
|
||||
}
|
||||
|
||||
// @public
|
||||
export type AdvancedThreatProtectionSettingsUpdatePutResponse = AdvancedThreatProtection;
|
||||
|
||||
// @public
|
||||
export type AdvancedThreatProtectionSettingsUpdateResponse = AdvancedThreatProtection;
|
||||
|
||||
// @public
|
||||
export type AdvancedThreatProtectionState = string;
|
||||
|
||||
// @public
|
||||
export interface AzureADAdministrator extends ProxyResource {
|
||||
administratorType?: AdministratorType;
|
||||
identityResourceId?: string;
|
||||
login?: string;
|
||||
sid?: string;
|
||||
readonly systemData?: SystemData;
|
||||
tenantId?: string;
|
||||
}
|
||||
|
||||
|
@ -80,6 +167,7 @@ export type AzureADAdministratorsListByServerResponse = AdministratorListResult;
|
|||
|
||||
// @public
|
||||
export interface Backup {
|
||||
backupIntervalHours?: number;
|
||||
backupRetentionDays?: number;
|
||||
readonly earliestRestoreDate?: Date;
|
||||
geoRedundantBackup?: EnableStatusEnum;
|
||||
|
@ -113,17 +201,24 @@ export interface BackupAndExportRequest extends BackupRequestBase {
|
|||
}
|
||||
|
||||
// @public
|
||||
export interface BackupAndExportResponse extends ProxyResource {
|
||||
export interface BackupAndExportResponse extends ProxyResource, ErrorResponse {
|
||||
backupMetadata?: string;
|
||||
datasourceSizeInBytes?: number;
|
||||
dataTransferredInBytes?: number;
|
||||
endTime?: Date;
|
||||
error?: ErrorResponse;
|
||||
percentComplete?: number;
|
||||
startTime?: Date;
|
||||
status?: OperationStatus;
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface BackupAndExportResponseType extends OperationProgressResponseType {
|
||||
backupMetadata?: string;
|
||||
datasourceSizeInBytes?: number;
|
||||
dataTransferredInBytes?: number;
|
||||
objectType: "BackupAndExportResponse";
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface BackupAndExportValidateBackupOptionalParams extends coreClient.OperationOptions {
|
||||
}
|
||||
|
@ -188,12 +283,22 @@ export interface BackupStoreDetails {
|
|||
// @public (undocumented)
|
||||
export type BackupStoreDetailsUnion = BackupStoreDetails | FullBackupStoreDetails;
|
||||
|
||||
// @public
|
||||
export type BackupType = string;
|
||||
|
||||
// @public
|
||||
export interface CapabilitiesListResult {
|
||||
readonly nextLink?: string;
|
||||
readonly value?: CapabilityProperties[];
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface Capability extends ProxyResource {
|
||||
readonly supportedFlexibleServerEditions?: ServerEditionCapabilityV2[];
|
||||
readonly supportedGeoBackupRegions?: string[];
|
||||
readonly supportedServerVersions?: ServerVersionCapabilityV2[];
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface CapabilityProperties {
|
||||
readonly supportedFlexibleServerEditions?: ServerEditionCapability[];
|
||||
|
@ -202,6 +307,12 @@ export interface CapabilityProperties {
|
|||
readonly zone?: string;
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface CapabilitySetsList {
|
||||
readonly nextLink?: string;
|
||||
readonly value?: Capability[];
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface CheckNameAvailability {
|
||||
execute(locationName: string, nameAvailabilityRequest: NameAvailabilityRequest, options?: CheckNameAvailabilityExecuteOptionalParams): Promise<CheckNameAvailabilityExecuteResponse>;
|
||||
|
@ -238,11 +349,6 @@ export interface CheckVirtualNetworkSubnetUsageExecuteOptionalParams extends cor
|
|||
// @public
|
||||
export type CheckVirtualNetworkSubnetUsageExecuteResponse = VirtualNetworkSubnetUsageResult;
|
||||
|
||||
// @public
|
||||
export interface CloudError {
|
||||
error?: ErrorResponse;
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface Configuration extends ProxyResource {
|
||||
readonly allowedValues?: string;
|
||||
|
@ -255,7 +361,6 @@ export interface Configuration extends ProxyResource {
|
|||
readonly isDynamicConfig?: IsDynamicConfig;
|
||||
readonly isReadOnly?: IsReadOnly;
|
||||
source?: ConfigurationSource;
|
||||
readonly systemData?: SystemData;
|
||||
value?: string;
|
||||
}
|
||||
|
||||
|
@ -361,7 +466,6 @@ export type CreateMode = string;
|
|||
export interface Database extends ProxyResource {
|
||||
charset?: string;
|
||||
collation?: string;
|
||||
readonly systemData?: SystemData;
|
||||
}
|
||||
|
||||
// @public
|
||||
|
@ -444,19 +548,23 @@ export interface ErrorAdditionalInfo {
|
|||
}
|
||||
|
||||
// @public
|
||||
export interface ErrorResponse {
|
||||
export interface ErrorDetail {
|
||||
readonly additionalInfo?: ErrorAdditionalInfo[];
|
||||
readonly code?: string;
|
||||
readonly details?: ErrorResponse[];
|
||||
readonly details?: ErrorDetail[];
|
||||
readonly message?: string;
|
||||
readonly target?: string;
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface ErrorResponse {
|
||||
error?: ErrorDetail;
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface FirewallRule extends ProxyResource {
|
||||
endIpAddress: string;
|
||||
startIpAddress: string;
|
||||
readonly systemData?: SystemData;
|
||||
}
|
||||
|
||||
// @public
|
||||
|
@ -551,15 +659,29 @@ export type HighAvailabilityMode = string;
|
|||
export type HighAvailabilityState = string;
|
||||
|
||||
// @public
|
||||
export interface Identity {
|
||||
readonly principalId?: string;
|
||||
readonly tenantId?: string;
|
||||
type?: ManagedServiceIdentityType;
|
||||
userAssignedIdentities?: {
|
||||
[propertyName: string]: Record<string, unknown>;
|
||||
};
|
||||
export interface HighAvailabilityValidationEstimation {
|
||||
readonly estimatedDowntime?: number;
|
||||
expectedStandbyAvailabilityZone?: string;
|
||||
readonly scheduledStandbyAvailabilityZone?: string;
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface ImportFromStorageResponseType extends OperationProgressResponseType {
|
||||
estimatedCompletionTime?: Date;
|
||||
objectType: "ImportFromStorageResponse";
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface ImportSourceProperties {
|
||||
dataDirPath?: string;
|
||||
sasToken?: string;
|
||||
storageType?: ImportSourceStorageType;
|
||||
storageUrl?: string;
|
||||
}
|
||||
|
||||
// @public
|
||||
export type ImportSourceStorageType = string;
|
||||
|
||||
// @public
|
||||
export type IsConfigPendingRestart = string;
|
||||
|
||||
|
@ -579,10 +701,34 @@ export enum KnownAdministratorType {
|
|||
ActiveDirectory = "ActiveDirectory"
|
||||
}
|
||||
|
||||
// @public
|
||||
export enum KnownAdvancedThreatProtectionName {
|
||||
Default = "Default"
|
||||
}
|
||||
|
||||
// @public
|
||||
export enum KnownAdvancedThreatProtectionProvisioningState {
|
||||
Canceled = "Canceled",
|
||||
Failed = "Failed",
|
||||
Succeeded = "Succeeded",
|
||||
Updating = "Updating"
|
||||
}
|
||||
|
||||
// @public
|
||||
export enum KnownAdvancedThreatProtectionState {
|
||||
Disabled = "Disabled",
|
||||
Enabled = "Enabled"
|
||||
}
|
||||
|
||||
// @public
|
||||
export enum KnownBackupFormat {
|
||||
CollatedFormat = "CollatedFormat",
|
||||
None = "None"
|
||||
Raw = "Raw"
|
||||
}
|
||||
|
||||
// @public
|
||||
export enum KnownBackupType {
|
||||
Full = "FULL"
|
||||
}
|
||||
|
||||
// @public
|
||||
|
@ -629,6 +775,11 @@ export enum KnownHighAvailabilityState {
|
|||
RemovingStandby = "RemovingStandby"
|
||||
}
|
||||
|
||||
// @public
|
||||
export enum KnownImportSourceStorageType {
|
||||
AzureBlob = "AzureBlob"
|
||||
}
|
||||
|
||||
// @public
|
||||
export enum KnownIsConfigPendingRestart {
|
||||
False = "False",
|
||||
|
@ -647,11 +798,67 @@ export enum KnownIsReadOnly {
|
|||
True = "True"
|
||||
}
|
||||
|
||||
// @public
|
||||
export enum KnownMaintenanceProvisioningState {
|
||||
Creating = "Creating",
|
||||
Deleting = "Deleting",
|
||||
Failed = "Failed",
|
||||
Succeeded = "Succeeded"
|
||||
}
|
||||
|
||||
// @public
|
||||
export enum KnownMaintenanceState {
|
||||
Canceled = "Canceled",
|
||||
Completed = "Completed",
|
||||
InPreparation = "InPreparation",
|
||||
Processing = "Processing",
|
||||
ReScheduled = "ReScheduled",
|
||||
Scheduled = "Scheduled"
|
||||
}
|
||||
|
||||
// @public
|
||||
export enum KnownMaintenanceType {
|
||||
HotFixes = "HotFixes",
|
||||
MinorVersionUpgrade = "MinorVersionUpgrade",
|
||||
RoutineMaintenance = "RoutineMaintenance",
|
||||
SecurityPatches = "SecurityPatches"
|
||||
}
|
||||
|
||||
// @public
|
||||
export enum KnownManagedServiceIdentityType {
|
||||
UserAssigned = "UserAssigned"
|
||||
}
|
||||
|
||||
// @public
|
||||
export enum KnownObjectType {
|
||||
BackupAndExportResponse = "BackupAndExportResponse",
|
||||
ImportFromStorageResponse = "ImportFromStorageResponse"
|
||||
}
|
||||
|
||||
// @public
|
||||
export enum KnownPrivateEndpointConnectionProvisioningState {
|
||||
Creating = "Creating",
|
||||
Deleting = "Deleting",
|
||||
Failed = "Failed",
|
||||
Succeeded = "Succeeded"
|
||||
}
|
||||
|
||||
// @public
|
||||
export enum KnownPrivateEndpointServiceConnectionStatus {
|
||||
Approved = "Approved",
|
||||
Pending = "Pending",
|
||||
Rejected = "Rejected"
|
||||
}
|
||||
|
||||
// @public
|
||||
export enum KnownProvisioningState {
|
||||
Canceled = "Canceled",
|
||||
Creating = "Creating",
|
||||
Deleting = "Deleting",
|
||||
Failed = "Failed",
|
||||
Succeeded = "Succeeded"
|
||||
}
|
||||
|
||||
// @public
|
||||
export enum KnownReplicationRole {
|
||||
None = "None",
|
||||
|
@ -665,6 +872,13 @@ export enum KnownResetAllToDefault {
|
|||
True = "True"
|
||||
}
|
||||
|
||||
// @public
|
||||
export enum KnownServerSkuTier {
|
||||
Burstable = "Burstable",
|
||||
GeneralPurpose = "GeneralPurpose",
|
||||
MemoryOptimized = "MemoryOptimized"
|
||||
}
|
||||
|
||||
// @public
|
||||
export enum KnownServerState {
|
||||
Disabled = "Disabled",
|
||||
|
@ -682,13 +896,6 @@ export enum KnownServerVersion {
|
|||
Five7 = "5.7"
|
||||
}
|
||||
|
||||
// @public
|
||||
export enum KnownSkuTier {
|
||||
Burstable = "Burstable",
|
||||
GeneralPurpose = "GeneralPurpose",
|
||||
MemoryOptimized = "MemoryOptimized"
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface LocationBasedCapabilities {
|
||||
list(locationName: string, options?: LocationBasedCapabilitiesListOptionalParams): PagedAsyncIterableIterator<CapabilityProperties>;
|
||||
|
@ -708,12 +915,38 @@ export interface LocationBasedCapabilitiesListOptionalParams extends coreClient.
|
|||
// @public
|
||||
export type LocationBasedCapabilitiesListResponse = CapabilitiesListResult;
|
||||
|
||||
// @public
|
||||
export interface LocationBasedCapabilitySet {
|
||||
get(locationName: string, capabilitySetName: string, options?: LocationBasedCapabilitySetGetOptionalParams): Promise<LocationBasedCapabilitySetGetResponse>;
|
||||
list(locationName: string, options?: LocationBasedCapabilitySetListOptionalParams): PagedAsyncIterableIterator<Capability>;
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface LocationBasedCapabilitySetGetOptionalParams extends coreClient.OperationOptions {
|
||||
}
|
||||
|
||||
// @public
|
||||
export type LocationBasedCapabilitySetGetResponse = Capability;
|
||||
|
||||
// @public
|
||||
export interface LocationBasedCapabilitySetListNextOptionalParams extends coreClient.OperationOptions {
|
||||
}
|
||||
|
||||
// @public
|
||||
export type LocationBasedCapabilitySetListNextResponse = CapabilitySetsList;
|
||||
|
||||
// @public
|
||||
export interface LocationBasedCapabilitySetListOptionalParams extends coreClient.OperationOptions {
|
||||
}
|
||||
|
||||
// @public
|
||||
export type LocationBasedCapabilitySetListResponse = CapabilitySetsList;
|
||||
|
||||
// @public
|
||||
export interface LogFile extends ProxyResource {
|
||||
createdTime?: Date;
|
||||
lastModifiedTime?: Date;
|
||||
sizeInKB?: number;
|
||||
readonly systemData?: SystemData;
|
||||
typePropertiesType?: string;
|
||||
url?: string;
|
||||
}
|
||||
|
@ -743,6 +976,135 @@ export interface LogFilesListByServerOptionalParams extends coreClient.Operation
|
|||
// @public
|
||||
export type LogFilesListByServerResponse = LogFileListResult;
|
||||
|
||||
// @public
|
||||
export interface LongRunningBackup {
|
||||
beginCreate(resourceGroupName: string, serverName: string, backupName: string, options?: LongRunningBackupCreateOptionalParams): Promise<SimplePollerLike<OperationState<LongRunningBackupCreateResponse>, LongRunningBackupCreateResponse>>;
|
||||
beginCreateAndWait(resourceGroupName: string, serverName: string, backupName: string, options?: LongRunningBackupCreateOptionalParams): Promise<LongRunningBackupCreateResponse>;
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface LongRunningBackupCreateHeaders {
|
||||
azureAsyncOperation?: string;
|
||||
location?: string;
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface LongRunningBackupCreateOptionalParams extends coreClient.OperationOptions {
|
||||
parameters?: ServerBackupV2;
|
||||
resumeFrom?: string;
|
||||
updateIntervalInMs?: number;
|
||||
}
|
||||
|
||||
// @public
|
||||
export type LongRunningBackupCreateResponse = ServerBackupV2;
|
||||
|
||||
// @public
|
||||
export interface LongRunningBackups {
|
||||
get(resourceGroupName: string, serverName: string, backupName: string, options?: LongRunningBackupsGetOptionalParams): Promise<LongRunningBackupsGetResponse>;
|
||||
list(resourceGroupName: string, serverName: string, options?: LongRunningBackupsListOptionalParams): PagedAsyncIterableIterator<ServerBackupV2>;
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface LongRunningBackupsGetOptionalParams extends coreClient.OperationOptions {
|
||||
}
|
||||
|
||||
// @public
|
||||
export type LongRunningBackupsGetResponse = ServerBackupV2;
|
||||
|
||||
// @public
|
||||
export interface LongRunningBackupsListNextOptionalParams extends coreClient.OperationOptions {
|
||||
}
|
||||
|
||||
// @public
|
||||
export type LongRunningBackupsListNextResponse = ServerBackupV2ListResult;
|
||||
|
||||
// @public
|
||||
export interface LongRunningBackupsListOptionalParams extends coreClient.OperationOptions {
|
||||
}
|
||||
|
||||
// @public
|
||||
export type LongRunningBackupsListResponse = ServerBackupV2ListResult;
|
||||
|
||||
// @public
|
||||
export interface Maintenance extends ProxyResource {
|
||||
readonly maintenanceAvailableScheduleMaxTime?: Date;
|
||||
readonly maintenanceAvailableScheduleMinTime?: Date;
|
||||
readonly maintenanceDescription?: string;
|
||||
readonly maintenanceEndTime?: Date;
|
||||
readonly maintenanceExecutionEndTime?: Date;
|
||||
readonly maintenanceExecutionStartTime?: Date;
|
||||
maintenanceStartTime?: Date;
|
||||
readonly maintenanceState?: MaintenanceState;
|
||||
readonly maintenanceTitle?: string;
|
||||
readonly maintenanceType?: MaintenanceType;
|
||||
readonly provisioningState?: MaintenanceProvisioningState;
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface MaintenanceListResult {
|
||||
nextLink?: string;
|
||||
value?: Maintenance[];
|
||||
}
|
||||
|
||||
// @public
|
||||
export type MaintenanceProvisioningState = string;
|
||||
|
||||
// @public
|
||||
export interface Maintenances {
|
||||
beginUpdate(resourceGroupName: string, serverName: string, maintenanceName: string, options?: MaintenancesUpdateOptionalParams): Promise<SimplePollerLike<OperationState<MaintenancesUpdateResponse>, MaintenancesUpdateResponse>>;
|
||||
beginUpdateAndWait(resourceGroupName: string, serverName: string, maintenanceName: string, options?: MaintenancesUpdateOptionalParams): Promise<MaintenancesUpdateResponse>;
|
||||
list(resourceGroupName: string, serverName: string, options?: MaintenancesListOptionalParams): PagedAsyncIterableIterator<Maintenance>;
|
||||
read(resourceGroupName: string, serverName: string, maintenanceName: string, options?: MaintenancesReadOptionalParams): Promise<MaintenancesReadResponse>;
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface MaintenancesListNextOptionalParams extends coreClient.OperationOptions {
|
||||
}
|
||||
|
||||
// @public
|
||||
export type MaintenancesListNextResponse = MaintenanceListResult;
|
||||
|
||||
// @public
|
||||
export interface MaintenancesListOptionalParams extends coreClient.OperationOptions {
|
||||
}
|
||||
|
||||
// @public
|
||||
export type MaintenancesListResponse = MaintenanceListResult;
|
||||
|
||||
// @public
|
||||
export interface MaintenancesReadOptionalParams extends coreClient.OperationOptions {
|
||||
}
|
||||
|
||||
// @public
|
||||
export type MaintenancesReadResponse = Maintenance;
|
||||
|
||||
// @public
|
||||
export type MaintenanceState = string;
|
||||
|
||||
// @public
|
||||
export interface MaintenancesUpdateHeaders {
|
||||
// (undocumented)
|
||||
location?: string;
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface MaintenancesUpdateOptionalParams extends coreClient.OperationOptions {
|
||||
parameters?: MaintenanceUpdate;
|
||||
resumeFrom?: string;
|
||||
updateIntervalInMs?: number;
|
||||
}
|
||||
|
||||
// @public
|
||||
export type MaintenancesUpdateResponse = Maintenance;
|
||||
|
||||
// @public
|
||||
export type MaintenanceType = string;
|
||||
|
||||
// @public
|
||||
export interface MaintenanceUpdate {
|
||||
maintenanceStartTime?: Date;
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface MaintenanceWindow {
|
||||
customWindow?: string;
|
||||
|
@ -759,6 +1121,9 @@ export class MySQLManagementFlexibleServerClient extends coreClient.ServiceClien
|
|||
// (undocumented)
|
||||
$host: string;
|
||||
constructor(credentials: coreAuth.TokenCredential, subscriptionId: string, options?: MySQLManagementFlexibleServerClientOptionalParams);
|
||||
constructor(credentials: coreAuth.TokenCredential, options?: MySQLManagementFlexibleServerClientOptionalParams);
|
||||
// (undocumented)
|
||||
advancedThreatProtectionSettings: AdvancedThreatProtectionSettings;
|
||||
// (undocumented)
|
||||
azureADAdministrators: AzureADAdministrators;
|
||||
// (undocumented)
|
||||
|
@ -782,15 +1147,29 @@ export class MySQLManagementFlexibleServerClient extends coreClient.ServiceClien
|
|||
// (undocumented)
|
||||
locationBasedCapabilities: LocationBasedCapabilities;
|
||||
// (undocumented)
|
||||
locationBasedCapabilitySet: LocationBasedCapabilitySet;
|
||||
// (undocumented)
|
||||
logFiles: LogFiles;
|
||||
// (undocumented)
|
||||
longRunningBackup: LongRunningBackup;
|
||||
// (undocumented)
|
||||
longRunningBackups: LongRunningBackups;
|
||||
// (undocumented)
|
||||
maintenances: Maintenances;
|
||||
// (undocumented)
|
||||
operationProgress: OperationProgress;
|
||||
// (undocumented)
|
||||
operationResults: OperationResults;
|
||||
// (undocumented)
|
||||
operations: Operations;
|
||||
// (undocumented)
|
||||
replicas: Replicas;
|
||||
// (undocumented)
|
||||
servers: Servers;
|
||||
// (undocumented)
|
||||
subscriptionId: string;
|
||||
serversMigration: ServersMigration;
|
||||
// (undocumented)
|
||||
subscriptionId?: string;
|
||||
}
|
||||
|
||||
// @public
|
||||
|
@ -799,6 +1178,22 @@ export interface MySQLManagementFlexibleServerClientOptionalParams extends coreC
|
|||
endpoint?: string;
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface MySQLServerIdentity {
|
||||
readonly principalId?: string;
|
||||
readonly tenantId?: string;
|
||||
type?: ManagedServiceIdentityType;
|
||||
userAssignedIdentities?: {
|
||||
[propertyName: string]: Record<string, unknown>;
|
||||
};
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface MySQLServerSku {
|
||||
name: string;
|
||||
tier: ServerSkuTier;
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface NameAvailability {
|
||||
message?: string;
|
||||
|
@ -819,6 +1214,9 @@ export interface Network {
|
|||
publicNetworkAccess?: EnableStatusEnum;
|
||||
}
|
||||
|
||||
// @public
|
||||
export type ObjectType = string;
|
||||
|
||||
// @public
|
||||
export interface Operation {
|
||||
display?: OperationDisplay;
|
||||
|
@ -843,6 +1241,43 @@ export interface OperationListResult {
|
|||
value?: Operation[];
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface OperationProgress {
|
||||
get(locationName: string, operationId: string, options?: OperationProgressGetOptionalParams): Promise<OperationProgressGetResponse>;
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface OperationProgressGetOptionalParams extends coreClient.OperationOptions {
|
||||
}
|
||||
|
||||
// @public
|
||||
export type OperationProgressGetResponse = OperationProgressResult;
|
||||
|
||||
// @public
|
||||
export interface OperationProgressResponseType {
|
||||
objectType: "BackupAndExportResponse" | "ImportFromStorageResponse";
|
||||
}
|
||||
|
||||
// @public (undocumented)
|
||||
export type OperationProgressResponseTypeUnion = OperationProgressResponseType | BackupAndExportResponseType | ImportFromStorageResponseType;
|
||||
|
||||
// @public
|
||||
export interface OperationProgressResult extends OperationStatusResult {
|
||||
objectType?: ObjectType;
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface OperationResults {
|
||||
get(locationName: string, operationId: string, options?: OperationResultsGetOptionalParams): Promise<OperationResultsGetResponse>;
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface OperationResultsGetOptionalParams extends coreClient.OperationOptions {
|
||||
}
|
||||
|
||||
// @public
|
||||
export type OperationResultsGetResponse = OperationStatusExtendedResult;
|
||||
|
||||
// @public
|
||||
export interface Operations {
|
||||
list(options?: OperationsListOptionalParams): PagedAsyncIterableIterator<Operation>;
|
||||
|
@ -865,6 +1300,60 @@ export type OperationsListResponse = OperationListResult;
|
|||
// @public
|
||||
export type OperationStatus = "Pending" | "InProgress" | "Succeeded" | "Failed" | "CancelInProgress" | "Canceled";
|
||||
|
||||
// @public
|
||||
export interface OperationStatusExtendedResult extends OperationStatusResult {
|
||||
properties?: {
|
||||
[propertyName: string]: any;
|
||||
};
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface OperationStatusResult {
|
||||
endTime?: Date;
|
||||
error?: ErrorDetail;
|
||||
id?: string;
|
||||
name?: string;
|
||||
operations?: OperationStatusResult[];
|
||||
percentComplete?: number;
|
||||
readonly resourceId?: string;
|
||||
startTime?: Date;
|
||||
status: string;
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface PrivateEndpoint {
|
||||
readonly id?: string;
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface PrivateEndpointConnection extends Resource {
|
||||
readonly groupIds?: string[];
|
||||
privateEndpoint?: PrivateEndpoint;
|
||||
privateLinkServiceConnectionState?: PrivateLinkServiceConnectionState;
|
||||
readonly provisioningState?: PrivateEndpointConnectionProvisioningState;
|
||||
}
|
||||
|
||||
// @public
|
||||
export type PrivateEndpointConnectionProvisioningState = string;
|
||||
|
||||
// @public
|
||||
export type PrivateEndpointServiceConnectionStatus = string;
|
||||
|
||||
// @public
|
||||
export interface PrivateLinkServiceConnectionState {
|
||||
actionsRequired?: string;
|
||||
description?: string;
|
||||
status?: PrivateEndpointServiceConnectionStatus;
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface Provisioning extends ProxyResource {
|
||||
readonly provisioningState?: ProvisioningState;
|
||||
}
|
||||
|
||||
// @public
|
||||
export type ProvisioningState = string;
|
||||
|
||||
// @public
|
||||
export interface ProxyResource extends Resource {
|
||||
}
|
||||
|
@ -898,6 +1387,7 @@ export type ResetAllToDefault = string;
|
|||
export interface Resource {
|
||||
readonly id?: string;
|
||||
readonly name?: string;
|
||||
readonly systemData?: SystemData;
|
||||
readonly type?: string;
|
||||
}
|
||||
|
||||
|
@ -911,17 +1401,18 @@ export interface Server extends TrackedResource {
|
|||
dataEncryption?: DataEncryption;
|
||||
readonly fullyQualifiedDomainName?: string;
|
||||
highAvailability?: HighAvailability;
|
||||
identity?: Identity;
|
||||
identity?: MySQLServerIdentity;
|
||||
importSourceProperties?: ImportSourceProperties;
|
||||
maintenanceWindow?: MaintenanceWindow;
|
||||
network?: Network;
|
||||
readonly privateEndpointConnections?: PrivateEndpointConnection[];
|
||||
readonly replicaCapacity?: number;
|
||||
replicationRole?: ReplicationRole;
|
||||
restorePointInTime?: Date;
|
||||
sku?: Sku;
|
||||
sku?: MySQLServerSku;
|
||||
sourceServerResourceId?: string;
|
||||
readonly state?: ServerState;
|
||||
storage?: Storage_2;
|
||||
readonly systemData?: SystemData;
|
||||
version?: ServerVersion;
|
||||
}
|
||||
|
||||
|
@ -930,7 +1421,6 @@ export interface ServerBackup extends ProxyResource {
|
|||
backupType?: string;
|
||||
completedTime?: Date;
|
||||
source?: string;
|
||||
readonly systemData?: SystemData;
|
||||
}
|
||||
|
||||
// @public
|
||||
|
@ -939,6 +1429,22 @@ export interface ServerBackupListResult {
|
|||
value?: ServerBackup[];
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface ServerBackupV2 extends ProxyResource {
|
||||
backupNameV2?: string;
|
||||
// (undocumented)
|
||||
backupType?: BackupType;
|
||||
completedTime?: Date;
|
||||
readonly provisioningState?: ProvisioningState;
|
||||
source?: string;
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface ServerBackupV2ListResult {
|
||||
nextLink?: string;
|
||||
value?: ServerBackupV2[];
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface ServerEditionCapability {
|
||||
readonly name?: string;
|
||||
|
@ -946,16 +1452,26 @@ export interface ServerEditionCapability {
|
|||
readonly supportedStorageEditions?: StorageEditionCapability[];
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface ServerEditionCapabilityV2 {
|
||||
readonly defaultSku?: string;
|
||||
readonly defaultStorageSize?: number;
|
||||
readonly name?: string;
|
||||
readonly supportedSkus?: SkuCapabilityV2[];
|
||||
readonly supportedStorageEditions?: StorageEditionCapability[];
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface ServerForUpdate {
|
||||
administratorLoginPassword?: string;
|
||||
backup?: Backup;
|
||||
dataEncryption?: DataEncryption;
|
||||
highAvailability?: HighAvailability;
|
||||
identity?: Identity;
|
||||
identity?: MySQLServerIdentity;
|
||||
maintenanceWindow?: MaintenanceWindow;
|
||||
network?: Network;
|
||||
replicationRole?: ReplicationRole;
|
||||
sku?: Sku;
|
||||
sku?: MySQLServerSku;
|
||||
storage?: Storage_2;
|
||||
tags?: {
|
||||
[propertyName: string]: string;
|
||||
|
@ -1001,6 +1517,7 @@ export interface Servers {
|
|||
get(resourceGroupName: string, serverName: string, options?: ServersGetOptionalParams): Promise<ServersGetResponse>;
|
||||
list(options?: ServersListOptionalParams): PagedAsyncIterableIterator<Server>;
|
||||
listByResourceGroup(resourceGroupName: string, options?: ServersListByResourceGroupOptionalParams): PagedAsyncIterableIterator<Server>;
|
||||
validateEstimateHighAvailability(resourceGroupName: string, serverName: string, parameters: HighAvailabilityValidationEstimation, options?: ServersValidateEstimateHighAvailabilityOptionalParams): Promise<ServersValidateEstimateHighAvailabilityResponse>;
|
||||
}
|
||||
|
||||
// @public
|
||||
|
@ -1049,6 +1566,9 @@ export interface ServersGetOptionalParams extends coreClient.OperationOptions {
|
|||
// @public
|
||||
export type ServersGetResponse = Server;
|
||||
|
||||
// @public
|
||||
export type ServerSkuTier = string;
|
||||
|
||||
// @public
|
||||
export interface ServersListByResourceGroupNextOptionalParams extends coreClient.OperationOptions {
|
||||
}
|
||||
|
@ -1077,6 +1597,27 @@ export interface ServersListOptionalParams extends coreClient.OperationOptions {
|
|||
// @public
|
||||
export type ServersListResponse = ServerListResult;
|
||||
|
||||
// @public
|
||||
export interface ServersMigration {
|
||||
beginCutoverMigration(resourceGroupName: string, serverName: string, options?: ServersMigrationCutoverMigrationOptionalParams): Promise<SimplePollerLike<OperationState<ServersMigrationCutoverMigrationResponse>, ServersMigrationCutoverMigrationResponse>>;
|
||||
beginCutoverMigrationAndWait(resourceGroupName: string, serverName: string, options?: ServersMigrationCutoverMigrationOptionalParams): Promise<ServersMigrationCutoverMigrationResponse>;
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface ServersMigrationCutoverMigrationHeaders {
|
||||
azureAsyncOperation?: string;
|
||||
location?: string;
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface ServersMigrationCutoverMigrationOptionalParams extends coreClient.OperationOptions {
|
||||
resumeFrom?: string;
|
||||
updateIntervalInMs?: number;
|
||||
}
|
||||
|
||||
// @public
|
||||
export type ServersMigrationCutoverMigrationResponse = Server;
|
||||
|
||||
// @public
|
||||
export interface ServersResetGtidHeaders {
|
||||
// (undocumented)
|
||||
|
@ -1143,6 +1684,13 @@ export interface ServersUpdateOptionalParams extends coreClient.OperationOptions
|
|||
// @public
|
||||
export type ServersUpdateResponse = Server;
|
||||
|
||||
// @public
|
||||
export interface ServersValidateEstimateHighAvailabilityOptionalParams extends coreClient.OperationOptions {
|
||||
}
|
||||
|
||||
// @public
|
||||
export type ServersValidateEstimateHighAvailabilityResponse = HighAvailabilityValidationEstimation;
|
||||
|
||||
// @public
|
||||
export type ServerVersion = string;
|
||||
|
||||
|
@ -1153,9 +1701,8 @@ export interface ServerVersionCapability {
|
|||
}
|
||||
|
||||
// @public
|
||||
export interface Sku {
|
||||
name: string;
|
||||
tier: SkuTier;
|
||||
export interface ServerVersionCapabilityV2 {
|
||||
readonly name?: string;
|
||||
}
|
||||
|
||||
// @public
|
||||
|
@ -1167,7 +1714,14 @@ export interface SkuCapability {
|
|||
}
|
||||
|
||||
// @public
|
||||
export type SkuTier = string;
|
||||
export interface SkuCapabilityV2 {
|
||||
readonly name?: string;
|
||||
readonly supportedHAMode?: string[];
|
||||
readonly supportedIops?: number;
|
||||
readonly supportedMemoryPerVCoreMB?: number;
|
||||
readonly supportedZones?: string[];
|
||||
readonly vCores?: number;
|
||||
}
|
||||
|
||||
// @public
|
||||
interface Storage_2 {
|
||||
|
@ -1182,8 +1736,10 @@ export { Storage_2 as Storage }
|
|||
|
||||
// @public
|
||||
export interface StorageEditionCapability {
|
||||
readonly maxBackupIntervalHours?: number;
|
||||
readonly maxBackupRetentionDays?: number;
|
||||
readonly maxStorageSize?: number;
|
||||
readonly minBackupIntervalHours?: number;
|
||||
readonly minBackupRetentionDays?: number;
|
||||
readonly minStorageSize?: number;
|
||||
readonly name?: string;
|
||||
|
|
|
@ -0,0 +1,48 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { MySQLManagementFlexibleServerClient } from "@azure/arm-mysql-flexible";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
import * as dotenv from "dotenv";
|
||||
|
||||
dotenv.config();
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Get a server's Advanced Threat Protection state
|
||||
*
|
||||
* @summary Get a server's Advanced Threat Protection state
|
||||
* x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/examples/AdvancedThreatProtectionSettingsGet.json
|
||||
*/
|
||||
async function getAServerAdvancedThreatProtectionSettings() {
|
||||
const subscriptionId =
|
||||
process.env["MYSQL_SUBSCRIPTION_ID"] ||
|
||||
"00000000-1111-2222-3333-444444444444";
|
||||
const resourceGroupName =
|
||||
process.env["MYSQL_RESOURCE_GROUP"] || "threatprotection-6852";
|
||||
const serverName = "threatprotection-2080";
|
||||
const advancedThreatProtectionName = "Default";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new MySQLManagementFlexibleServerClient(
|
||||
credential,
|
||||
subscriptionId,
|
||||
);
|
||||
const result = await client.advancedThreatProtectionSettings.get(
|
||||
resourceGroupName,
|
||||
serverName,
|
||||
advancedThreatProtectionName,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
async function main() {
|
||||
getAServerAdvancedThreatProtectionSettings();
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
|
@ -0,0 +1,49 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { MySQLManagementFlexibleServerClient } from "@azure/arm-mysql-flexible";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
import * as dotenv from "dotenv";
|
||||
|
||||
dotenv.config();
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Gets a list of server's Advanced Threat Protection states.
|
||||
*
|
||||
* @summary Gets a list of server's Advanced Threat Protection states.
|
||||
* x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/examples/AdvancedThreatProtectionSettingsList.json
|
||||
*/
|
||||
async function getListOfServerAdvancedThreatProtectionSettings() {
|
||||
const subscriptionId =
|
||||
process.env["MYSQL_SUBSCRIPTION_ID"] ||
|
||||
"00000000-1111-2222-3333-444444444444";
|
||||
const resourceGroupName =
|
||||
process.env["MYSQL_RESOURCE_GROUP"] || "threatprotection-6852";
|
||||
const serverName = "threatprotection-2080";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new MySQLManagementFlexibleServerClient(
|
||||
credential,
|
||||
subscriptionId,
|
||||
);
|
||||
const resArray = new Array();
|
||||
for await (let item of client.advancedThreatProtectionSettings.list(
|
||||
resourceGroupName,
|
||||
serverName,
|
||||
)) {
|
||||
resArray.push(item);
|
||||
}
|
||||
console.log(resArray);
|
||||
}
|
||||
|
||||
async function main() {
|
||||
getListOfServerAdvancedThreatProtectionSettings();
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
|
@ -0,0 +1,85 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import {
|
||||
AdvancedThreatProtection,
|
||||
MySQLManagementFlexibleServerClient,
|
||||
} from "@azure/arm-mysql-flexible";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
import * as dotenv from "dotenv";
|
||||
|
||||
dotenv.config();
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Updates a server's Advanced Threat Protection state.
|
||||
*
|
||||
* @summary Updates a server's Advanced Threat Protection state.
|
||||
* x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/examples/AdvancedThreatProtectionSettingsPutDisabled.json
|
||||
*/
|
||||
async function disableAServerAdvancedThreatProtectionSettingsWithAllParametersUsingPut() {
|
||||
const subscriptionId =
|
||||
process.env["MYSQL_SUBSCRIPTION_ID"] ||
|
||||
"00000000-1111-2222-3333-444444444444";
|
||||
const resourceGroupName =
|
||||
process.env["MYSQL_RESOURCE_GROUP"] || "threatprotection-4799";
|
||||
const serverName = "threatprotection-6440";
|
||||
const advancedThreatProtectionName = "Default";
|
||||
const parameters: AdvancedThreatProtection = { state: "Disabled" };
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new MySQLManagementFlexibleServerClient(
|
||||
credential,
|
||||
subscriptionId,
|
||||
);
|
||||
const result =
|
||||
await client.advancedThreatProtectionSettings.beginUpdatePutAndWait(
|
||||
resourceGroupName,
|
||||
serverName,
|
||||
advancedThreatProtectionName,
|
||||
parameters,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Updates a server's Advanced Threat Protection state.
|
||||
*
|
||||
* @summary Updates a server's Advanced Threat Protection state.
|
||||
* x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/examples/AdvancedThreatProtectionSettingsPutEnabled.json
|
||||
*/
|
||||
async function enableAServerAdvancedThreatProtectionSettingsUsingPut() {
|
||||
const subscriptionId =
|
||||
process.env["MYSQL_SUBSCRIPTION_ID"] ||
|
||||
"00000000-1111-2222-3333-444444444444";
|
||||
const resourceGroupName =
|
||||
process.env["MYSQL_RESOURCE_GROUP"] || "threatprotection-4799";
|
||||
const serverName = "threatprotection-6440";
|
||||
const advancedThreatProtectionName = "Default";
|
||||
const parameters: AdvancedThreatProtection = { state: "Enabled" };
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new MySQLManagementFlexibleServerClient(
|
||||
credential,
|
||||
subscriptionId,
|
||||
);
|
||||
const result =
|
||||
await client.advancedThreatProtectionSettings.beginUpdatePutAndWait(
|
||||
resourceGroupName,
|
||||
serverName,
|
||||
advancedThreatProtectionName,
|
||||
parameters,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
async function main() {
|
||||
disableAServerAdvancedThreatProtectionSettingsWithAllParametersUsingPut();
|
||||
enableAServerAdvancedThreatProtectionSettingsUsingPut();
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
|
@ -0,0 +1,85 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import {
|
||||
AdvancedThreatProtectionForUpdate,
|
||||
MySQLManagementFlexibleServerClient,
|
||||
} from "@azure/arm-mysql-flexible";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
import * as dotenv from "dotenv";
|
||||
|
||||
dotenv.config();
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Updates a server's Advanced Threat Protection state.
|
||||
*
|
||||
* @summary Updates a server's Advanced Threat Protection state.
|
||||
* x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/examples/AdvancedThreatProtectionSettingsPatchDisabled.json
|
||||
*/
|
||||
async function disableAServerAdvancedThreatProtectionSettingsWithAllParameters() {
|
||||
const subscriptionId =
|
||||
process.env["MYSQL_SUBSCRIPTION_ID"] ||
|
||||
"00000000-1111-2222-3333-444444444444";
|
||||
const resourceGroupName =
|
||||
process.env["MYSQL_RESOURCE_GROUP"] || "threatprotection-4799";
|
||||
const serverName = "threatprotection-6440";
|
||||
const advancedThreatProtectionName = "Default";
|
||||
const parameters: AdvancedThreatProtectionForUpdate = { state: "Disabled" };
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new MySQLManagementFlexibleServerClient(
|
||||
credential,
|
||||
subscriptionId,
|
||||
);
|
||||
const result =
|
||||
await client.advancedThreatProtectionSettings.beginUpdateAndWait(
|
||||
resourceGroupName,
|
||||
serverName,
|
||||
advancedThreatProtectionName,
|
||||
parameters,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Updates a server's Advanced Threat Protection state.
|
||||
*
|
||||
* @summary Updates a server's Advanced Threat Protection state.
|
||||
* x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/examples/AdvancedThreatProtectionSettingsPatchEnabled.json
|
||||
*/
|
||||
async function enableAServerAdvancedThreatProtectionSettings() {
|
||||
const subscriptionId =
|
||||
process.env["MYSQL_SUBSCRIPTION_ID"] ||
|
||||
"00000000-1111-2222-3333-444444444444";
|
||||
const resourceGroupName =
|
||||
process.env["MYSQL_RESOURCE_GROUP"] || "threatprotection-4799";
|
||||
const serverName = "threatprotection-6440";
|
||||
const advancedThreatProtectionName = "Default";
|
||||
const parameters: AdvancedThreatProtectionForUpdate = { state: "Enabled" };
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new MySQLManagementFlexibleServerClient(
|
||||
credential,
|
||||
subscriptionId,
|
||||
);
|
||||
const result =
|
||||
await client.advancedThreatProtectionSettings.beginUpdateAndWait(
|
||||
resourceGroupName,
|
||||
serverName,
|
||||
advancedThreatProtectionName,
|
||||
parameters,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
async function main() {
|
||||
disableAServerAdvancedThreatProtectionSettingsWithAllParameters();
|
||||
enableAServerAdvancedThreatProtectionSettings();
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
|
@ -10,7 +10,7 @@
|
|||
// Licensed under the MIT License.
|
||||
import {
|
||||
AzureADAdministrator,
|
||||
MySQLManagementFlexibleServerClient
|
||||
MySQLManagementFlexibleServerClient,
|
||||
} from "@azure/arm-mysql-flexible";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
import * as dotenv from "dotenv";
|
||||
|
@ -21,7 +21,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Creates or updates an existing Azure Active Directory administrator.
|
||||
*
|
||||
* @summary Creates or updates an existing Azure Active Directory administrator.
|
||||
* x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/AAD/preview/2021-12-01-preview/examples/AzureADAdministratorCreate.json
|
||||
* x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/AAD/preview/2023-06-01-preview/examples/AzureADAdministratorCreate.json
|
||||
*/
|
||||
async function createAnAzureAdAdministrator() {
|
||||
const subscriptionId =
|
||||
|
@ -36,18 +36,18 @@ async function createAnAzureAdAdministrator() {
|
|||
"/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/test-group/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-umi",
|
||||
login: "bob@contoso.com",
|
||||
sid: "c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c",
|
||||
tenantId: "c12b7025-bfe2-46c1-b463-993b5e4cd467"
|
||||
tenantId: "c12b7025-bfe2-46c1-b463-993b5e4cd467",
|
||||
};
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new MySQLManagementFlexibleServerClient(
|
||||
credential,
|
||||
subscriptionId
|
||||
subscriptionId,
|
||||
);
|
||||
const result = await client.azureADAdministrators.beginCreateOrUpdateAndWait(
|
||||
resourceGroupName,
|
||||
serverName,
|
||||
administratorName,
|
||||
parameters
|
||||
parameters,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Deletes an Azure AD Administrator.
|
||||
*
|
||||
* @summary Deletes an Azure AD Administrator.
|
||||
* x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/AAD/preview/2021-12-01-preview/examples/AzureADAdministratorDelete.json
|
||||
* x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/AAD/preview/2023-06-01-preview/examples/AzureADAdministratorDelete.json
|
||||
*/
|
||||
async function deleteAnAzureAdAdministrator() {
|
||||
const subscriptionId =
|
||||
|
@ -30,12 +30,12 @@ async function deleteAnAzureAdAdministrator() {
|
|||
const credential = new DefaultAzureCredential();
|
||||
const client = new MySQLManagementFlexibleServerClient(
|
||||
credential,
|
||||
subscriptionId
|
||||
subscriptionId,
|
||||
);
|
||||
const result = await client.azureADAdministrators.beginDeleteAndWait(
|
||||
resourceGroupName,
|
||||
serverName,
|
||||
administratorName
|
||||
administratorName,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Gets information about an azure ad administrator.
|
||||
*
|
||||
* @summary Gets information about an azure ad administrator.
|
||||
* x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/AAD/preview/2021-12-01-preview/examples/AzureADAdministratorGet.json
|
||||
* x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/AAD/preview/2023-06-01-preview/examples/AzureADAdministratorGet.json
|
||||
*/
|
||||
async function getAnAzureAdAdministrator() {
|
||||
const subscriptionId =
|
||||
|
@ -30,12 +30,12 @@ async function getAnAzureAdAdministrator() {
|
|||
const credential = new DefaultAzureCredential();
|
||||
const client = new MySQLManagementFlexibleServerClient(
|
||||
credential,
|
||||
subscriptionId
|
||||
subscriptionId,
|
||||
);
|
||||
const result = await client.azureADAdministrators.get(
|
||||
resourceGroupName,
|
||||
serverName,
|
||||
administratorName
|
||||
administratorName,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to List all the AAD administrators in a given server.
|
||||
*
|
||||
* @summary List all the AAD administrators in a given server.
|
||||
* x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/AAD/preview/2021-12-01-preview/examples/AzureADAdministratorsListByServer.json
|
||||
* x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/AAD/preview/2023-06-01-preview/examples/AzureADAdministratorsListByServer.json
|
||||
*/
|
||||
async function listAzureAdAdministratorsInAServer() {
|
||||
const subscriptionId =
|
||||
|
@ -29,12 +29,12 @@ async function listAzureAdAdministratorsInAServer() {
|
|||
const credential = new DefaultAzureCredential();
|
||||
const client = new MySQLManagementFlexibleServerClient(
|
||||
credential,
|
||||
subscriptionId
|
||||
subscriptionId,
|
||||
);
|
||||
const resArray = new Array();
|
||||
for await (let item of client.azureADAdministrators.listByServer(
|
||||
resourceGroupName,
|
||||
serverName
|
||||
serverName,
|
||||
)) {
|
||||
resArray.push(item);
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
// Licensed under the MIT License.
|
||||
import {
|
||||
BackupAndExportRequest,
|
||||
MySQLManagementFlexibleServerClient
|
||||
MySQLManagementFlexibleServerClient,
|
||||
} from "@azure/arm-mysql-flexible";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
import * as dotenv from "dotenv";
|
||||
|
@ -21,7 +21,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Exports the backup of the given server by creating a backup if not existing.
|
||||
*
|
||||
* @summary Exports the backup of the given server by creating a backup if not existing.
|
||||
* x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/Backups/preview/2022-09-30-preview/examples/BackupAndExport.json
|
||||
* x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/Backups/preview/2023-10-01-preview/examples/BackupAndExport.json
|
||||
*/
|
||||
async function createAndExportBackup() {
|
||||
const subscriptionId =
|
||||
|
@ -33,18 +33,18 @@ async function createAndExportBackup() {
|
|||
backupSettings: { backupName: "customer-backup-name" },
|
||||
targetDetails: {
|
||||
objectType: "FullBackupStoreDetails",
|
||||
sasUriList: ["sasuri1", "sasuri2"]
|
||||
}
|
||||
sasUriList: ["sasuri1", "sasuri2"],
|
||||
},
|
||||
};
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new MySQLManagementFlexibleServerClient(
|
||||
credential,
|
||||
subscriptionId
|
||||
subscriptionId,
|
||||
);
|
||||
const result = await client.backupAndExport.beginCreateAndWait(
|
||||
resourceGroupName,
|
||||
serverName,
|
||||
parameters
|
||||
parameters,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Validates if backup can be performed for given server.
|
||||
*
|
||||
* @summary Validates if backup can be performed for given server.
|
||||
* x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/Backups/preview/2022-09-30-preview/examples/ValidateBackup.json
|
||||
* x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/Backups/preview/2023-10-01-preview/examples/ValidateBackup.json
|
||||
*/
|
||||
async function validateBackup() {
|
||||
const subscriptionId =
|
||||
|
@ -29,11 +29,11 @@ async function validateBackup() {
|
|||
const credential = new DefaultAzureCredential();
|
||||
const client = new MySQLManagementFlexibleServerClient(
|
||||
credential,
|
||||
subscriptionId
|
||||
subscriptionId,
|
||||
);
|
||||
const result = await client.backupAndExport.validateBackup(
|
||||
resourceGroupName,
|
||||
serverName
|
||||
serverName,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to List all the backups for a given server.
|
||||
*
|
||||
* @summary List all the backups for a given server.
|
||||
* x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/Backups/preview/2022-09-30-preview/examples/BackupGet.json
|
||||
* x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/Backups/preview/2023-10-01-preview/examples/BackupGet.json
|
||||
*/
|
||||
async function getABackupForAServer() {
|
||||
const subscriptionId =
|
||||
|
@ -30,12 +30,12 @@ async function getABackupForAServer() {
|
|||
const credential = new DefaultAzureCredential();
|
||||
const client = new MySQLManagementFlexibleServerClient(
|
||||
credential,
|
||||
subscriptionId
|
||||
subscriptionId,
|
||||
);
|
||||
const result = await client.backups.get(
|
||||
resourceGroupName,
|
||||
serverName,
|
||||
backupName
|
||||
backupName,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to List all the backups for a given server.
|
||||
*
|
||||
* @summary List all the backups for a given server.
|
||||
* x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/Backups/preview/2022-09-30-preview/examples/BackupsListByServer.json
|
||||
* x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/Backups/preview/2023-10-01-preview/examples/BackupsListByServer.json
|
||||
*/
|
||||
async function listBackupsForAServer() {
|
||||
const subscriptionId =
|
||||
|
@ -29,12 +29,12 @@ async function listBackupsForAServer() {
|
|||
const credential = new DefaultAzureCredential();
|
||||
const client = new MySQLManagementFlexibleServerClient(
|
||||
credential,
|
||||
subscriptionId
|
||||
subscriptionId,
|
||||
);
|
||||
const resArray = new Array();
|
||||
for await (let item of client.backups.listByServer(
|
||||
resourceGroupName,
|
||||
serverName
|
||||
serverName,
|
||||
)) {
|
||||
resArray.push(item);
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Create backup for a given server with specified backup name.
|
||||
*
|
||||
* @summary Create backup for a given server with specified backup name.
|
||||
* x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/Backups/preview/2022-09-30-preview/examples/BackupPut.json
|
||||
* x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/Backups/preview/2023-10-01-preview/examples/BackupPut.json
|
||||
*/
|
||||
async function createBackupForAServer() {
|
||||
const subscriptionId =
|
||||
|
@ -30,12 +30,12 @@ async function createBackupForAServer() {
|
|||
const credential = new DefaultAzureCredential();
|
||||
const client = new MySQLManagementFlexibleServerClient(
|
||||
credential,
|
||||
subscriptionId
|
||||
subscriptionId,
|
||||
);
|
||||
const result = await client.backups.put(
|
||||
resourceGroupName,
|
||||
serverName,
|
||||
backupName
|
||||
backupName,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
// Licensed under the MIT License.
|
||||
import {
|
||||
NameAvailabilityRequest,
|
||||
MySQLManagementFlexibleServerClient
|
||||
MySQLManagementFlexibleServerClient,
|
||||
} from "@azure/arm-mysql-flexible";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
import * as dotenv from "dotenv";
|
||||
|
@ -21,7 +21,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Check the availability of name for server
|
||||
*
|
||||
* @summary Check the availability of name for server
|
||||
* x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/ServiceOperations/preview/2021-12-01-preview/examples/CheckNameAvailability.json
|
||||
* x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/ServiceOperations/stable/2023-12-30/examples/CheckNameAvailability.json
|
||||
*/
|
||||
async function checkNameAvailability() {
|
||||
const subscriptionId =
|
||||
|
@ -30,16 +30,16 @@ async function checkNameAvailability() {
|
|||
const locationName = "SouthEastAsia";
|
||||
const nameAvailabilityRequest: NameAvailabilityRequest = {
|
||||
name: "name1",
|
||||
type: "Microsoft.DBforMySQL/flexibleServers"
|
||||
type: "Microsoft.DBforMySQL/flexibleServers",
|
||||
};
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new MySQLManagementFlexibleServerClient(
|
||||
credential,
|
||||
subscriptionId
|
||||
subscriptionId,
|
||||
);
|
||||
const result = await client.checkNameAvailability.execute(
|
||||
locationName,
|
||||
nameAvailabilityRequest
|
||||
nameAvailabilityRequest,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
// Licensed under the MIT License.
|
||||
import {
|
||||
NameAvailabilityRequest,
|
||||
MySQLManagementFlexibleServerClient
|
||||
MySQLManagementFlexibleServerClient,
|
||||
} from "@azure/arm-mysql-flexible";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
import * as dotenv from "dotenv";
|
||||
|
@ -21,7 +21,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Check the availability of name for server
|
||||
*
|
||||
* @summary Check the availability of name for server
|
||||
* x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/ServiceOperations/preview/2021-12-01-preview/examples/CheckNameAvailability.json
|
||||
* x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/ServiceOperations/stable/2023-12-30/examples/CheckNameAvailability.json
|
||||
*/
|
||||
async function checkNameAvailability() {
|
||||
const subscriptionId =
|
||||
|
@ -29,15 +29,15 @@ async function checkNameAvailability() {
|
|||
"ffffffff-ffff-ffff-ffff-ffffffffffff";
|
||||
const nameAvailabilityRequest: NameAvailabilityRequest = {
|
||||
name: "name1",
|
||||
type: "Microsoft.DBforMySQL/flexibleServers"
|
||||
type: "Microsoft.DBforMySQL/flexibleServers",
|
||||
};
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new MySQLManagementFlexibleServerClient(
|
||||
credential,
|
||||
subscriptionId
|
||||
subscriptionId,
|
||||
);
|
||||
const result = await client.checkNameAvailabilityWithoutLocation.execute(
|
||||
nameAvailabilityRequest
|
||||
nameAvailabilityRequest,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
// Licensed under the MIT License.
|
||||
import {
|
||||
VirtualNetworkSubnetUsageParameter,
|
||||
MySQLManagementFlexibleServerClient
|
||||
MySQLManagementFlexibleServerClient,
|
||||
} from "@azure/arm-mysql-flexible";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
import * as dotenv from "dotenv";
|
||||
|
@ -21,7 +21,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Get virtual network subnet usage for a given vNet resource id.
|
||||
*
|
||||
* @summary Get virtual network subnet usage for a given vNet resource id.
|
||||
* x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/ServiceOperations/preview/2021-12-01-preview/examples/CheckVirtualNetworkSubnetUsage.json
|
||||
* x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/ServiceOperations/stable/2023-12-30/examples/CheckVirtualNetworkSubnetUsage.json
|
||||
*/
|
||||
async function checkVirtualNetworkSubnetUsage() {
|
||||
const subscriptionId =
|
||||
|
@ -30,16 +30,16 @@ async function checkVirtualNetworkSubnetUsage() {
|
|||
const locationName = "WestUS";
|
||||
const parameters: VirtualNetworkSubnetUsageParameter = {
|
||||
virtualNetworkResourceId:
|
||||
"/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/testvnet"
|
||||
"/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/testvnet",
|
||||
};
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new MySQLManagementFlexibleServerClient(
|
||||
credential,
|
||||
subscriptionId
|
||||
subscriptionId,
|
||||
);
|
||||
const result = await client.checkVirtualNetworkSubnetUsage.execute(
|
||||
locationName,
|
||||
parameters
|
||||
parameters,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
// Licensed under the MIT License.
|
||||
import {
|
||||
ConfigurationListForBatchUpdate,
|
||||
MySQLManagementFlexibleServerClient
|
||||
MySQLManagementFlexibleServerClient,
|
||||
} from "@azure/arm-mysql-flexible";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
import * as dotenv from "dotenv";
|
||||
|
@ -21,7 +21,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Update a list of configurations in a given server.
|
||||
*
|
||||
* @summary Update a list of configurations in a given server.
|
||||
* x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/Configurations/preview/2021-12-01-preview/examples/ConfigurationsBatchUpdate.json
|
||||
* x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/Configurations/preview/2023-06-01-preview/examples/ConfigurationsBatchUpdate.json
|
||||
*/
|
||||
async function configurationList() {
|
||||
const subscriptionId =
|
||||
|
@ -33,18 +33,18 @@ async function configurationList() {
|
|||
resetAllToDefault: "False",
|
||||
value: [
|
||||
{ name: "event_scheduler", value: "OFF" },
|
||||
{ name: "div_precision_increment", value: "8" }
|
||||
]
|
||||
{ name: "div_precision_increment", value: "8" },
|
||||
],
|
||||
};
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new MySQLManagementFlexibleServerClient(
|
||||
credential,
|
||||
subscriptionId
|
||||
subscriptionId,
|
||||
);
|
||||
const result = await client.configurations.beginBatchUpdateAndWait(
|
||||
resourceGroupName,
|
||||
serverName,
|
||||
parameters
|
||||
parameters,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
// Licensed under the MIT License.
|
||||
import {
|
||||
Configuration,
|
||||
MySQLManagementFlexibleServerClient
|
||||
MySQLManagementFlexibleServerClient,
|
||||
} from "@azure/arm-mysql-flexible";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
import * as dotenv from "dotenv";
|
||||
|
@ -21,7 +21,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Updates a configuration of a server.
|
||||
*
|
||||
* @summary Updates a configuration of a server.
|
||||
* x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/Configurations/preview/2021-12-01-preview/examples/ConfigurationCreateOrUpdate.json
|
||||
* x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/Configurations/preview/2023-06-01-preview/examples/ConfigurationCreateOrUpdate.json
|
||||
*/
|
||||
async function configurationCreateOrUpdate() {
|
||||
const subscriptionId =
|
||||
|
@ -34,13 +34,13 @@ async function configurationCreateOrUpdate() {
|
|||
const credential = new DefaultAzureCredential();
|
||||
const client = new MySQLManagementFlexibleServerClient(
|
||||
credential,
|
||||
subscriptionId
|
||||
subscriptionId,
|
||||
);
|
||||
const result = await client.configurations.beginCreateOrUpdateAndWait(
|
||||
resourceGroupName,
|
||||
serverName,
|
||||
configurationName,
|
||||
parameters
|
||||
parameters,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Gets information about a configuration of server.
|
||||
*
|
||||
* @summary Gets information about a configuration of server.
|
||||
* x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/Configurations/preview/2021-12-01-preview/examples/ConfigurationGet.json
|
||||
* x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/Configurations/preview/2023-06-01-preview/examples/ConfigurationGet.json
|
||||
*/
|
||||
async function getAConfiguration() {
|
||||
const subscriptionId =
|
||||
|
@ -30,12 +30,12 @@ async function getAConfiguration() {
|
|||
const credential = new DefaultAzureCredential();
|
||||
const client = new MySQLManagementFlexibleServerClient(
|
||||
credential,
|
||||
subscriptionId
|
||||
subscriptionId,
|
||||
);
|
||||
const result = await client.configurations.get(
|
||||
resourceGroupName,
|
||||
serverName,
|
||||
configurationName
|
||||
configurationName,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
// Licensed under the MIT License.
|
||||
import {
|
||||
ConfigurationsListByServerOptionalParams,
|
||||
MySQLManagementFlexibleServerClient
|
||||
MySQLManagementFlexibleServerClient,
|
||||
} from "@azure/arm-mysql-flexible";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
import * as dotenv from "dotenv";
|
||||
|
@ -21,7 +21,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to List all the configurations in a given server.
|
||||
*
|
||||
* @summary List all the configurations in a given server.
|
||||
* x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/Configurations/preview/2021-12-01-preview/examples/ConfigurationsListByServer.json
|
||||
* x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/Configurations/preview/2023-06-01-preview/examples/ConfigurationsListByServer.json
|
||||
*/
|
||||
async function listAllConfigurationsForAServer() {
|
||||
const subscriptionId =
|
||||
|
@ -35,13 +35,13 @@ async function listAllConfigurationsForAServer() {
|
|||
const credential = new DefaultAzureCredential();
|
||||
const client = new MySQLManagementFlexibleServerClient(
|
||||
credential,
|
||||
subscriptionId
|
||||
subscriptionId,
|
||||
);
|
||||
const resArray = new Array();
|
||||
for await (let item of client.configurations.listByServer(
|
||||
resourceGroupName,
|
||||
serverName,
|
||||
options
|
||||
options,
|
||||
)) {
|
||||
resArray.push(item);
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
// Licensed under the MIT License.
|
||||
import {
|
||||
Configuration,
|
||||
MySQLManagementFlexibleServerClient
|
||||
MySQLManagementFlexibleServerClient,
|
||||
} from "@azure/arm-mysql-flexible";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
import * as dotenv from "dotenv";
|
||||
|
@ -21,7 +21,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Updates a configuration of a server.
|
||||
*
|
||||
* @summary Updates a configuration of a server.
|
||||
* x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/Configurations/preview/2021-12-01-preview/examples/ConfigurationUpdate.json
|
||||
* x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/Configurations/preview/2023-06-01-preview/examples/ConfigurationUpdate.json
|
||||
*/
|
||||
async function updateAUserConfiguration() {
|
||||
const subscriptionId =
|
||||
|
@ -34,13 +34,13 @@ async function updateAUserConfiguration() {
|
|||
const credential = new DefaultAzureCredential();
|
||||
const client = new MySQLManagementFlexibleServerClient(
|
||||
credential,
|
||||
subscriptionId
|
||||
subscriptionId,
|
||||
);
|
||||
const result = await client.configurations.beginUpdateAndWait(
|
||||
resourceGroupName,
|
||||
serverName,
|
||||
configurationName,
|
||||
parameters
|
||||
parameters,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
// Licensed under the MIT License.
|
||||
import {
|
||||
Database,
|
||||
MySQLManagementFlexibleServerClient
|
||||
MySQLManagementFlexibleServerClient,
|
||||
} from "@azure/arm-mysql-flexible";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
import * as dotenv from "dotenv";
|
||||
|
@ -21,7 +21,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Creates a new database or updates an existing database.
|
||||
*
|
||||
* @summary Creates a new database or updates an existing database.
|
||||
* x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/Databases/preview/2021-12-01-preview/examples/DatabaseCreate.json
|
||||
* x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/Databases/preview/2023-06-01-preview/examples/DatabaseCreate.json
|
||||
*/
|
||||
async function createADatabase() {
|
||||
const subscriptionId =
|
||||
|
@ -32,18 +32,18 @@ async function createADatabase() {
|
|||
const databaseName = "db1";
|
||||
const parameters: Database = {
|
||||
charset: "utf8",
|
||||
collation: "utf8_general_ci"
|
||||
collation: "utf8_general_ci",
|
||||
};
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new MySQLManagementFlexibleServerClient(
|
||||
credential,
|
||||
subscriptionId
|
||||
subscriptionId,
|
||||
);
|
||||
const result = await client.databases.beginCreateOrUpdateAndWait(
|
||||
resourceGroupName,
|
||||
serverName,
|
||||
databaseName,
|
||||
parameters
|
||||
parameters,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Deletes a database.
|
||||
*
|
||||
* @summary Deletes a database.
|
||||
* x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/Databases/preview/2021-12-01-preview/examples/DatabaseDelete.json
|
||||
* x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/Databases/preview/2023-06-01-preview/examples/DatabaseDelete.json
|
||||
*/
|
||||
async function deleteADatabase() {
|
||||
const subscriptionId =
|
||||
|
@ -30,12 +30,12 @@ async function deleteADatabase() {
|
|||
const credential = new DefaultAzureCredential();
|
||||
const client = new MySQLManagementFlexibleServerClient(
|
||||
credential,
|
||||
subscriptionId
|
||||
subscriptionId,
|
||||
);
|
||||
const result = await client.databases.beginDeleteAndWait(
|
||||
resourceGroupName,
|
||||
serverName,
|
||||
databaseName
|
||||
databaseName,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Gets information about a database.
|
||||
*
|
||||
* @summary Gets information about a database.
|
||||
* x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/Databases/preview/2021-12-01-preview/examples/DatabaseGet.json
|
||||
* x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/Databases/preview/2023-06-01-preview/examples/DatabaseGet.json
|
||||
*/
|
||||
async function getADatabase() {
|
||||
const subscriptionId =
|
||||
|
@ -30,12 +30,12 @@ async function getADatabase() {
|
|||
const credential = new DefaultAzureCredential();
|
||||
const client = new MySQLManagementFlexibleServerClient(
|
||||
credential,
|
||||
subscriptionId
|
||||
subscriptionId,
|
||||
);
|
||||
const result = await client.databases.get(
|
||||
resourceGroupName,
|
||||
serverName,
|
||||
databaseName
|
||||
databaseName,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to List all the databases in a given server.
|
||||
*
|
||||
* @summary List all the databases in a given server.
|
||||
* x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/Databases/preview/2021-12-01-preview/examples/DatabasesListByServer.json
|
||||
* x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/Databases/preview/2023-06-01-preview/examples/DatabasesListByServer.json
|
||||
*/
|
||||
async function listDatabasesInAServer() {
|
||||
const subscriptionId =
|
||||
|
@ -29,12 +29,12 @@ async function listDatabasesInAServer() {
|
|||
const credential = new DefaultAzureCredential();
|
||||
const client = new MySQLManagementFlexibleServerClient(
|
||||
credential,
|
||||
subscriptionId
|
||||
subscriptionId,
|
||||
);
|
||||
const resArray = new Array();
|
||||
for await (let item of client.databases.listByServer(
|
||||
resourceGroupName,
|
||||
serverName
|
||||
serverName,
|
||||
)) {
|
||||
resArray.push(item);
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
// Licensed under the MIT License.
|
||||
import {
|
||||
FirewallRule,
|
||||
MySQLManagementFlexibleServerClient
|
||||
MySQLManagementFlexibleServerClient,
|
||||
} from "@azure/arm-mysql-flexible";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
import * as dotenv from "dotenv";
|
||||
|
@ -21,7 +21,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Creates a new firewall rule or updates an existing firewall rule.
|
||||
*
|
||||
* @summary Creates a new firewall rule or updates an existing firewall rule.
|
||||
* x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/Firewall/preview/2021-12-01-preview/examples/FirewallRuleCreate.json
|
||||
* x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/Firewall/preview/2023-06-01-preview/examples/FirewallRuleCreate.json
|
||||
*/
|
||||
async function createAFirewallRule() {
|
||||
const subscriptionId =
|
||||
|
@ -32,18 +32,18 @@ async function createAFirewallRule() {
|
|||
const firewallRuleName = "rule1";
|
||||
const parameters: FirewallRule = {
|
||||
endIpAddress: "255.255.255.255",
|
||||
startIpAddress: "0.0.0.0"
|
||||
startIpAddress: "0.0.0.0",
|
||||
};
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new MySQLManagementFlexibleServerClient(
|
||||
credential,
|
||||
subscriptionId
|
||||
subscriptionId,
|
||||
);
|
||||
const result = await client.firewallRules.beginCreateOrUpdateAndWait(
|
||||
resourceGroupName,
|
||||
serverName,
|
||||
firewallRuleName,
|
||||
parameters
|
||||
parameters,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Deletes a firewall rule.
|
||||
*
|
||||
* @summary Deletes a firewall rule.
|
||||
* x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/Firewall/preview/2021-12-01-preview/examples/FirewallRuleDelete.json
|
||||
* x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/Firewall/preview/2023-06-01-preview/examples/FirewallRuleDelete.json
|
||||
*/
|
||||
async function deleteAFirewallRule() {
|
||||
const subscriptionId =
|
||||
|
@ -30,12 +30,12 @@ async function deleteAFirewallRule() {
|
|||
const credential = new DefaultAzureCredential();
|
||||
const client = new MySQLManagementFlexibleServerClient(
|
||||
credential,
|
||||
subscriptionId
|
||||
subscriptionId,
|
||||
);
|
||||
const result = await client.firewallRules.beginDeleteAndWait(
|
||||
resourceGroupName,
|
||||
serverName,
|
||||
firewallRuleName
|
||||
firewallRuleName,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Gets information about a server firewall rule.
|
||||
*
|
||||
* @summary Gets information about a server firewall rule.
|
||||
* x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/Firewall/preview/2021-12-01-preview/examples/FirewallRuleGet.json
|
||||
* x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/Firewall/preview/2023-06-01-preview/examples/FirewallRuleGet.json
|
||||
*/
|
||||
async function getAFirewallRule() {
|
||||
const subscriptionId =
|
||||
|
@ -30,12 +30,12 @@ async function getAFirewallRule() {
|
|||
const credential = new DefaultAzureCredential();
|
||||
const client = new MySQLManagementFlexibleServerClient(
|
||||
credential,
|
||||
subscriptionId
|
||||
subscriptionId,
|
||||
);
|
||||
const result = await client.firewallRules.get(
|
||||
resourceGroupName,
|
||||
serverName,
|
||||
firewallRuleName
|
||||
firewallRuleName,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to List all the firewall rules in a given server.
|
||||
*
|
||||
* @summary List all the firewall rules in a given server.
|
||||
* x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/Firewall/preview/2021-12-01-preview/examples/FirewallRulesListByServer.json
|
||||
* x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/Firewall/preview/2023-06-01-preview/examples/FirewallRulesListByServer.json
|
||||
*/
|
||||
async function listAllFirewallRulesInAServer() {
|
||||
const subscriptionId =
|
||||
|
@ -29,12 +29,12 @@ async function listAllFirewallRulesInAServer() {
|
|||
const credential = new DefaultAzureCredential();
|
||||
const client = new MySQLManagementFlexibleServerClient(
|
||||
credential,
|
||||
subscriptionId
|
||||
subscriptionId,
|
||||
);
|
||||
const resArray = new Array();
|
||||
for await (let item of client.firewallRules.listByServer(
|
||||
resourceGroupName,
|
||||
serverName
|
||||
serverName,
|
||||
)) {
|
||||
resArray.push(item);
|
||||
}
|
||||
|
|
|
@ -18,17 +18,11 @@ dotenv.config();
|
|||
* This sample demonstrates how to Get private DNS zone suffix in the cloud.
|
||||
*
|
||||
* @summary Get private DNS zone suffix in the cloud.
|
||||
* x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/ServiceOperations/preview/2021-12-01-preview/examples/GetPrivateDnsZoneSuffix.json
|
||||
* x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/ServiceOperations/stable/2023-12-30/examples/GetPrivateDnsZoneSuffix.json
|
||||
*/
|
||||
async function getPrivateDnsZoneSuffix() {
|
||||
const subscriptionId =
|
||||
process.env["MYSQL_SUBSCRIPTION_ID"] ||
|
||||
"00000000-0000-0000-0000-000000000000";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new MySQLManagementFlexibleServerClient(
|
||||
credential,
|
||||
subscriptionId
|
||||
);
|
||||
const client = new MySQLManagementFlexibleServerClient(credential);
|
||||
const result = await client.getPrivateDnsZoneSuffix.execute();
|
||||
console.log(result);
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Get capabilities at specified location in a given subscription.
|
||||
*
|
||||
* @summary Get capabilities at specified location in a given subscription.
|
||||
* x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/ServiceOperations/preview/2021-12-01-preview/examples/CapabilitiesByLocationList.json
|
||||
* x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/ServiceOperations/stable/2023-12-30/examples/CapabilitiesByLocationList.json
|
||||
*/
|
||||
async function capabilitiesList() {
|
||||
const subscriptionId =
|
||||
|
@ -28,7 +28,7 @@ async function capabilitiesList() {
|
|||
const credential = new DefaultAzureCredential();
|
||||
const client = new MySQLManagementFlexibleServerClient(
|
||||
credential,
|
||||
subscriptionId
|
||||
subscriptionId,
|
||||
);
|
||||
const resArray = new Array();
|
||||
for await (let item of client.locationBasedCapabilities.list(locationName)) {
|
||||
|
|
|
@ -0,0 +1,45 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { MySQLManagementFlexibleServerClient } from "@azure/arm-mysql-flexible";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
import * as dotenv from "dotenv";
|
||||
|
||||
dotenv.config();
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Get capabilities at specified location in a given subscription.
|
||||
*
|
||||
* @summary Get capabilities at specified location in a given subscription.
|
||||
* x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/ServiceOperations/stable/2023-12-30/examples/CapabilitySetByLocation.json
|
||||
*/
|
||||
async function capabilityResult() {
|
||||
const subscriptionId =
|
||||
process.env["MYSQL_SUBSCRIPTION_ID"] ||
|
||||
"ffffffff-ffff-ffff-ffff-ffffffffffff";
|
||||
const locationName = "WestUS";
|
||||
const capabilitySetName = "default";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new MySQLManagementFlexibleServerClient(
|
||||
credential,
|
||||
subscriptionId,
|
||||
);
|
||||
const result = await client.locationBasedCapabilitySet.get(
|
||||
locationName,
|
||||
capabilitySetName,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
async function main() {
|
||||
capabilityResult();
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
|
@ -0,0 +1,44 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { MySQLManagementFlexibleServerClient } from "@azure/arm-mysql-flexible";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
import * as dotenv from "dotenv";
|
||||
|
||||
dotenv.config();
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Get capabilities at specified location in a given subscription.
|
||||
*
|
||||
* @summary Get capabilities at specified location in a given subscription.
|
||||
* x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/ServiceOperations/stable/2023-12-30/examples/CapabilitySetListByLocation.json
|
||||
*/
|
||||
async function capabilitySetsResult() {
|
||||
const subscriptionId =
|
||||
process.env["MYSQL_SUBSCRIPTION_ID"] ||
|
||||
"ffffffff-ffff-ffff-ffff-ffffffffffff";
|
||||
const locationName = "WestUS";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new MySQLManagementFlexibleServerClient(
|
||||
credential,
|
||||
subscriptionId,
|
||||
);
|
||||
const resArray = new Array();
|
||||
for await (let item of client.locationBasedCapabilitySet.list(locationName)) {
|
||||
resArray.push(item);
|
||||
}
|
||||
console.log(resArray);
|
||||
}
|
||||
|
||||
async function main() {
|
||||
capabilitySetsResult();
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to List all the server log files in a given server.
|
||||
*
|
||||
* @summary List all the server log files in a given server.
|
||||
* x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/LogFiles/preview/2021-12-01-preview/examples/LogFilesListByServer.json
|
||||
* x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/LogFiles/preview/2023-06-01-preview/examples/LogFilesListByServer.json
|
||||
*/
|
||||
async function listAllServerLogFilesForAServer() {
|
||||
const subscriptionId =
|
||||
|
@ -29,12 +29,12 @@ async function listAllServerLogFilesForAServer() {
|
|||
const credential = new DefaultAzureCredential();
|
||||
const client = new MySQLManagementFlexibleServerClient(
|
||||
credential,
|
||||
subscriptionId
|
||||
subscriptionId,
|
||||
);
|
||||
const resArray = new Array();
|
||||
for await (let item of client.logFiles.listByServer(
|
||||
resourceGroupName,
|
||||
serverName
|
||||
serverName,
|
||||
)) {
|
||||
resArray.push(item);
|
||||
}
|
||||
|
|
|
@ -0,0 +1,47 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { MySQLManagementFlexibleServerClient } from "@azure/arm-mysql-flexible";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
import * as dotenv from "dotenv";
|
||||
|
||||
dotenv.config();
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Create backup for a given server with specified backup name.
|
||||
*
|
||||
* @summary Create backup for a given server with specified backup name.
|
||||
* x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/Backups/preview/2023-10-01-preview/examples/LongRunningBackup.json
|
||||
*/
|
||||
async function createBackupForAServer() {
|
||||
const subscriptionId =
|
||||
process.env["MYSQL_SUBSCRIPTION_ID"] ||
|
||||
"ffffffff-ffff-ffff-ffff-ffffffffffff";
|
||||
const resourceGroupName = process.env["MYSQL_RESOURCE_GROUP"] || "TestGroup";
|
||||
const serverName = "mysqltestserver";
|
||||
const backupName = "testback";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new MySQLManagementFlexibleServerClient(
|
||||
credential,
|
||||
subscriptionId,
|
||||
);
|
||||
const result = await client.longRunningBackup.beginCreateAndWait(
|
||||
resourceGroupName,
|
||||
serverName,
|
||||
backupName,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
async function main() {
|
||||
createBackupForAServer();
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
|
@ -0,0 +1,47 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { MySQLManagementFlexibleServerClient } from "@azure/arm-mysql-flexible";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
import * as dotenv from "dotenv";
|
||||
|
||||
dotenv.config();
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Get backup for a given server.
|
||||
*
|
||||
* @summary Get backup for a given server.
|
||||
* x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/Backups/preview/2023-10-01-preview/examples/LongRunningBackupGet.json
|
||||
*/
|
||||
async function getABackupForAServer() {
|
||||
const subscriptionId =
|
||||
process.env["MYSQL_SUBSCRIPTION_ID"] ||
|
||||
"ffffffff-ffff-ffff-ffff-ffffffffffff";
|
||||
const resourceGroupName = process.env["MYSQL_RESOURCE_GROUP"] || "TestGroup";
|
||||
const serverName = "mysqltestserver";
|
||||
const backupName = "daily_20210615T160516";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new MySQLManagementFlexibleServerClient(
|
||||
credential,
|
||||
subscriptionId,
|
||||
);
|
||||
const result = await client.longRunningBackups.get(
|
||||
resourceGroupName,
|
||||
serverName,
|
||||
backupName,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
async function main() {
|
||||
getABackupForAServer();
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
|
@ -0,0 +1,48 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { MySQLManagementFlexibleServerClient } from "@azure/arm-mysql-flexible";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
import * as dotenv from "dotenv";
|
||||
|
||||
dotenv.config();
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to List all the backups for a given server.
|
||||
*
|
||||
* @summary List all the backups for a given server.
|
||||
* x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/Backups/preview/2023-10-01-preview/examples/LongRunningBackupsListByServer.json
|
||||
*/
|
||||
async function listBackupsForAServer() {
|
||||
const subscriptionId =
|
||||
process.env["MYSQL_SUBSCRIPTION_ID"] ||
|
||||
"ffffffff-ffff-ffff-ffff-ffffffffffff";
|
||||
const resourceGroupName = process.env["MYSQL_RESOURCE_GROUP"] || "TestGroup";
|
||||
const serverName = "mysqltestserver";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new MySQLManagementFlexibleServerClient(
|
||||
credential,
|
||||
subscriptionId,
|
||||
);
|
||||
const resArray = new Array();
|
||||
for await (let item of client.longRunningBackups.list(
|
||||
resourceGroupName,
|
||||
serverName,
|
||||
)) {
|
||||
resArray.push(item);
|
||||
}
|
||||
console.log(resArray);
|
||||
}
|
||||
|
||||
async function main() {
|
||||
listBackupsForAServer();
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
|
@ -0,0 +1,48 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { MySQLManagementFlexibleServerClient } from "@azure/arm-mysql-flexible";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
import * as dotenv from "dotenv";
|
||||
|
||||
dotenv.config();
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to List maintenances.
|
||||
*
|
||||
* @summary List maintenances.
|
||||
* x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/Maintenance/preview/2023-10-01-preview/examples/MaintenancesListByServer.json
|
||||
*/
|
||||
async function listMaintenancesOnAServer() {
|
||||
const subscriptionId =
|
||||
process.env["MYSQL_SUBSCRIPTION_ID"] ||
|
||||
"ffffffff-ffff-ffff-ffff-ffffffffffff";
|
||||
const resourceGroupName = process.env["MYSQL_RESOURCE_GROUP"] || "TestGroup";
|
||||
const serverName = "testserver";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new MySQLManagementFlexibleServerClient(
|
||||
credential,
|
||||
subscriptionId,
|
||||
);
|
||||
const resArray = new Array();
|
||||
for await (let item of client.maintenances.list(
|
||||
resourceGroupName,
|
||||
serverName,
|
||||
)) {
|
||||
resArray.push(item);
|
||||
}
|
||||
console.log(resArray);
|
||||
}
|
||||
|
||||
async function main() {
|
||||
listMaintenancesOnAServer();
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
|
@ -0,0 +1,47 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { MySQLManagementFlexibleServerClient } from "@azure/arm-mysql-flexible";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
import * as dotenv from "dotenv";
|
||||
|
||||
dotenv.config();
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Read maintenance.
|
||||
*
|
||||
* @summary Read maintenance.
|
||||
* x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/Maintenance/preview/2023-10-01-preview/examples/MaintenanceRead.json
|
||||
*/
|
||||
async function readAMaintenance() {
|
||||
const subscriptionId =
|
||||
process.env["MYSQL_SUBSCRIPTION_ID"] ||
|
||||
"ffffffff-ffff-ffff-ffff-ffffffffffff";
|
||||
const resourceGroupName = process.env["MYSQL_RESOURCE_GROUP"] || "TestGroup";
|
||||
const serverName = "testserver";
|
||||
const maintenanceName = "_T9Q-TS8";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new MySQLManagementFlexibleServerClient(
|
||||
credential,
|
||||
subscriptionId,
|
||||
);
|
||||
const result = await client.maintenances.read(
|
||||
resourceGroupName,
|
||||
serverName,
|
||||
maintenanceName,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
async function main() {
|
||||
readAMaintenance();
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
|
@ -0,0 +1,56 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import {
|
||||
MaintenanceUpdate,
|
||||
MaintenancesUpdateOptionalParams,
|
||||
MySQLManagementFlexibleServerClient,
|
||||
} from "@azure/arm-mysql-flexible";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
import * as dotenv from "dotenv";
|
||||
|
||||
dotenv.config();
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Update maintenances.
|
||||
*
|
||||
* @summary Update maintenances.
|
||||
* x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/Maintenance/preview/2023-10-01-preview/examples/MaintenanceUpdate.json
|
||||
*/
|
||||
async function updateMaintenanceOnAServer() {
|
||||
const subscriptionId =
|
||||
process.env["MYSQL_SUBSCRIPTION_ID"] ||
|
||||
"ffffffff-ffff-ffff-ffff-ffffffffffff";
|
||||
const resourceGroupName = process.env["MYSQL_RESOURCE_GROUP"] || "TestGroup";
|
||||
const serverName = "testserver";
|
||||
const maintenanceName = "_T9Q-TS8";
|
||||
const parameters: MaintenanceUpdate = {
|
||||
maintenanceStartTime: new Date("2024-01-20T00:00:00"),
|
||||
};
|
||||
const options: MaintenancesUpdateOptionalParams = { parameters };
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new MySQLManagementFlexibleServerClient(
|
||||
credential,
|
||||
subscriptionId,
|
||||
);
|
||||
const result = await client.maintenances.beginUpdateAndWait(
|
||||
resourceGroupName,
|
||||
serverName,
|
||||
maintenanceName,
|
||||
options,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
async function main() {
|
||||
updateMaintenanceOnAServer();
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
|
@ -0,0 +1,64 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { MySQLManagementFlexibleServerClient } from "@azure/arm-mysql-flexible";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
import * as dotenv from "dotenv";
|
||||
|
||||
dotenv.config();
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Get the operation result for a long running operation.
|
||||
*
|
||||
* @summary Get the operation result for a long running operation.
|
||||
* x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/ServiceOperations/stable/2023-12-30/examples/OperationProgress_Get_BackupAndExport.json
|
||||
*/
|
||||
async function operationProgressGetBackupAndExport() {
|
||||
const subscriptionId =
|
||||
process.env["MYSQL_SUBSCRIPTION_ID"] ||
|
||||
"ffffffff-ffff-ffff-ffff-ffffffffffff";
|
||||
const locationName = "westus";
|
||||
const operationId = "00000000-0000-0000-0000-000000000000";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new MySQLManagementFlexibleServerClient(
|
||||
credential,
|
||||
subscriptionId,
|
||||
);
|
||||
const result = await client.operationProgress.get(locationName, operationId);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Get the operation result for a long running operation.
|
||||
*
|
||||
* @summary Get the operation result for a long running operation.
|
||||
* x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/ServiceOperations/stable/2023-12-30/examples/OperationProgress_Get_ImportFromStorage.json
|
||||
*/
|
||||
async function operationProgressGetImportFromStorage() {
|
||||
const subscriptionId =
|
||||
process.env["MYSQL_SUBSCRIPTION_ID"] ||
|
||||
"ffffffff-ffff-ffff-ffff-ffffffffffff";
|
||||
const locationName = "westus";
|
||||
const operationId = "00000000-0000-0000-0000-000000000000";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new MySQLManagementFlexibleServerClient(
|
||||
credential,
|
||||
subscriptionId,
|
||||
);
|
||||
const result = await client.operationProgress.get(locationName, operationId);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
async function main() {
|
||||
operationProgressGetBackupAndExport();
|
||||
operationProgressGetImportFromStorage();
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
|
@ -0,0 +1,42 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { MySQLManagementFlexibleServerClient } from "@azure/arm-mysql-flexible";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
import * as dotenv from "dotenv";
|
||||
|
||||
dotenv.config();
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Get the operation result for a long running operation.
|
||||
*
|
||||
* @summary Get the operation result for a long running operation.
|
||||
* x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/ServiceOperations/stable/2023-12-30/examples/OperationResults_Get.json
|
||||
*/
|
||||
async function operationResultsGet() {
|
||||
const subscriptionId =
|
||||
process.env["MYSQL_SUBSCRIPTION_ID"] ||
|
||||
"ffffffff-ffff-ffff-ffff-ffffffffffff";
|
||||
const locationName = "westus";
|
||||
const operationId = "00000000-0000-0000-0000-000000000000";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new MySQLManagementFlexibleServerClient(
|
||||
credential,
|
||||
subscriptionId,
|
||||
);
|
||||
const result = await client.operationResults.get(locationName, operationId);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
async function main() {
|
||||
operationResultsGet();
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Lists all of the available REST API operations.
|
||||
*
|
||||
* @summary Lists all of the available REST API operations.
|
||||
* x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/ServiceOperations/preview/2021-12-01-preview/examples/OperationsList.json
|
||||
* x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/ServiceOperations/stable/2023-12-30/examples/OperationsList.json
|
||||
*/
|
||||
async function operationList() {
|
||||
const subscriptionId =
|
||||
|
@ -27,7 +27,7 @@ async function operationList() {
|
|||
const credential = new DefaultAzureCredential();
|
||||
const client = new MySQLManagementFlexibleServerClient(
|
||||
credential,
|
||||
subscriptionId
|
||||
subscriptionId,
|
||||
);
|
||||
const resArray = new Array();
|
||||
for await (let item of client.operations.list()) {
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to List all the replicas for a given server.
|
||||
*
|
||||
* @summary List all the replicas for a given server.
|
||||
* x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2022-09-30-preview/examples/ReplicasListByServer.json
|
||||
* x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/examples/ReplicasListByServer.json
|
||||
*/
|
||||
async function listReplicasForAServer() {
|
||||
const subscriptionId =
|
||||
|
@ -29,12 +29,12 @@ async function listReplicasForAServer() {
|
|||
const credential = new DefaultAzureCredential();
|
||||
const client = new MySQLManagementFlexibleServerClient(
|
||||
credential,
|
||||
subscriptionId
|
||||
subscriptionId,
|
||||
);
|
||||
const resArray = new Array();
|
||||
for await (let item of client.replicas.listByServer(
|
||||
resourceGroupName,
|
||||
serverName
|
||||
serverName,
|
||||
)) {
|
||||
resArray.push(item);
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
// Licensed under the MIT License.
|
||||
import {
|
||||
Server,
|
||||
MySQLManagementFlexibleServerClient
|
||||
MySQLManagementFlexibleServerClient,
|
||||
} from "@azure/arm-mysql-flexible";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
import * as dotenv from "dotenv";
|
||||
|
@ -21,7 +21,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Creates a new server or updates an existing server. The update action will overwrite the existing server.
|
||||
*
|
||||
* @summary Creates a new server or updates an existing server. The update action will overwrite the existing server.
|
||||
* x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2022-09-30-preview/examples/ServerCreate.json
|
||||
* x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/examples/ServerCreate.json
|
||||
*/
|
||||
async function createANewServer() {
|
||||
const subscriptionId =
|
||||
|
@ -33,24 +33,28 @@ async function createANewServer() {
|
|||
administratorLogin: "cloudsa",
|
||||
administratorLoginPassword: "your_password",
|
||||
availabilityZone: "1",
|
||||
backup: { backupRetentionDays: 7, geoRedundantBackup: "Disabled" },
|
||||
backup: {
|
||||
backupIntervalHours: 24,
|
||||
backupRetentionDays: 7,
|
||||
geoRedundantBackup: "Disabled",
|
||||
},
|
||||
createMode: "Default",
|
||||
highAvailability: { mode: "ZoneRedundant", standbyAvailabilityZone: "3" },
|
||||
location: "southeastasia",
|
||||
sku: { name: "Standard_D2ds_v4", tier: "GeneralPurpose" },
|
||||
storage: { autoGrow: "Disabled", iops: 600, storageSizeGB: 100 },
|
||||
tags: { num: "1" },
|
||||
version: "5.7"
|
||||
version: "5.7",
|
||||
};
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new MySQLManagementFlexibleServerClient(
|
||||
credential,
|
||||
subscriptionId
|
||||
subscriptionId,
|
||||
);
|
||||
const result = await client.servers.beginCreateAndWait(
|
||||
resourceGroupName,
|
||||
serverName,
|
||||
parameters
|
||||
parameters,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
@ -59,7 +63,7 @@ async function createANewServer() {
|
|||
* This sample demonstrates how to Creates a new server or updates an existing server. The update action will overwrite the existing server.
|
||||
*
|
||||
* @summary Creates a new server or updates an existing server. The update action will overwrite the existing server.
|
||||
* x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2022-09-30-preview/examples/ServerCreateReplica.json
|
||||
* x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/examples/ServerCreateReplica.json
|
||||
*/
|
||||
async function createAReplicaServer() {
|
||||
const subscriptionId =
|
||||
|
@ -71,17 +75,17 @@ async function createAReplicaServer() {
|
|||
createMode: "Replica",
|
||||
location: "SoutheastAsia",
|
||||
sourceServerResourceId:
|
||||
"/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testgr/providers/Microsoft.DBforMySQL/flexibleServers/source-server"
|
||||
"/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testgr/providers/Microsoft.DBforMySQL/flexibleServers/source-server",
|
||||
};
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new MySQLManagementFlexibleServerClient(
|
||||
credential,
|
||||
subscriptionId
|
||||
subscriptionId,
|
||||
);
|
||||
const result = await client.servers.beginCreateAndWait(
|
||||
resourceGroupName,
|
||||
serverName,
|
||||
parameters
|
||||
parameters,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
@ -90,7 +94,7 @@ async function createAReplicaServer() {
|
|||
* This sample demonstrates how to Creates a new server or updates an existing server. The update action will overwrite the existing server.
|
||||
*
|
||||
* @summary Creates a new server or updates an existing server. The update action will overwrite the existing server.
|
||||
* x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2022-09-30-preview/examples/ServerCreateWithPointInTimeRestore.json
|
||||
* x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/examples/ServerCreateWithPointInTimeRestore.json
|
||||
*/
|
||||
async function createAServerAsAPointInTimeRestore() {
|
||||
const subscriptionId =
|
||||
|
@ -106,17 +110,17 @@ async function createAServerAsAPointInTimeRestore() {
|
|||
sku: { name: "Standard_D14_v2", tier: "GeneralPurpose" },
|
||||
sourceServerResourceId:
|
||||
"/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/SourceResourceGroup/providers/Microsoft.DBforMySQL/flexibleServers/sourceserver",
|
||||
tags: { num: "1" }
|
||||
tags: { num: "1" },
|
||||
};
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new MySQLManagementFlexibleServerClient(
|
||||
credential,
|
||||
subscriptionId
|
||||
subscriptionId,
|
||||
);
|
||||
const result = await client.servers.beginCreateAndWait(
|
||||
resourceGroupName,
|
||||
serverName,
|
||||
parameters
|
||||
parameters,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
@ -125,7 +129,7 @@ async function createAServerAsAPointInTimeRestore() {
|
|||
* This sample demonstrates how to Creates a new server or updates an existing server. The update action will overwrite the existing server.
|
||||
*
|
||||
* @summary Creates a new server or updates an existing server. The update action will overwrite the existing server.
|
||||
* x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2022-09-30-preview/examples/ServerCreateWithBYOK.json
|
||||
* x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/examples/ServerCreateWithBYOK.json
|
||||
*/
|
||||
async function createAServerWithByok() {
|
||||
const subscriptionId =
|
||||
|
@ -137,7 +141,11 @@ async function createAServerWithByok() {
|
|||
administratorLogin: "cloudsa",
|
||||
administratorLoginPassword: "your_password",
|
||||
availabilityZone: "1",
|
||||
backup: { backupRetentionDays: 7, geoRedundantBackup: "Disabled" },
|
||||
backup: {
|
||||
backupIntervalHours: 24,
|
||||
backupRetentionDays: 7,
|
||||
geoRedundantBackup: "Disabled",
|
||||
},
|
||||
createMode: "Default",
|
||||
dataEncryption: {
|
||||
type: "AzureKeyVault",
|
||||
|
@ -148,30 +156,31 @@ async function createAServerWithByok() {
|
|||
primaryKeyURI:
|
||||
"https://test.vault.azure.net/keys/key/c8a92236622244c0a4fdb892666f671a",
|
||||
primaryUserAssignedIdentityId:
|
||||
"/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-identity"
|
||||
"/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-identity",
|
||||
},
|
||||
highAvailability: { mode: "ZoneRedundant", standbyAvailabilityZone: "3" },
|
||||
identity: {
|
||||
type: "UserAssigned",
|
||||
userAssignedIdentities: {
|
||||
"/subscriptions/ffffffffFfffFfffFfffFfffffffffff/resourceGroups/testrg/providers/MicrosoftManagedIdentity/userAssignedIdentities/testIdentity": {}
|
||||
}
|
||||
"/subscriptions/ffffffffFfffFfffFfffFfffffffffff/resourceGroups/testrg/providers/MicrosoftManagedIdentity/userAssignedIdentities/testIdentity":
|
||||
{},
|
||||
},
|
||||
},
|
||||
location: "southeastasia",
|
||||
sku: { name: "Standard_D2ds_v4", tier: "GeneralPurpose" },
|
||||
storage: { autoGrow: "Disabled", iops: 600, storageSizeGB: 100 },
|
||||
tags: { num: "1" },
|
||||
version: "5.7"
|
||||
version: "5.7",
|
||||
};
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new MySQLManagementFlexibleServerClient(
|
||||
credential,
|
||||
subscriptionId
|
||||
subscriptionId,
|
||||
);
|
||||
const result = await client.servers.beginCreateAndWait(
|
||||
resourceGroupName,
|
||||
serverName,
|
||||
parameters
|
||||
parameters,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Deletes a server.
|
||||
*
|
||||
* @summary Deletes a server.
|
||||
* x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2022-09-30-preview/examples/ServerDelete.json
|
||||
* x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/examples/ServerDelete.json
|
||||
*/
|
||||
async function deleteAServer() {
|
||||
const subscriptionId =
|
||||
|
@ -29,11 +29,11 @@ async function deleteAServer() {
|
|||
const credential = new DefaultAzureCredential();
|
||||
const client = new MySQLManagementFlexibleServerClient(
|
||||
credential,
|
||||
subscriptionId
|
||||
subscriptionId,
|
||||
);
|
||||
const result = await client.servers.beginDeleteAndWait(
|
||||
resourceGroupName,
|
||||
serverName
|
||||
serverName,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Manual failover a server.
|
||||
*
|
||||
* @summary Manual failover a server.
|
||||
* x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2022-09-30-preview/examples/ServerFailover.json
|
||||
* x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/examples/ServerFailover.json
|
||||
*/
|
||||
async function restartAServer() {
|
||||
const subscriptionId =
|
||||
|
@ -29,11 +29,11 @@ async function restartAServer() {
|
|||
const credential = new DefaultAzureCredential();
|
||||
const client = new MySQLManagementFlexibleServerClient(
|
||||
credential,
|
||||
subscriptionId
|
||||
subscriptionId,
|
||||
);
|
||||
const result = await client.servers.beginFailoverAndWait(
|
||||
resourceGroupName,
|
||||
serverName
|
||||
serverName,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Gets information about a server.
|
||||
*
|
||||
* @summary Gets information about a server.
|
||||
* x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2022-09-30-preview/examples/ServerGet.json
|
||||
* x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/examples/ServerGet.json
|
||||
*/
|
||||
async function getAServer() {
|
||||
const subscriptionId =
|
||||
|
@ -29,7 +29,7 @@ async function getAServer() {
|
|||
const credential = new DefaultAzureCredential();
|
||||
const client = new MySQLManagementFlexibleServerClient(
|
||||
credential,
|
||||
subscriptionId
|
||||
subscriptionId,
|
||||
);
|
||||
const result = await client.servers.get(resourceGroupName, serverName);
|
||||
console.log(result);
|
||||
|
@ -39,7 +39,7 @@ async function getAServer() {
|
|||
* This sample demonstrates how to Gets information about a server.
|
||||
*
|
||||
* @summary Gets information about a server.
|
||||
* x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2022-09-30-preview/examples/ServerGetWithVnet.json
|
||||
* x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/examples/ServerGetWithVnet.json
|
||||
*/
|
||||
async function getAServerWithVnet() {
|
||||
const subscriptionId =
|
||||
|
@ -50,7 +50,7 @@ async function getAServerWithVnet() {
|
|||
const credential = new DefaultAzureCredential();
|
||||
const client = new MySQLManagementFlexibleServerClient(
|
||||
credential,
|
||||
subscriptionId
|
||||
subscriptionId,
|
||||
);
|
||||
const result = await client.servers.get(resourceGroupName, serverName);
|
||||
console.log(result);
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to List all the servers in a given resource group.
|
||||
*
|
||||
* @summary List all the servers in a given resource group.
|
||||
* x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2022-09-30-preview/examples/ServersListByResourceGroup.json
|
||||
* x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/examples/ServersListByResourceGroup.json
|
||||
*/
|
||||
async function listServersInAResourceGroup() {
|
||||
const subscriptionId =
|
||||
|
@ -28,11 +28,11 @@ async function listServersInAResourceGroup() {
|
|||
const credential = new DefaultAzureCredential();
|
||||
const client = new MySQLManagementFlexibleServerClient(
|
||||
credential,
|
||||
subscriptionId
|
||||
subscriptionId,
|
||||
);
|
||||
const resArray = new Array();
|
||||
for await (let item of client.servers.listByResourceGroup(
|
||||
resourceGroupName
|
||||
resourceGroupName,
|
||||
)) {
|
||||
resArray.push(item);
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to List all the servers in a given subscription.
|
||||
*
|
||||
* @summary List all the servers in a given subscription.
|
||||
* x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2022-09-30-preview/examples/ServersList.json
|
||||
* x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/examples/ServersList.json
|
||||
*/
|
||||
async function listServersInASubscription() {
|
||||
const subscriptionId =
|
||||
|
@ -27,7 +27,7 @@ async function listServersInASubscription() {
|
|||
const credential = new DefaultAzureCredential();
|
||||
const client = new MySQLManagementFlexibleServerClient(
|
||||
credential,
|
||||
subscriptionId
|
||||
subscriptionId,
|
||||
);
|
||||
const resArray = new Array();
|
||||
for await (let item of client.servers.list()) {
|
||||
|
|
|
@ -0,0 +1,45 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { MySQLManagementFlexibleServerClient } from "@azure/arm-mysql-flexible";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
import * as dotenv from "dotenv";
|
||||
|
||||
dotenv.config();
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Cutover migration for MySQL import, it will switch source elastic server DNS to flexible server.
|
||||
*
|
||||
* @summary Cutover migration for MySQL import, it will switch source elastic server DNS to flexible server.
|
||||
* x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/examples/CutoverMigration.json
|
||||
*/
|
||||
async function cutoverMigrationForMySqlImport() {
|
||||
const subscriptionId =
|
||||
process.env["MYSQL_SUBSCRIPTION_ID"] ||
|
||||
"ffffffff-ffff-ffff-ffff-ffffffffffff";
|
||||
const resourceGroupName = process.env["MYSQL_RESOURCE_GROUP"] || "testrg";
|
||||
const serverName = "mysqltestserver";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new MySQLManagementFlexibleServerClient(
|
||||
credential,
|
||||
subscriptionId,
|
||||
);
|
||||
const result = await client.serversMigration.beginCutoverMigrationAndWait(
|
||||
resourceGroupName,
|
||||
serverName,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
async function main() {
|
||||
cutoverMigrationForMySqlImport();
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
|
@ -10,7 +10,7 @@
|
|||
// Licensed under the MIT License.
|
||||
import {
|
||||
ServerGtidSetParameter,
|
||||
MySQLManagementFlexibleServerClient
|
||||
MySQLManagementFlexibleServerClient,
|
||||
} from "@azure/arm-mysql-flexible";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
import * as dotenv from "dotenv";
|
||||
|
@ -21,7 +21,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Resets GTID on a server.
|
||||
*
|
||||
* @summary Resets GTID on a server.
|
||||
* x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2022-09-30-preview/examples/ServerResetGtid.json
|
||||
* x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/examples/ServerResetGtid.json
|
||||
*/
|
||||
async function resetGtidOnAServer() {
|
||||
const subscriptionId =
|
||||
|
@ -30,17 +30,17 @@ async function resetGtidOnAServer() {
|
|||
const resourceGroupName = process.env["MYSQL_RESOURCE_GROUP"] || "TestGroup";
|
||||
const serverName = "testserver";
|
||||
const parameters: ServerGtidSetParameter = {
|
||||
gtidSet: "4aff5b51-97ba-11ed-a955-002248036acc:1-16"
|
||||
gtidSet: "4aff5b51-97ba-11ed-a955-002248036acc:1-16",
|
||||
};
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new MySQLManagementFlexibleServerClient(
|
||||
credential,
|
||||
subscriptionId
|
||||
subscriptionId,
|
||||
);
|
||||
const result = await client.servers.beginResetGtidAndWait(
|
||||
resourceGroupName,
|
||||
serverName,
|
||||
parameters
|
||||
parameters,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
// Licensed under the MIT License.
|
||||
import {
|
||||
ServerRestartParameter,
|
||||
MySQLManagementFlexibleServerClient
|
||||
MySQLManagementFlexibleServerClient,
|
||||
} from "@azure/arm-mysql-flexible";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
import * as dotenv from "dotenv";
|
||||
|
@ -21,7 +21,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Restarts a server.
|
||||
*
|
||||
* @summary Restarts a server.
|
||||
* x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2022-09-30-preview/examples/ServerRestart.json
|
||||
* x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/examples/ServerRestart.json
|
||||
*/
|
||||
async function restartAServer() {
|
||||
const subscriptionId =
|
||||
|
@ -31,17 +31,17 @@ async function restartAServer() {
|
|||
const serverName = "testserver";
|
||||
const parameters: ServerRestartParameter = {
|
||||
maxFailoverSeconds: 60,
|
||||
restartWithFailover: "Enabled"
|
||||
restartWithFailover: "Enabled",
|
||||
};
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new MySQLManagementFlexibleServerClient(
|
||||
credential,
|
||||
subscriptionId
|
||||
subscriptionId,
|
||||
);
|
||||
const result = await client.servers.beginRestartAndWait(
|
||||
resourceGroupName,
|
||||
serverName,
|
||||
parameters
|
||||
parameters,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Starts a server.
|
||||
*
|
||||
* @summary Starts a server.
|
||||
* x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2022-09-30-preview/examples/ServerStart.json
|
||||
* x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/examples/ServerStart.json
|
||||
*/
|
||||
async function startAServer() {
|
||||
const subscriptionId =
|
||||
|
@ -29,11 +29,11 @@ async function startAServer() {
|
|||
const credential = new DefaultAzureCredential();
|
||||
const client = new MySQLManagementFlexibleServerClient(
|
||||
credential,
|
||||
subscriptionId
|
||||
subscriptionId,
|
||||
);
|
||||
const result = await client.servers.beginStartAndWait(
|
||||
resourceGroupName,
|
||||
serverName
|
||||
serverName,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Stops a server.
|
||||
*
|
||||
* @summary Stops a server.
|
||||
* x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2022-09-30-preview/examples/ServerStop.json
|
||||
* x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/examples/ServerStop.json
|
||||
*/
|
||||
async function stopAServer() {
|
||||
const subscriptionId =
|
||||
|
@ -29,11 +29,11 @@ async function stopAServer() {
|
|||
const credential = new DefaultAzureCredential();
|
||||
const client = new MySQLManagementFlexibleServerClient(
|
||||
credential,
|
||||
subscriptionId
|
||||
subscriptionId,
|
||||
);
|
||||
const result = await client.servers.beginStopAndWait(
|
||||
resourceGroupName,
|
||||
serverName
|
||||
serverName,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
// Licensed under the MIT License.
|
||||
import {
|
||||
ServerForUpdate,
|
||||
MySQLManagementFlexibleServerClient
|
||||
MySQLManagementFlexibleServerClient,
|
||||
} from "@azure/arm-mysql-flexible";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
import * as dotenv from "dotenv";
|
||||
|
@ -21,7 +21,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Updates an existing server. The request body can contain one to many of the properties present in the normal server definition.
|
||||
*
|
||||
* @summary Updates an existing server. The request body can contain one to many of the properties present in the normal server definition.
|
||||
* x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2022-09-30-preview/examples/ServerUpdate.json
|
||||
* x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/examples/ServerUpdate.json
|
||||
*/
|
||||
async function updateAServer() {
|
||||
const subscriptionId =
|
||||
|
@ -30,22 +30,23 @@ async function updateAServer() {
|
|||
const resourceGroupName = process.env["MYSQL_RESOURCE_GROUP"] || "testrg";
|
||||
const serverName = "mysqltestserver";
|
||||
const parameters: ServerForUpdate = {
|
||||
network: { publicNetworkAccess: "Disabled" },
|
||||
storage: {
|
||||
autoGrow: "Disabled",
|
||||
autoIoScaling: "Disabled",
|
||||
iops: 200,
|
||||
storageSizeGB: 30
|
||||
}
|
||||
storageSizeGB: 30,
|
||||
},
|
||||
};
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new MySQLManagementFlexibleServerClient(
|
||||
credential,
|
||||
subscriptionId
|
||||
subscriptionId,
|
||||
);
|
||||
const result = await client.servers.beginUpdateAndWait(
|
||||
resourceGroupName,
|
||||
serverName,
|
||||
parameters
|
||||
parameters,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
@ -54,7 +55,7 @@ async function updateAServer() {
|
|||
* This sample demonstrates how to Updates an existing server. The request body can contain one to many of the properties present in the normal server definition.
|
||||
*
|
||||
* @summary Updates an existing server. The request body can contain one to many of the properties present in the normal server definition.
|
||||
* x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2022-09-30-preview/examples/ServerUpdateWithCustomerMaintenanceWindow.json
|
||||
* x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/examples/ServerUpdateWithCustomerMaintenanceWindow.json
|
||||
*/
|
||||
async function updateServerCustomerMaintenanceWindow() {
|
||||
const subscriptionId =
|
||||
|
@ -67,18 +68,18 @@ async function updateServerCustomerMaintenanceWindow() {
|
|||
customWindow: "Enabled",
|
||||
dayOfWeek: 1,
|
||||
startHour: 8,
|
||||
startMinute: 0
|
||||
}
|
||||
startMinute: 0,
|
||||
},
|
||||
};
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new MySQLManagementFlexibleServerClient(
|
||||
credential,
|
||||
subscriptionId
|
||||
subscriptionId,
|
||||
);
|
||||
const result = await client.servers.beginUpdateAndWait(
|
||||
resourceGroupName,
|
||||
serverName,
|
||||
parameters
|
||||
parameters,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
@ -87,7 +88,7 @@ async function updateServerCustomerMaintenanceWindow() {
|
|||
* This sample demonstrates how to Updates an existing server. The request body can contain one to many of the properties present in the normal server definition.
|
||||
*
|
||||
* @summary Updates an existing server. The request body can contain one to many of the properties present in the normal server definition.
|
||||
* x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2022-09-30-preview/examples/ServerUpdateWithBYOK.json
|
||||
* x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/examples/ServerUpdateWithBYOK.json
|
||||
*/
|
||||
async function updateServerWithByok() {
|
||||
const subscriptionId =
|
||||
|
@ -105,24 +106,25 @@ async function updateServerWithByok() {
|
|||
primaryKeyURI:
|
||||
"https://test.vault.azure.net/keys/key/c8a92236622244c0a4fdb892666f671a",
|
||||
primaryUserAssignedIdentityId:
|
||||
"/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-identity"
|
||||
"/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-identity",
|
||||
},
|
||||
identity: {
|
||||
type: "UserAssigned",
|
||||
userAssignedIdentities: {
|
||||
"/subscriptions/ffffffffFfffFfffFfffFfffffffffff/resourceGroups/testrg/providers/MicrosoftManagedIdentity/userAssignedIdentities/testIdentity": {}
|
||||
}
|
||||
}
|
||||
"/subscriptions/ffffffffFfffFfffFfffFfffffffffff/resourceGroups/testrg/providers/MicrosoftManagedIdentity/userAssignedIdentities/testIdentity":
|
||||
{},
|
||||
},
|
||||
},
|
||||
};
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new MySQLManagementFlexibleServerClient(
|
||||
credential,
|
||||
subscriptionId
|
||||
subscriptionId,
|
||||
);
|
||||
const result = await client.servers.beginUpdateAndWait(
|
||||
resourceGroupName,
|
||||
serverName,
|
||||
parameters
|
||||
parameters,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
|
|
@ -0,0 +1,52 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import {
|
||||
HighAvailabilityValidationEstimation,
|
||||
MySQLManagementFlexibleServerClient,
|
||||
} from "@azure/arm-mysql-flexible";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
import * as dotenv from "dotenv";
|
||||
|
||||
dotenv.config();
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Validate a deployment of high availability.
|
||||
*
|
||||
* @summary Validate a deployment of high availability.
|
||||
* x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/examples/ServerValidateEstimateHighAvailability.json
|
||||
*/
|
||||
async function validateAValidationAndEstimationOfHighAvailability() {
|
||||
const subscriptionId =
|
||||
process.env["MYSQL_SUBSCRIPTION_ID"] ||
|
||||
"ffffffff-ffff-ffff-ffff-ffffffffffff";
|
||||
const resourceGroupName = process.env["MYSQL_RESOURCE_GROUP"] || "TestGroup";
|
||||
const serverName = "testserver";
|
||||
const parameters: HighAvailabilityValidationEstimation = {
|
||||
expectedStandbyAvailabilityZone: "1",
|
||||
};
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new MySQLManagementFlexibleServerClient(
|
||||
credential,
|
||||
subscriptionId,
|
||||
);
|
||||
const result = await client.servers.validateEstimateHighAvailability(
|
||||
resourceGroupName,
|
||||
serverName,
|
||||
parameters,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
async function main() {
|
||||
validateAValidationAndEstimationOfHighAvailability();
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
|
@ -2,49 +2,65 @@
|
|||
|
||||
These sample programs show how to use the JavaScript client libraries for in some common scenarios.
|
||||
|
||||
| **File Name** | **Description** |
|
||||
| --------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| [azureAdAdministratorsCreateOrUpdateSample.js][azureadadministratorscreateorupdatesample] | Creates or updates an existing Azure Active Directory administrator. x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/AAD/preview/2021-12-01-preview/examples/AzureADAdministratorCreate.json |
|
||||
| [azureAdAdministratorsDeleteSample.js][azureadadministratorsdeletesample] | Deletes an Azure AD Administrator. x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/AAD/preview/2021-12-01-preview/examples/AzureADAdministratorDelete.json |
|
||||
| [azureAdAdministratorsGetSample.js][azureadadministratorsgetsample] | Gets information about an azure ad administrator. x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/AAD/preview/2021-12-01-preview/examples/AzureADAdministratorGet.json |
|
||||
| [azureAdAdministratorsListByServerSample.js][azureadadministratorslistbyserversample] | List all the AAD administrators in a given server. x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/AAD/preview/2021-12-01-preview/examples/AzureADAdministratorsListByServer.json |
|
||||
| [backupAndExportCreateSample.js][backupandexportcreatesample] | Exports the backup of the given server by creating a backup if not existing. x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/Backups/preview/2022-09-30-preview/examples/BackupAndExport.json |
|
||||
| [backupAndExportValidateBackupSample.js][backupandexportvalidatebackupsample] | Validates if backup can be performed for given server. x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/Backups/preview/2022-09-30-preview/examples/ValidateBackup.json |
|
||||
| [backupsGetSample.js][backupsgetsample] | List all the backups for a given server. x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/Backups/preview/2022-09-30-preview/examples/BackupGet.json |
|
||||
| [backupsListByServerSample.js][backupslistbyserversample] | List all the backups for a given server. x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/Backups/preview/2022-09-30-preview/examples/BackupsListByServer.json |
|
||||
| [backupsPutSample.js][backupsputsample] | Create backup for a given server with specified backup name. x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/Backups/preview/2022-09-30-preview/examples/BackupPut.json |
|
||||
| [checkNameAvailabilityExecuteSample.js][checknameavailabilityexecutesample] | Check the availability of name for server x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/ServiceOperations/preview/2021-12-01-preview/examples/CheckNameAvailability.json |
|
||||
| [checkNameAvailabilityWithoutLocationExecuteSample.js][checknameavailabilitywithoutlocationexecutesample] | Check the availability of name for server x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/ServiceOperations/preview/2021-12-01-preview/examples/CheckNameAvailability.json |
|
||||
| [checkVirtualNetworkSubnetUsageExecuteSample.js][checkvirtualnetworksubnetusageexecutesample] | Get virtual network subnet usage for a given vNet resource id. x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/ServiceOperations/preview/2021-12-01-preview/examples/CheckVirtualNetworkSubnetUsage.json |
|
||||
| [configurationsBatchUpdateSample.js][configurationsbatchupdatesample] | Update a list of configurations in a given server. x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/Configurations/preview/2021-12-01-preview/examples/ConfigurationsBatchUpdate.json |
|
||||
| [configurationsCreateOrUpdateSample.js][configurationscreateorupdatesample] | Updates a configuration of a server. x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/Configurations/preview/2021-12-01-preview/examples/ConfigurationCreateOrUpdate.json |
|
||||
| [configurationsGetSample.js][configurationsgetsample] | Gets information about a configuration of server. x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/Configurations/preview/2021-12-01-preview/examples/ConfigurationGet.json |
|
||||
| [configurationsListByServerSample.js][configurationslistbyserversample] | List all the configurations in a given server. x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/Configurations/preview/2021-12-01-preview/examples/ConfigurationsListByServer.json |
|
||||
| [configurationsUpdateSample.js][configurationsupdatesample] | Updates a configuration of a server. x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/Configurations/preview/2021-12-01-preview/examples/ConfigurationUpdate.json |
|
||||
| [databasesCreateOrUpdateSample.js][databasescreateorupdatesample] | Creates a new database or updates an existing database. x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/Databases/preview/2021-12-01-preview/examples/DatabaseCreate.json |
|
||||
| [databasesDeleteSample.js][databasesdeletesample] | Deletes a database. x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/Databases/preview/2021-12-01-preview/examples/DatabaseDelete.json |
|
||||
| [databasesGetSample.js][databasesgetsample] | Gets information about a database. x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/Databases/preview/2021-12-01-preview/examples/DatabaseGet.json |
|
||||
| [databasesListByServerSample.js][databaseslistbyserversample] | List all the databases in a given server. x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/Databases/preview/2021-12-01-preview/examples/DatabasesListByServer.json |
|
||||
| [firewallRulesCreateOrUpdateSample.js][firewallrulescreateorupdatesample] | Creates a new firewall rule or updates an existing firewall rule. x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/Firewall/preview/2021-12-01-preview/examples/FirewallRuleCreate.json |
|
||||
| [firewallRulesDeleteSample.js][firewallrulesdeletesample] | Deletes a firewall rule. x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/Firewall/preview/2021-12-01-preview/examples/FirewallRuleDelete.json |
|
||||
| [firewallRulesGetSample.js][firewallrulesgetsample] | Gets information about a server firewall rule. x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/Firewall/preview/2021-12-01-preview/examples/FirewallRuleGet.json |
|
||||
| [firewallRulesListByServerSample.js][firewallruleslistbyserversample] | List all the firewall rules in a given server. x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/Firewall/preview/2021-12-01-preview/examples/FirewallRulesListByServer.json |
|
||||
| [getPrivateDnsZoneSuffixExecuteSample.js][getprivatednszonesuffixexecutesample] | Get private DNS zone suffix in the cloud. x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/ServiceOperations/preview/2021-12-01-preview/examples/GetPrivateDnsZoneSuffix.json |
|
||||
| [locationBasedCapabilitiesListSample.js][locationbasedcapabilitieslistsample] | Get capabilities at specified location in a given subscription. x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/ServiceOperations/preview/2021-12-01-preview/examples/CapabilitiesByLocationList.json |
|
||||
| [logFilesListByServerSample.js][logfileslistbyserversample] | List all the server log files in a given server. x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/LogFiles/preview/2021-12-01-preview/examples/LogFilesListByServer.json |
|
||||
| [operationsListSample.js][operationslistsample] | Lists all of the available REST API operations. x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/ServiceOperations/preview/2021-12-01-preview/examples/OperationsList.json |
|
||||
| [replicasListByServerSample.js][replicaslistbyserversample] | List all the replicas for a given server. x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2022-09-30-preview/examples/ReplicasListByServer.json |
|
||||
| [serversCreateSample.js][serverscreatesample] | Creates a new server or updates an existing server. The update action will overwrite the existing server. x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2022-09-30-preview/examples/ServerCreate.json |
|
||||
| [serversDeleteSample.js][serversdeletesample] | Deletes a server. x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2022-09-30-preview/examples/ServerDelete.json |
|
||||
| [serversFailoverSample.js][serversfailoversample] | Manual failover a server. x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2022-09-30-preview/examples/ServerFailover.json |
|
||||
| [serversGetSample.js][serversgetsample] | Gets information about a server. x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2022-09-30-preview/examples/ServerGet.json |
|
||||
| [serversListByResourceGroupSample.js][serverslistbyresourcegroupsample] | List all the servers in a given resource group. x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2022-09-30-preview/examples/ServersListByResourceGroup.json |
|
||||
| [serversListSample.js][serverslistsample] | List all the servers in a given subscription. x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2022-09-30-preview/examples/ServersList.json |
|
||||
| [serversResetGtidSample.js][serversresetgtidsample] | Resets GTID on a server. x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2022-09-30-preview/examples/ServerResetGtid.json |
|
||||
| [serversRestartSample.js][serversrestartsample] | Restarts a server. x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2022-09-30-preview/examples/ServerRestart.json |
|
||||
| [serversStartSample.js][serversstartsample] | Starts a server. x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2022-09-30-preview/examples/ServerStart.json |
|
||||
| [serversStopSample.js][serversstopsample] | Stops a server. x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2022-09-30-preview/examples/ServerStop.json |
|
||||
| [serversUpdateSample.js][serversupdatesample] | Updates an existing server. The request body can contain one to many of the properties present in the normal server definition. x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2022-09-30-preview/examples/ServerUpdate.json |
|
||||
| **File Name** | **Description** |
|
||||
| --------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| [advancedThreatProtectionSettingsGetSample.js][advancedthreatprotectionsettingsgetsample] | Get a server's Advanced Threat Protection state x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/examples/AdvancedThreatProtectionSettingsGet.json |
|
||||
| [advancedThreatProtectionSettingsListSample.js][advancedthreatprotectionsettingslistsample] | Gets a list of server's Advanced Threat Protection states. x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/examples/AdvancedThreatProtectionSettingsList.json |
|
||||
| [advancedThreatProtectionSettingsUpdatePutSample.js][advancedthreatprotectionsettingsupdateputsample] | Updates a server's Advanced Threat Protection state. x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/examples/AdvancedThreatProtectionSettingsPutDisabled.json |
|
||||
| [advancedThreatProtectionSettingsUpdateSample.js][advancedthreatprotectionsettingsupdatesample] | Updates a server's Advanced Threat Protection state. x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/examples/AdvancedThreatProtectionSettingsPatchDisabled.json |
|
||||
| [azureAdAdministratorsCreateOrUpdateSample.js][azureadadministratorscreateorupdatesample] | Creates or updates an existing Azure Active Directory administrator. x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/AAD/preview/2023-06-01-preview/examples/AzureADAdministratorCreate.json |
|
||||
| [azureAdAdministratorsDeleteSample.js][azureadadministratorsdeletesample] | Deletes an Azure AD Administrator. x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/AAD/preview/2023-06-01-preview/examples/AzureADAdministratorDelete.json |
|
||||
| [azureAdAdministratorsGetSample.js][azureadadministratorsgetsample] | Gets information about an azure ad administrator. x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/AAD/preview/2023-06-01-preview/examples/AzureADAdministratorGet.json |
|
||||
| [azureAdAdministratorsListByServerSample.js][azureadadministratorslistbyserversample] | List all the AAD administrators in a given server. x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/AAD/preview/2023-06-01-preview/examples/AzureADAdministratorsListByServer.json |
|
||||
| [backupAndExportCreateSample.js][backupandexportcreatesample] | Exports the backup of the given server by creating a backup if not existing. x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/Backups/preview/2023-10-01-preview/examples/BackupAndExport.json |
|
||||
| [backupAndExportValidateBackupSample.js][backupandexportvalidatebackupsample] | Validates if backup can be performed for given server. x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/Backups/preview/2023-10-01-preview/examples/ValidateBackup.json |
|
||||
| [backupsGetSample.js][backupsgetsample] | List all the backups for a given server. x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/Backups/preview/2023-10-01-preview/examples/BackupGet.json |
|
||||
| [backupsListByServerSample.js][backupslistbyserversample] | List all the backups for a given server. x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/Backups/preview/2023-10-01-preview/examples/BackupsListByServer.json |
|
||||
| [backupsPutSample.js][backupsputsample] | Create backup for a given server with specified backup name. x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/Backups/preview/2023-10-01-preview/examples/BackupPut.json |
|
||||
| [checkNameAvailabilityExecuteSample.js][checknameavailabilityexecutesample] | Check the availability of name for server x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/ServiceOperations/stable/2023-12-30/examples/CheckNameAvailability.json |
|
||||
| [checkNameAvailabilityWithoutLocationExecuteSample.js][checknameavailabilitywithoutlocationexecutesample] | Check the availability of name for server x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/ServiceOperations/stable/2023-12-30/examples/CheckNameAvailability.json |
|
||||
| [checkVirtualNetworkSubnetUsageExecuteSample.js][checkvirtualnetworksubnetusageexecutesample] | Get virtual network subnet usage for a given vNet resource id. x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/ServiceOperations/stable/2023-12-30/examples/CheckVirtualNetworkSubnetUsage.json |
|
||||
| [configurationsBatchUpdateSample.js][configurationsbatchupdatesample] | Update a list of configurations in a given server. x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/Configurations/preview/2023-06-01-preview/examples/ConfigurationsBatchUpdate.json |
|
||||
| [configurationsCreateOrUpdateSample.js][configurationscreateorupdatesample] | Updates a configuration of a server. x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/Configurations/preview/2023-06-01-preview/examples/ConfigurationCreateOrUpdate.json |
|
||||
| [configurationsGetSample.js][configurationsgetsample] | Gets information about a configuration of server. x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/Configurations/preview/2023-06-01-preview/examples/ConfigurationGet.json |
|
||||
| [configurationsListByServerSample.js][configurationslistbyserversample] | List all the configurations in a given server. x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/Configurations/preview/2023-06-01-preview/examples/ConfigurationsListByServer.json |
|
||||
| [configurationsUpdateSample.js][configurationsupdatesample] | Updates a configuration of a server. x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/Configurations/preview/2023-06-01-preview/examples/ConfigurationUpdate.json |
|
||||
| [databasesCreateOrUpdateSample.js][databasescreateorupdatesample] | Creates a new database or updates an existing database. x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/Databases/preview/2023-06-01-preview/examples/DatabaseCreate.json |
|
||||
| [databasesDeleteSample.js][databasesdeletesample] | Deletes a database. x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/Databases/preview/2023-06-01-preview/examples/DatabaseDelete.json |
|
||||
| [databasesGetSample.js][databasesgetsample] | Gets information about a database. x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/Databases/preview/2023-06-01-preview/examples/DatabaseGet.json |
|
||||
| [databasesListByServerSample.js][databaseslistbyserversample] | List all the databases in a given server. x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/Databases/preview/2023-06-01-preview/examples/DatabasesListByServer.json |
|
||||
| [firewallRulesCreateOrUpdateSample.js][firewallrulescreateorupdatesample] | Creates a new firewall rule or updates an existing firewall rule. x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/Firewall/preview/2023-06-01-preview/examples/FirewallRuleCreate.json |
|
||||
| [firewallRulesDeleteSample.js][firewallrulesdeletesample] | Deletes a firewall rule. x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/Firewall/preview/2023-06-01-preview/examples/FirewallRuleDelete.json |
|
||||
| [firewallRulesGetSample.js][firewallrulesgetsample] | Gets information about a server firewall rule. x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/Firewall/preview/2023-06-01-preview/examples/FirewallRuleGet.json |
|
||||
| [firewallRulesListByServerSample.js][firewallruleslistbyserversample] | List all the firewall rules in a given server. x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/Firewall/preview/2023-06-01-preview/examples/FirewallRulesListByServer.json |
|
||||
| [getPrivateDnsZoneSuffixExecuteSample.js][getprivatednszonesuffixexecutesample] | Get private DNS zone suffix in the cloud. x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/ServiceOperations/stable/2023-12-30/examples/GetPrivateDnsZoneSuffix.json |
|
||||
| [locationBasedCapabilitiesListSample.js][locationbasedcapabilitieslistsample] | Get capabilities at specified location in a given subscription. x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/ServiceOperations/stable/2023-12-30/examples/CapabilitiesByLocationList.json |
|
||||
| [locationBasedCapabilitySetGetSample.js][locationbasedcapabilitysetgetsample] | Get capabilities at specified location in a given subscription. x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/ServiceOperations/stable/2023-12-30/examples/CapabilitySetByLocation.json |
|
||||
| [locationBasedCapabilitySetListSample.js][locationbasedcapabilitysetlistsample] | Get capabilities at specified location in a given subscription. x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/ServiceOperations/stable/2023-12-30/examples/CapabilitySetListByLocation.json |
|
||||
| [logFilesListByServerSample.js][logfileslistbyserversample] | List all the server log files in a given server. x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/LogFiles/preview/2023-06-01-preview/examples/LogFilesListByServer.json |
|
||||
| [longRunningBackupCreateSample.js][longrunningbackupcreatesample] | Create backup for a given server with specified backup name. x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/Backups/preview/2023-10-01-preview/examples/LongRunningBackup.json |
|
||||
| [longRunningBackupsGetSample.js][longrunningbackupsgetsample] | Get backup for a given server. x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/Backups/preview/2023-10-01-preview/examples/LongRunningBackupGet.json |
|
||||
| [longRunningBackupsListSample.js][longrunningbackupslistsample] | List all the backups for a given server. x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/Backups/preview/2023-10-01-preview/examples/LongRunningBackupsListByServer.json |
|
||||
| [maintenancesListSample.js][maintenanceslistsample] | List maintenances. x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/Maintenance/preview/2023-10-01-preview/examples/MaintenancesListByServer.json |
|
||||
| [maintenancesReadSample.js][maintenancesreadsample] | Read maintenance. x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/Maintenance/preview/2023-10-01-preview/examples/MaintenanceRead.json |
|
||||
| [maintenancesUpdateSample.js][maintenancesupdatesample] | Update maintenances. x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/Maintenance/preview/2023-10-01-preview/examples/MaintenanceUpdate.json |
|
||||
| [operationProgressGetSample.js][operationprogressgetsample] | Get the operation result for a long running operation. x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/ServiceOperations/stable/2023-12-30/examples/OperationProgress_Get_BackupAndExport.json |
|
||||
| [operationResultsGetSample.js][operationresultsgetsample] | Get the operation result for a long running operation. x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/ServiceOperations/stable/2023-12-30/examples/OperationResults_Get.json |
|
||||
| [operationsListSample.js][operationslistsample] | Lists all of the available REST API operations. x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/ServiceOperations/stable/2023-12-30/examples/OperationsList.json |
|
||||
| [replicasListByServerSample.js][replicaslistbyserversample] | List all the replicas for a given server. x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/examples/ReplicasListByServer.json |
|
||||
| [serversCreateSample.js][serverscreatesample] | Creates a new server or updates an existing server. The update action will overwrite the existing server. x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/examples/ServerCreate.json |
|
||||
| [serversDeleteSample.js][serversdeletesample] | Deletes a server. x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/examples/ServerDelete.json |
|
||||
| [serversFailoverSample.js][serversfailoversample] | Manual failover a server. x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/examples/ServerFailover.json |
|
||||
| [serversGetSample.js][serversgetsample] | Gets information about a server. x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/examples/ServerGet.json |
|
||||
| [serversListByResourceGroupSample.js][serverslistbyresourcegroupsample] | List all the servers in a given resource group. x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/examples/ServersListByResourceGroup.json |
|
||||
| [serversListSample.js][serverslistsample] | List all the servers in a given subscription. x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/examples/ServersList.json |
|
||||
| [serversMigrationCutoverMigrationSample.js][serversmigrationcutovermigrationsample] | Cutover migration for MySQL import, it will switch source elastic server DNS to flexible server. x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/examples/CutoverMigration.json |
|
||||
| [serversResetGtidSample.js][serversresetgtidsample] | Resets GTID on a server. x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/examples/ServerResetGtid.json |
|
||||
| [serversRestartSample.js][serversrestartsample] | Restarts a server. x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/examples/ServerRestart.json |
|
||||
| [serversStartSample.js][serversstartsample] | Starts a server. x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/examples/ServerStart.json |
|
||||
| [serversStopSample.js][serversstopsample] | Stops a server. x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/examples/ServerStop.json |
|
||||
| [serversUpdateSample.js][serversupdatesample] | Updates an existing server. The request body can contain one to many of the properties present in the normal server definition. x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/examples/ServerUpdate.json |
|
||||
| [serversValidateEstimateHighAvailabilitySample.js][serversvalidateestimatehighavailabilitysample] | Validate a deployment of high availability. x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/examples/ServerValidateEstimateHighAvailability.json |
|
||||
|
||||
## Prerequisites
|
||||
|
||||
|
@ -71,19 +87,23 @@ npm install
|
|||
3. Run whichever samples you like (note that some samples may require additional setup, see the table above):
|
||||
|
||||
```bash
|
||||
node azureAdAdministratorsCreateOrUpdateSample.js
|
||||
node advancedThreatProtectionSettingsGetSample.js
|
||||
```
|
||||
|
||||
Alternatively, run a single sample with the correct environment variables set (setting up the `.env` file is not required if you do this), for example (cross-platform):
|
||||
|
||||
```bash
|
||||
npx cross-env MYSQL_SUBSCRIPTION_ID="<mysql subscription id>" MYSQL_RESOURCE_GROUP="<mysql resource group>" node azureAdAdministratorsCreateOrUpdateSample.js
|
||||
npx cross-env MYSQL_SUBSCRIPTION_ID="<mysql subscription id>" MYSQL_RESOURCE_GROUP="<mysql resource group>" node advancedThreatProtectionSettingsGetSample.js
|
||||
```
|
||||
|
||||
## Next Steps
|
||||
|
||||
Take a look at our [API Documentation][apiref] for more information about the APIs that are available in the clients.
|
||||
|
||||
[advancedthreatprotectionsettingsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mysql/arm-mysql-flexible/samples/v4-beta/javascript/advancedThreatProtectionSettingsGetSample.js
|
||||
[advancedthreatprotectionsettingslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mysql/arm-mysql-flexible/samples/v4-beta/javascript/advancedThreatProtectionSettingsListSample.js
|
||||
[advancedthreatprotectionsettingsupdateputsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mysql/arm-mysql-flexible/samples/v4-beta/javascript/advancedThreatProtectionSettingsUpdatePutSample.js
|
||||
[advancedthreatprotectionsettingsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mysql/arm-mysql-flexible/samples/v4-beta/javascript/advancedThreatProtectionSettingsUpdateSample.js
|
||||
[azureadadministratorscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mysql/arm-mysql-flexible/samples/v4-beta/javascript/azureAdAdministratorsCreateOrUpdateSample.js
|
||||
[azureadadministratorsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mysql/arm-mysql-flexible/samples/v4-beta/javascript/azureAdAdministratorsDeleteSample.js
|
||||
[azureadadministratorsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mysql/arm-mysql-flexible/samples/v4-beta/javascript/azureAdAdministratorsGetSample.js
|
||||
|
@ -111,7 +131,17 @@ Take a look at our [API Documentation][apiref] for more information about the AP
|
|||
[firewallruleslistbyserversample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mysql/arm-mysql-flexible/samples/v4-beta/javascript/firewallRulesListByServerSample.js
|
||||
[getprivatednszonesuffixexecutesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mysql/arm-mysql-flexible/samples/v4-beta/javascript/getPrivateDnsZoneSuffixExecuteSample.js
|
||||
[locationbasedcapabilitieslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mysql/arm-mysql-flexible/samples/v4-beta/javascript/locationBasedCapabilitiesListSample.js
|
||||
[locationbasedcapabilitysetgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mysql/arm-mysql-flexible/samples/v4-beta/javascript/locationBasedCapabilitySetGetSample.js
|
||||
[locationbasedcapabilitysetlistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mysql/arm-mysql-flexible/samples/v4-beta/javascript/locationBasedCapabilitySetListSample.js
|
||||
[logfileslistbyserversample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mysql/arm-mysql-flexible/samples/v4-beta/javascript/logFilesListByServerSample.js
|
||||
[longrunningbackupcreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mysql/arm-mysql-flexible/samples/v4-beta/javascript/longRunningBackupCreateSample.js
|
||||
[longrunningbackupsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mysql/arm-mysql-flexible/samples/v4-beta/javascript/longRunningBackupsGetSample.js
|
||||
[longrunningbackupslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mysql/arm-mysql-flexible/samples/v4-beta/javascript/longRunningBackupsListSample.js
|
||||
[maintenanceslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mysql/arm-mysql-flexible/samples/v4-beta/javascript/maintenancesListSample.js
|
||||
[maintenancesreadsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mysql/arm-mysql-flexible/samples/v4-beta/javascript/maintenancesReadSample.js
|
||||
[maintenancesupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mysql/arm-mysql-flexible/samples/v4-beta/javascript/maintenancesUpdateSample.js
|
||||
[operationprogressgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mysql/arm-mysql-flexible/samples/v4-beta/javascript/operationProgressGetSample.js
|
||||
[operationresultsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mysql/arm-mysql-flexible/samples/v4-beta/javascript/operationResultsGetSample.js
|
||||
[operationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mysql/arm-mysql-flexible/samples/v4-beta/javascript/operationsListSample.js
|
||||
[replicaslistbyserversample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mysql/arm-mysql-flexible/samples/v4-beta/javascript/replicasListByServerSample.js
|
||||
[serverscreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mysql/arm-mysql-flexible/samples/v4-beta/javascript/serversCreateSample.js
|
||||
|
@ -120,11 +150,13 @@ Take a look at our [API Documentation][apiref] for more information about the AP
|
|||
[serversgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mysql/arm-mysql-flexible/samples/v4-beta/javascript/serversGetSample.js
|
||||
[serverslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mysql/arm-mysql-flexible/samples/v4-beta/javascript/serversListByResourceGroupSample.js
|
||||
[serverslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mysql/arm-mysql-flexible/samples/v4-beta/javascript/serversListSample.js
|
||||
[serversmigrationcutovermigrationsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mysql/arm-mysql-flexible/samples/v4-beta/javascript/serversMigrationCutoverMigrationSample.js
|
||||
[serversresetgtidsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mysql/arm-mysql-flexible/samples/v4-beta/javascript/serversResetGtidSample.js
|
||||
[serversrestartsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mysql/arm-mysql-flexible/samples/v4-beta/javascript/serversRestartSample.js
|
||||
[serversstartsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mysql/arm-mysql-flexible/samples/v4-beta/javascript/serversStartSample.js
|
||||
[serversstopsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mysql/arm-mysql-flexible/samples/v4-beta/javascript/serversStopSample.js
|
||||
[serversupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mysql/arm-mysql-flexible/samples/v4-beta/javascript/serversUpdateSample.js
|
||||
[serversvalidateestimatehighavailabilitysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/mysql/arm-mysql-flexible/samples/v4-beta/javascript/serversValidateEstimateHighAvailabilitySample.js
|
||||
[apiref]: https://docs.microsoft.com/javascript/api/@azure/arm-mysql-flexible?view=azure-node-preview
|
||||
[freesub]: https://azure.microsoft.com/free/
|
||||
[package]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/mysql/arm-mysql-flexible/README.md
|
||||
|
|
|
@ -0,0 +1,41 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
const { MySQLManagementFlexibleServerClient } = require("@azure/arm-mysql-flexible");
|
||||
const { DefaultAzureCredential } = require("@azure/identity");
|
||||
require("dotenv").config();
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Get a server's Advanced Threat Protection state
|
||||
*
|
||||
* @summary Get a server's Advanced Threat Protection state
|
||||
* x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/examples/AdvancedThreatProtectionSettingsGet.json
|
||||
*/
|
||||
async function getAServerAdvancedThreatProtectionSettings() {
|
||||
const subscriptionId =
|
||||
process.env["MYSQL_SUBSCRIPTION_ID"] || "00000000-1111-2222-3333-444444444444";
|
||||
const resourceGroupName = process.env["MYSQL_RESOURCE_GROUP"] || "threatprotection-6852";
|
||||
const serverName = "threatprotection-2080";
|
||||
const advancedThreatProtectionName = "Default";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new MySQLManagementFlexibleServerClient(credential, subscriptionId);
|
||||
const result = await client.advancedThreatProtectionSettings.get(
|
||||
resourceGroupName,
|
||||
serverName,
|
||||
advancedThreatProtectionName,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
async function main() {
|
||||
getAServerAdvancedThreatProtectionSettings();
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
|
@ -0,0 +1,42 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
const { MySQLManagementFlexibleServerClient } = require("@azure/arm-mysql-flexible");
|
||||
const { DefaultAzureCredential } = require("@azure/identity");
|
||||
require("dotenv").config();
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Gets a list of server's Advanced Threat Protection states.
|
||||
*
|
||||
* @summary Gets a list of server's Advanced Threat Protection states.
|
||||
* x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/examples/AdvancedThreatProtectionSettingsList.json
|
||||
*/
|
||||
async function getListOfServerAdvancedThreatProtectionSettings() {
|
||||
const subscriptionId =
|
||||
process.env["MYSQL_SUBSCRIPTION_ID"] || "00000000-1111-2222-3333-444444444444";
|
||||
const resourceGroupName = process.env["MYSQL_RESOURCE_GROUP"] || "threatprotection-6852";
|
||||
const serverName = "threatprotection-2080";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new MySQLManagementFlexibleServerClient(credential, subscriptionId);
|
||||
const resArray = new Array();
|
||||
for await (let item of client.advancedThreatProtectionSettings.list(
|
||||
resourceGroupName,
|
||||
serverName,
|
||||
)) {
|
||||
resArray.push(item);
|
||||
}
|
||||
console.log(resArray);
|
||||
}
|
||||
|
||||
async function main() {
|
||||
getListOfServerAdvancedThreatProtectionSettings();
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
|
@ -0,0 +1,68 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
const { MySQLManagementFlexibleServerClient } = require("@azure/arm-mysql-flexible");
|
||||
const { DefaultAzureCredential } = require("@azure/identity");
|
||||
require("dotenv").config();
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Updates a server's Advanced Threat Protection state.
|
||||
*
|
||||
* @summary Updates a server's Advanced Threat Protection state.
|
||||
* x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/examples/AdvancedThreatProtectionSettingsPutDisabled.json
|
||||
*/
|
||||
async function disableAServerAdvancedThreatProtectionSettingsWithAllParametersUsingPut() {
|
||||
const subscriptionId =
|
||||
process.env["MYSQL_SUBSCRIPTION_ID"] || "00000000-1111-2222-3333-444444444444";
|
||||
const resourceGroupName = process.env["MYSQL_RESOURCE_GROUP"] || "threatprotection-4799";
|
||||
const serverName = "threatprotection-6440";
|
||||
const advancedThreatProtectionName = "Default";
|
||||
const parameters = { state: "Disabled" };
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new MySQLManagementFlexibleServerClient(credential, subscriptionId);
|
||||
const result = await client.advancedThreatProtectionSettings.beginUpdatePutAndWait(
|
||||
resourceGroupName,
|
||||
serverName,
|
||||
advancedThreatProtectionName,
|
||||
parameters,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Updates a server's Advanced Threat Protection state.
|
||||
*
|
||||
* @summary Updates a server's Advanced Threat Protection state.
|
||||
* x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/examples/AdvancedThreatProtectionSettingsPutEnabled.json
|
||||
*/
|
||||
async function enableAServerAdvancedThreatProtectionSettingsUsingPut() {
|
||||
const subscriptionId =
|
||||
process.env["MYSQL_SUBSCRIPTION_ID"] || "00000000-1111-2222-3333-444444444444";
|
||||
const resourceGroupName = process.env["MYSQL_RESOURCE_GROUP"] || "threatprotection-4799";
|
||||
const serverName = "threatprotection-6440";
|
||||
const advancedThreatProtectionName = "Default";
|
||||
const parameters = { state: "Enabled" };
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new MySQLManagementFlexibleServerClient(credential, subscriptionId);
|
||||
const result = await client.advancedThreatProtectionSettings.beginUpdatePutAndWait(
|
||||
resourceGroupName,
|
||||
serverName,
|
||||
advancedThreatProtectionName,
|
||||
parameters,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
async function main() {
|
||||
disableAServerAdvancedThreatProtectionSettingsWithAllParametersUsingPut();
|
||||
enableAServerAdvancedThreatProtectionSettingsUsingPut();
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
|
@ -0,0 +1,68 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
const { MySQLManagementFlexibleServerClient } = require("@azure/arm-mysql-flexible");
|
||||
const { DefaultAzureCredential } = require("@azure/identity");
|
||||
require("dotenv").config();
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Updates a server's Advanced Threat Protection state.
|
||||
*
|
||||
* @summary Updates a server's Advanced Threat Protection state.
|
||||
* x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/examples/AdvancedThreatProtectionSettingsPatchDisabled.json
|
||||
*/
|
||||
async function disableAServerAdvancedThreatProtectionSettingsWithAllParameters() {
|
||||
const subscriptionId =
|
||||
process.env["MYSQL_SUBSCRIPTION_ID"] || "00000000-1111-2222-3333-444444444444";
|
||||
const resourceGroupName = process.env["MYSQL_RESOURCE_GROUP"] || "threatprotection-4799";
|
||||
const serverName = "threatprotection-6440";
|
||||
const advancedThreatProtectionName = "Default";
|
||||
const parameters = { state: "Disabled" };
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new MySQLManagementFlexibleServerClient(credential, subscriptionId);
|
||||
const result = await client.advancedThreatProtectionSettings.beginUpdateAndWait(
|
||||
resourceGroupName,
|
||||
serverName,
|
||||
advancedThreatProtectionName,
|
||||
parameters,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Updates a server's Advanced Threat Protection state.
|
||||
*
|
||||
* @summary Updates a server's Advanced Threat Protection state.
|
||||
* x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/examples/AdvancedThreatProtectionSettingsPatchEnabled.json
|
||||
*/
|
||||
async function enableAServerAdvancedThreatProtectionSettings() {
|
||||
const subscriptionId =
|
||||
process.env["MYSQL_SUBSCRIPTION_ID"] || "00000000-1111-2222-3333-444444444444";
|
||||
const resourceGroupName = process.env["MYSQL_RESOURCE_GROUP"] || "threatprotection-4799";
|
||||
const serverName = "threatprotection-6440";
|
||||
const advancedThreatProtectionName = "Default";
|
||||
const parameters = { state: "Enabled" };
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new MySQLManagementFlexibleServerClient(credential, subscriptionId);
|
||||
const result = await client.advancedThreatProtectionSettings.beginUpdateAndWait(
|
||||
resourceGroupName,
|
||||
serverName,
|
||||
advancedThreatProtectionName,
|
||||
parameters,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
async function main() {
|
||||
disableAServerAdvancedThreatProtectionSettingsWithAllParameters();
|
||||
enableAServerAdvancedThreatProtectionSettings();
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
|
@ -16,7 +16,7 @@ require("dotenv").config();
|
|||
* This sample demonstrates how to Creates or updates an existing Azure Active Directory administrator.
|
||||
*
|
||||
* @summary Creates or updates an existing Azure Active Directory administrator.
|
||||
* x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/AAD/preview/2021-12-01-preview/examples/AzureADAdministratorCreate.json
|
||||
* x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/AAD/preview/2023-06-01-preview/examples/AzureADAdministratorCreate.json
|
||||
*/
|
||||
async function createAnAzureAdAdministrator() {
|
||||
const subscriptionId =
|
||||
|
@ -38,7 +38,7 @@ async function createAnAzureAdAdministrator() {
|
|||
resourceGroupName,
|
||||
serverName,
|
||||
administratorName,
|
||||
parameters
|
||||
parameters,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
|
|
@ -16,7 +16,7 @@ require("dotenv").config();
|
|||
* This sample demonstrates how to Deletes an Azure AD Administrator.
|
||||
*
|
||||
* @summary Deletes an Azure AD Administrator.
|
||||
* x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/AAD/preview/2021-12-01-preview/examples/AzureADAdministratorDelete.json
|
||||
* x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/AAD/preview/2023-06-01-preview/examples/AzureADAdministratorDelete.json
|
||||
*/
|
||||
async function deleteAnAzureAdAdministrator() {
|
||||
const subscriptionId =
|
||||
|
@ -29,7 +29,7 @@ async function deleteAnAzureAdAdministrator() {
|
|||
const result = await client.azureADAdministrators.beginDeleteAndWait(
|
||||
resourceGroupName,
|
||||
serverName,
|
||||
administratorName
|
||||
administratorName,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
|
|
@ -16,7 +16,7 @@ require("dotenv").config();
|
|||
* This sample demonstrates how to Gets information about an azure ad administrator.
|
||||
*
|
||||
* @summary Gets information about an azure ad administrator.
|
||||
* x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/AAD/preview/2021-12-01-preview/examples/AzureADAdministratorGet.json
|
||||
* x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/AAD/preview/2023-06-01-preview/examples/AzureADAdministratorGet.json
|
||||
*/
|
||||
async function getAnAzureAdAdministrator() {
|
||||
const subscriptionId =
|
||||
|
@ -29,7 +29,7 @@ async function getAnAzureAdAdministrator() {
|
|||
const result = await client.azureADAdministrators.get(
|
||||
resourceGroupName,
|
||||
serverName,
|
||||
administratorName
|
||||
administratorName,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
|
|
@ -16,7 +16,7 @@ require("dotenv").config();
|
|||
* This sample demonstrates how to List all the AAD administrators in a given server.
|
||||
*
|
||||
* @summary List all the AAD administrators in a given server.
|
||||
* x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/AAD/preview/2021-12-01-preview/examples/AzureADAdministratorsListByServer.json
|
||||
* x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/AAD/preview/2023-06-01-preview/examples/AzureADAdministratorsListByServer.json
|
||||
*/
|
||||
async function listAzureAdAdministratorsInAServer() {
|
||||
const subscriptionId =
|
||||
|
|
|
@ -16,7 +16,7 @@ require("dotenv").config();
|
|||
* This sample demonstrates how to Exports the backup of the given server by creating a backup if not existing.
|
||||
*
|
||||
* @summary Exports the backup of the given server by creating a backup if not existing.
|
||||
* x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/Backups/preview/2022-09-30-preview/examples/BackupAndExport.json
|
||||
* x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/Backups/preview/2023-10-01-preview/examples/BackupAndExport.json
|
||||
*/
|
||||
async function createAndExportBackup() {
|
||||
const subscriptionId =
|
||||
|
@ -35,7 +35,7 @@ async function createAndExportBackup() {
|
|||
const result = await client.backupAndExport.beginCreateAndWait(
|
||||
resourceGroupName,
|
||||
serverName,
|
||||
parameters
|
||||
parameters,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
|
|
@ -16,7 +16,7 @@ require("dotenv").config();
|
|||
* This sample demonstrates how to Validates if backup can be performed for given server.
|
||||
*
|
||||
* @summary Validates if backup can be performed for given server.
|
||||
* x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/Backups/preview/2022-09-30-preview/examples/ValidateBackup.json
|
||||
* x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/Backups/preview/2023-10-01-preview/examples/ValidateBackup.json
|
||||
*/
|
||||
async function validateBackup() {
|
||||
const subscriptionId =
|
||||
|
|
|
@ -16,7 +16,7 @@ require("dotenv").config();
|
|||
* This sample demonstrates how to List all the backups for a given server.
|
||||
*
|
||||
* @summary List all the backups for a given server.
|
||||
* x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/Backups/preview/2022-09-30-preview/examples/BackupGet.json
|
||||
* x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/Backups/preview/2023-10-01-preview/examples/BackupGet.json
|
||||
*/
|
||||
async function getABackupForAServer() {
|
||||
const subscriptionId =
|
||||
|
|
|
@ -16,7 +16,7 @@ require("dotenv").config();
|
|||
* This sample demonstrates how to List all the backups for a given server.
|
||||
*
|
||||
* @summary List all the backups for a given server.
|
||||
* x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/Backups/preview/2022-09-30-preview/examples/BackupsListByServer.json
|
||||
* x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/Backups/preview/2023-10-01-preview/examples/BackupsListByServer.json
|
||||
*/
|
||||
async function listBackupsForAServer() {
|
||||
const subscriptionId =
|
||||
|
|
|
@ -16,7 +16,7 @@ require("dotenv").config();
|
|||
* This sample demonstrates how to Create backup for a given server with specified backup name.
|
||||
*
|
||||
* @summary Create backup for a given server with specified backup name.
|
||||
* x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/Backups/preview/2022-09-30-preview/examples/BackupPut.json
|
||||
* x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/Backups/preview/2023-10-01-preview/examples/BackupPut.json
|
||||
*/
|
||||
async function createBackupForAServer() {
|
||||
const subscriptionId =
|
||||
|
|
|
@ -16,7 +16,7 @@ require("dotenv").config();
|
|||
* This sample demonstrates how to Check the availability of name for server
|
||||
*
|
||||
* @summary Check the availability of name for server
|
||||
* x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/ServiceOperations/preview/2021-12-01-preview/examples/CheckNameAvailability.json
|
||||
* x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/ServiceOperations/stable/2023-12-30/examples/CheckNameAvailability.json
|
||||
*/
|
||||
async function checkNameAvailability() {
|
||||
const subscriptionId =
|
||||
|
|
|
@ -16,7 +16,7 @@ require("dotenv").config();
|
|||
* This sample demonstrates how to Check the availability of name for server
|
||||
*
|
||||
* @summary Check the availability of name for server
|
||||
* x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/ServiceOperations/preview/2021-12-01-preview/examples/CheckNameAvailability.json
|
||||
* x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/ServiceOperations/stable/2023-12-30/examples/CheckNameAvailability.json
|
||||
*/
|
||||
async function checkNameAvailability() {
|
||||
const subscriptionId =
|
||||
|
|
|
@ -16,7 +16,7 @@ require("dotenv").config();
|
|||
* This sample demonstrates how to Get virtual network subnet usage for a given vNet resource id.
|
||||
*
|
||||
* @summary Get virtual network subnet usage for a given vNet resource id.
|
||||
* x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/ServiceOperations/preview/2021-12-01-preview/examples/CheckVirtualNetworkSubnetUsage.json
|
||||
* x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/ServiceOperations/stable/2023-12-30/examples/CheckVirtualNetworkSubnetUsage.json
|
||||
*/
|
||||
async function checkVirtualNetworkSubnetUsage() {
|
||||
const subscriptionId =
|
||||
|
|
|
@ -16,7 +16,7 @@ require("dotenv").config();
|
|||
* This sample demonstrates how to Update a list of configurations in a given server.
|
||||
*
|
||||
* @summary Update a list of configurations in a given server.
|
||||
* x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/Configurations/preview/2021-12-01-preview/examples/ConfigurationsBatchUpdate.json
|
||||
* x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/Configurations/preview/2023-06-01-preview/examples/ConfigurationsBatchUpdate.json
|
||||
*/
|
||||
async function configurationList() {
|
||||
const subscriptionId =
|
||||
|
@ -35,7 +35,7 @@ async function configurationList() {
|
|||
const result = await client.configurations.beginBatchUpdateAndWait(
|
||||
resourceGroupName,
|
||||
serverName,
|
||||
parameters
|
||||
parameters,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
|
|
@ -16,7 +16,7 @@ require("dotenv").config();
|
|||
* This sample demonstrates how to Updates a configuration of a server.
|
||||
*
|
||||
* @summary Updates a configuration of a server.
|
||||
* x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/Configurations/preview/2021-12-01-preview/examples/ConfigurationCreateOrUpdate.json
|
||||
* x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/Configurations/preview/2023-06-01-preview/examples/ConfigurationCreateOrUpdate.json
|
||||
*/
|
||||
async function configurationCreateOrUpdate() {
|
||||
const subscriptionId =
|
||||
|
@ -31,7 +31,7 @@ async function configurationCreateOrUpdate() {
|
|||
resourceGroupName,
|
||||
serverName,
|
||||
configurationName,
|
||||
parameters
|
||||
parameters,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
|
|
@ -16,7 +16,7 @@ require("dotenv").config();
|
|||
* This sample demonstrates how to Gets information about a configuration of server.
|
||||
*
|
||||
* @summary Gets information about a configuration of server.
|
||||
* x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/Configurations/preview/2021-12-01-preview/examples/ConfigurationGet.json
|
||||
* x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/Configurations/preview/2023-06-01-preview/examples/ConfigurationGet.json
|
||||
*/
|
||||
async function getAConfiguration() {
|
||||
const subscriptionId =
|
||||
|
|
|
@ -16,7 +16,7 @@ require("dotenv").config();
|
|||
* This sample demonstrates how to List all the configurations in a given server.
|
||||
*
|
||||
* @summary List all the configurations in a given server.
|
||||
* x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/Configurations/preview/2021-12-01-preview/examples/ConfigurationsListByServer.json
|
||||
* x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/Configurations/preview/2023-06-01-preview/examples/ConfigurationsListByServer.json
|
||||
*/
|
||||
async function listAllConfigurationsForAServer() {
|
||||
const subscriptionId =
|
||||
|
@ -32,7 +32,7 @@ async function listAllConfigurationsForAServer() {
|
|||
for await (let item of client.configurations.listByServer(
|
||||
resourceGroupName,
|
||||
serverName,
|
||||
options
|
||||
options,
|
||||
)) {
|
||||
resArray.push(item);
|
||||
}
|
||||
|
|
|
@ -16,7 +16,7 @@ require("dotenv").config();
|
|||
* This sample demonstrates how to Updates a configuration of a server.
|
||||
*
|
||||
* @summary Updates a configuration of a server.
|
||||
* x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/Configurations/preview/2021-12-01-preview/examples/ConfigurationUpdate.json
|
||||
* x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/Configurations/preview/2023-06-01-preview/examples/ConfigurationUpdate.json
|
||||
*/
|
||||
async function updateAUserConfiguration() {
|
||||
const subscriptionId =
|
||||
|
@ -31,7 +31,7 @@ async function updateAUserConfiguration() {
|
|||
resourceGroupName,
|
||||
serverName,
|
||||
configurationName,
|
||||
parameters
|
||||
parameters,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
|
|
@ -16,7 +16,7 @@ require("dotenv").config();
|
|||
* This sample demonstrates how to Creates a new database or updates an existing database.
|
||||
*
|
||||
* @summary Creates a new database or updates an existing database.
|
||||
* x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/Databases/preview/2021-12-01-preview/examples/DatabaseCreate.json
|
||||
* x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/Databases/preview/2023-06-01-preview/examples/DatabaseCreate.json
|
||||
*/
|
||||
async function createADatabase() {
|
||||
const subscriptionId =
|
||||
|
@ -34,7 +34,7 @@ async function createADatabase() {
|
|||
resourceGroupName,
|
||||
serverName,
|
||||
databaseName,
|
||||
parameters
|
||||
parameters,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
|
|
@ -16,7 +16,7 @@ require("dotenv").config();
|
|||
* This sample demonstrates how to Deletes a database.
|
||||
*
|
||||
* @summary Deletes a database.
|
||||
* x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/Databases/preview/2021-12-01-preview/examples/DatabaseDelete.json
|
||||
* x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/Databases/preview/2023-06-01-preview/examples/DatabaseDelete.json
|
||||
*/
|
||||
async function deleteADatabase() {
|
||||
const subscriptionId =
|
||||
|
@ -29,7 +29,7 @@ async function deleteADatabase() {
|
|||
const result = await client.databases.beginDeleteAndWait(
|
||||
resourceGroupName,
|
||||
serverName,
|
||||
databaseName
|
||||
databaseName,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
|
|
@ -16,7 +16,7 @@ require("dotenv").config();
|
|||
* This sample demonstrates how to Gets information about a database.
|
||||
*
|
||||
* @summary Gets information about a database.
|
||||
* x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/Databases/preview/2021-12-01-preview/examples/DatabaseGet.json
|
||||
* x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/Databases/preview/2023-06-01-preview/examples/DatabaseGet.json
|
||||
*/
|
||||
async function getADatabase() {
|
||||
const subscriptionId =
|
||||
|
|
|
@ -16,7 +16,7 @@ require("dotenv").config();
|
|||
* This sample demonstrates how to List all the databases in a given server.
|
||||
*
|
||||
* @summary List all the databases in a given server.
|
||||
* x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/Databases/preview/2021-12-01-preview/examples/DatabasesListByServer.json
|
||||
* x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/Databases/preview/2023-06-01-preview/examples/DatabasesListByServer.json
|
||||
*/
|
||||
async function listDatabasesInAServer() {
|
||||
const subscriptionId =
|
||||
|
|
|
@ -16,7 +16,7 @@ require("dotenv").config();
|
|||
* This sample demonstrates how to Creates a new firewall rule or updates an existing firewall rule.
|
||||
*
|
||||
* @summary Creates a new firewall rule or updates an existing firewall rule.
|
||||
* x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/Firewall/preview/2021-12-01-preview/examples/FirewallRuleCreate.json
|
||||
* x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/Firewall/preview/2023-06-01-preview/examples/FirewallRuleCreate.json
|
||||
*/
|
||||
async function createAFirewallRule() {
|
||||
const subscriptionId =
|
||||
|
@ -34,7 +34,7 @@ async function createAFirewallRule() {
|
|||
resourceGroupName,
|
||||
serverName,
|
||||
firewallRuleName,
|
||||
parameters
|
||||
parameters,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
|
|
@ -16,7 +16,7 @@ require("dotenv").config();
|
|||
* This sample demonstrates how to Deletes a firewall rule.
|
||||
*
|
||||
* @summary Deletes a firewall rule.
|
||||
* x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/Firewall/preview/2021-12-01-preview/examples/FirewallRuleDelete.json
|
||||
* x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/Firewall/preview/2023-06-01-preview/examples/FirewallRuleDelete.json
|
||||
*/
|
||||
async function deleteAFirewallRule() {
|
||||
const subscriptionId =
|
||||
|
@ -29,7 +29,7 @@ async function deleteAFirewallRule() {
|
|||
const result = await client.firewallRules.beginDeleteAndWait(
|
||||
resourceGroupName,
|
||||
serverName,
|
||||
firewallRuleName
|
||||
firewallRuleName,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
|
|
@ -16,7 +16,7 @@ require("dotenv").config();
|
|||
* This sample demonstrates how to Gets information about a server firewall rule.
|
||||
*
|
||||
* @summary Gets information about a server firewall rule.
|
||||
* x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/Firewall/preview/2021-12-01-preview/examples/FirewallRuleGet.json
|
||||
* x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/Firewall/preview/2023-06-01-preview/examples/FirewallRuleGet.json
|
||||
*/
|
||||
async function getAFirewallRule() {
|
||||
const subscriptionId =
|
||||
|
|
|
@ -16,7 +16,7 @@ require("dotenv").config();
|
|||
* This sample demonstrates how to List all the firewall rules in a given server.
|
||||
*
|
||||
* @summary List all the firewall rules in a given server.
|
||||
* x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/Firewall/preview/2021-12-01-preview/examples/FirewallRulesListByServer.json
|
||||
* x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/Firewall/preview/2023-06-01-preview/examples/FirewallRulesListByServer.json
|
||||
*/
|
||||
async function listAllFirewallRulesInAServer() {
|
||||
const subscriptionId =
|
||||
|
|
|
@ -16,13 +16,11 @@ require("dotenv").config();
|
|||
* This sample demonstrates how to Get private DNS zone suffix in the cloud.
|
||||
*
|
||||
* @summary Get private DNS zone suffix in the cloud.
|
||||
* x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/ServiceOperations/preview/2021-12-01-preview/examples/GetPrivateDnsZoneSuffix.json
|
||||
* x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/ServiceOperations/stable/2023-12-30/examples/GetPrivateDnsZoneSuffix.json
|
||||
*/
|
||||
async function getPrivateDnsZoneSuffix() {
|
||||
const subscriptionId =
|
||||
process.env["MYSQL_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new MySQLManagementFlexibleServerClient(credential, subscriptionId);
|
||||
const client = new MySQLManagementFlexibleServerClient(credential);
|
||||
const result = await client.getPrivateDnsZoneSuffix.execute();
|
||||
console.log(result);
|
||||
}
|
||||
|
|
|
@ -16,7 +16,7 @@ require("dotenv").config();
|
|||
* This sample demonstrates how to Get capabilities at specified location in a given subscription.
|
||||
*
|
||||
* @summary Get capabilities at specified location in a given subscription.
|
||||
* x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/ServiceOperations/preview/2021-12-01-preview/examples/CapabilitiesByLocationList.json
|
||||
* x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/ServiceOperations/stable/2023-12-30/examples/CapabilitiesByLocationList.json
|
||||
*/
|
||||
async function capabilitiesList() {
|
||||
const subscriptionId =
|
||||
|
|
|
@ -0,0 +1,36 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
const { MySQLManagementFlexibleServerClient } = require("@azure/arm-mysql-flexible");
|
||||
const { DefaultAzureCredential } = require("@azure/identity");
|
||||
require("dotenv").config();
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Get capabilities at specified location in a given subscription.
|
||||
*
|
||||
* @summary Get capabilities at specified location in a given subscription.
|
||||
* x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/ServiceOperations/stable/2023-12-30/examples/CapabilitySetByLocation.json
|
||||
*/
|
||||
async function capabilityResult() {
|
||||
const subscriptionId =
|
||||
process.env["MYSQL_SUBSCRIPTION_ID"] || "ffffffff-ffff-ffff-ffff-ffffffffffff";
|
||||
const locationName = "WestUS";
|
||||
const capabilitySetName = "default";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new MySQLManagementFlexibleServerClient(credential, subscriptionId);
|
||||
const result = await client.locationBasedCapabilitySet.get(locationName, capabilitySetName);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
async function main() {
|
||||
capabilityResult();
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
|
@ -0,0 +1,38 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
const { MySQLManagementFlexibleServerClient } = require("@azure/arm-mysql-flexible");
|
||||
const { DefaultAzureCredential } = require("@azure/identity");
|
||||
require("dotenv").config();
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Get capabilities at specified location in a given subscription.
|
||||
*
|
||||
* @summary Get capabilities at specified location in a given subscription.
|
||||
* x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/ServiceOperations/stable/2023-12-30/examples/CapabilitySetListByLocation.json
|
||||
*/
|
||||
async function capabilitySetsResult() {
|
||||
const subscriptionId =
|
||||
process.env["MYSQL_SUBSCRIPTION_ID"] || "ffffffff-ffff-ffff-ffff-ffffffffffff";
|
||||
const locationName = "WestUS";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new MySQLManagementFlexibleServerClient(credential, subscriptionId);
|
||||
const resArray = new Array();
|
||||
for await (let item of client.locationBasedCapabilitySet.list(locationName)) {
|
||||
resArray.push(item);
|
||||
}
|
||||
console.log(resArray);
|
||||
}
|
||||
|
||||
async function main() {
|
||||
capabilitySetsResult();
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
|
@ -16,7 +16,7 @@ require("dotenv").config();
|
|||
* This sample demonstrates how to List all the server log files in a given server.
|
||||
*
|
||||
* @summary List all the server log files in a given server.
|
||||
* x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/LogFiles/preview/2021-12-01-preview/examples/LogFilesListByServer.json
|
||||
* x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/LogFiles/preview/2023-06-01-preview/examples/LogFilesListByServer.json
|
||||
*/
|
||||
async function listAllServerLogFilesForAServer() {
|
||||
const subscriptionId =
|
||||
|
|
|
@ -0,0 +1,41 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
const { MySQLManagementFlexibleServerClient } = require("@azure/arm-mysql-flexible");
|
||||
const { DefaultAzureCredential } = require("@azure/identity");
|
||||
require("dotenv").config();
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Create backup for a given server with specified backup name.
|
||||
*
|
||||
* @summary Create backup for a given server with specified backup name.
|
||||
* x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/Backups/preview/2023-10-01-preview/examples/LongRunningBackup.json
|
||||
*/
|
||||
async function createBackupForAServer() {
|
||||
const subscriptionId =
|
||||
process.env["MYSQL_SUBSCRIPTION_ID"] || "ffffffff-ffff-ffff-ffff-ffffffffffff";
|
||||
const resourceGroupName = process.env["MYSQL_RESOURCE_GROUP"] || "TestGroup";
|
||||
const serverName = "mysqltestserver";
|
||||
const backupName = "testback";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new MySQLManagementFlexibleServerClient(credential, subscriptionId);
|
||||
const result = await client.longRunningBackup.beginCreateAndWait(
|
||||
resourceGroupName,
|
||||
serverName,
|
||||
backupName,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
async function main() {
|
||||
createBackupForAServer();
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше
Загрузка…
Ссылка в новой задаче