From de34ac3b6399561f201d2c0baccb39f9243b40dd Mon Sep 17 00:00:00 2001 From: SDK Automation Date: Tue, 8 Sep 2020 08:57:02 +0000 Subject: [PATCH] Generated from fed73dd683d9b4bd4a18e4816ad526c73d85447d Change LocationBasedCapabilities_List response body --- sdk/mysql/arm-mysql/LICENSE.txt | 2 +- sdk/mysql/arm-mysql/README.md | 5 +- sdk/mysql/arm-mysql/package.json | 14 +- sdk/mysql/arm-mysql/rollup.config.js | 2 +- .../arm-mysql/src/models/advisorsMappers.ts | 43 + .../src/models/configurationsMappers.ts | 20 +- .../arm-mysql/src/models/databasesMappers.ts | 20 +- .../src/models/firewallRulesMappers.ts | 20 +- sdk/mysql/arm-mysql/src/models/index.ts | 1903 +++++++++++++++-- ...dedActionSessionsOperationStatusMappers.ts | 13 + ...dRecommendedActionSessionsResultMappers.ts | 43 + .../arm-mysql/src/models/logFilesMappers.ts | 20 +- sdk/mysql/arm-mysql/src/models/mappers.ts | 1303 ++++++++++- sdk/mysql/arm-mysql/src/models/parameters.ts | 163 +- .../privateEndpointConnectionsMappers.ts | 46 + .../src/models/privateLinkResourcesMappers.ts | 45 + .../arm-mysql/src/models/queryTextsMappers.ts | 43 + .../src/models/recommendedActionsMappers.ts | 43 + .../arm-mysql/src/models/replicasMappers.ts | 20 +- .../src/models/serverAdministratorsMappers.ts | 45 + .../arm-mysql/src/models/serverKeysMappers.ts | 45 + .../serverSecurityAlertPoliciesMappers.ts | 20 +- .../arm-mysql/src/models/serversMappers.ts | 21 +- .../src/models/topQueryStatisticsMappers.ts | 44 + .../src/models/virtualNetworkRulesMappers.ts | 20 +- .../src/models/waitStatisticsMappers.ts | 44 + .../arm-mysql/src/mySQLManagementClient.ts | 92 +- .../src/mySQLManagementClientContext.ts | 4 +- .../arm-mysql/src/operations/advisors.ts | 198 ++ .../src/operations/checkNameAvailability.ts | 2 +- .../src/operations/configurations.ts | 30 +- .../arm-mysql/src/operations/databases.ts | 38 +- .../arm-mysql/src/operations/firewallRules.ts | 38 +- sdk/mysql/arm-mysql/src/operations/index.ts | 13 +- .../locationBasedPerformanceTier.ts | 2 +- ...ecommendedActionSessionsOperationStatus.ts | 87 + ...ionBasedRecommendedActionSessionsResult.ts | 142 ++ .../arm-mysql/src/operations/logFiles.ts | 11 +- .../arm-mysql/src/operations/operations.ts | 2 +- .../operations/privateEndpointConnections.ts | 399 ++++ .../src/operations/privateLinkResources.ts | 198 ++ .../arm-mysql/src/operations/queryTexts.ts | 203 ++ .../src/operations/recommendedActions.ts | 209 ++ .../arm-mysql/src/operations/replicas.ts | 11 +- .../src/operations/serverAdministrators.ts | 270 +++ .../arm-mysql/src/operations/serverKeys.ts | 330 +++ .../operations/serverSecurityAlertPolicies.ts | 19 +- sdk/mysql/arm-mysql/src/operations/servers.ts | 228 +- .../src/operations/topQueryStatistics.ts | 209 ++ .../src/operations/virtualNetworkRules.ts | 38 +- .../src/operations/waitStatistics.ts | 209 ++ sdk/mysql/arm-mysql/tsconfig.json | 2 +- 52 files changed, 6561 insertions(+), 430 deletions(-) create mode 100644 sdk/mysql/arm-mysql/src/models/advisorsMappers.ts create mode 100644 sdk/mysql/arm-mysql/src/models/locationBasedRecommendedActionSessionsOperationStatusMappers.ts create mode 100644 sdk/mysql/arm-mysql/src/models/locationBasedRecommendedActionSessionsResultMappers.ts create mode 100644 sdk/mysql/arm-mysql/src/models/privateEndpointConnectionsMappers.ts create mode 100644 sdk/mysql/arm-mysql/src/models/privateLinkResourcesMappers.ts create mode 100644 sdk/mysql/arm-mysql/src/models/queryTextsMappers.ts create mode 100644 sdk/mysql/arm-mysql/src/models/recommendedActionsMappers.ts create mode 100644 sdk/mysql/arm-mysql/src/models/serverAdministratorsMappers.ts create mode 100644 sdk/mysql/arm-mysql/src/models/serverKeysMappers.ts create mode 100644 sdk/mysql/arm-mysql/src/models/topQueryStatisticsMappers.ts create mode 100644 sdk/mysql/arm-mysql/src/models/waitStatisticsMappers.ts create mode 100644 sdk/mysql/arm-mysql/src/operations/advisors.ts create mode 100644 sdk/mysql/arm-mysql/src/operations/locationBasedRecommendedActionSessionsOperationStatus.ts create mode 100644 sdk/mysql/arm-mysql/src/operations/locationBasedRecommendedActionSessionsResult.ts create mode 100644 sdk/mysql/arm-mysql/src/operations/privateEndpointConnections.ts create mode 100644 sdk/mysql/arm-mysql/src/operations/privateLinkResources.ts create mode 100644 sdk/mysql/arm-mysql/src/operations/queryTexts.ts create mode 100644 sdk/mysql/arm-mysql/src/operations/recommendedActions.ts create mode 100644 sdk/mysql/arm-mysql/src/operations/serverAdministrators.ts create mode 100644 sdk/mysql/arm-mysql/src/operations/serverKeys.ts create mode 100644 sdk/mysql/arm-mysql/src/operations/topQueryStatistics.ts create mode 100644 sdk/mysql/arm-mysql/src/operations/waitStatistics.ts diff --git a/sdk/mysql/arm-mysql/LICENSE.txt b/sdk/mysql/arm-mysql/LICENSE.txt index b73b4a1293c3..ea8fb1516028 100644 --- a/sdk/mysql/arm-mysql/LICENSE.txt +++ b/sdk/mysql/arm-mysql/LICENSE.txt @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2019 Microsoft +Copyright (c) 2020 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 diff --git a/sdk/mysql/arm-mysql/README.md b/sdk/mysql/arm-mysql/README.md index 9c51be4833fe..cdbca9ee6824 100644 --- a/sdk/mysql/arm-mysql/README.md +++ b/sdk/mysql/arm-mysql/README.md @@ -19,8 +19,9 @@ npm install @azure/arm-mysql ##### Install @azure/ms-rest-nodeauth +- Please install minimum version of `"@azure/ms-rest-nodeauth": "^3.0.0"`. ```bash -npm install @azure/ms-rest-nodeauth +npm install @azure/ms-rest-nodeauth@"^3.0.0" ``` ##### Sample code @@ -99,4 +100,4 @@ See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to - [Microsoft Azure SDK for Javascript](https://github.com/Azure/azure-sdk-for-js) -![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js%2Fsdk%2Fmysql%2Farm-mysql%2FREADME.png) +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js/sdk/mysql/arm-mysql/README.png) diff --git a/sdk/mysql/arm-mysql/package.json b/sdk/mysql/arm-mysql/package.json index 287210f79af1..abe0f16d1cff 100644 --- a/sdk/mysql/arm-mysql/package.json +++ b/sdk/mysql/arm-mysql/package.json @@ -4,9 +4,9 @@ "description": "MySQLManagementClient Library with typescript type definitions for node.js and browser.", "version": "3.3.0", "dependencies": { - "@azure/ms-rest-azure-js": "^1.3.2", - "@azure/ms-rest-js": "^1.8.1", - "tslib": "^1.9.3" + "@azure/ms-rest-azure-js": "^2.0.1", + "@azure/ms-rest-js": "^2.0.4", + "tslib": "^1.10.0" }, "keywords": [ "node", @@ -20,11 +20,11 @@ "module": "./esm/mySQLManagementClient.js", "types": "./esm/mySQLManagementClient.d.ts", "devDependencies": { - "typescript": "^3.1.1", - "rollup": "^0.66.2", - "rollup-plugin-node-resolve": "^3.4.0", + "typescript": "^3.5.3", + "rollup": "^1.18.0", + "rollup-plugin-node-resolve": "^5.2.0", "rollup-plugin-sourcemaps": "^0.4.2", - "uglify-js": "^3.4.9" + "uglify-js": "^3.6.0" }, "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/mysql/arm-mysql", "repository": { diff --git a/sdk/mysql/arm-mysql/rollup.config.js b/sdk/mysql/arm-mysql/rollup.config.js index 1461c9cabee5..e996142ef991 100644 --- a/sdk/mysql/arm-mysql/rollup.config.js +++ b/sdk/mysql/arm-mysql/rollup.config.js @@ -29,7 +29,7 @@ const config = { */` }, plugins: [ - nodeResolve({ module: true }), + nodeResolve({ mainFields: ['module', 'main'] }), sourcemaps() ] }; diff --git a/sdk/mysql/arm-mysql/src/models/advisorsMappers.ts b/sdk/mysql/arm-mysql/src/models/advisorsMappers.ts new file mode 100644 index 000000000000..153048e01383 --- /dev/null +++ b/sdk/mysql/arm-mysql/src/models/advisorsMappers.ts @@ -0,0 +1,43 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + discriminators, + Advisor, + AdvisorsResultList, + AzureEntityResource, + BaseResource, + CloudError, + Configuration, + Database, + FirewallRule, + LogFile, + PrivateEndpointConnection, + PrivateEndpointProperty, + PrivateLinkResource, + PrivateLinkResourceProperties, + PrivateLinkServiceConnectionStateProperty, + ProxyResource, + QueryStatistic, + QueryText, + RecommendationAction, + Resource, + ResourceIdentity, + Server, + ServerAdministratorResource, + ServerKey, + ServerPrivateEndpointConnection, + ServerPrivateEndpointConnectionProperties, + ServerPrivateLinkServiceConnectionStateProperty, + ServerSecurityAlertPolicy, + Sku, + StorageProfile, + TrackedResource, + VirtualNetworkRule, + WaitStatistic +} from "../models/mappers"; diff --git a/sdk/mysql/arm-mysql/src/models/configurationsMappers.ts b/sdk/mysql/arm-mysql/src/models/configurationsMappers.ts index 3df779f095a3..a1bdb44478d7 100644 --- a/sdk/mysql/arm-mysql/src/models/configurationsMappers.ts +++ b/sdk/mysql/arm-mysql/src/models/configurationsMappers.ts @@ -8,6 +8,8 @@ export { discriminators, + Advisor, + AzureEntityResource, BaseResource, CloudError, Configuration, @@ -15,11 +17,27 @@ export { Database, FirewallRule, LogFile, + PrivateEndpointConnection, + PrivateEndpointProperty, + PrivateLinkResource, + PrivateLinkResourceProperties, + PrivateLinkServiceConnectionStateProperty, ProxyResource, + QueryStatistic, + QueryText, + RecommendationAction, + Resource, + ResourceIdentity, Server, + ServerAdministratorResource, + ServerKey, + ServerPrivateEndpointConnection, + ServerPrivateEndpointConnectionProperties, + ServerPrivateLinkServiceConnectionStateProperty, ServerSecurityAlertPolicy, Sku, StorageProfile, TrackedResource, - VirtualNetworkRule + VirtualNetworkRule, + WaitStatistic } from "../models/mappers"; diff --git a/sdk/mysql/arm-mysql/src/models/databasesMappers.ts b/sdk/mysql/arm-mysql/src/models/databasesMappers.ts index aab1065ee094..9f140b1c3b5c 100644 --- a/sdk/mysql/arm-mysql/src/models/databasesMappers.ts +++ b/sdk/mysql/arm-mysql/src/models/databasesMappers.ts @@ -8,6 +8,8 @@ export { discriminators, + Advisor, + AzureEntityResource, BaseResource, CloudError, Configuration, @@ -15,11 +17,27 @@ export { DatabaseListResult, FirewallRule, LogFile, + PrivateEndpointConnection, + PrivateEndpointProperty, + PrivateLinkResource, + PrivateLinkResourceProperties, + PrivateLinkServiceConnectionStateProperty, ProxyResource, + QueryStatistic, + QueryText, + RecommendationAction, + Resource, + ResourceIdentity, Server, + ServerAdministratorResource, + ServerKey, + ServerPrivateEndpointConnection, + ServerPrivateEndpointConnectionProperties, + ServerPrivateLinkServiceConnectionStateProperty, ServerSecurityAlertPolicy, Sku, StorageProfile, TrackedResource, - VirtualNetworkRule + VirtualNetworkRule, + WaitStatistic } from "../models/mappers"; diff --git a/sdk/mysql/arm-mysql/src/models/firewallRulesMappers.ts b/sdk/mysql/arm-mysql/src/models/firewallRulesMappers.ts index 2b819a0b71bc..ec40ca6b0c4d 100644 --- a/sdk/mysql/arm-mysql/src/models/firewallRulesMappers.ts +++ b/sdk/mysql/arm-mysql/src/models/firewallRulesMappers.ts @@ -8,6 +8,8 @@ export { discriminators, + Advisor, + AzureEntityResource, BaseResource, CloudError, Configuration, @@ -15,11 +17,27 @@ export { FirewallRule, FirewallRuleListResult, LogFile, + PrivateEndpointConnection, + PrivateEndpointProperty, + PrivateLinkResource, + PrivateLinkResourceProperties, + PrivateLinkServiceConnectionStateProperty, ProxyResource, + QueryStatistic, + QueryText, + RecommendationAction, + Resource, + ResourceIdentity, Server, + ServerAdministratorResource, + ServerKey, + ServerPrivateEndpointConnection, + ServerPrivateEndpointConnectionProperties, + ServerPrivateLinkServiceConnectionStateProperty, ServerSecurityAlertPolicy, Sku, StorageProfile, TrackedResource, - VirtualNetworkRule + VirtualNetworkRule, + WaitStatistic } from "../models/mappers"; diff --git a/sdk/mysql/arm-mysql/src/models/index.ts b/sdk/mysql/arm-mysql/src/models/index.ts index 693159b1be74..a236d4229030 100644 --- a/sdk/mysql/arm-mysql/src/models/index.ts +++ b/sdk/mysql/arm-mysql/src/models/index.ts @@ -12,38 +12,69 @@ import * as msRest from "@azure/ms-rest-js"; export { BaseResource, CloudError }; /** - * Resource properties. + * An interface representing PrivateEndpointProperty. */ -export interface ProxyResource extends BaseResource { +export interface PrivateEndpointProperty extends BaseResource { /** - * Resource ID - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Resource id of the private endpoint. */ - readonly id?: string; + id?: string; +} + +/** + * An interface representing ServerPrivateLinkServiceConnectionStateProperty. + */ +export interface ServerPrivateLinkServiceConnectionStateProperty { + /** + * The private link service connection status. Possible values include: 'Approved', 'Pending', + * 'Rejected', 'Disconnected' + */ + status: PrivateLinkServiceConnectionStateStatus; + /** + * The private link service connection description. + */ + description: string; /** - * Resource name. + * The actions required for private link service connection. Possible values include: 'None' * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly name?: string; + readonly actionsRequired?: PrivateLinkServiceConnectionStateActionsRequire; +} + +/** + * Properties of a private endpoint connection. + */ +export interface ServerPrivateEndpointConnectionProperties { /** - * Resource type. + * Private endpoint which the connection belongs to. + */ + privateEndpoint?: PrivateEndpointProperty; + /** + * Connection state of the private endpoint connection. + */ + privateLinkServiceConnectionState?: ServerPrivateLinkServiceConnectionStateProperty; + /** + * State of the private endpoint connection. Possible values include: 'Approving', 'Ready', + * 'Dropping', 'Failed', 'Rejecting' * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly type?: string; + readonly provisioningState?: PrivateEndpointProvisioningState; } /** - * Resource properties including location and tags for track resources. + * A private endpoint connection under a server */ -export interface TrackedResource extends ProxyResource { +export interface ServerPrivateEndpointConnection { /** - * The location the resource resides in. + * Resource Id of the private endpoint connection. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - location: string; + readonly id?: string; /** - * Application-specific metadata in the form of key-value pairs. + * Private endpoint connection properties + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - tags?: { [propertyName: string]: string }; + readonly properties?: ServerPrivateEndpointConnectionProperties; } /** @@ -82,7 +113,7 @@ export interface ServerPropertiesForCreate { */ createMode: "ServerPropertiesForCreate"; /** - * Server version. Possible values include: '5.6', '5.7' + * Server version. Possible values include: '5.6', '5.7', '8.0' */ version?: ServerVersion; /** @@ -90,6 +121,21 @@ export interface ServerPropertiesForCreate { * 'Disabled' */ sslEnforcement?: SslEnforcementEnum; + /** + * Enforce a minimal Tls version for the server. Possible values include: 'TLS1_0', 'TLS1_1', + * 'TLS1_2', 'TLSEnforcementDisabled' + */ + minimalTlsVersion?: MinimalTlsVersionEnum; + /** + * Status showing whether the server enabled infrastructure encryption. Possible values include: + * 'Enabled', 'Disabled' + */ + infrastructureEncryption?: InfrastructureEncryption; + /** + * Whether or not public network access is allowed for this server. Value is optional but if + * passed in, must be 'Enabled' or 'Disabled'. Possible values include: 'Enabled', 'Disabled' + */ + publicNetworkAccess?: PublicNetworkAccessEnum; /** * Storage profile of a server. */ @@ -105,7 +151,7 @@ export interface ServerPropertiesForDefaultCreate { */ createMode: "Default"; /** - * Server version. Possible values include: '5.6', '5.7' + * Server version. Possible values include: '5.6', '5.7', '8.0' */ version?: ServerVersion; /** @@ -113,6 +159,21 @@ export interface ServerPropertiesForDefaultCreate { * 'Disabled' */ sslEnforcement?: SslEnforcementEnum; + /** + * Enforce a minimal Tls version for the server. Possible values include: 'TLS1_0', 'TLS1_1', + * 'TLS1_2', 'TLSEnforcementDisabled' + */ + minimalTlsVersion?: MinimalTlsVersionEnum; + /** + * Status showing whether the server enabled infrastructure encryption. Possible values include: + * 'Enabled', 'Disabled' + */ + infrastructureEncryption?: InfrastructureEncryption; + /** + * Whether or not public network access is allowed for this server. Value is optional but if + * passed in, must be 'Enabled' or 'Disabled'. Possible values include: 'Enabled', 'Disabled' + */ + publicNetworkAccess?: PublicNetworkAccessEnum; /** * Storage profile of a server. */ @@ -137,7 +198,7 @@ export interface ServerPropertiesForRestore { */ createMode: "PointInTimeRestore"; /** - * Server version. Possible values include: '5.6', '5.7' + * Server version. Possible values include: '5.6', '5.7', '8.0' */ version?: ServerVersion; /** @@ -145,6 +206,21 @@ export interface ServerPropertiesForRestore { * 'Disabled' */ sslEnforcement?: SslEnforcementEnum; + /** + * Enforce a minimal Tls version for the server. Possible values include: 'TLS1_0', 'TLS1_1', + * 'TLS1_2', 'TLSEnforcementDisabled' + */ + minimalTlsVersion?: MinimalTlsVersionEnum; + /** + * Status showing whether the server enabled infrastructure encryption. Possible values include: + * 'Enabled', 'Disabled' + */ + infrastructureEncryption?: InfrastructureEncryption; + /** + * Whether or not public network access is allowed for this server. Value is optional but if + * passed in, must be 'Enabled' or 'Disabled'. Possible values include: 'Enabled', 'Disabled' + */ + publicNetworkAccess?: PublicNetworkAccessEnum; /** * Storage profile of a server. */ @@ -169,7 +245,7 @@ export interface ServerPropertiesForGeoRestore { */ createMode: "GeoRestore"; /** - * Server version. Possible values include: '5.6', '5.7' + * Server version. Possible values include: '5.6', '5.7', '8.0' */ version?: ServerVersion; /** @@ -177,6 +253,21 @@ export interface ServerPropertiesForGeoRestore { * 'Disabled' */ sslEnforcement?: SslEnforcementEnum; + /** + * Enforce a minimal Tls version for the server. Possible values include: 'TLS1_0', 'TLS1_1', + * 'TLS1_2', 'TLSEnforcementDisabled' + */ + minimalTlsVersion?: MinimalTlsVersionEnum; + /** + * Status showing whether the server enabled infrastructure encryption. Possible values include: + * 'Enabled', 'Disabled' + */ + infrastructureEncryption?: InfrastructureEncryption; + /** + * Whether or not public network access is allowed for this server. Value is optional but if + * passed in, must be 'Enabled' or 'Disabled'. Possible values include: 'Enabled', 'Disabled' + */ + publicNetworkAccess?: PublicNetworkAccessEnum; /** * Storage profile of a server. */ @@ -196,7 +287,7 @@ export interface ServerPropertiesForReplica { */ createMode: "Replica"; /** - * Server version. Possible values include: '5.6', '5.7' + * Server version. Possible values include: '5.6', '5.7', '8.0' */ version?: ServerVersion; /** @@ -204,6 +295,21 @@ export interface ServerPropertiesForReplica { * 'Disabled' */ sslEnforcement?: SslEnforcementEnum; + /** + * Enforce a minimal Tls version for the server. Possible values include: 'TLS1_0', 'TLS1_1', + * 'TLS1_2', 'TLSEnforcementDisabled' + */ + minimalTlsVersion?: MinimalTlsVersionEnum; + /** + * Status showing whether the server enabled infrastructure encryption. Possible values include: + * 'Enabled', 'Disabled' + */ + infrastructureEncryption?: InfrastructureEncryption; + /** + * Whether or not public network access is allowed for this server. Value is optional but if + * passed in, must be 'Enabled' or 'Disabled'. Possible values include: 'Enabled', 'Disabled' + */ + publicNetworkAccess?: PublicNetworkAccessEnum; /** * Storage profile of a server. */ @@ -241,10 +347,72 @@ export interface Sku { family?: string; } +/** + * Azure Active Directory identity configuration for a resource. + */ +export interface ResourceIdentity { + /** + * The Azure Active Directory principal id. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly principalId?: string; + /** + * The identity type. Set this to 'SystemAssigned' in order to automatically create and assign an + * Azure Active Directory principal for the resource. Possible values include: 'SystemAssigned' + */ + type?: IdentityType; + /** + * The Azure Active Directory tenant id. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly tenantId?: string; +} + +/** + * An interface representing Resource. + */ +export interface Resource extends BaseResource { + /** + * Fully qualified resource Id for the resource. Ex - + * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly id?: string; + /** + * The name of the resource + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly name?: string; + /** + * The type of the resource. Ex- Microsoft.Compute/virtualMachines or + * Microsoft.Storage/storageAccounts. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly type?: string; +} + +/** + * The resource model definition for a ARM tracked top level resource + */ +export interface TrackedResource extends Resource { + /** + * Resource tags. + */ + tags?: { [propertyName: string]: string }; + /** + * The geo-location where the resource lives + */ + location: string; +} + /** * Represents a server. */ export interface Server extends TrackedResource { + /** + * The Azure Active Directory identity of the server. + */ + identity?: ResourceIdentity; /** * The SKU (pricing tier) of the server. */ @@ -255,7 +423,7 @@ export interface Server extends TrackedResource { */ administratorLogin?: string; /** - * Server version. Possible values include: '5.6', '5.7' + * Server version. Possible values include: '5.6', '5.7', '8.0' */ version?: ServerVersion; /** @@ -263,9 +431,24 @@ export interface Server extends TrackedResource { * 'Disabled' */ sslEnforcement?: SslEnforcementEnum; + /** + * Enforce a minimal Tls version for the server. Possible values include: 'TLS1_0', 'TLS1_1', + * 'TLS1_2', 'TLSEnforcementDisabled' + */ + minimalTlsVersion?: MinimalTlsVersionEnum; + /** + * Status showing whether the server data encryption is enabled with customer-managed keys. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly byokEnforcement?: string; + /** + * Status showing whether the server enabled infrastructure encryption. Possible values include: + * 'Enabled', 'Disabled' + */ + infrastructureEncryption?: InfrastructureEncryption; /** * A state of a server that is visible to user. Possible values include: 'Ready', 'Dropping', - * 'Disabled' + * 'Disabled', 'Inaccessible' */ userVisibleState?: ServerState; /** @@ -292,12 +475,26 @@ export interface Server extends TrackedResource { * The maximum number of replicas that a master server can have. */ replicaCapacity?: number; + /** + * Whether or not public network access is allowed for this server. Value is optional but if + * passed in, must be 'Enabled' or 'Disabled'. Possible values include: 'Enabled', 'Disabled' + */ + publicNetworkAccess?: PublicNetworkAccessEnum; + /** + * List of private endpoint connections on a server + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly privateEndpointConnections?: ServerPrivateEndpointConnection[]; } /** * Represents a server to be created. */ export interface ServerForCreate { + /** + * The Azure Active Directory identity of the server. + */ + identity?: ResourceIdentity; /** * The SKU (pricing tier) of the server. */ @@ -320,6 +517,10 @@ export interface ServerForCreate { * Parameters allowed to update for a server. */ export interface ServerUpdateParameters { + /** + * The Azure Active Directory identity of the server. + */ + identity?: ResourceIdentity; /** * The SKU (pricing tier) of the server. */ @@ -333,7 +534,7 @@ export interface ServerUpdateParameters { */ administratorLoginPassword?: string; /** - * The version of a server. Possible values include: '5.6', '5.7' + * The version of a server. Possible values include: '5.6', '5.7', '8.0' */ version?: ServerVersion; /** @@ -341,6 +542,16 @@ export interface ServerUpdateParameters { * 'Disabled' */ sslEnforcement?: SslEnforcementEnum; + /** + * Enforce a minimal Tls version for the server. Possible values include: 'TLS1_0', 'TLS1_1', + * 'TLS1_2', 'TLSEnforcementDisabled' + */ + minimalTlsVersion?: MinimalTlsVersionEnum; + /** + * Whether or not public network access is allowed for this server. Value is optional but if + * passed in, must be 'Enabled' or 'Disabled'. Possible values include: 'Enabled', 'Disabled' + */ + publicNetworkAccess?: PublicNetworkAccessEnum; /** * The replication role of the server. */ @@ -351,6 +562,13 @@ export interface ServerUpdateParameters { tags?: { [propertyName: string]: string }; } +/** + * The resource model definition for a ARM proxy resource. It will have everything other than + * required location and tags + */ +export interface ProxyResource extends Resource { +} + /** * Represents a server firewall rule. */ @@ -608,6 +826,82 @@ export interface NameAvailability { reason?: string; } +/** + * The resource management error additional info. + */ +export interface ErrorAdditionalInfo { + /** + * The additional info type. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly type?: string; + /** + * The additional info. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly info?: any; +} + +/** + * The resource management error response. + */ +export interface ErrorResponse { + /** + * The error code. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly code?: string; + /** + * The error message. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly message?: string; + /** + * The error target. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly target?: string; + /** + * The error details. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly details?: ErrorResponse[]; + /** + * The error additional info. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly additionalInfo?: ErrorAdditionalInfo[]; +} + +/** + * Represents a and external administrator to be created. + */ +export interface ServerAdministratorResource extends ProxyResource { + /** + * The server administrator login account name. + */ + login: string; + /** + * The server administrator Sid (Secure ID). + */ + sid: string; + /** + * The server Active Directory Administrator tenant id. + */ + tenantId: string; +} + +/** + * The resource model definition for a Azure Resource Manager resource with an etag. + */ +export interface AzureEntityResource extends Resource { + /** + * Resource Etag. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly etag?: string; +} + /** * A server security alert policy. */ @@ -646,47 +940,378 @@ export interface ServerSecurityAlertPolicy extends ProxyResource { } /** - * An interface representing MySQLManagementClientOptions. + * Represents a Query Text. */ -export interface MySQLManagementClientOptions extends AzureServiceClientOptions { - baseUri?: string; +export interface QueryText extends ProxyResource { + /** + * Query identifier unique to the server. + */ + queryId?: string; + /** + * Query text. + */ + queryText?: string; } /** - * @interface - * A list of servers. - * @extends Array + * Input to get top query statistics */ -export interface ServerListResult extends Array { +export interface TopQueryStatisticsInput { + /** + * Max number of top queries to return. + */ + numberOfTopQueries: number; + /** + * Aggregation function name. + */ + aggregationFunction: string; + /** + * Observed metric name. + */ + observedMetric: string; + /** + * Observation start time. + */ + observationStartTime: Date; + /** + * Observation end time. + */ + observationEndTime: Date; + /** + * Aggregation interval type in ISO 8601 format. + */ + aggregationWindow: string; } /** - * @interface - * A list of firewall rules. - * @extends Array + * Represents a Query Statistic. */ -export interface FirewallRuleListResult extends Array { +export interface QueryStatistic extends ProxyResource { + /** + * Database query identifier. + */ + queryId?: string; + /** + * Observation start time. + */ + startTime?: Date; + /** + * Observation end time. + */ + endTime?: Date; + /** + * Aggregation function name. + */ + aggregationFunction?: string; + /** + * The list of database names. + */ + databaseNames?: string[]; + /** + * Number of query executions in this time interval. + */ + queryExecutionCount?: number; + /** + * Metric name. + */ + metricName?: string; + /** + * Metric display name. + */ + metricDisplayName?: string; + /** + * Metric value. + */ + metricValue?: number; + /** + * Metric value unit. + */ + metricValueUnit?: string; } /** - * @interface - * A list of virtual network rules. - * @extends Array + * Input to get wait statistics */ -export interface VirtualNetworkRuleListResult extends Array { +export interface WaitStatisticsInput { /** - * Link to retrieve next page of results. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Observation start time. */ - readonly nextLink?: string; + observationStartTime: Date; + /** + * Observation end time. + */ + observationEndTime: Date; + /** + * Aggregation interval type in ISO 8601 format. + */ + aggregationWindow: string; } /** - * @interface - * A List of databases. - * @extends Array + * Represents a Wait Statistic. */ -export interface DatabaseListResult extends Array { +export interface WaitStatistic extends ProxyResource { + /** + * Observation start time. + */ + startTime?: Date; + /** + * Observation end time. + */ + endTime?: Date; + /** + * Wait event name. + */ + eventName?: string; + /** + * Wait event type name. + */ + eventTypeName?: string; + /** + * Database query identifier. + */ + queryId?: number; + /** + * Database Name. + */ + databaseName?: string; + /** + * Database user identifier. + */ + userId?: number; + /** + * Wait event count observed in this time interval. + */ + count?: number; + /** + * Total time of wait in milliseconds in this time interval. + */ + totalTimeInMs?: number; +} + +/** + * Represents a recommendation action advisor. + */ +export interface Advisor extends ProxyResource { + /** + * The properties of a recommendation action advisor. + */ + properties?: any; +} + +/** + * Represents a Recommendation Action. + */ +export interface RecommendationAction extends ProxyResource { + /** + * Advisor name. + */ + advisorName?: string; + /** + * Recommendation action session identifier. + */ + sessionId?: string; + /** + * Recommendation action identifier. + */ + actionId?: number; + /** + * Recommendation action creation time. + */ + createdTime?: Date; + /** + * Recommendation action expiration time. + */ + expirationTime?: Date; + /** + * Recommendation action reason. + */ + reason?: string; + /** + * Recommendation action type. + */ + recommendationType?: string; + /** + * Recommendation action details. + */ + details?: { [propertyName: string]: string }; +} + +/** + * Recommendation action session operation status. + */ +export interface RecommendedActionSessionsOperationStatus { + /** + * Operation identifier. + */ + name?: string; + /** + * Operation start time. + */ + startTime?: Date; + /** + * Operation status. + */ + status?: string; +} + +/** + * An interface representing PrivateLinkServiceConnectionStateProperty. + */ +export interface PrivateLinkServiceConnectionStateProperty { + /** + * The private link service connection status. + */ + status: string; + /** + * The private link service connection description. + */ + description: string; + /** + * The actions required for private link service connection. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly actionsRequired?: string; +} + +/** + * A private endpoint connection + */ +export interface PrivateEndpointConnection extends ProxyResource { + /** + * Private endpoint which the connection belongs to. + */ + privateEndpoint?: PrivateEndpointProperty; + /** + * Connection state of the private endpoint connection. + */ + privateLinkServiceConnectionState?: PrivateLinkServiceConnectionStateProperty; + /** + * State of the private endpoint connection. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly provisioningState?: string; +} + +/** + * Tags object for patch operations. + */ +export interface TagsObject { + /** + * Resource tags. + */ + tags?: { [propertyName: string]: string }; +} + +/** + * Properties of a private link resource. + */ +export interface PrivateLinkResourceProperties { + /** + * The private link resource group id. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly groupId?: string; + /** + * The private link resource required member names. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly requiredMembers?: string[]; +} + +/** + * A private link resource + */ +export interface PrivateLinkResource extends ProxyResource { + /** + * The private link resource group id. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly properties?: PrivateLinkResourceProperties; +} + +/** + * A MySQL Server key. + */ +export interface ServerKey extends ProxyResource { + /** + * Kind of encryption protector used to protect the key. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly kind?: string; + /** + * The URI of the key. + */ + uri?: string; + /** + * The key creation date. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly creationDate?: Date; +} + +/** + * An interface representing ServerUpgradeParameters. + */ +export interface ServerUpgradeParameters { + /** + * Represents an server storage profile. + */ + targetServerVersion?: string; +} + +/** + * Optional Parameters. + */ +export interface RecommendedActionsListByServerOptionalParams extends msRest.RequestOptionsBase { + /** + * The recommendation action session identifier. + */ + sessionId?: string; +} + +/** + * An interface representing MySQLManagementClientOptions. + */ +export interface MySQLManagementClientOptions extends AzureServiceClientOptions { + baseUri?: string; +} + +/** + * @interface + * A list of servers. + * @extends Array + */ +export interface ServerListResult extends Array { +} + +/** + * @interface + * A list of firewall rules. + * @extends Array + */ +export interface FirewallRuleListResult extends Array { +} + +/** + * @interface + * A list of virtual network rules. + * @extends Array + */ +export interface VirtualNetworkRuleListResult extends Array { + /** + * Link to retrieve next page of results. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * A List of databases. + * @extends Array + */ +export interface DatabaseListResult extends Array { } /** @@ -705,6 +1330,14 @@ export interface ConfigurationListResult extends Array { export interface LogFileListResult extends Array { } +/** + * @interface + * The response to a list Active Directory Administrators request. + * @extends Array + */ +export interface ServerAdministratorResourceListResult extends Array { +} + /** * @interface * A list of performance tiers. @@ -714,81 +1347,961 @@ export interface PerformanceTierListResult extends Array + */ +export interface QueryTextsResultList extends Array { + /** + * Link to retrieve next page of results. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * A list of query statistics. + * @extends Array + */ +export interface TopQueryStatisticsResultList extends Array { + /** + * Link to retrieve next page of results. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * A list of wait statistics. + * @extends Array + */ +export interface WaitStatisticsResultList extends Array { + /** + * Link to retrieve next page of results. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * A list of query statistics. + * @extends Array + */ +export interface AdvisorsResultList extends Array { + /** + * Link to retrieve next page of results. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * A list of recommendation actions. + * @extends Array + */ +export interface RecommendationActionsResultList extends Array { + /** + * Link to retrieve next page of results. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * A list of private endpoint connections. + * @extends Array + */ +export interface PrivateEndpointConnectionListResult extends Array { + /** + * Link to retrieve next page of results. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * A list of private link resources + * @extends Array + */ +export interface PrivateLinkResourceListResult extends Array { + /** + * Link to retrieve next page of results. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * A list of MySQL Server keys. + * @extends Array + */ +export interface ServerKeyListResult extends Array { + /** + * Link to retrieve next page of results. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nextLink?: string; +} + +/** + * Defines values for ServerVersion. + * Possible values include: '5.6', '5.7', '8.0' + * @readonly + * @enum {string} + */ +export type ServerVersion = '5.6' | '5.7' | '8.0'; + +/** + * Defines values for SslEnforcementEnum. + * Possible values include: 'Enabled', 'Disabled' + * @readonly + * @enum {string} + */ +export type SslEnforcementEnum = 'Enabled' | 'Disabled'; + +/** + * Defines values for MinimalTlsVersionEnum. + * Possible values include: 'TLS1_0', 'TLS1_1', 'TLS1_2', 'TLSEnforcementDisabled' + * @readonly + * @enum {string} + */ +export type MinimalTlsVersionEnum = 'TLS1_0' | 'TLS1_1' | 'TLS1_2' | 'TLSEnforcementDisabled'; + +/** + * Defines values for InfrastructureEncryption. + * Possible values include: 'Enabled', 'Disabled' + * @readonly + * @enum {string} + */ +export type InfrastructureEncryption = 'Enabled' | 'Disabled'; + +/** + * Defines values for PublicNetworkAccessEnum. + * Possible values include: 'Enabled', 'Disabled' + * @readonly + * @enum {string} + */ +export type PublicNetworkAccessEnum = 'Enabled' | 'Disabled'; + +/** + * Defines values for PrivateLinkServiceConnectionStateStatus. + * Possible values include: 'Approved', 'Pending', 'Rejected', 'Disconnected' + * @readonly + * @enum {string} + */ +export type PrivateLinkServiceConnectionStateStatus = 'Approved' | 'Pending' | 'Rejected' | 'Disconnected'; + +/** + * Defines values for PrivateLinkServiceConnectionStateActionsRequire. + * Possible values include: 'None' + * @readonly + * @enum {string} + */ +export type PrivateLinkServiceConnectionStateActionsRequire = 'None'; + +/** + * Defines values for PrivateEndpointProvisioningState. + * Possible values include: 'Approving', 'Ready', 'Dropping', 'Failed', 'Rejecting' + * @readonly + * @enum {string} + */ +export type PrivateEndpointProvisioningState = 'Approving' | 'Ready' | 'Dropping' | 'Failed' | 'Rejecting'; + +/** + * Defines values for ServerState. + * Possible values include: 'Ready', 'Dropping', 'Disabled', 'Inaccessible' + * @readonly + * @enum {string} + */ +export type ServerState = 'Ready' | 'Dropping' | 'Disabled' | 'Inaccessible'; + +/** + * Defines values for GeoRedundantBackup. + * Possible values include: 'Enabled', 'Disabled' + * @readonly + * @enum {string} + */ +export type GeoRedundantBackup = 'Enabled' | 'Disabled'; + +/** + * Defines values for StorageAutogrow. + * Possible values include: 'Enabled', 'Disabled' + * @readonly + * @enum {string} + */ +export type StorageAutogrow = 'Enabled' | 'Disabled'; + +/** + * Defines values for SkuTier. + * Possible values include: 'Basic', 'GeneralPurpose', 'MemoryOptimized' + * @readonly + * @enum {string} + */ +export type SkuTier = 'Basic' | 'GeneralPurpose' | 'MemoryOptimized'; + +/** + * Defines values for IdentityType. + * Possible values include: 'SystemAssigned' + * @readonly + * @enum {string} + */ +export type IdentityType = 'SystemAssigned'; + +/** + * Defines values for VirtualNetworkRuleState. + * Possible values include: 'Initializing', 'InProgress', 'Ready', 'Deleting', 'Unknown' + * @readonly + * @enum {string} + */ +export type VirtualNetworkRuleState = 'Initializing' | 'InProgress' | 'Ready' | 'Deleting' | 'Unknown'; + +/** + * Defines values for OperationOrigin. + * Possible values include: 'NotSpecified', 'user', 'system' + * @readonly + * @enum {string} + */ +export type OperationOrigin = 'NotSpecified' | 'user' | 'system'; + +/** + * Defines values for ServerSecurityAlertPolicyState. + * Possible values include: 'Enabled', 'Disabled' + * @readonly + * @enum {string} + */ +export type ServerSecurityAlertPolicyState = 'Enabled' | 'Disabled'; + +/** + * Contains response data for the create operation. + */ +export type ServersCreateResponse = Server & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: Server; + }; +}; + +/** + * Contains response data for the update operation. + */ +export type ServersUpdateResponse = Server & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: Server; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type ServersGetResponse = Server & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: Server; + }; +}; + +/** + * Contains response data for the listByResourceGroup operation. + */ +export type ServersListByResourceGroupResponse = ServerListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ServerListResult; + }; +}; + +/** + * Contains response data for the list operation. + */ +export type ServersListResponse = ServerListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ServerListResult; + }; +}; + +/** + * Contains response data for the beginCreate operation. + */ +export type ServersBeginCreateResponse = Server & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: Server; + }; +}; + +/** + * Contains response data for the beginUpdate operation. + */ +export type ServersBeginUpdateResponse = Server & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: Server; + }; +}; + +/** + * Contains response data for the listByServer operation. + */ +export type ReplicasListByServerResponse = ServerListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ServerListResult; + }; +}; + +/** + * Contains response data for the createOrUpdate operation. + */ +export type FirewallRulesCreateOrUpdateResponse = FirewallRule & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: FirewallRule; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type FirewallRulesGetResponse = FirewallRule & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: FirewallRule; + }; +}; + +/** + * Contains response data for the listByServer operation. + */ +export type FirewallRulesListByServerResponse = FirewallRuleListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: FirewallRuleListResult; + }; +}; + +/** + * Contains response data for the beginCreateOrUpdate operation. + */ +export type FirewallRulesBeginCreateOrUpdateResponse = FirewallRule & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: FirewallRule; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type VirtualNetworkRulesGetResponse = VirtualNetworkRule & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: VirtualNetworkRule; + }; +}; + +/** + * Contains response data for the createOrUpdate operation. + */ +export type VirtualNetworkRulesCreateOrUpdateResponse = VirtualNetworkRule & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: VirtualNetworkRule; + }; +}; + +/** + * Contains response data for the listByServer operation. + */ +export type VirtualNetworkRulesListByServerResponse = VirtualNetworkRuleListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: VirtualNetworkRuleListResult; + }; +}; + +/** + * Contains response data for the beginCreateOrUpdate operation. + */ +export type VirtualNetworkRulesBeginCreateOrUpdateResponse = VirtualNetworkRule & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: VirtualNetworkRule; + }; +}; + +/** + * Contains response data for the listByServerNext operation. + */ +export type VirtualNetworkRulesListByServerNextResponse = VirtualNetworkRuleListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: VirtualNetworkRuleListResult; + }; +}; + +/** + * Contains response data for the createOrUpdate operation. + */ +export type DatabasesCreateOrUpdateResponse = Database & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: Database; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type DatabasesGetResponse = Database & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: Database; + }; +}; + +/** + * Contains response data for the listByServer operation. + */ +export type DatabasesListByServerResponse = DatabaseListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: DatabaseListResult; + }; +}; + +/** + * Contains response data for the beginCreateOrUpdate operation. + */ +export type DatabasesBeginCreateOrUpdateResponse = Database & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: Database; + }; +}; + +/** + * Contains response data for the createOrUpdate operation. + */ +export type ConfigurationsCreateOrUpdateResponse = Configuration & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: Configuration; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type ConfigurationsGetResponse = Configuration & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: Configuration; + }; +}; + +/** + * Contains response data for the listByServer operation. + */ +export type ConfigurationsListByServerResponse = ConfigurationListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ConfigurationListResult; + }; +}; + +/** + * Contains response data for the beginCreateOrUpdate operation. + */ +export type ConfigurationsBeginCreateOrUpdateResponse = Configuration & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: Configuration; + }; +}; + +/** + * Contains response data for the listByServer operation. + */ +export type LogFilesListByServerResponse = LogFileListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: LogFileListResult; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type ServerAdministratorsGetResponse = ServerAdministratorResource & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ServerAdministratorResource; + }; +}; + +/** + * Contains response data for the createOrUpdate operation. + */ +export type ServerAdministratorsCreateOrUpdateResponse = ServerAdministratorResource & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ServerAdministratorResource; + }; +}; + +/** + * Contains response data for the list operation. + */ +export type ServerAdministratorsListResponse = ServerAdministratorResourceListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ServerAdministratorResourceListResult; + }; +}; + +/** + * Contains response data for the beginCreateOrUpdate operation. + */ +export type ServerAdministratorsBeginCreateOrUpdateResponse = ServerAdministratorResource & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ServerAdministratorResource; + }; +}; + +/** + * Contains response data for the list operation. + */ +export type LocationBasedPerformanceTierListResponse = PerformanceTierListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: PerformanceTierListResult; + }; +}; + +/** + * Contains response data for the execute operation. */ -export type ServerVersion = '5.6' | '5.7'; +export type CheckNameAvailabilityExecuteResponse = NameAvailability & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; -/** - * Defines values for SslEnforcementEnum. - * Possible values include: 'Enabled', 'Disabled' - * @readonly - * @enum {string} - */ -export type SslEnforcementEnum = 'Enabled' | 'Disabled'; + /** + * The response body as parsed JSON or XML + */ + parsedBody: NameAvailability; + }; +}; /** - * Defines values for ServerState. - * Possible values include: 'Ready', 'Dropping', 'Disabled' - * @readonly - * @enum {string} + * Contains response data for the list operation. */ -export type ServerState = 'Ready' | 'Dropping' | 'Disabled'; +export type OperationsListResponse = OperationListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; -/** - * Defines values for GeoRedundantBackup. - * Possible values include: 'Enabled', 'Disabled' - * @readonly - * @enum {string} - */ -export type GeoRedundantBackup = 'Enabled' | 'Disabled'; + /** + * The response body as parsed JSON or XML + */ + parsedBody: OperationListResult; + }; +}; /** - * Defines values for StorageAutogrow. - * Possible values include: 'Enabled', 'Disabled' - * @readonly - * @enum {string} + * Contains response data for the get operation. */ -export type StorageAutogrow = 'Enabled' | 'Disabled'; +export type ServerSecurityAlertPoliciesGetResponse = ServerSecurityAlertPolicy & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; -/** - * Defines values for SkuTier. - * Possible values include: 'Basic', 'GeneralPurpose', 'MemoryOptimized' - * @readonly - * @enum {string} - */ -export type SkuTier = 'Basic' | 'GeneralPurpose' | 'MemoryOptimized'; + /** + * The response body as parsed JSON or XML + */ + parsedBody: ServerSecurityAlertPolicy; + }; +}; /** - * Defines values for VirtualNetworkRuleState. - * Possible values include: 'Initializing', 'InProgress', 'Ready', 'Deleting', 'Unknown' - * @readonly - * @enum {string} + * Contains response data for the createOrUpdate operation. */ -export type VirtualNetworkRuleState = 'Initializing' | 'InProgress' | 'Ready' | 'Deleting' | 'Unknown'; +export type ServerSecurityAlertPoliciesCreateOrUpdateResponse = ServerSecurityAlertPolicy & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; -/** - * Defines values for OperationOrigin. - * Possible values include: 'NotSpecified', 'user', 'system' - * @readonly - * @enum {string} - */ -export type OperationOrigin = 'NotSpecified' | 'user' | 'system'; + /** + * The response body as parsed JSON or XML + */ + parsedBody: ServerSecurityAlertPolicy; + }; +}; /** - * Defines values for ServerSecurityAlertPolicyState. - * Possible values include: 'Enabled', 'Disabled' - * @readonly - * @enum {string} + * Contains response data for the beginCreateOrUpdate operation. */ -export type ServerSecurityAlertPolicyState = 'Enabled' | 'Disabled'; +export type ServerSecurityAlertPoliciesBeginCreateOrUpdateResponse = ServerSecurityAlertPolicy & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ServerSecurityAlertPolicy; + }; +}; /** - * Contains response data for the create operation. + * Contains response data for the get operation. */ -export type ServersCreateResponse = Server & { +export type QueryTextsGetResponse = QueryText & { /** * The underlying HTTP response. */ @@ -801,14 +2314,14 @@ export type ServersCreateResponse = Server & { /** * The response body as parsed JSON or XML */ - parsedBody: Server; + parsedBody: QueryText; }; }; /** - * Contains response data for the update operation. + * Contains response data for the listByServer operation. */ -export type ServersUpdateResponse = Server & { +export type QueryTextsListByServerResponse = QueryTextsResultList & { /** * The underlying HTTP response. */ @@ -821,14 +2334,14 @@ export type ServersUpdateResponse = Server & { /** * The response body as parsed JSON or XML */ - parsedBody: Server; + parsedBody: QueryTextsResultList; }; }; /** - * Contains response data for the get operation. + * Contains response data for the listByServerNext operation. */ -export type ServersGetResponse = Server & { +export type QueryTextsListByServerNextResponse = QueryTextsResultList & { /** * The underlying HTTP response. */ @@ -841,14 +2354,14 @@ export type ServersGetResponse = Server & { /** * The response body as parsed JSON or XML */ - parsedBody: Server; + parsedBody: QueryTextsResultList; }; }; /** - * Contains response data for the listByResourceGroup operation. + * Contains response data for the get operation. */ -export type ServersListByResourceGroupResponse = ServerListResult & { +export type TopQueryStatisticsGetResponse = QueryStatistic & { /** * The underlying HTTP response. */ @@ -861,14 +2374,14 @@ export type ServersListByResourceGroupResponse = ServerListResult & { /** * The response body as parsed JSON or XML */ - parsedBody: ServerListResult; + parsedBody: QueryStatistic; }; }; /** - * Contains response data for the list operation. + * Contains response data for the listByServer operation. */ -export type ServersListResponse = ServerListResult & { +export type TopQueryStatisticsListByServerResponse = TopQueryStatisticsResultList & { /** * The underlying HTTP response. */ @@ -881,14 +2394,14 @@ export type ServersListResponse = ServerListResult & { /** * The response body as parsed JSON or XML */ - parsedBody: ServerListResult; + parsedBody: TopQueryStatisticsResultList; }; }; /** - * Contains response data for the beginCreate operation. + * Contains response data for the listByServerNext operation. */ -export type ServersBeginCreateResponse = Server & { +export type TopQueryStatisticsListByServerNextResponse = TopQueryStatisticsResultList & { /** * The underlying HTTP response. */ @@ -901,14 +2414,14 @@ export type ServersBeginCreateResponse = Server & { /** * The response body as parsed JSON or XML */ - parsedBody: Server; + parsedBody: TopQueryStatisticsResultList; }; }; /** - * Contains response data for the beginUpdate operation. + * Contains response data for the get operation. */ -export type ServersBeginUpdateResponse = Server & { +export type WaitStatisticsGetResponse = WaitStatistic & { /** * The underlying HTTP response. */ @@ -921,14 +2434,14 @@ export type ServersBeginUpdateResponse = Server & { /** * The response body as parsed JSON or XML */ - parsedBody: Server; + parsedBody: WaitStatistic; }; }; /** * Contains response data for the listByServer operation. */ -export type ReplicasListByServerResponse = ServerListResult & { +export type WaitStatisticsListByServerResponse = WaitStatisticsResultList & { /** * The underlying HTTP response. */ @@ -941,14 +2454,14 @@ export type ReplicasListByServerResponse = ServerListResult & { /** * The response body as parsed JSON or XML */ - parsedBody: ServerListResult; + parsedBody: WaitStatisticsResultList; }; }; /** - * Contains response data for the createOrUpdate operation. + * Contains response data for the listByServerNext operation. */ -export type FirewallRulesCreateOrUpdateResponse = FirewallRule & { +export type WaitStatisticsListByServerNextResponse = WaitStatisticsResultList & { /** * The underlying HTTP response. */ @@ -961,14 +2474,14 @@ export type FirewallRulesCreateOrUpdateResponse = FirewallRule & { /** * The response body as parsed JSON or XML */ - parsedBody: FirewallRule; + parsedBody: WaitStatisticsResultList; }; }; /** * Contains response data for the get operation. */ -export type FirewallRulesGetResponse = FirewallRule & { +export type AdvisorsGetResponse = Advisor & { /** * The underlying HTTP response. */ @@ -981,14 +2494,14 @@ export type FirewallRulesGetResponse = FirewallRule & { /** * The response body as parsed JSON or XML */ - parsedBody: FirewallRule; + parsedBody: Advisor; }; }; /** * Contains response data for the listByServer operation. */ -export type FirewallRulesListByServerResponse = FirewallRuleListResult & { +export type AdvisorsListByServerResponse = AdvisorsResultList & { /** * The underlying HTTP response. */ @@ -1001,14 +2514,14 @@ export type FirewallRulesListByServerResponse = FirewallRuleListResult & { /** * The response body as parsed JSON or XML */ - parsedBody: FirewallRuleListResult; + parsedBody: AdvisorsResultList; }; }; /** - * Contains response data for the beginCreateOrUpdate operation. + * Contains response data for the listByServerNext operation. */ -export type FirewallRulesBeginCreateOrUpdateResponse = FirewallRule & { +export type AdvisorsListByServerNextResponse = AdvisorsResultList & { /** * The underlying HTTP response. */ @@ -1021,14 +2534,14 @@ export type FirewallRulesBeginCreateOrUpdateResponse = FirewallRule & { /** * The response body as parsed JSON or XML */ - parsedBody: FirewallRule; + parsedBody: AdvisorsResultList; }; }; /** * Contains response data for the get operation. */ -export type VirtualNetworkRulesGetResponse = VirtualNetworkRule & { +export type RecommendedActionsGetResponse = RecommendationAction & { /** * The underlying HTTP response. */ @@ -1041,14 +2554,14 @@ export type VirtualNetworkRulesGetResponse = VirtualNetworkRule & { /** * The response body as parsed JSON or XML */ - parsedBody: VirtualNetworkRule; + parsedBody: RecommendationAction; }; }; /** - * Contains response data for the createOrUpdate operation. + * Contains response data for the listByServer operation. */ -export type VirtualNetworkRulesCreateOrUpdateResponse = VirtualNetworkRule & { +export type RecommendedActionsListByServerResponse = RecommendationActionsResultList & { /** * The underlying HTTP response. */ @@ -1061,14 +2574,14 @@ export type VirtualNetworkRulesCreateOrUpdateResponse = VirtualNetworkRule & { /** * The response body as parsed JSON or XML */ - parsedBody: VirtualNetworkRule; + parsedBody: RecommendationActionsResultList; }; }; /** - * Contains response data for the listByServer operation. + * Contains response data for the listByServerNext operation. */ -export type VirtualNetworkRulesListByServerResponse = VirtualNetworkRuleListResult & { +export type RecommendedActionsListByServerNextResponse = RecommendationActionsResultList & { /** * The underlying HTTP response. */ @@ -1081,14 +2594,14 @@ export type VirtualNetworkRulesListByServerResponse = VirtualNetworkRuleListResu /** * The response body as parsed JSON or XML */ - parsedBody: VirtualNetworkRuleListResult; + parsedBody: RecommendationActionsResultList; }; }; /** - * Contains response data for the beginCreateOrUpdate operation. + * Contains response data for the get operation. */ -export type VirtualNetworkRulesBeginCreateOrUpdateResponse = VirtualNetworkRule & { +export type LocationBasedRecommendedActionSessionsOperationStatusGetResponse = RecommendedActionSessionsOperationStatus & { /** * The underlying HTTP response. */ @@ -1101,14 +2614,14 @@ export type VirtualNetworkRulesBeginCreateOrUpdateResponse = VirtualNetworkRule /** * The response body as parsed JSON or XML */ - parsedBody: VirtualNetworkRule; + parsedBody: RecommendedActionSessionsOperationStatus; }; }; /** - * Contains response data for the listByServerNext operation. + * Contains response data for the list operation. */ -export type VirtualNetworkRulesListByServerNextResponse = VirtualNetworkRuleListResult & { +export type LocationBasedRecommendedActionSessionsResultListResponse = RecommendationActionsResultList & { /** * The underlying HTTP response. */ @@ -1121,14 +2634,14 @@ export type VirtualNetworkRulesListByServerNextResponse = VirtualNetworkRuleList /** * The response body as parsed JSON or XML */ - parsedBody: VirtualNetworkRuleListResult; + parsedBody: RecommendationActionsResultList; }; }; /** - * Contains response data for the createOrUpdate operation. + * Contains response data for the listNext operation. */ -export type DatabasesCreateOrUpdateResponse = Database & { +export type LocationBasedRecommendedActionSessionsResultListNextResponse = RecommendationActionsResultList & { /** * The underlying HTTP response. */ @@ -1141,14 +2654,14 @@ export type DatabasesCreateOrUpdateResponse = Database & { /** * The response body as parsed JSON or XML */ - parsedBody: Database; + parsedBody: RecommendationActionsResultList; }; }; /** * Contains response data for the get operation. */ -export type DatabasesGetResponse = Database & { +export type PrivateEndpointConnectionsGetResponse = PrivateEndpointConnection & { /** * The underlying HTTP response. */ @@ -1161,14 +2674,14 @@ export type DatabasesGetResponse = Database & { /** * The response body as parsed JSON or XML */ - parsedBody: Database; + parsedBody: PrivateEndpointConnection; }; }; /** - * Contains response data for the listByServer operation. + * Contains response data for the createOrUpdate operation. */ -export type DatabasesListByServerResponse = DatabaseListResult & { +export type PrivateEndpointConnectionsCreateOrUpdateResponse = PrivateEndpointConnection & { /** * The underlying HTTP response. */ @@ -1181,14 +2694,14 @@ export type DatabasesListByServerResponse = DatabaseListResult & { /** * The response body as parsed JSON or XML */ - parsedBody: DatabaseListResult; + parsedBody: PrivateEndpointConnection; }; }; /** - * Contains response data for the beginCreateOrUpdate operation. + * Contains response data for the updateTags operation. */ -export type DatabasesBeginCreateOrUpdateResponse = Database & { +export type PrivateEndpointConnectionsUpdateTagsResponse = PrivateEndpointConnection & { /** * The underlying HTTP response. */ @@ -1201,14 +2714,14 @@ export type DatabasesBeginCreateOrUpdateResponse = Database & { /** * The response body as parsed JSON or XML */ - parsedBody: Database; + parsedBody: PrivateEndpointConnection; }; }; /** - * Contains response data for the createOrUpdate operation. + * Contains response data for the listByServer operation. */ -export type ConfigurationsCreateOrUpdateResponse = Configuration & { +export type PrivateEndpointConnectionsListByServerResponse = PrivateEndpointConnectionListResult & { /** * The underlying HTTP response. */ @@ -1221,14 +2734,14 @@ export type ConfigurationsCreateOrUpdateResponse = Configuration & { /** * The response body as parsed JSON or XML */ - parsedBody: Configuration; + parsedBody: PrivateEndpointConnectionListResult; }; }; /** - * Contains response data for the get operation. + * Contains response data for the beginCreateOrUpdate operation. */ -export type ConfigurationsGetResponse = Configuration & { +export type PrivateEndpointConnectionsBeginCreateOrUpdateResponse = PrivateEndpointConnection & { /** * The underlying HTTP response. */ @@ -1241,14 +2754,14 @@ export type ConfigurationsGetResponse = Configuration & { /** * The response body as parsed JSON or XML */ - parsedBody: Configuration; + parsedBody: PrivateEndpointConnection; }; }; /** - * Contains response data for the listByServer operation. + * Contains response data for the beginUpdateTags operation. */ -export type ConfigurationsListByServerResponse = ConfigurationListResult & { +export type PrivateEndpointConnectionsBeginUpdateTagsResponse = PrivateEndpointConnection & { /** * The underlying HTTP response. */ @@ -1261,14 +2774,14 @@ export type ConfigurationsListByServerResponse = ConfigurationListResult & { /** * The response body as parsed JSON or XML */ - parsedBody: ConfigurationListResult; + parsedBody: PrivateEndpointConnection; }; }; /** - * Contains response data for the beginCreateOrUpdate operation. + * Contains response data for the listByServerNext operation. */ -export type ConfigurationsBeginCreateOrUpdateResponse = Configuration & { +export type PrivateEndpointConnectionsListByServerNextResponse = PrivateEndpointConnectionListResult & { /** * The underlying HTTP response. */ @@ -1281,14 +2794,14 @@ export type ConfigurationsBeginCreateOrUpdateResponse = Configuration & { /** * The response body as parsed JSON or XML */ - parsedBody: Configuration; + parsedBody: PrivateEndpointConnectionListResult; }; }; /** * Contains response data for the listByServer operation. */ -export type LogFilesListByServerResponse = LogFileListResult & { +export type PrivateLinkResourcesListByServerResponse = PrivateLinkResourceListResult & { /** * The underlying HTTP response. */ @@ -1301,14 +2814,14 @@ export type LogFilesListByServerResponse = LogFileListResult & { /** * The response body as parsed JSON or XML */ - parsedBody: LogFileListResult; + parsedBody: PrivateLinkResourceListResult; }; }; /** - * Contains response data for the list operation. + * Contains response data for the get operation. */ -export type LocationBasedPerformanceTierListResponse = PerformanceTierListResult & { +export type PrivateLinkResourcesGetResponse = PrivateLinkResource & { /** * The underlying HTTP response. */ @@ -1321,14 +2834,14 @@ export type LocationBasedPerformanceTierListResponse = PerformanceTierListResult /** * The response body as parsed JSON or XML */ - parsedBody: PerformanceTierListResult; + parsedBody: PrivateLinkResource; }; }; /** - * Contains response data for the execute operation. + * Contains response data for the listByServerNext operation. */ -export type CheckNameAvailabilityExecuteResponse = NameAvailability & { +export type PrivateLinkResourcesListByServerNextResponse = PrivateLinkResourceListResult & { /** * The underlying HTTP response. */ @@ -1341,14 +2854,34 @@ export type CheckNameAvailabilityExecuteResponse = NameAvailability & { /** * The response body as parsed JSON or XML */ - parsedBody: NameAvailability; + parsedBody: PrivateLinkResourceListResult; + }; +}; + +/** + * Contains response data for the list operation. + */ +export type ServerKeysListResponse = ServerKeyListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ServerKeyListResult; }; }; /** * Contains response data for the get operation. */ -export type ServerSecurityAlertPoliciesGetResponse = ServerSecurityAlertPolicy & { +export type ServerKeysGetResponse = ServerKey & { /** * The underlying HTTP response. */ @@ -1361,14 +2894,14 @@ export type ServerSecurityAlertPoliciesGetResponse = ServerSecurityAlertPolicy & /** * The response body as parsed JSON or XML */ - parsedBody: ServerSecurityAlertPolicy; + parsedBody: ServerKey; }; }; /** * Contains response data for the createOrUpdate operation. */ -export type ServerSecurityAlertPoliciesCreateOrUpdateResponse = ServerSecurityAlertPolicy & { +export type ServerKeysCreateOrUpdateResponse = ServerKey & { /** * The underlying HTTP response. */ @@ -1381,14 +2914,14 @@ export type ServerSecurityAlertPoliciesCreateOrUpdateResponse = ServerSecurityAl /** * The response body as parsed JSON or XML */ - parsedBody: ServerSecurityAlertPolicy; + parsedBody: ServerKey; }; }; /** * Contains response data for the beginCreateOrUpdate operation. */ -export type ServerSecurityAlertPoliciesBeginCreateOrUpdateResponse = ServerSecurityAlertPolicy & { +export type ServerKeysBeginCreateOrUpdateResponse = ServerKey & { /** * The underlying HTTP response. */ @@ -1401,14 +2934,14 @@ export type ServerSecurityAlertPoliciesBeginCreateOrUpdateResponse = ServerSecur /** * The response body as parsed JSON or XML */ - parsedBody: ServerSecurityAlertPolicy; + parsedBody: ServerKey; }; }; /** - * Contains response data for the list operation. + * Contains response data for the listNext operation. */ -export type OperationsListResponse = OperationListResult & { +export type ServerKeysListNextResponse = ServerKeyListResult & { /** * The underlying HTTP response. */ @@ -1421,6 +2954,6 @@ export type OperationsListResponse = OperationListResult & { /** * The response body as parsed JSON or XML */ - parsedBody: OperationListResult; + parsedBody: ServerKeyListResult; }; }; diff --git a/sdk/mysql/arm-mysql/src/models/locationBasedRecommendedActionSessionsOperationStatusMappers.ts b/sdk/mysql/arm-mysql/src/models/locationBasedRecommendedActionSessionsOperationStatusMappers.ts new file mode 100644 index 000000000000..79bc08f8d3d3 --- /dev/null +++ b/sdk/mysql/arm-mysql/src/models/locationBasedRecommendedActionSessionsOperationStatusMappers.ts @@ -0,0 +1,13 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + discriminators, + CloudError, + RecommendedActionSessionsOperationStatus +} from "../models/mappers"; diff --git a/sdk/mysql/arm-mysql/src/models/locationBasedRecommendedActionSessionsResultMappers.ts b/sdk/mysql/arm-mysql/src/models/locationBasedRecommendedActionSessionsResultMappers.ts new file mode 100644 index 000000000000..2c50ada3b730 --- /dev/null +++ b/sdk/mysql/arm-mysql/src/models/locationBasedRecommendedActionSessionsResultMappers.ts @@ -0,0 +1,43 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + discriminators, + Advisor, + AzureEntityResource, + BaseResource, + CloudError, + Configuration, + Database, + FirewallRule, + LogFile, + PrivateEndpointConnection, + PrivateEndpointProperty, + PrivateLinkResource, + PrivateLinkResourceProperties, + PrivateLinkServiceConnectionStateProperty, + ProxyResource, + QueryStatistic, + QueryText, + RecommendationAction, + RecommendationActionsResultList, + Resource, + ResourceIdentity, + Server, + ServerAdministratorResource, + ServerKey, + ServerPrivateEndpointConnection, + ServerPrivateEndpointConnectionProperties, + ServerPrivateLinkServiceConnectionStateProperty, + ServerSecurityAlertPolicy, + Sku, + StorageProfile, + TrackedResource, + VirtualNetworkRule, + WaitStatistic +} from "../models/mappers"; diff --git a/sdk/mysql/arm-mysql/src/models/logFilesMappers.ts b/sdk/mysql/arm-mysql/src/models/logFilesMappers.ts index b6832542b835..9e62a10f2c63 100644 --- a/sdk/mysql/arm-mysql/src/models/logFilesMappers.ts +++ b/sdk/mysql/arm-mysql/src/models/logFilesMappers.ts @@ -8,6 +8,8 @@ export { discriminators, + Advisor, + AzureEntityResource, BaseResource, CloudError, Configuration, @@ -15,11 +17,27 @@ export { FirewallRule, LogFile, LogFileListResult, + PrivateEndpointConnection, + PrivateEndpointProperty, + PrivateLinkResource, + PrivateLinkResourceProperties, + PrivateLinkServiceConnectionStateProperty, ProxyResource, + QueryStatistic, + QueryText, + RecommendationAction, + Resource, + ResourceIdentity, Server, + ServerAdministratorResource, + ServerKey, + ServerPrivateEndpointConnection, + ServerPrivateEndpointConnectionProperties, + ServerPrivateLinkServiceConnectionStateProperty, ServerSecurityAlertPolicy, Sku, StorageProfile, TrackedResource, - VirtualNetworkRule + VirtualNetworkRule, + WaitStatistic } from "../models/mappers"; diff --git a/sdk/mysql/arm-mysql/src/models/mappers.ts b/sdk/mysql/arm-mysql/src/models/mappers.ts index ba6229c5b54f..f0af28065890 100644 --- a/sdk/mysql/arm-mysql/src/models/mappers.ts +++ b/sdk/mysql/arm-mysql/src/models/mappers.ts @@ -12,29 +12,76 @@ import * as msRest from "@azure/ms-rest-js"; export const CloudError = CloudErrorMapper; export const BaseResource = BaseResourceMapper; -export const ProxyResource: msRest.CompositeMapper = { - serializedName: "ProxyResource", +export const PrivateEndpointProperty: msRest.CompositeMapper = { + serializedName: "PrivateEndpointProperty", type: { name: "Composite", - className: "ProxyResource", + className: "PrivateEndpointProperty", modelProperties: { id: { - readOnly: true, serializedName: "id", type: { name: "String" } + } + } + } +}; + +export const ServerPrivateLinkServiceConnectionStateProperty: msRest.CompositeMapper = { + serializedName: "ServerPrivateLinkServiceConnectionStateProperty", + type: { + name: "Composite", + className: "ServerPrivateLinkServiceConnectionStateProperty", + modelProperties: { + status: { + required: true, + serializedName: "status", + type: { + name: "String" + } }, - name: { + description: { + required: true, + serializedName: "description", + type: { + name: "String" + } + }, + actionsRequired: { readOnly: true, - serializedName: "name", + serializedName: "actionsRequired", type: { name: "String" } + } + } + } +}; + +export const ServerPrivateEndpointConnectionProperties: msRest.CompositeMapper = { + serializedName: "ServerPrivateEndpointConnectionProperties", + type: { + name: "Composite", + className: "ServerPrivateEndpointConnectionProperties", + modelProperties: { + privateEndpoint: { + serializedName: "privateEndpoint", + type: { + name: "Composite", + className: "PrivateEndpointProperty" + } }, - type: { + privateLinkServiceConnectionState: { + serializedName: "privateLinkServiceConnectionState", + type: { + name: "Composite", + className: "ServerPrivateLinkServiceConnectionStateProperty" + } + }, + provisioningState: { readOnly: true, - serializedName: "type", + serializedName: "provisioningState", type: { name: "String" } @@ -43,29 +90,25 @@ export const ProxyResource: msRest.CompositeMapper = { } }; -export const TrackedResource: msRest.CompositeMapper = { - serializedName: "TrackedResource", +export const ServerPrivateEndpointConnection: msRest.CompositeMapper = { + serializedName: "ServerPrivateEndpointConnection", type: { name: "Composite", - className: "TrackedResource", + className: "ServerPrivateEndpointConnection", modelProperties: { - ...ProxyResource.type.modelProperties, - location: { - required: true, - serializedName: "location", + id: { + readOnly: true, + serializedName: "id", type: { name: "String" } }, - tags: { - serializedName: "tags", + properties: { + readOnly: true, + serializedName: "properties", type: { - name: "Dictionary", - value: { - type: { - name: "String" - } - } + name: "Composite", + className: "ServerPrivateEndpointConnectionProperties" } } } @@ -133,6 +176,24 @@ export const ServerPropertiesForCreate: msRest.CompositeMapper = { ] } }, + minimalTlsVersion: { + serializedName: "minimalTlsVersion", + type: { + name: "String" + } + }, + infrastructureEncryption: { + serializedName: "infrastructureEncryption", + type: { + name: "String" + } + }, + publicNetworkAccess: { + serializedName: "publicNetworkAccess", + type: { + name: "String" + } + }, storageProfile: { serializedName: "storageProfile", type: { @@ -288,6 +349,96 @@ export const Sku: msRest.CompositeMapper = { } }; +export const ResourceIdentity: msRest.CompositeMapper = { + serializedName: "ResourceIdentity", + type: { + name: "Composite", + className: "ResourceIdentity", + modelProperties: { + principalId: { + readOnly: true, + serializedName: "principalId", + type: { + name: "Uuid" + } + }, + type: { + serializedName: "type", + type: { + name: "String" + } + }, + tenantId: { + readOnly: true, + serializedName: "tenantId", + type: { + name: "Uuid" + } + } + } + } +}; + +export const Resource: msRest.CompositeMapper = { + serializedName: "Resource", + type: { + name: "Composite", + className: "Resource", + modelProperties: { + id: { + readOnly: true, + serializedName: "id", + type: { + name: "String" + } + }, + name: { + readOnly: true, + serializedName: "name", + type: { + name: "String" + } + }, + type: { + readOnly: true, + serializedName: "type", + type: { + name: "String" + } + } + } + } +}; + +export const TrackedResource: msRest.CompositeMapper = { + serializedName: "TrackedResource", + type: { + name: "Composite", + className: "TrackedResource", + modelProperties: { + ...Resource.type.modelProperties, + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + } + }, + location: { + required: true, + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + export const Server: msRest.CompositeMapper = { serializedName: "Server", type: { @@ -295,6 +446,13 @@ export const Server: msRest.CompositeMapper = { className: "Server", modelProperties: { ...TrackedResource.type.modelProperties, + identity: { + serializedName: "identity", + type: { + name: "Composite", + className: "ResourceIdentity" + } + }, sku: { serializedName: "sku", type: { @@ -324,6 +482,25 @@ export const Server: msRest.CompositeMapper = { ] } }, + minimalTlsVersion: { + serializedName: "properties.minimalTlsVersion", + type: { + name: "String" + } + }, + byokEnforcement: { + readOnly: true, + serializedName: "properties.byokEnforcement", + type: { + name: "String" + } + }, + infrastructureEncryption: { + serializedName: "properties.infrastructureEncryption", + type: { + name: "String" + } + }, userVisibleState: { serializedName: "properties.userVisibleState", type: { @@ -369,6 +546,25 @@ export const Server: msRest.CompositeMapper = { type: { name: "Number" } + }, + publicNetworkAccess: { + serializedName: "properties.publicNetworkAccess", + type: { + name: "String" + } + }, + privateEndpointConnections: { + readOnly: true, + serializedName: "properties.privateEndpointConnections", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ServerPrivateEndpointConnection" + } + } + } } } } @@ -380,6 +576,13 @@ export const ServerForCreate: msRest.CompositeMapper = { name: "Composite", className: "ServerForCreate", modelProperties: { + identity: { + serializedName: "identity", + type: { + name: "Composite", + className: "ResourceIdentity" + } + }, sku: { serializedName: "sku", type: { @@ -423,6 +626,13 @@ export const ServerUpdateParameters: msRest.CompositeMapper = { name: "Composite", className: "ServerUpdateParameters", modelProperties: { + identity: { + serializedName: "identity", + type: { + name: "Composite", + className: "ResourceIdentity" + } + }, sku: { serializedName: "sku", type: { @@ -459,6 +669,18 @@ export const ServerUpdateParameters: msRest.CompositeMapper = { ] } }, + minimalTlsVersion: { + serializedName: "properties.minimalTlsVersion", + type: { + name: "String" + } + }, + publicNetworkAccess: { + serializedName: "properties.publicNetworkAccess", + type: { + name: "String" + } + }, replicationRole: { serializedName: "properties.replicationRole", type: { @@ -480,6 +702,17 @@ export const ServerUpdateParameters: msRest.CompositeMapper = { } }; +export const ProxyResource: msRest.CompositeMapper = { + serializedName: "ProxyResource", + type: { + name: "Composite", + className: "ProxyResource", + modelProperties: { + ...Resource.type.modelProperties + } + } +}; + export const FirewallRule: msRest.CompositeMapper = { serializedName: "FirewallRule", type: { @@ -900,68 +1133,752 @@ export const NameAvailability: msRest.CompositeMapper = { } }; -export const ServerSecurityAlertPolicy: msRest.CompositeMapper = { - serializedName: "ServerSecurityAlertPolicy", +export const ErrorAdditionalInfo: msRest.CompositeMapper = { + serializedName: "ErrorAdditionalInfo", type: { name: "Composite", - className: "ServerSecurityAlertPolicy", + className: "ErrorAdditionalInfo", modelProperties: { - ...ProxyResource.type.modelProperties, - state: { - required: true, - serializedName: "properties.state", + type: { + readOnly: true, + serializedName: "type", type: { - name: "Enum", - allowedValues: [ - "Enabled", - "Disabled" - ] + name: "String" } }, - disabledAlerts: { - serializedName: "properties.disabledAlerts", + info: { + readOnly: true, + serializedName: "info", type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } + name: "Object" } - }, - emailAddresses: { - serializedName: "properties.emailAddresses", + } + } + } +}; + +export const ErrorResponse: msRest.CompositeMapper = { + serializedName: "ErrorResponse", + type: { + name: "Composite", + className: "ErrorResponse", + modelProperties: { + code: { + readOnly: true, + serializedName: "code", type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } + name: "String" } }, - emailAccountAdmins: { - serializedName: "properties.emailAccountAdmins", + message: { + readOnly: true, + serializedName: "message", + type: { + name: "String" + } + }, + target: { + readOnly: true, + serializedName: "target", + type: { + name: "String" + } + }, + details: { + readOnly: true, + serializedName: "details", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ErrorResponse" + } + } + } + }, + additionalInfo: { + readOnly: true, + serializedName: "additionalInfo", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ErrorAdditionalInfo" + } + } + } + } + } + } +}; + +export const ServerAdministratorResource: msRest.CompositeMapper = { + serializedName: "ServerAdministratorResource", + type: { + name: "Composite", + className: "ServerAdministratorResource", + modelProperties: { + ...ProxyResource.type.modelProperties, + administratorType: { + required: true, + isConstant: true, + serializedName: "properties.administratorType", + defaultValue: 'ActiveDirectory', + type: { + name: "String" + } + }, + login: { + required: true, + serializedName: "properties.login", + type: { + name: "String" + } + }, + sid: { + required: true, + serializedName: "properties.sid", + type: { + name: "Uuid" + } + }, + tenantId: { + required: true, + serializedName: "properties.tenantId", + type: { + name: "Uuid" + } + } + } + } +}; + +export const AzureEntityResource: msRest.CompositeMapper = { + serializedName: "AzureEntityResource", + type: { + name: "Composite", + className: "AzureEntityResource", + modelProperties: { + ...Resource.type.modelProperties, + etag: { + readOnly: true, + serializedName: "etag", + type: { + name: "String" + } + } + } + } +}; + +export const ServerSecurityAlertPolicy: msRest.CompositeMapper = { + serializedName: "ServerSecurityAlertPolicy", + type: { + name: "Composite", + className: "ServerSecurityAlertPolicy", + modelProperties: { + ...ProxyResource.type.modelProperties, + state: { + required: true, + serializedName: "properties.state", + type: { + name: "Enum", + allowedValues: [ + "Enabled", + "Disabled" + ] + } + }, + disabledAlerts: { + serializedName: "properties.disabledAlerts", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + emailAddresses: { + serializedName: "properties.emailAddresses", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + emailAccountAdmins: { + serializedName: "properties.emailAccountAdmins", + type: { + name: "Boolean" + } + }, + storageEndpoint: { + serializedName: "properties.storageEndpoint", + type: { + name: "String" + } + }, + storageAccountAccessKey: { + serializedName: "properties.storageAccountAccessKey", + type: { + name: "String" + } + }, + retentionDays: { + serializedName: "properties.retentionDays", + type: { + name: "Number" + } + } + } + } +}; + +export const QueryText: msRest.CompositeMapper = { + serializedName: "QueryText", + type: { + name: "Composite", + className: "QueryText", + modelProperties: { + ...ProxyResource.type.modelProperties, + queryId: { + serializedName: "properties.queryId", + type: { + name: "String" + } + }, + queryText: { + serializedName: "properties.queryText", + type: { + name: "String" + } + } + } + } +}; + +export const TopQueryStatisticsInput: msRest.CompositeMapper = { + serializedName: "TopQueryStatisticsInput", + type: { + name: "Composite", + className: "TopQueryStatisticsInput", + modelProperties: { + numberOfTopQueries: { + required: true, + serializedName: "properties.numberOfTopQueries", + type: { + name: "Number" + } + }, + aggregationFunction: { + required: true, + serializedName: "properties.aggregationFunction", + type: { + name: "String" + } + }, + observedMetric: { + required: true, + serializedName: "properties.observedMetric", + type: { + name: "String" + } + }, + observationStartTime: { + required: true, + serializedName: "properties.observationStartTime", + type: { + name: "DateTime" + } + }, + observationEndTime: { + required: true, + serializedName: "properties.observationEndTime", + type: { + name: "DateTime" + } + }, + aggregationWindow: { + required: true, + serializedName: "properties.aggregationWindow", + type: { + name: "String" + } + } + } + } +}; + +export const QueryStatistic: msRest.CompositeMapper = { + serializedName: "QueryStatistic", + type: { + name: "Composite", + className: "QueryStatistic", + modelProperties: { + ...ProxyResource.type.modelProperties, + queryId: { + serializedName: "properties.queryId", + type: { + name: "String" + } + }, + startTime: { + serializedName: "properties.startTime", + type: { + name: "DateTime" + } + }, + endTime: { + serializedName: "properties.endTime", + type: { + name: "DateTime" + } + }, + aggregationFunction: { + serializedName: "properties.aggregationFunction", + type: { + name: "String" + } + }, + databaseNames: { + serializedName: "properties.databaseNames", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + queryExecutionCount: { + serializedName: "properties.queryExecutionCount", + type: { + name: "Number" + } + }, + metricName: { + serializedName: "properties.metricName", + type: { + name: "String" + } + }, + metricDisplayName: { + serializedName: "properties.metricDisplayName", + type: { + name: "String" + } + }, + metricValue: { + serializedName: "properties.metricValue", + type: { + name: "Number" + } + }, + metricValueUnit: { + serializedName: "properties.metricValueUnit", + type: { + name: "String" + } + } + } + } +}; + +export const WaitStatisticsInput: msRest.CompositeMapper = { + serializedName: "WaitStatisticsInput", + type: { + name: "Composite", + className: "WaitStatisticsInput", + modelProperties: { + observationStartTime: { + required: true, + serializedName: "properties.observationStartTime", + type: { + name: "DateTime" + } + }, + observationEndTime: { + required: true, + serializedName: "properties.observationEndTime", + type: { + name: "DateTime" + } + }, + aggregationWindow: { + required: true, + serializedName: "properties.aggregationWindow", + type: { + name: "String" + } + } + } + } +}; + +export const WaitStatistic: msRest.CompositeMapper = { + serializedName: "WaitStatistic", + type: { + name: "Composite", + className: "WaitStatistic", + modelProperties: { + ...ProxyResource.type.modelProperties, + startTime: { + serializedName: "properties.startTime", + type: { + name: "DateTime" + } + }, + endTime: { + serializedName: "properties.endTime", + type: { + name: "DateTime" + } + }, + eventName: { + serializedName: "properties.eventName", + type: { + name: "String" + } + }, + eventTypeName: { + serializedName: "properties.eventTypeName", + type: { + name: "String" + } + }, + queryId: { + serializedName: "properties.queryId", + type: { + name: "Number" + } + }, + databaseName: { + serializedName: "properties.databaseName", + type: { + name: "String" + } + }, + userId: { + serializedName: "properties.userId", + type: { + name: "Number" + } + }, + count: { + serializedName: "properties.count", + type: { + name: "Number" + } + }, + totalTimeInMs: { + serializedName: "properties.totalTimeInMs", + type: { + name: "Number" + } + } + } + } +}; + +export const Advisor: msRest.CompositeMapper = { + serializedName: "Advisor", + type: { + name: "Composite", + className: "Advisor", + modelProperties: { + ...ProxyResource.type.modelProperties, + properties: { + serializedName: "properties", + type: { + name: "Object" + } + } + } + } +}; + +export const RecommendationAction: msRest.CompositeMapper = { + serializedName: "RecommendationAction", + type: { + name: "Composite", + className: "RecommendationAction", + modelProperties: { + ...ProxyResource.type.modelProperties, + advisorName: { + serializedName: "properties.advisorName", + type: { + name: "String" + } + }, + sessionId: { + serializedName: "properties.sessionId", + type: { + name: "String" + } + }, + actionId: { + serializedName: "properties.actionId", + type: { + name: "Number" + } + }, + createdTime: { + serializedName: "properties.createdTime", + type: { + name: "DateTime" + } + }, + expirationTime: { + serializedName: "properties.expirationTime", + type: { + name: "DateTime" + } + }, + reason: { + serializedName: "properties.reason", + type: { + name: "String" + } + }, + recommendationType: { + serializedName: "properties.recommendationType", + type: { + name: "String" + } + }, + details: { + serializedName: "properties.details", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const RecommendedActionSessionsOperationStatus: msRest.CompositeMapper = { + serializedName: "RecommendedActionSessionsOperationStatus", + type: { + name: "Composite", + className: "RecommendedActionSessionsOperationStatus", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String" + } + }, + startTime: { + serializedName: "startTime", + type: { + name: "DateTime" + } + }, + status: { + serializedName: "status", + type: { + name: "String" + } + } + } + } +}; + +export const PrivateLinkServiceConnectionStateProperty: msRest.CompositeMapper = { + serializedName: "PrivateLinkServiceConnectionStateProperty", + type: { + name: "Composite", + className: "PrivateLinkServiceConnectionStateProperty", + modelProperties: { + status: { + required: true, + serializedName: "status", + type: { + name: "String" + } + }, + description: { + required: true, + serializedName: "description", + type: { + name: "String" + } + }, + actionsRequired: { + readOnly: true, + serializedName: "actionsRequired", + type: { + name: "String" + } + } + } + } +}; + +export const PrivateEndpointConnection: msRest.CompositeMapper = { + serializedName: "PrivateEndpointConnection", + type: { + name: "Composite", + className: "PrivateEndpointConnection", + modelProperties: { + ...ProxyResource.type.modelProperties, + privateEndpoint: { + serializedName: "properties.privateEndpoint", + type: { + name: "Composite", + className: "PrivateEndpointProperty" + } + }, + privateLinkServiceConnectionState: { + serializedName: "properties.privateLinkServiceConnectionState", + type: { + name: "Composite", + className: "PrivateLinkServiceConnectionStateProperty" + } + }, + provisioningState: { + readOnly: true, + serializedName: "properties.provisioningState", + type: { + name: "String" + } + } + } + } +}; + +export const TagsObject: msRest.CompositeMapper = { + serializedName: "TagsObject", + type: { + name: "Composite", + className: "TagsObject", + modelProperties: { + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const PrivateLinkResourceProperties: msRest.CompositeMapper = { + serializedName: "PrivateLinkResourceProperties", + type: { + name: "Composite", + className: "PrivateLinkResourceProperties", + modelProperties: { + groupId: { + readOnly: true, + serializedName: "groupId", + type: { + name: "String" + } + }, + requiredMembers: { + readOnly: true, + serializedName: "requiredMembers", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const PrivateLinkResource: msRest.CompositeMapper = { + serializedName: "PrivateLinkResource", + type: { + name: "Composite", + className: "PrivateLinkResource", + modelProperties: { + ...ProxyResource.type.modelProperties, + properties: { + readOnly: true, + serializedName: "properties", + type: { + name: "Composite", + className: "PrivateLinkResourceProperties" + } + } + } + } +}; + +export const ServerKey: msRest.CompositeMapper = { + serializedName: "ServerKey", + type: { + name: "Composite", + className: "ServerKey", + modelProperties: { + ...ProxyResource.type.modelProperties, + kind: { + readOnly: true, + serializedName: "kind", type: { - name: "Boolean" + name: "String" } }, - storageEndpoint: { - serializedName: "properties.storageEndpoint", + serverKeyType: { + required: true, + isConstant: true, + serializedName: "properties.serverKeyType", + defaultValue: 'AzureKeyVault', type: { name: "String" } }, - storageAccountAccessKey: { - serializedName: "properties.storageAccountAccessKey", + uri: { + serializedName: "properties.uri", type: { name: "String" } }, - retentionDays: { - serializedName: "properties.retentionDays", + creationDate: { + readOnly: true, + serializedName: "properties.creationDate", type: { - name: "Number" + name: "DateTime" + } + } + } + } +}; + +export const ServerUpgradeParameters: msRest.CompositeMapper = { + serializedName: "ServerUpgradeParameters", + type: { + name: "Composite", + className: "ServerUpgradeParameters", + modelProperties: { + targetServerVersion: { + serializedName: "properties.targetServerVersion", + type: { + name: "String" } } } @@ -1108,6 +2025,28 @@ export const LogFileListResult: msRest.CompositeMapper = { } }; +export const ServerAdministratorResourceListResult: msRest.CompositeMapper = { + serializedName: "ServerAdministratorResourceListResult", + type: { + name: "Composite", + className: "ServerAdministratorResourceListResult", + modelProperties: { + value: { + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ServerAdministratorResource" + } + } + } + } + } + } +}; + export const PerformanceTierListResult: msRest.CompositeMapper = { serializedName: "PerformanceTierListResult", type: { @@ -1130,6 +2069,246 @@ export const PerformanceTierListResult: msRest.CompositeMapper = { } }; +export const QueryTextsResultList: msRest.CompositeMapper = { + serializedName: "QueryTextsResultList", + type: { + name: "Composite", + className: "QueryTextsResultList", + modelProperties: { + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "QueryText" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const TopQueryStatisticsResultList: msRest.CompositeMapper = { + serializedName: "TopQueryStatisticsResultList", + type: { + name: "Composite", + className: "TopQueryStatisticsResultList", + modelProperties: { + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "QueryStatistic" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const WaitStatisticsResultList: msRest.CompositeMapper = { + serializedName: "WaitStatisticsResultList", + type: { + name: "Composite", + className: "WaitStatisticsResultList", + modelProperties: { + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "WaitStatistic" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const AdvisorsResultList: msRest.CompositeMapper = { + serializedName: "AdvisorsResultList", + type: { + name: "Composite", + className: "AdvisorsResultList", + modelProperties: { + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Advisor" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const RecommendationActionsResultList: msRest.CompositeMapper = { + serializedName: "RecommendationActionsResultList", + type: { + name: "Composite", + className: "RecommendationActionsResultList", + modelProperties: { + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "RecommendationAction" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const PrivateEndpointConnectionListResult: msRest.CompositeMapper = { + serializedName: "PrivateEndpointConnectionListResult", + type: { + name: "Composite", + className: "PrivateEndpointConnectionListResult", + modelProperties: { + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PrivateEndpointConnection" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const PrivateLinkResourceListResult: msRest.CompositeMapper = { + serializedName: "PrivateLinkResourceListResult", + type: { + name: "Composite", + className: "PrivateLinkResourceListResult", + modelProperties: { + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PrivateLinkResource" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const ServerKeyListResult: msRest.CompositeMapper = { + serializedName: "ServerKeyListResult", + type: { + name: "Composite", + className: "ServerKeyListResult", + modelProperties: { + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ServerKey" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + export const discriminators = { 'ServerPropertiesForCreate' : ServerPropertiesForCreate, 'ServerPropertiesForCreate.Default' : ServerPropertiesForDefaultCreate, diff --git a/sdk/mysql/arm-mysql/src/models/parameters.ts b/sdk/mysql/arm-mysql/src/models/parameters.ts index 7dbc0227f6c5..748c65f1fc18 100644 --- a/sdk/mysql/arm-mysql/src/models/parameters.ts +++ b/sdk/mysql/arm-mysql/src/models/parameters.ts @@ -20,11 +20,56 @@ export const acceptLanguage: msRest.OperationParameter = { } } }; -export const apiVersion: msRest.OperationQueryParameter = { +export const advisorName: msRest.OperationURLParameter = { + parameterPath: "advisorName", + mapper: { + required: true, + serializedName: "advisorName", + type: { + name: "String" + } + } +}; +export const apiVersion0: msRest.OperationQueryParameter = { + parameterPath: "apiVersion", + mapper: { + required: true, + isConstant: true, + serializedName: "api-version", + defaultValue: '2017-12-01', + constraints: { + MinLength: 1 + }, + type: { + name: "String" + } + } +}; +export const apiVersion1: msRest.OperationQueryParameter = { + parameterPath: "apiVersion", + mapper: { + required: true, + isConstant: true, + serializedName: "api-version", + defaultValue: '2020-01-01', + constraints: { + MinLength: 1 + }, + type: { + name: "String" + } + } +}; +export const apiVersion2: msRest.OperationQueryParameter = { parameterPath: "apiVersion", mapper: { required: true, + isConstant: true, serializedName: "api-version", + defaultValue: '2018-06-01', + constraints: { + MinLength: 1 + }, type: { name: "String" } @@ -60,6 +105,26 @@ export const firewallRuleName: msRest.OperationURLParameter = { } } }; +export const groupName: msRest.OperationURLParameter = { + parameterPath: "groupName", + mapper: { + required: true, + serializedName: "groupName", + type: { + name: "String" + } + } +}; +export const keyName: msRest.OperationURLParameter = { + parameterPath: "keyName", + mapper: { + required: true, + serializedName: "keyName", + type: { + name: "String" + } + } +}; export const locationName: msRest.OperationURLParameter = { parameterPath: "locationName", mapper: { @@ -81,11 +146,82 @@ export const nextPageLink: msRest.OperationURLParameter = { }, skipEncoding: true }; +export const operationId: msRest.OperationURLParameter = { + parameterPath: "operationId", + mapper: { + required: true, + serializedName: "operationId", + type: { + name: "String" + } + } +}; +export const privateEndpointConnectionName: msRest.OperationURLParameter = { + parameterPath: "privateEndpointConnectionName", + mapper: { + required: true, + serializedName: "privateEndpointConnectionName", + type: { + name: "String" + } + } +}; +export const queryId: msRest.OperationURLParameter = { + parameterPath: "queryId", + mapper: { + required: true, + serializedName: "queryId", + type: { + name: "String" + } + } +}; +export const queryIds: msRest.OperationQueryParameter = { + parameterPath: "queryIds", + mapper: { + required: true, + serializedName: "queryIds", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + collectionFormat: msRest.QueryCollectionFormat.Multi +}; +export const queryStatisticId: msRest.OperationURLParameter = { + parameterPath: "queryStatisticId", + mapper: { + required: true, + serializedName: "queryStatisticId", + type: { + name: "String" + } + } +}; +export const recommendedActionName: msRest.OperationURLParameter = { + parameterPath: "recommendedActionName", + mapper: { + required: true, + serializedName: "recommendedActionName", + type: { + name: "String" + } + } +}; export const resourceGroupName: msRest.OperationURLParameter = { parameterPath: "resourceGroupName", mapper: { required: true, serializedName: "resourceGroupName", + constraints: { + MaxLength: 90, + MinLength: 1, + Pattern: /^[-\w\._\(\)]+$/ + }, type: { name: "String" } @@ -113,11 +249,26 @@ export const serverName: msRest.OperationURLParameter = { } } }; +export const sessionId: msRest.OperationQueryParameter = { + parameterPath: [ + "options", + "sessionId" + ], + mapper: { + serializedName: "sessionId", + type: { + name: "String" + } + } +}; export const subscriptionId: msRest.OperationURLParameter = { parameterPath: "subscriptionId", mapper: { required: true, serializedName: "subscriptionId", + constraints: { + MinLength: 1 + }, type: { name: "String" } @@ -133,3 +284,13 @@ export const virtualNetworkRuleName: msRest.OperationURLParameter = { } } }; +export const waitStatisticsId: msRest.OperationURLParameter = { + parameterPath: "waitStatisticsId", + mapper: { + required: true, + serializedName: "waitStatisticsId", + type: { + name: "String" + } + } +}; diff --git a/sdk/mysql/arm-mysql/src/models/privateEndpointConnectionsMappers.ts b/sdk/mysql/arm-mysql/src/models/privateEndpointConnectionsMappers.ts new file mode 100644 index 000000000000..e78d29ea0b36 --- /dev/null +++ b/sdk/mysql/arm-mysql/src/models/privateEndpointConnectionsMappers.ts @@ -0,0 +1,46 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + discriminators, + Advisor, + AzureEntityResource, + BaseResource, + CloudError, + Configuration, + Database, + ErrorAdditionalInfo, + ErrorResponse, + FirewallRule, + LogFile, + PrivateEndpointConnection, + PrivateEndpointConnectionListResult, + PrivateEndpointProperty, + PrivateLinkResource, + PrivateLinkResourceProperties, + PrivateLinkServiceConnectionStateProperty, + ProxyResource, + QueryStatistic, + QueryText, + RecommendationAction, + Resource, + ResourceIdentity, + Server, + ServerAdministratorResource, + ServerKey, + ServerPrivateEndpointConnection, + ServerPrivateEndpointConnectionProperties, + ServerPrivateLinkServiceConnectionStateProperty, + ServerSecurityAlertPolicy, + Sku, + StorageProfile, + TagsObject, + TrackedResource, + VirtualNetworkRule, + WaitStatistic +} from "../models/mappers"; diff --git a/sdk/mysql/arm-mysql/src/models/privateLinkResourcesMappers.ts b/sdk/mysql/arm-mysql/src/models/privateLinkResourcesMappers.ts new file mode 100644 index 000000000000..c2d7cf1721dc --- /dev/null +++ b/sdk/mysql/arm-mysql/src/models/privateLinkResourcesMappers.ts @@ -0,0 +1,45 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + discriminators, + Advisor, + AzureEntityResource, + BaseResource, + CloudError, + Configuration, + Database, + ErrorAdditionalInfo, + ErrorResponse, + FirewallRule, + LogFile, + PrivateEndpointConnection, + PrivateEndpointProperty, + PrivateLinkResource, + PrivateLinkResourceListResult, + PrivateLinkResourceProperties, + PrivateLinkServiceConnectionStateProperty, + ProxyResource, + QueryStatistic, + QueryText, + RecommendationAction, + Resource, + ResourceIdentity, + Server, + ServerAdministratorResource, + ServerKey, + ServerPrivateEndpointConnection, + ServerPrivateEndpointConnectionProperties, + ServerPrivateLinkServiceConnectionStateProperty, + ServerSecurityAlertPolicy, + Sku, + StorageProfile, + TrackedResource, + VirtualNetworkRule, + WaitStatistic +} from "../models/mappers"; diff --git a/sdk/mysql/arm-mysql/src/models/queryTextsMappers.ts b/sdk/mysql/arm-mysql/src/models/queryTextsMappers.ts new file mode 100644 index 000000000000..95192ca5c20f --- /dev/null +++ b/sdk/mysql/arm-mysql/src/models/queryTextsMappers.ts @@ -0,0 +1,43 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + discriminators, + Advisor, + AzureEntityResource, + BaseResource, + CloudError, + Configuration, + Database, + FirewallRule, + LogFile, + PrivateEndpointConnection, + PrivateEndpointProperty, + PrivateLinkResource, + PrivateLinkResourceProperties, + PrivateLinkServiceConnectionStateProperty, + ProxyResource, + QueryStatistic, + QueryText, + QueryTextsResultList, + RecommendationAction, + Resource, + ResourceIdentity, + Server, + ServerAdministratorResource, + ServerKey, + ServerPrivateEndpointConnection, + ServerPrivateEndpointConnectionProperties, + ServerPrivateLinkServiceConnectionStateProperty, + ServerSecurityAlertPolicy, + Sku, + StorageProfile, + TrackedResource, + VirtualNetworkRule, + WaitStatistic +} from "../models/mappers"; diff --git a/sdk/mysql/arm-mysql/src/models/recommendedActionsMappers.ts b/sdk/mysql/arm-mysql/src/models/recommendedActionsMappers.ts new file mode 100644 index 000000000000..2c50ada3b730 --- /dev/null +++ b/sdk/mysql/arm-mysql/src/models/recommendedActionsMappers.ts @@ -0,0 +1,43 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + discriminators, + Advisor, + AzureEntityResource, + BaseResource, + CloudError, + Configuration, + Database, + FirewallRule, + LogFile, + PrivateEndpointConnection, + PrivateEndpointProperty, + PrivateLinkResource, + PrivateLinkResourceProperties, + PrivateLinkServiceConnectionStateProperty, + ProxyResource, + QueryStatistic, + QueryText, + RecommendationAction, + RecommendationActionsResultList, + Resource, + ResourceIdentity, + Server, + ServerAdministratorResource, + ServerKey, + ServerPrivateEndpointConnection, + ServerPrivateEndpointConnectionProperties, + ServerPrivateLinkServiceConnectionStateProperty, + ServerSecurityAlertPolicy, + Sku, + StorageProfile, + TrackedResource, + VirtualNetworkRule, + WaitStatistic +} from "../models/mappers"; diff --git a/sdk/mysql/arm-mysql/src/models/replicasMappers.ts b/sdk/mysql/arm-mysql/src/models/replicasMappers.ts index b86a44e417cd..00664bf629fe 100644 --- a/sdk/mysql/arm-mysql/src/models/replicasMappers.ts +++ b/sdk/mysql/arm-mysql/src/models/replicasMappers.ts @@ -8,18 +8,36 @@ export { discriminators, + Advisor, + AzureEntityResource, BaseResource, CloudError, Configuration, Database, FirewallRule, LogFile, + PrivateEndpointConnection, + PrivateEndpointProperty, + PrivateLinkResource, + PrivateLinkResourceProperties, + PrivateLinkServiceConnectionStateProperty, ProxyResource, + QueryStatistic, + QueryText, + RecommendationAction, + Resource, + ResourceIdentity, Server, + ServerAdministratorResource, + ServerKey, ServerListResult, + ServerPrivateEndpointConnection, + ServerPrivateEndpointConnectionProperties, + ServerPrivateLinkServiceConnectionStateProperty, ServerSecurityAlertPolicy, Sku, StorageProfile, TrackedResource, - VirtualNetworkRule + VirtualNetworkRule, + WaitStatistic } from "../models/mappers"; diff --git a/sdk/mysql/arm-mysql/src/models/serverAdministratorsMappers.ts b/sdk/mysql/arm-mysql/src/models/serverAdministratorsMappers.ts new file mode 100644 index 000000000000..b603c8aad0fb --- /dev/null +++ b/sdk/mysql/arm-mysql/src/models/serverAdministratorsMappers.ts @@ -0,0 +1,45 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + discriminators, + Advisor, + AzureEntityResource, + BaseResource, + CloudError, + Configuration, + Database, + ErrorAdditionalInfo, + ErrorResponse, + FirewallRule, + LogFile, + PrivateEndpointConnection, + PrivateEndpointProperty, + PrivateLinkResource, + PrivateLinkResourceProperties, + PrivateLinkServiceConnectionStateProperty, + ProxyResource, + QueryStatistic, + QueryText, + RecommendationAction, + Resource, + ResourceIdentity, + Server, + ServerAdministratorResource, + ServerAdministratorResourceListResult, + ServerKey, + ServerPrivateEndpointConnection, + ServerPrivateEndpointConnectionProperties, + ServerPrivateLinkServiceConnectionStateProperty, + ServerSecurityAlertPolicy, + Sku, + StorageProfile, + TrackedResource, + VirtualNetworkRule, + WaitStatistic +} from "../models/mappers"; diff --git a/sdk/mysql/arm-mysql/src/models/serverKeysMappers.ts b/sdk/mysql/arm-mysql/src/models/serverKeysMappers.ts new file mode 100644 index 000000000000..df596d683f17 --- /dev/null +++ b/sdk/mysql/arm-mysql/src/models/serverKeysMappers.ts @@ -0,0 +1,45 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + discriminators, + Advisor, + AzureEntityResource, + BaseResource, + CloudError, + Configuration, + Database, + ErrorAdditionalInfo, + ErrorResponse, + FirewallRule, + LogFile, + PrivateEndpointConnection, + PrivateEndpointProperty, + PrivateLinkResource, + PrivateLinkResourceProperties, + PrivateLinkServiceConnectionStateProperty, + ProxyResource, + QueryStatistic, + QueryText, + RecommendationAction, + Resource, + ResourceIdentity, + Server, + ServerAdministratorResource, + ServerKey, + ServerKeyListResult, + ServerPrivateEndpointConnection, + ServerPrivateEndpointConnectionProperties, + ServerPrivateLinkServiceConnectionStateProperty, + ServerSecurityAlertPolicy, + Sku, + StorageProfile, + TrackedResource, + VirtualNetworkRule, + WaitStatistic +} from "../models/mappers"; diff --git a/sdk/mysql/arm-mysql/src/models/serverSecurityAlertPoliciesMappers.ts b/sdk/mysql/arm-mysql/src/models/serverSecurityAlertPoliciesMappers.ts index 9555ebb4e3ca..a9d0ce4d32ee 100644 --- a/sdk/mysql/arm-mysql/src/models/serverSecurityAlertPoliciesMappers.ts +++ b/sdk/mysql/arm-mysql/src/models/serverSecurityAlertPoliciesMappers.ts @@ -8,17 +8,35 @@ export { discriminators, + Advisor, + AzureEntityResource, BaseResource, CloudError, Configuration, Database, FirewallRule, LogFile, + PrivateEndpointConnection, + PrivateEndpointProperty, + PrivateLinkResource, + PrivateLinkResourceProperties, + PrivateLinkServiceConnectionStateProperty, ProxyResource, + QueryStatistic, + QueryText, + RecommendationAction, + Resource, + ResourceIdentity, Server, + ServerAdministratorResource, + ServerKey, + ServerPrivateEndpointConnection, + ServerPrivateEndpointConnectionProperties, + ServerPrivateLinkServiceConnectionStateProperty, ServerSecurityAlertPolicy, Sku, StorageProfile, TrackedResource, - VirtualNetworkRule + VirtualNetworkRule, + WaitStatistic } from "../models/mappers"; diff --git a/sdk/mysql/arm-mysql/src/models/serversMappers.ts b/sdk/mysql/arm-mysql/src/models/serversMappers.ts index 4495c8e37cdd..b2fc0fb0811a 100644 --- a/sdk/mysql/arm-mysql/src/models/serversMappers.ts +++ b/sdk/mysql/arm-mysql/src/models/serversMappers.ts @@ -8,16 +8,33 @@ export { discriminators, + Advisor, + AzureEntityResource, BaseResource, CloudError, Configuration, Database, FirewallRule, LogFile, + PrivateEndpointConnection, + PrivateEndpointProperty, + PrivateLinkResource, + PrivateLinkResourceProperties, + PrivateLinkServiceConnectionStateProperty, ProxyResource, + QueryStatistic, + QueryText, + RecommendationAction, + Resource, + ResourceIdentity, Server, + ServerAdministratorResource, ServerForCreate, + ServerKey, ServerListResult, + ServerPrivateEndpointConnection, + ServerPrivateEndpointConnectionProperties, + ServerPrivateLinkServiceConnectionStateProperty, ServerPropertiesForCreate, ServerPropertiesForDefaultCreate, ServerPropertiesForGeoRestore, @@ -25,8 +42,10 @@ export { ServerPropertiesForRestore, ServerSecurityAlertPolicy, ServerUpdateParameters, + ServerUpgradeParameters, Sku, StorageProfile, TrackedResource, - VirtualNetworkRule + VirtualNetworkRule, + WaitStatistic } from "../models/mappers"; diff --git a/sdk/mysql/arm-mysql/src/models/topQueryStatisticsMappers.ts b/sdk/mysql/arm-mysql/src/models/topQueryStatisticsMappers.ts new file mode 100644 index 000000000000..90a1e6a92427 --- /dev/null +++ b/sdk/mysql/arm-mysql/src/models/topQueryStatisticsMappers.ts @@ -0,0 +1,44 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + discriminators, + Advisor, + AzureEntityResource, + BaseResource, + CloudError, + Configuration, + Database, + FirewallRule, + LogFile, + PrivateEndpointConnection, + PrivateEndpointProperty, + PrivateLinkResource, + PrivateLinkResourceProperties, + PrivateLinkServiceConnectionStateProperty, + ProxyResource, + QueryStatistic, + QueryText, + RecommendationAction, + Resource, + ResourceIdentity, + Server, + ServerAdministratorResource, + ServerKey, + ServerPrivateEndpointConnection, + ServerPrivateEndpointConnectionProperties, + ServerPrivateLinkServiceConnectionStateProperty, + ServerSecurityAlertPolicy, + Sku, + StorageProfile, + TopQueryStatisticsInput, + TopQueryStatisticsResultList, + TrackedResource, + VirtualNetworkRule, + WaitStatistic +} from "../models/mappers"; diff --git a/sdk/mysql/arm-mysql/src/models/virtualNetworkRulesMappers.ts b/sdk/mysql/arm-mysql/src/models/virtualNetworkRulesMappers.ts index 08d2a62e7e38..362fb2c78762 100644 --- a/sdk/mysql/arm-mysql/src/models/virtualNetworkRulesMappers.ts +++ b/sdk/mysql/arm-mysql/src/models/virtualNetworkRulesMappers.ts @@ -8,18 +8,36 @@ export { discriminators, + Advisor, + AzureEntityResource, BaseResource, CloudError, Configuration, Database, FirewallRule, LogFile, + PrivateEndpointConnection, + PrivateEndpointProperty, + PrivateLinkResource, + PrivateLinkResourceProperties, + PrivateLinkServiceConnectionStateProperty, ProxyResource, + QueryStatistic, + QueryText, + RecommendationAction, + Resource, + ResourceIdentity, Server, + ServerAdministratorResource, + ServerKey, + ServerPrivateEndpointConnection, + ServerPrivateEndpointConnectionProperties, + ServerPrivateLinkServiceConnectionStateProperty, ServerSecurityAlertPolicy, Sku, StorageProfile, TrackedResource, VirtualNetworkRule, - VirtualNetworkRuleListResult + VirtualNetworkRuleListResult, + WaitStatistic } from "../models/mappers"; diff --git a/sdk/mysql/arm-mysql/src/models/waitStatisticsMappers.ts b/sdk/mysql/arm-mysql/src/models/waitStatisticsMappers.ts new file mode 100644 index 000000000000..5a3c5fc994c2 --- /dev/null +++ b/sdk/mysql/arm-mysql/src/models/waitStatisticsMappers.ts @@ -0,0 +1,44 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + discriminators, + Advisor, + AzureEntityResource, + BaseResource, + CloudError, + Configuration, + Database, + FirewallRule, + LogFile, + PrivateEndpointConnection, + PrivateEndpointProperty, + PrivateLinkResource, + PrivateLinkResourceProperties, + PrivateLinkServiceConnectionStateProperty, + ProxyResource, + QueryStatistic, + QueryText, + RecommendationAction, + Resource, + ResourceIdentity, + Server, + ServerAdministratorResource, + ServerKey, + ServerPrivateEndpointConnection, + ServerPrivateEndpointConnectionProperties, + ServerPrivateLinkServiceConnectionStateProperty, + ServerSecurityAlertPolicy, + Sku, + StorageProfile, + TrackedResource, + VirtualNetworkRule, + WaitStatistic, + WaitStatisticsInput, + WaitStatisticsResultList +} from "../models/mappers"; diff --git a/sdk/mysql/arm-mysql/src/mySQLManagementClient.ts b/sdk/mysql/arm-mysql/src/mySQLManagementClient.ts index aa67d2e2852d..5cd55e375cda 100644 --- a/sdk/mysql/arm-mysql/src/mySQLManagementClient.ts +++ b/sdk/mysql/arm-mysql/src/mySQLManagementClient.ts @@ -9,8 +9,10 @@ */ import * as msRest from "@azure/ms-rest-js"; +import * as msRestAzure from "@azure/ms-rest-azure-js"; import * as Models from "./models"; import * as Mappers from "./models/mappers"; +import * as Parameters from "./models/parameters"; import * as operations from "./operations"; import { MySQLManagementClientContext } from "./mySQLManagementClientContext"; @@ -24,15 +26,26 @@ class MySQLManagementClient extends MySQLManagementClientContext { databases: operations.Databases; configurations: operations.Configurations; logFiles: operations.LogFiles; + serverAdministrators: operations.ServerAdministrators; locationBasedPerformanceTier: operations.LocationBasedPerformanceTier; checkNameAvailability: operations.CheckNameAvailability; - serverSecurityAlertPolicies: operations.ServerSecurityAlertPolicies; operations: operations.Operations; + serverSecurityAlertPolicies: operations.ServerSecurityAlertPolicies; + queryTexts: operations.QueryTexts; + topQueryStatistics: operations.TopQueryStatistics; + waitStatistics: operations.WaitStatistics; + advisors: operations.Advisors; + recommendedActions: operations.RecommendedActions; + locationBasedRecommendedActionSessionsOperationStatus: operations.LocationBasedRecommendedActionSessionsOperationStatus; + locationBasedRecommendedActionSessionsResult: operations.LocationBasedRecommendedActionSessionsResult; + privateEndpointConnections: operations.PrivateEndpointConnections; + privateLinkResources: operations.PrivateLinkResources; + serverKeys: operations.ServerKeys; /** * Initializes a new instance of the MySQLManagementClient class. * @param credentials Credentials needed for the client to connect to Azure. - * @param subscriptionId The subscription ID that identifies an Azure subscription. + * @param subscriptionId The ID of the target subscription. * @param [options] The parameter options */ constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.MySQLManagementClientOptions) { @@ -44,14 +57,87 @@ class MySQLManagementClient extends MySQLManagementClientContext { this.databases = new operations.Databases(this); this.configurations = new operations.Configurations(this); this.logFiles = new operations.LogFiles(this); + this.serverAdministrators = new operations.ServerAdministrators(this); this.locationBasedPerformanceTier = new operations.LocationBasedPerformanceTier(this); this.checkNameAvailability = new operations.CheckNameAvailability(this); - this.serverSecurityAlertPolicies = new operations.ServerSecurityAlertPolicies(this); this.operations = new operations.Operations(this); + this.serverSecurityAlertPolicies = new operations.ServerSecurityAlertPolicies(this); + this.queryTexts = new operations.QueryTexts(this); + this.topQueryStatistics = new operations.TopQueryStatistics(this); + this.waitStatistics = new operations.WaitStatistics(this); + this.advisors = new operations.Advisors(this); + this.recommendedActions = new operations.RecommendedActions(this); + this.locationBasedRecommendedActionSessionsOperationStatus = new operations.LocationBasedRecommendedActionSessionsOperationStatus(this); + this.locationBasedRecommendedActionSessionsResult = new operations.LocationBasedRecommendedActionSessionsResult(this); + this.privateEndpointConnections = new operations.PrivateEndpointConnections(this); + this.privateLinkResources = new operations.PrivateLinkResources(this); + this.serverKeys = new operations.ServerKeys(this); + } + + /** + * Create recommendation action session for the advisor. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param advisorName The advisor name for recommendation action. + * @param databaseName The name of the database. + * @param [options] The optional parameters + * @returns Promise + */ + createRecommendedActionSession(resourceGroupName: string, serverName: string, advisorName: string, databaseName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginCreateRecommendedActionSession(resourceGroupName,serverName,advisorName,databaseName,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + + /** + * Create recommendation action session for the advisor. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param advisorName The advisor name for recommendation action. + * @param databaseName The name of the database. + * @param [options] The optional parameters + * @returns Promise + */ + beginCreateRecommendedActionSession(resourceGroupName: string, serverName: string, advisorName: string, databaseName: string, options?: msRest.RequestOptionsBase): Promise { + return this.sendLRORequest( + { + resourceGroupName, + serverName, + advisorName, + databaseName, + options + }, + beginCreateRecommendedActionSessionOperationSpec, + options); } } // Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const beginCreateRecommendedActionSessionOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}/advisors/{advisorName}/createRecommendedActionSession", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.advisorName + ], + queryParameters: [ + Parameters.apiVersion2, + Parameters.databaseName + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 202: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; export { MySQLManagementClient, diff --git a/sdk/mysql/arm-mysql/src/mySQLManagementClientContext.ts b/sdk/mysql/arm-mysql/src/mySQLManagementClientContext.ts index 7171fdfd9303..c79cfb9f057d 100644 --- a/sdk/mysql/arm-mysql/src/mySQLManagementClientContext.ts +++ b/sdk/mysql/arm-mysql/src/mySQLManagementClientContext.ts @@ -18,12 +18,11 @@ const packageVersion = "3.3.0"; export class MySQLManagementClientContext extends msRestAzure.AzureServiceClient { credentials: msRest.ServiceClientCredentials; subscriptionId: string; - apiVersion?: string; /** * Initializes a new instance of the MySQLManagementClient class. * @param credentials Credentials needed for the client to connect to Azure. - * @param subscriptionId The subscription ID that identifies an Azure subscription. + * @param subscriptionId The ID of the target subscription. * @param [options] The parameter options */ constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.MySQLManagementClientOptions) { @@ -44,7 +43,6 @@ export class MySQLManagementClientContext extends msRestAzure.AzureServiceClient super(credentials, options); - this.apiVersion = '2017-12-01'; this.acceptLanguage = 'en-US'; this.longRunningOperationRetryTimeout = 30; this.baseUri = options.baseUri || this.baseUri || "https://management.azure.com"; diff --git a/sdk/mysql/arm-mysql/src/operations/advisors.ts b/sdk/mysql/arm-mysql/src/operations/advisors.ts new file mode 100644 index 000000000000..db9a9f426141 --- /dev/null +++ b/sdk/mysql/arm-mysql/src/operations/advisors.ts @@ -0,0 +1,198 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/advisorsMappers"; +import * as Parameters from "../models/parameters"; +import { MySQLManagementClientContext } from "../mySQLManagementClientContext"; + +/** Class representing a Advisors. */ +export class Advisors { + private readonly client: MySQLManagementClientContext; + + /** + * Create a Advisors. + * @param {MySQLManagementClientContext} client Reference to the service client. + */ + constructor(client: MySQLManagementClientContext) { + this.client = client; + } + + /** + * Get a recommendation action advisor. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param advisorName The advisor name for recommendation action. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, serverName: string, advisorName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param advisorName The advisor name for recommendation action. + * @param callback The callback + */ + get(resourceGroupName: string, serverName: string, advisorName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param advisorName The advisor name for recommendation action. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, serverName: string, advisorName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, serverName: string, advisorName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + advisorName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * List recommendation action advisors. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param [options] The optional parameters + * @returns Promise + */ + listByServer(resourceGroupName: string, serverName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param callback The callback + */ + listByServer(resourceGroupName: string, serverName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param options The optional parameters + * @param callback The callback + */ + listByServer(resourceGroupName: string, serverName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByServer(resourceGroupName: string, serverName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + options + }, + listByServerOperationSpec, + callback) as Promise; + } + + /** + * List recommendation action advisors. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByServerNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByServerNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listByServerNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByServerNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByServerNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}/advisors/{advisorName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.advisorName + ], + queryParameters: [ + Parameters.apiVersion2 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.Advisor + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByServerOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}/advisors", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.serverName + ], + queryParameters: [ + Parameters.apiVersion2 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.AdvisorsResultList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByServerNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.AdvisorsResultList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/mysql/arm-mysql/src/operations/checkNameAvailability.ts b/sdk/mysql/arm-mysql/src/operations/checkNameAvailability.ts index 1461d4413798..da2757e357f2 100644 --- a/sdk/mysql/arm-mysql/src/operations/checkNameAvailability.ts +++ b/sdk/mysql/arm-mysql/src/operations/checkNameAvailability.ts @@ -67,7 +67,7 @@ const executeOperationSpec: msRest.OperationSpec = { Parameters.subscriptionId ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage diff --git a/sdk/mysql/arm-mysql/src/operations/configurations.ts b/sdk/mysql/arm-mysql/src/operations/configurations.ts index 9eef7a32e000..9cee15b8a483 100644 --- a/sdk/mysql/arm-mysql/src/operations/configurations.ts +++ b/sdk/mysql/arm-mysql/src/operations/configurations.ts @@ -29,8 +29,7 @@ export class Configurations { /** * Updates a configuration of a server. - * @param resourceGroupName The name of the resource group that contains the resource. You can - * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param configurationName The name of the server configuration. * @param parameters The required parameters for updating a server configuration. @@ -44,8 +43,7 @@ export class Configurations { /** * Gets information about a configuration of server. - * @param resourceGroupName The name of the resource group that contains the resource. You can - * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param configurationName The name of the server configuration. * @param [options] The optional parameters @@ -53,16 +51,14 @@ export class Configurations { */ get(resourceGroupName: string, serverName: string, configurationName: string, options?: msRest.RequestOptionsBase): Promise; /** - * @param resourceGroupName The name of the resource group that contains the resource. You can - * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param configurationName The name of the server configuration. * @param callback The callback */ get(resourceGroupName: string, serverName: string, configurationName: string, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName The name of the resource group that contains the resource. You can - * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param configurationName The name of the server configuration. * @param options The optional parameters @@ -83,23 +79,20 @@ export class Configurations { /** * List all the configurations in a given server. - * @param resourceGroupName The name of the resource group that contains the resource. You can - * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param [options] The optional parameters * @returns Promise */ listByServer(resourceGroupName: string, serverName: string, options?: msRest.RequestOptionsBase): Promise; /** - * @param resourceGroupName The name of the resource group that contains the resource. You can - * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param callback The callback */ listByServer(resourceGroupName: string, serverName: string, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName The name of the resource group that contains the resource. You can - * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param options The optional parameters * @param callback The callback @@ -118,8 +111,7 @@ export class Configurations { /** * Updates a configuration of a server. - * @param resourceGroupName The name of the resource group that contains the resource. You can - * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param configurationName The name of the server configuration. * @param parameters The required parameters for updating a server configuration. @@ -152,7 +144,7 @@ const getOperationSpec: msRest.OperationSpec = { Parameters.configurationName ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage @@ -177,7 +169,7 @@ const listByServerOperationSpec: msRest.OperationSpec = { Parameters.serverName ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage @@ -203,7 +195,7 @@ const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { Parameters.configurationName ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage diff --git a/sdk/mysql/arm-mysql/src/operations/databases.ts b/sdk/mysql/arm-mysql/src/operations/databases.ts index c0400068269c..46ec6f68134d 100644 --- a/sdk/mysql/arm-mysql/src/operations/databases.ts +++ b/sdk/mysql/arm-mysql/src/operations/databases.ts @@ -29,8 +29,7 @@ export class Databases { /** * Creates a new database or updates an existing database. - * @param resourceGroupName The name of the resource group that contains the resource. You can - * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The required parameters for creating or updating a database. @@ -44,8 +43,7 @@ export class Databases { /** * Deletes a database. - * @param resourceGroupName The name of the resource group that contains the resource. You can - * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param databaseName The name of the database. * @param [options] The optional parameters @@ -58,8 +56,7 @@ export class Databases { /** * Gets information about a database. - * @param resourceGroupName The name of the resource group that contains the resource. You can - * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param databaseName The name of the database. * @param [options] The optional parameters @@ -67,16 +64,14 @@ export class Databases { */ get(resourceGroupName: string, serverName: string, databaseName: string, options?: msRest.RequestOptionsBase): Promise; /** - * @param resourceGroupName The name of the resource group that contains the resource. You can - * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param databaseName The name of the database. * @param callback The callback */ get(resourceGroupName: string, serverName: string, databaseName: string, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName The name of the resource group that contains the resource. You can - * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param databaseName The name of the database. * @param options The optional parameters @@ -97,23 +92,20 @@ export class Databases { /** * List all the databases in a given server. - * @param resourceGroupName The name of the resource group that contains the resource. You can - * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param [options] The optional parameters * @returns Promise */ listByServer(resourceGroupName: string, serverName: string, options?: msRest.RequestOptionsBase): Promise; /** - * @param resourceGroupName The name of the resource group that contains the resource. You can - * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param callback The callback */ listByServer(resourceGroupName: string, serverName: string, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName The name of the resource group that contains the resource. You can - * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param options The optional parameters * @param callback The callback @@ -132,8 +124,7 @@ export class Databases { /** * Creates a new database or updates an existing database. - * @param resourceGroupName The name of the resource group that contains the resource. You can - * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The required parameters for creating or updating a database. @@ -155,8 +146,7 @@ export class Databases { /** * Deletes a database. - * @param resourceGroupName The name of the resource group that contains the resource. You can - * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param databaseName The name of the database. * @param [options] The optional parameters @@ -187,7 +177,7 @@ const getOperationSpec: msRest.OperationSpec = { Parameters.databaseName ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage @@ -212,7 +202,7 @@ const listByServerOperationSpec: msRest.OperationSpec = { Parameters.serverName ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage @@ -238,7 +228,7 @@ const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { Parameters.databaseName ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage @@ -275,7 +265,7 @@ const beginDeleteMethodOperationSpec: msRest.OperationSpec = { Parameters.databaseName ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage diff --git a/sdk/mysql/arm-mysql/src/operations/firewallRules.ts b/sdk/mysql/arm-mysql/src/operations/firewallRules.ts index 1744e21a520a..f2e6da83b8f6 100644 --- a/sdk/mysql/arm-mysql/src/operations/firewallRules.ts +++ b/sdk/mysql/arm-mysql/src/operations/firewallRules.ts @@ -29,8 +29,7 @@ export class FirewallRules { /** * Creates a new firewall rule or updates an existing firewall rule. - * @param resourceGroupName The name of the resource group that contains the resource. You can - * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param firewallRuleName The name of the server firewall rule. * @param parameters The required parameters for creating or updating a firewall rule. @@ -44,8 +43,7 @@ export class FirewallRules { /** * Deletes a server firewall rule. - * @param resourceGroupName The name of the resource group that contains the resource. You can - * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param firewallRuleName The name of the server firewall rule. * @param [options] The optional parameters @@ -58,8 +56,7 @@ export class FirewallRules { /** * Gets information about a server firewall rule. - * @param resourceGroupName The name of the resource group that contains the resource. You can - * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param firewallRuleName The name of the server firewall rule. * @param [options] The optional parameters @@ -67,16 +64,14 @@ export class FirewallRules { */ get(resourceGroupName: string, serverName: string, firewallRuleName: string, options?: msRest.RequestOptionsBase): Promise; /** - * @param resourceGroupName The name of the resource group that contains the resource. You can - * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param firewallRuleName The name of the server firewall rule. * @param callback The callback */ get(resourceGroupName: string, serverName: string, firewallRuleName: string, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName The name of the resource group that contains the resource. You can - * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param firewallRuleName The name of the server firewall rule. * @param options The optional parameters @@ -97,23 +92,20 @@ export class FirewallRules { /** * List all the firewall rules in a given server. - * @param resourceGroupName The name of the resource group that contains the resource. You can - * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param [options] The optional parameters * @returns Promise */ listByServer(resourceGroupName: string, serverName: string, options?: msRest.RequestOptionsBase): Promise; /** - * @param resourceGroupName The name of the resource group that contains the resource. You can - * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param callback The callback */ listByServer(resourceGroupName: string, serverName: string, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName The name of the resource group that contains the resource. You can - * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param options The optional parameters * @param callback The callback @@ -132,8 +124,7 @@ export class FirewallRules { /** * Creates a new firewall rule or updates an existing firewall rule. - * @param resourceGroupName The name of the resource group that contains the resource. You can - * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param firewallRuleName The name of the server firewall rule. * @param parameters The required parameters for creating or updating a firewall rule. @@ -155,8 +146,7 @@ export class FirewallRules { /** * Deletes a server firewall rule. - * @param resourceGroupName The name of the resource group that contains the resource. You can - * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param firewallRuleName The name of the server firewall rule. * @param [options] The optional parameters @@ -187,7 +177,7 @@ const getOperationSpec: msRest.OperationSpec = { Parameters.firewallRuleName ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage @@ -212,7 +202,7 @@ const listByServerOperationSpec: msRest.OperationSpec = { Parameters.serverName ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage @@ -238,7 +228,7 @@ const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { Parameters.firewallRuleName ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage @@ -275,7 +265,7 @@ const beginDeleteMethodOperationSpec: msRest.OperationSpec = { Parameters.firewallRuleName ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage diff --git a/sdk/mysql/arm-mysql/src/operations/index.ts b/sdk/mysql/arm-mysql/src/operations/index.ts index bb02d2d2c5e9..1fc78c01685b 100644 --- a/sdk/mysql/arm-mysql/src/operations/index.ts +++ b/sdk/mysql/arm-mysql/src/operations/index.ts @@ -15,7 +15,18 @@ export * from "./virtualNetworkRules"; export * from "./databases"; export * from "./configurations"; export * from "./logFiles"; +export * from "./serverAdministrators"; export * from "./locationBasedPerformanceTier"; export * from "./checkNameAvailability"; -export * from "./serverSecurityAlertPolicies"; export * from "./operations"; +export * from "./serverSecurityAlertPolicies"; +export * from "./queryTexts"; +export * from "./topQueryStatistics"; +export * from "./waitStatistics"; +export * from "./advisors"; +export * from "./recommendedActions"; +export * from "./locationBasedRecommendedActionSessionsOperationStatus"; +export * from "./locationBasedRecommendedActionSessionsResult"; +export * from "./privateEndpointConnections"; +export * from "./privateLinkResources"; +export * from "./serverKeys"; diff --git a/sdk/mysql/arm-mysql/src/operations/locationBasedPerformanceTier.ts b/sdk/mysql/arm-mysql/src/operations/locationBasedPerformanceTier.ts index 470294fa212d..4aea8ab79acf 100644 --- a/sdk/mysql/arm-mysql/src/operations/locationBasedPerformanceTier.ts +++ b/sdk/mysql/arm-mysql/src/operations/locationBasedPerformanceTier.ts @@ -65,7 +65,7 @@ const listOperationSpec: msRest.OperationSpec = { Parameters.locationName ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage diff --git a/sdk/mysql/arm-mysql/src/operations/locationBasedRecommendedActionSessionsOperationStatus.ts b/sdk/mysql/arm-mysql/src/operations/locationBasedRecommendedActionSessionsOperationStatus.ts new file mode 100644 index 000000000000..a2175aea31de --- /dev/null +++ b/sdk/mysql/arm-mysql/src/operations/locationBasedRecommendedActionSessionsOperationStatus.ts @@ -0,0 +1,87 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/locationBasedRecommendedActionSessionsOperationStatusMappers"; +import * as Parameters from "../models/parameters"; +import { MySQLManagementClientContext } from "../mySQLManagementClientContext"; + +/** Class representing a LocationBasedRecommendedActionSessionsOperationStatus. */ +export class LocationBasedRecommendedActionSessionsOperationStatus { + private readonly client: MySQLManagementClientContext; + + /** + * Create a LocationBasedRecommendedActionSessionsOperationStatus. + * @param {MySQLManagementClientContext} client Reference to the service client. + */ + constructor(client: MySQLManagementClientContext) { + this.client = client; + } + + /** + * Recommendation action session operation status. + * @param locationName The name of the location. + * @param operationId The operation identifier. + * @param [options] The optional parameters + * @returns Promise + */ + get(locationName: string, operationId: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param locationName The name of the location. + * @param operationId The operation identifier. + * @param callback The callback + */ + get(locationName: string, operationId: string, callback: msRest.ServiceCallback): void; + /** + * @param locationName The name of the location. + * @param operationId The operation identifier. + * @param options The optional parameters + * @param callback The callback + */ + get(locationName: string, operationId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(locationName: string, operationId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + locationName, + operationId, + options + }, + getOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/providers/Microsoft.DBforMySQL/locations/{locationName}/recommendedActionSessionsAzureAsyncOperation/{operationId}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.locationName, + Parameters.operationId + ], + queryParameters: [ + Parameters.apiVersion2 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.RecommendedActionSessionsOperationStatus + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/mysql/arm-mysql/src/operations/locationBasedRecommendedActionSessionsResult.ts b/sdk/mysql/arm-mysql/src/operations/locationBasedRecommendedActionSessionsResult.ts new file mode 100644 index 000000000000..a81a3d68b743 --- /dev/null +++ b/sdk/mysql/arm-mysql/src/operations/locationBasedRecommendedActionSessionsResult.ts @@ -0,0 +1,142 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/locationBasedRecommendedActionSessionsResultMappers"; +import * as Parameters from "../models/parameters"; +import { MySQLManagementClientContext } from "../mySQLManagementClientContext"; + +/** Class representing a LocationBasedRecommendedActionSessionsResult. */ +export class LocationBasedRecommendedActionSessionsResult { + private readonly client: MySQLManagementClientContext; + + /** + * Create a LocationBasedRecommendedActionSessionsResult. + * @param {MySQLManagementClientContext} client Reference to the service client. + */ + constructor(client: MySQLManagementClientContext) { + this.client = client; + } + + /** + * Recommendation action session operation result. + * @param locationName The name of the location. + * @param operationId The operation identifier. + * @param [options] The optional parameters + * @returns Promise + */ + list(locationName: string, operationId: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param locationName The name of the location. + * @param operationId The operation identifier. + * @param callback The callback + */ + list(locationName: string, operationId: string, callback: msRest.ServiceCallback): void; + /** + * @param locationName The name of the location. + * @param operationId The operation identifier. + * @param options The optional parameters + * @param callback The callback + */ + list(locationName: string, operationId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(locationName: string, operationId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + locationName, + operationId, + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * Recommendation action session operation result. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/providers/Microsoft.DBforMySQL/locations/{locationName}/recommendedActionSessionsOperationResults/{operationId}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.locationName, + Parameters.operationId + ], + queryParameters: [ + Parameters.apiVersion2 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.RecommendationActionsResultList + }, + 201: { + bodyMapper: Mappers.RecommendationActionsResultList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.RecommendationActionsResultList + }, + 201: { + bodyMapper: Mappers.RecommendationActionsResultList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/mysql/arm-mysql/src/operations/logFiles.ts b/sdk/mysql/arm-mysql/src/operations/logFiles.ts index 357983282b65..43f749603fd6 100644 --- a/sdk/mysql/arm-mysql/src/operations/logFiles.ts +++ b/sdk/mysql/arm-mysql/src/operations/logFiles.ts @@ -28,23 +28,20 @@ export class LogFiles { /** * List all the log files in a given server. - * @param resourceGroupName The name of the resource group that contains the resource. You can - * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param [options] The optional parameters * @returns Promise */ listByServer(resourceGroupName: string, serverName: string, options?: msRest.RequestOptionsBase): Promise; /** - * @param resourceGroupName The name of the resource group that contains the resource. You can - * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param callback The callback */ listByServer(resourceGroupName: string, serverName: string, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName The name of the resource group that contains the resource. You can - * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param options The optional parameters * @param callback The callback @@ -73,7 +70,7 @@ const listByServerOperationSpec: msRest.OperationSpec = { Parameters.serverName ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage diff --git a/sdk/mysql/arm-mysql/src/operations/operations.ts b/sdk/mysql/arm-mysql/src/operations/operations.ts index b165a30747ef..9e7503dbf3bf 100644 --- a/sdk/mysql/arm-mysql/src/operations/operations.ts +++ b/sdk/mysql/arm-mysql/src/operations/operations.ts @@ -57,7 +57,7 @@ const listOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "providers/Microsoft.DBforMySQL/operations", queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage diff --git a/sdk/mysql/arm-mysql/src/operations/privateEndpointConnections.ts b/sdk/mysql/arm-mysql/src/operations/privateEndpointConnections.ts new file mode 100644 index 000000000000..6c6fcce03134 --- /dev/null +++ b/sdk/mysql/arm-mysql/src/operations/privateEndpointConnections.ts @@ -0,0 +1,399 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as msRestAzure from "@azure/ms-rest-azure-js"; +import * as Models from "../models"; +import * as Mappers from "../models/privateEndpointConnectionsMappers"; +import * as Parameters from "../models/parameters"; +import { MySQLManagementClientContext } from "../mySQLManagementClientContext"; + +/** Class representing a PrivateEndpointConnections. */ +export class PrivateEndpointConnections { + private readonly client: MySQLManagementClientContext; + + /** + * Create a PrivateEndpointConnections. + * @param {MySQLManagementClientContext} client Reference to the service client. + */ + constructor(client: MySQLManagementClientContext) { + this.client = client; + } + + /** + * Gets a private endpoint connection. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, serverName: string, privateEndpointConnectionName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param callback The callback + */ + get(resourceGroupName: string, serverName: string, privateEndpointConnectionName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, serverName: string, privateEndpointConnectionName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, serverName: string, privateEndpointConnectionName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + privateEndpointConnectionName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Approve or reject a private endpoint connection with a given name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param privateEndpointConnectionName + * @param parameters + * @param [options] The optional parameters + * @returns Promise + */ + createOrUpdate(resourceGroupName: string, serverName: string, privateEndpointConnectionName: string, parameters: Models.PrivateEndpointConnection, options?: msRest.RequestOptionsBase): Promise { + return this.beginCreateOrUpdate(resourceGroupName,serverName,privateEndpointConnectionName,parameters,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Deletes a private endpoint connection with a given name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param privateEndpointConnectionName + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(resourceGroupName: string, serverName: string, privateEndpointConnectionName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginDeleteMethod(resourceGroupName,serverName,privateEndpointConnectionName,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + + /** + * Updates private endpoint connection with the specified tags. + * @summary Updates tags on private endpoint connection. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param privateEndpointConnectionName + * @param parameters Parameters supplied to the Update private endpoint connection Tags operation. + * @param [options] The optional parameters + * @returns Promise + */ + updateTags(resourceGroupName: string, serverName: string, privateEndpointConnectionName: string, parameters: Models.TagsObject, options?: msRest.RequestOptionsBase): Promise { + return this.beginUpdateTags(resourceGroupName,serverName,privateEndpointConnectionName,parameters,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Gets all private endpoint connections on a server. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param [options] The optional parameters + * @returns Promise + */ + listByServer(resourceGroupName: string, serverName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param callback The callback + */ + listByServer(resourceGroupName: string, serverName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param options The optional parameters + * @param callback The callback + */ + listByServer(resourceGroupName: string, serverName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByServer(resourceGroupName: string, serverName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + options + }, + listByServerOperationSpec, + callback) as Promise; + } + + /** + * Approve or reject a private endpoint connection with a given name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param privateEndpointConnectionName + * @param parameters + * @param [options] The optional parameters + * @returns Promise + */ + beginCreateOrUpdate(resourceGroupName: string, serverName: string, privateEndpointConnectionName: string, parameters: Models.PrivateEndpointConnection, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + serverName, + privateEndpointConnectionName, + parameters, + options + }, + beginCreateOrUpdateOperationSpec, + options); + } + + /** + * Deletes a private endpoint connection with a given name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param privateEndpointConnectionName + * @param [options] The optional parameters + * @returns Promise + */ + beginDeleteMethod(resourceGroupName: string, serverName: string, privateEndpointConnectionName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + serverName, + privateEndpointConnectionName, + options + }, + beginDeleteMethodOperationSpec, + options); + } + + /** + * Updates private endpoint connection with the specified tags. + * @summary Updates tags on private endpoint connection. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param privateEndpointConnectionName + * @param parameters Parameters supplied to the Update private endpoint connection Tags operation. + * @param [options] The optional parameters + * @returns Promise + */ + beginUpdateTags(resourceGroupName: string, serverName: string, privateEndpointConnectionName: string, parameters: Models.TagsObject, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + serverName, + privateEndpointConnectionName, + parameters, + options + }, + beginUpdateTagsOperationSpec, + options); + } + + /** + * Gets all private endpoint connections on a server. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByServerNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByServerNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listByServerNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByServerNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByServerNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}/privateEndpointConnections/{privateEndpointConnectionName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.privateEndpointConnectionName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion2 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.PrivateEndpointConnection + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByServerOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}/privateEndpointConnections", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion2 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.PrivateEndpointConnectionListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}/privateEndpointConnections/{privateEndpointConnectionName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.privateEndpointConnectionName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion2 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.PrivateEndpointConnection, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.PrivateEndpointConnection + }, + 202: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginDeleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}/privateEndpointConnections/{privateEndpointConnectionName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.privateEndpointConnectionName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion2 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginUpdateTagsOperationSpec: msRest.OperationSpec = { + httpMethod: "PATCH", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}/privateEndpointConnections/{privateEndpointConnectionName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.privateEndpointConnectionName + ], + queryParameters: [ + Parameters.apiVersion2 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.TagsObject, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.PrivateEndpointConnection + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByServerNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.PrivateEndpointConnectionListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/mysql/arm-mysql/src/operations/privateLinkResources.ts b/sdk/mysql/arm-mysql/src/operations/privateLinkResources.ts new file mode 100644 index 000000000000..323b448e4bc6 --- /dev/null +++ b/sdk/mysql/arm-mysql/src/operations/privateLinkResources.ts @@ -0,0 +1,198 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/privateLinkResourcesMappers"; +import * as Parameters from "../models/parameters"; +import { MySQLManagementClientContext } from "../mySQLManagementClientContext"; + +/** Class representing a PrivateLinkResources. */ +export class PrivateLinkResources { + private readonly client: MySQLManagementClientContext; + + /** + * Create a PrivateLinkResources. + * @param {MySQLManagementClientContext} client Reference to the service client. + */ + constructor(client: MySQLManagementClientContext) { + this.client = client; + } + + /** + * Gets the private link resources for MySQL server. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param [options] The optional parameters + * @returns Promise + */ + listByServer(resourceGroupName: string, serverName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param callback The callback + */ + listByServer(resourceGroupName: string, serverName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param options The optional parameters + * @param callback The callback + */ + listByServer(resourceGroupName: string, serverName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByServer(resourceGroupName: string, serverName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + options + }, + listByServerOperationSpec, + callback) as Promise; + } + + /** + * Gets a private link resource for MySQL server. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param groupName The name of the private link resource. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, serverName: string, groupName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param groupName The name of the private link resource. + * @param callback The callback + */ + get(resourceGroupName: string, serverName: string, groupName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param groupName The name of the private link resource. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, serverName: string, groupName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, serverName: string, groupName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + groupName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Gets the private link resources for MySQL server. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByServerNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByServerNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listByServerNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByServerNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByServerNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listByServerOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}/privateLinkResources", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion2 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.PrivateLinkResourceListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}/privateLinkResources/{groupName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.groupName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion2 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.PrivateLinkResource + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByServerNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.PrivateLinkResourceListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/mysql/arm-mysql/src/operations/queryTexts.ts b/sdk/mysql/arm-mysql/src/operations/queryTexts.ts new file mode 100644 index 000000000000..0c45ac92727f --- /dev/null +++ b/sdk/mysql/arm-mysql/src/operations/queryTexts.ts @@ -0,0 +1,203 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/queryTextsMappers"; +import * as Parameters from "../models/parameters"; +import { MySQLManagementClientContext } from "../mySQLManagementClientContext"; + +/** Class representing a QueryTexts. */ +export class QueryTexts { + private readonly client: MySQLManagementClientContext; + + /** + * Create a QueryTexts. + * @param {MySQLManagementClientContext} client Reference to the service client. + */ + constructor(client: MySQLManagementClientContext) { + this.client = client; + } + + /** + * Retrieve the Query-Store query texts for the queryId. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param queryId The Query-Store query identifier. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, serverName: string, queryId: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param queryId The Query-Store query identifier. + * @param callback The callback + */ + get(resourceGroupName: string, serverName: string, queryId: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param queryId The Query-Store query identifier. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, serverName: string, queryId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, serverName: string, queryId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + queryId, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Retrieve the Query-Store query texts for specified queryIds. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param queryIds The query identifiers + * @param [options] The optional parameters + * @returns Promise + */ + listByServer(resourceGroupName: string, serverName: string, queryIds: string[], options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param queryIds The query identifiers + * @param callback The callback + */ + listByServer(resourceGroupName: string, serverName: string, queryIds: string[], callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param queryIds The query identifiers + * @param options The optional parameters + * @param callback The callback + */ + listByServer(resourceGroupName: string, serverName: string, queryIds: string[], options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByServer(resourceGroupName: string, serverName: string, queryIds: string[], options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + queryIds, + options + }, + listByServerOperationSpec, + callback) as Promise; + } + + /** + * Retrieve the Query-Store query texts for specified queryIds. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByServerNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByServerNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listByServerNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByServerNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByServerNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}/queryTexts/{queryId}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.queryId + ], + queryParameters: [ + Parameters.apiVersion2 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.QueryText + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByServerOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}/queryTexts", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.serverName + ], + queryParameters: [ + Parameters.apiVersion2, + Parameters.queryIds + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.QueryTextsResultList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByServerNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.QueryTextsResultList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/mysql/arm-mysql/src/operations/recommendedActions.ts b/sdk/mysql/arm-mysql/src/operations/recommendedActions.ts new file mode 100644 index 000000000000..ff32f09d0a5d --- /dev/null +++ b/sdk/mysql/arm-mysql/src/operations/recommendedActions.ts @@ -0,0 +1,209 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/recommendedActionsMappers"; +import * as Parameters from "../models/parameters"; +import { MySQLManagementClientContext } from "../mySQLManagementClientContext"; + +/** Class representing a RecommendedActions. */ +export class RecommendedActions { + private readonly client: MySQLManagementClientContext; + + /** + * Create a RecommendedActions. + * @param {MySQLManagementClientContext} client Reference to the service client. + */ + constructor(client: MySQLManagementClientContext) { + this.client = client; + } + + /** + * Retrieve recommended actions from the advisor. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param advisorName The advisor name for recommendation action. + * @param recommendedActionName The recommended action name. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, serverName: string, advisorName: string, recommendedActionName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param advisorName The advisor name for recommendation action. + * @param recommendedActionName The recommended action name. + * @param callback The callback + */ + get(resourceGroupName: string, serverName: string, advisorName: string, recommendedActionName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param advisorName The advisor name for recommendation action. + * @param recommendedActionName The recommended action name. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, serverName: string, advisorName: string, recommendedActionName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, serverName: string, advisorName: string, recommendedActionName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + advisorName, + recommendedActionName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Retrieve recommended actions from the advisor. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param advisorName The advisor name for recommendation action. + * @param [options] The optional parameters + * @returns Promise + */ + listByServer(resourceGroupName: string, serverName: string, advisorName: string, options?: Models.RecommendedActionsListByServerOptionalParams): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param advisorName The advisor name for recommendation action. + * @param callback The callback + */ + listByServer(resourceGroupName: string, serverName: string, advisorName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param advisorName The advisor name for recommendation action. + * @param options The optional parameters + * @param callback The callback + */ + listByServer(resourceGroupName: string, serverName: string, advisorName: string, options: Models.RecommendedActionsListByServerOptionalParams, callback: msRest.ServiceCallback): void; + listByServer(resourceGroupName: string, serverName: string, advisorName: string, options?: Models.RecommendedActionsListByServerOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + advisorName, + options + }, + listByServerOperationSpec, + callback) as Promise; + } + + /** + * Retrieve recommended actions from the advisor. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByServerNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByServerNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listByServerNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByServerNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByServerNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}/advisors/{advisorName}/recommendedActions/{recommendedActionName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.advisorName, + Parameters.recommendedActionName + ], + queryParameters: [ + Parameters.apiVersion2 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.RecommendationAction + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByServerOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}/advisors/{advisorName}/recommendedActions", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.advisorName + ], + queryParameters: [ + Parameters.apiVersion2, + Parameters.sessionId + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.RecommendationActionsResultList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByServerNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.RecommendationActionsResultList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/mysql/arm-mysql/src/operations/replicas.ts b/sdk/mysql/arm-mysql/src/operations/replicas.ts index ddea7a60a9ca..b39e94893ad6 100644 --- a/sdk/mysql/arm-mysql/src/operations/replicas.ts +++ b/sdk/mysql/arm-mysql/src/operations/replicas.ts @@ -28,23 +28,20 @@ export class Replicas { /** * List all the replicas for a given server. - * @param resourceGroupName The name of the resource group that contains the resource. You can - * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param [options] The optional parameters * @returns Promise */ listByServer(resourceGroupName: string, serverName: string, options?: msRest.RequestOptionsBase): Promise; /** - * @param resourceGroupName The name of the resource group that contains the resource. You can - * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param callback The callback */ listByServer(resourceGroupName: string, serverName: string, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName The name of the resource group that contains the resource. You can - * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param options The optional parameters * @param callback The callback @@ -73,7 +70,7 @@ const listByServerOperationSpec: msRest.OperationSpec = { Parameters.serverName ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage diff --git a/sdk/mysql/arm-mysql/src/operations/serverAdministrators.ts b/sdk/mysql/arm-mysql/src/operations/serverAdministrators.ts new file mode 100644 index 000000000000..bc48953f3333 --- /dev/null +++ b/sdk/mysql/arm-mysql/src/operations/serverAdministrators.ts @@ -0,0 +1,270 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as msRestAzure from "@azure/ms-rest-azure-js"; +import * as Models from "../models"; +import * as Mappers from "../models/serverAdministratorsMappers"; +import * as Parameters from "../models/parameters"; +import { MySQLManagementClientContext } from "../mySQLManagementClientContext"; + +/** Class representing a ServerAdministrators. */ +export class ServerAdministrators { + private readonly client: MySQLManagementClientContext; + + /** + * Create a ServerAdministrators. + * @param {MySQLManagementClientContext} client Reference to the service client. + */ + constructor(client: MySQLManagementClientContext) { + this.client = client; + } + + /** + * Gets information about a AAD server administrator. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, serverName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param callback The callback + */ + get(resourceGroupName: string, serverName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, serverName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, serverName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Creates or update active directory administrator on an existing server. The update action will + * overwrite the existing administrator. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param properties The required parameters for creating or updating an AAD server administrator. + * @param [options] The optional parameters + * @returns Promise + */ + createOrUpdate(resourceGroupName: string, serverName: string, properties: Models.ServerAdministratorResource, options?: msRest.RequestOptionsBase): Promise { + return this.beginCreateOrUpdate(resourceGroupName,serverName,properties,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Deletes server active directory administrator. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(resourceGroupName: string, serverName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginDeleteMethod(resourceGroupName,serverName,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + + /** + * Returns a list of server Administrators. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param [options] The optional parameters + * @returns Promise + */ + list(resourceGroupName: string, serverName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param callback The callback + */ + list(resourceGroupName: string, serverName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param options The optional parameters + * @param callback The callback + */ + list(resourceGroupName: string, serverName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(resourceGroupName: string, serverName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * Creates or update active directory administrator on an existing server. The update action will + * overwrite the existing administrator. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param properties The required parameters for creating or updating an AAD server administrator. + * @param [options] The optional parameters + * @returns Promise + */ + beginCreateOrUpdate(resourceGroupName: string, serverName: string, properties: Models.ServerAdministratorResource, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + serverName, + properties, + options + }, + beginCreateOrUpdateOperationSpec, + options); + } + + /** + * Deletes server active directory administrator. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param [options] The optional parameters + * @returns Promise + */ + beginDeleteMethod(resourceGroupName: string, serverName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + serverName, + options + }, + beginDeleteMethodOperationSpec, + options); + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}/Administrators/activeDirectory", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.serverName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ServerAdministratorResource + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}/administrators", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.serverName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ServerAdministratorResourceListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}/Administrators/activeDirectory", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.serverName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "properties", + mapper: { + ...Mappers.ServerAdministratorResource, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.ServerAdministratorResource + }, + 202: { + bodyMapper: Mappers.ServerAdministratorResource + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginDeleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}/Administrators/activeDirectory", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.serverName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/mysql/arm-mysql/src/operations/serverKeys.ts b/sdk/mysql/arm-mysql/src/operations/serverKeys.ts new file mode 100644 index 000000000000..55c1ca423749 --- /dev/null +++ b/sdk/mysql/arm-mysql/src/operations/serverKeys.ts @@ -0,0 +1,330 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as msRestAzure from "@azure/ms-rest-azure-js"; +import * as Models from "../models"; +import * as Mappers from "../models/serverKeysMappers"; +import * as Parameters from "../models/parameters"; +import { MySQLManagementClientContext } from "../mySQLManagementClientContext"; + +/** Class representing a ServerKeys. */ +export class ServerKeys { + private readonly client: MySQLManagementClientContext; + + /** + * Create a ServerKeys. + * @param {MySQLManagementClientContext} client Reference to the service client. + */ + constructor(client: MySQLManagementClientContext) { + this.client = client; + } + + /** + * Gets a list of Server keys. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param [options] The optional parameters + * @returns Promise + */ + list(resourceGroupName: string, serverName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param callback The callback + */ + list(resourceGroupName: string, serverName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param options The optional parameters + * @param callback The callback + */ + list(resourceGroupName: string, serverName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(resourceGroupName: string, serverName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * Gets a MySQL Server key. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param keyName The name of the MySQL Server key to be retrieved. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, serverName: string, keyName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param keyName The name of the MySQL Server key to be retrieved. + * @param callback The callback + */ + get(resourceGroupName: string, serverName: string, keyName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param keyName The name of the MySQL Server key to be retrieved. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, serverName: string, keyName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, serverName: string, keyName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + keyName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Creates or updates a MySQL Server key. + * @param serverName The name of the server. + * @param keyName The name of the MySQL Server key to be operated on (updated or created). + * @param parameters The requested MySQL Server key resource state. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param [options] The optional parameters + * @returns Promise + */ + createOrUpdate(serverName: string, keyName: string, parameters: Models.ServerKey, resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginCreateOrUpdate(serverName,keyName,parameters,resourceGroupName,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Deletes the MySQL Server key with the given name. + * @param serverName The name of the server. + * @param keyName The name of the MySQL Server key to be deleted. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(serverName: string, keyName: string, resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginDeleteMethod(serverName,keyName,resourceGroupName,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + + /** + * Creates or updates a MySQL Server key. + * @param serverName The name of the server. + * @param keyName The name of the MySQL Server key to be operated on (updated or created). + * @param parameters The requested MySQL Server key resource state. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param [options] The optional parameters + * @returns Promise + */ + beginCreateOrUpdate(serverName: string, keyName: string, parameters: Models.ServerKey, resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + serverName, + keyName, + parameters, + resourceGroupName, + options + }, + beginCreateOrUpdateOperationSpec, + options); + } + + /** + * Deletes the MySQL Server key with the given name. + * @param serverName The name of the server. + * @param keyName The name of the MySQL Server key to be deleted. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param [options] The optional parameters + * @returns Promise + */ + beginDeleteMethod(serverName: string, keyName: string, resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + serverName, + keyName, + resourceGroupName, + options + }, + beginDeleteMethodOperationSpec, + options); + } + + /** + * Gets a list of Server keys. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}/keys", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.serverName + ], + queryParameters: [ + Parameters.apiVersion1 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ServerKeyListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}/keys/{keyName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.keyName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion1 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ServerKey + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}/keys/{keyName}", + urlParameters: [ + Parameters.serverName, + Parameters.keyName, + Parameters.subscriptionId, + Parameters.resourceGroupName + ], + queryParameters: [ + Parameters.apiVersion1 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.ServerKey, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.ServerKey + }, + 202: { + bodyMapper: Mappers.ServerKey + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginDeleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}/keys/{keyName}", + urlParameters: [ + Parameters.serverName, + Parameters.keyName, + Parameters.subscriptionId, + Parameters.resourceGroupName + ], + queryParameters: [ + Parameters.apiVersion1 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ServerKeyListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/mysql/arm-mysql/src/operations/serverSecurityAlertPolicies.ts b/sdk/mysql/arm-mysql/src/operations/serverSecurityAlertPolicies.ts index 05c012e4492d..50ce4767929b 100644 --- a/sdk/mysql/arm-mysql/src/operations/serverSecurityAlertPolicies.ts +++ b/sdk/mysql/arm-mysql/src/operations/serverSecurityAlertPolicies.ts @@ -29,23 +29,20 @@ export class ServerSecurityAlertPolicies { /** * Get a server's security alert policy. - * @param resourceGroupName The name of the resource group that contains the resource. You can - * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param [options] The optional parameters * @returns Promise */ get(resourceGroupName: string, serverName: string, options?: msRest.RequestOptionsBase): Promise; /** - * @param resourceGroupName The name of the resource group that contains the resource. You can - * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param callback The callback */ get(resourceGroupName: string, serverName: string, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName The name of the resource group that contains the resource. You can - * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param options The optional parameters * @param callback The callback @@ -64,8 +61,7 @@ export class ServerSecurityAlertPolicies { /** * Creates or updates a threat detection policy. - * @param resourceGroupName The name of the resource group that contains the resource. You can - * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param parameters The server security alert policy. * @param [options] The optional parameters @@ -78,8 +74,7 @@ export class ServerSecurityAlertPolicies { /** * Creates or updates a threat detection policy. - * @param resourceGroupName The name of the resource group that contains the resource. You can - * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param parameters The server security alert policy. * @param [options] The optional parameters @@ -110,7 +105,7 @@ const getOperationSpec: msRest.OperationSpec = { Parameters.subscriptionId ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage @@ -136,7 +131,7 @@ const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { Parameters.subscriptionId ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage diff --git a/sdk/mysql/arm-mysql/src/operations/servers.ts b/sdk/mysql/arm-mysql/src/operations/servers.ts index 2985d9a5c7b4..f50a5609eb9e 100644 --- a/sdk/mysql/arm-mysql/src/operations/servers.ts +++ b/sdk/mysql/arm-mysql/src/operations/servers.ts @@ -30,8 +30,7 @@ export class Servers { /** * Creates a new server or updates an existing server. The update action will overwrite the * existing server. - * @param resourceGroupName The name of the resource group that contains the resource. You can - * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param parameters The required parameters for creating or updating a server. * @param [options] The optional parameters @@ -45,8 +44,7 @@ export class Servers { /** * Updates an existing server. The request body can contain one to many of the properties present * in the normal server definition. - * @param resourceGroupName The name of the resource group that contains the resource. You can - * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param parameters The required parameters for updating a server. * @param [options] The optional parameters @@ -59,8 +57,7 @@ export class Servers { /** * Deletes a server. - * @param resourceGroupName The name of the resource group that contains the resource. You can - * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param [options] The optional parameters * @returns Promise @@ -72,23 +69,20 @@ export class Servers { /** * Gets information about a server. - * @param resourceGroupName The name of the resource group that contains the resource. You can - * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param [options] The optional parameters * @returns Promise */ get(resourceGroupName: string, serverName: string, options?: msRest.RequestOptionsBase): Promise; /** - * @param resourceGroupName The name of the resource group that contains the resource. You can - * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param callback The callback */ get(resourceGroupName: string, serverName: string, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName The name of the resource group that contains the resource. You can - * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param options The optional parameters * @param callback The callback @@ -107,21 +101,18 @@ export class Servers { /** * List all the servers in a given resource group. - * @param resourceGroupName The name of the resource group that contains the resource. You can - * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param [options] The optional parameters * @returns Promise */ listByResourceGroup(resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise; /** - * @param resourceGroupName The name of the resource group that contains the resource. You can - * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param callback The callback */ listByResourceGroup(resourceGroupName: string, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName The name of the resource group that contains the resource. You can - * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param options The optional parameters * @param callback The callback */ @@ -162,8 +153,7 @@ export class Servers { /** * Restarts a server. - * @param resourceGroupName The name of the resource group that contains the resource. You can - * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param [options] The optional parameters * @returns Promise @@ -173,11 +163,47 @@ export class Servers { .then(lroPoller => lroPoller.pollUntilFinished()); } + /** + * Starts a stopped server. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param [options] The optional parameters + * @returns Promise + */ + start(resourceGroupName: string, serverName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginStart(resourceGroupName,serverName,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + + /** + * Stops a running server. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param [options] The optional parameters + * @returns Promise + */ + stop(resourceGroupName: string, serverName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginStop(resourceGroupName,serverName,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + + /** + * Upgrade server version. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param parameters The required parameters for updating a server. + * @param [options] The optional parameters + * @returns Promise + */ + upgrade(resourceGroupName: string, serverName: string, parameters: Models.ServerUpgradeParameters, options?: msRest.RequestOptionsBase): Promise { + return this.beginUpgrade(resourceGroupName,serverName,parameters,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + /** * Creates a new server or updates an existing server. The update action will overwrite the * existing server. - * @param resourceGroupName The name of the resource group that contains the resource. You can - * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param parameters The required parameters for creating or updating a server. * @param [options] The optional parameters @@ -198,8 +224,7 @@ export class Servers { /** * Updates an existing server. The request body can contain one to many of the properties present * in the normal server definition. - * @param resourceGroupName The name of the resource group that contains the resource. You can - * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param parameters The required parameters for updating a server. * @param [options] The optional parameters @@ -219,8 +244,7 @@ export class Servers { /** * Deletes a server. - * @param resourceGroupName The name of the resource group that contains the resource. You can - * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param [options] The optional parameters * @returns Promise @@ -238,8 +262,7 @@ export class Servers { /** * Restarts a server. - * @param resourceGroupName The name of the resource group that contains the resource. You can - * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param [options] The optional parameters * @returns Promise @@ -254,6 +277,62 @@ export class Servers { beginRestartOperationSpec, options); } + + /** + * Starts a stopped server. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param [options] The optional parameters + * @returns Promise + */ + beginStart(resourceGroupName: string, serverName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + serverName, + options + }, + beginStartOperationSpec, + options); + } + + /** + * Stops a running server. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param [options] The optional parameters + * @returns Promise + */ + beginStop(resourceGroupName: string, serverName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + serverName, + options + }, + beginStopOperationSpec, + options); + } + + /** + * Upgrade server version. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param parameters The required parameters for updating a server. + * @param [options] The optional parameters + * @returns Promise + */ + beginUpgrade(resourceGroupName: string, serverName: string, parameters: Models.ServerUpgradeParameters, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + serverName, + parameters, + options + }, + beginUpgradeOperationSpec, + options); + } } // Operation Specifications @@ -267,7 +346,7 @@ const getOperationSpec: msRest.OperationSpec = { Parameters.serverName ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage @@ -291,7 +370,7 @@ const listByResourceGroupOperationSpec: msRest.OperationSpec = { Parameters.resourceGroupName ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage @@ -314,7 +393,7 @@ const listOperationSpec: msRest.OperationSpec = { Parameters.subscriptionId ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage @@ -339,7 +418,7 @@ const beginCreateOperationSpec: msRest.OperationSpec = { Parameters.serverName ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage @@ -375,7 +454,7 @@ const beginUpdateOperationSpec: msRest.OperationSpec = { Parameters.serverName ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage @@ -408,7 +487,7 @@ const beginDeleteMethodOperationSpec: msRest.OperationSpec = { Parameters.serverName ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage @@ -433,7 +512,7 @@ const beginRestartOperationSpec: msRest.OperationSpec = { Parameters.serverName ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage @@ -447,3 +526,82 @@ const beginRestartOperationSpec: msRest.OperationSpec = { }, serializer }; + +const beginStartOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}/start", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.serverName + ], + queryParameters: [ + Parameters.apiVersion1 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 202: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginStopOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}/stop", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.serverName + ], + queryParameters: [ + Parameters.apiVersion1 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 202: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginUpgradeOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}/upgrade", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.serverName + ], + queryParameters: [ + Parameters.apiVersion1 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.ServerUpgradeParameters, + required: true + } + }, + responses: { + 200: {}, + 202: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/mysql/arm-mysql/src/operations/topQueryStatistics.ts b/sdk/mysql/arm-mysql/src/operations/topQueryStatistics.ts new file mode 100644 index 000000000000..83ec9f8e463e --- /dev/null +++ b/sdk/mysql/arm-mysql/src/operations/topQueryStatistics.ts @@ -0,0 +1,209 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/topQueryStatisticsMappers"; +import * as Parameters from "../models/parameters"; +import { MySQLManagementClientContext } from "../mySQLManagementClientContext"; + +/** Class representing a TopQueryStatistics. */ +export class TopQueryStatistics { + private readonly client: MySQLManagementClientContext; + + /** + * Create a TopQueryStatistics. + * @param {MySQLManagementClientContext} client Reference to the service client. + */ + constructor(client: MySQLManagementClientContext) { + this.client = client; + } + + /** + * Retrieve the query statistic for specified identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param queryStatisticId The Query Statistic identifier. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, serverName: string, queryStatisticId: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param queryStatisticId The Query Statistic identifier. + * @param callback The callback + */ + get(resourceGroupName: string, serverName: string, queryStatisticId: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param queryStatisticId The Query Statistic identifier. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, serverName: string, queryStatisticId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, serverName: string, queryStatisticId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + queryStatisticId, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Retrieve the Query-Store top queries for specified metric and aggregation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param parameters The required parameters for retrieving top query statistics. + * @param [options] The optional parameters + * @returns Promise + */ + listByServer(resourceGroupName: string, serverName: string, parameters: Models.TopQueryStatisticsInput, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param parameters The required parameters for retrieving top query statistics. + * @param callback The callback + */ + listByServer(resourceGroupName: string, serverName: string, parameters: Models.TopQueryStatisticsInput, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param parameters The required parameters for retrieving top query statistics. + * @param options The optional parameters + * @param callback The callback + */ + listByServer(resourceGroupName: string, serverName: string, parameters: Models.TopQueryStatisticsInput, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByServer(resourceGroupName: string, serverName: string, parameters: Models.TopQueryStatisticsInput, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + parameters, + options + }, + listByServerOperationSpec, + callback) as Promise; + } + + /** + * Retrieve the Query-Store top queries for specified metric and aggregation. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByServerNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByServerNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listByServerNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByServerNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByServerNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}/topQueryStatistics/{queryStatisticId}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.queryStatisticId + ], + queryParameters: [ + Parameters.apiVersion2 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.QueryStatistic + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByServerOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}/topQueryStatistics", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.serverName + ], + queryParameters: [ + Parameters.apiVersion2 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.TopQueryStatisticsInput, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.TopQueryStatisticsResultList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByServerNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.TopQueryStatisticsResultList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/mysql/arm-mysql/src/operations/virtualNetworkRules.ts b/sdk/mysql/arm-mysql/src/operations/virtualNetworkRules.ts index 5416a1edca8c..6e61232025f9 100644 --- a/sdk/mysql/arm-mysql/src/operations/virtualNetworkRules.ts +++ b/sdk/mysql/arm-mysql/src/operations/virtualNetworkRules.ts @@ -29,8 +29,7 @@ export class VirtualNetworkRules { /** * Gets a virtual network rule. - * @param resourceGroupName The name of the resource group that contains the resource. You can - * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param virtualNetworkRuleName The name of the virtual network rule. * @param [options] The optional parameters @@ -38,16 +37,14 @@ export class VirtualNetworkRules { */ get(resourceGroupName: string, serverName: string, virtualNetworkRuleName: string, options?: msRest.RequestOptionsBase): Promise; /** - * @param resourceGroupName The name of the resource group that contains the resource. You can - * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param virtualNetworkRuleName The name of the virtual network rule. * @param callback The callback */ get(resourceGroupName: string, serverName: string, virtualNetworkRuleName: string, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName The name of the resource group that contains the resource. You can - * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param virtualNetworkRuleName The name of the virtual network rule. * @param options The optional parameters @@ -68,8 +65,7 @@ export class VirtualNetworkRules { /** * Creates or updates an existing virtual network rule. - * @param resourceGroupName The name of the resource group that contains the resource. You can - * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param virtualNetworkRuleName The name of the virtual network rule. * @param parameters The requested virtual Network Rule Resource state. @@ -83,8 +79,7 @@ export class VirtualNetworkRules { /** * Deletes the virtual network rule with the given name. - * @param resourceGroupName The name of the resource group that contains the resource. You can - * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param virtualNetworkRuleName The name of the virtual network rule. * @param [options] The optional parameters @@ -97,23 +92,20 @@ export class VirtualNetworkRules { /** * Gets a list of virtual network rules in a server. - * @param resourceGroupName The name of the resource group that contains the resource. You can - * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param [options] The optional parameters * @returns Promise */ listByServer(resourceGroupName: string, serverName: string, options?: msRest.RequestOptionsBase): Promise; /** - * @param resourceGroupName The name of the resource group that contains the resource. You can - * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param callback The callback */ listByServer(resourceGroupName: string, serverName: string, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName The name of the resource group that contains the resource. You can - * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param options The optional parameters * @param callback The callback @@ -132,8 +124,7 @@ export class VirtualNetworkRules { /** * Creates or updates an existing virtual network rule. - * @param resourceGroupName The name of the resource group that contains the resource. You can - * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param virtualNetworkRuleName The name of the virtual network rule. * @param parameters The requested virtual Network Rule Resource state. @@ -155,8 +146,7 @@ export class VirtualNetworkRules { /** * Deletes the virtual network rule with the given name. - * @param resourceGroupName The name of the resource group that contains the resource. You can - * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param virtualNetworkRuleName The name of the virtual network rule. * @param [options] The optional parameters @@ -215,7 +205,7 @@ const getOperationSpec: msRest.OperationSpec = { Parameters.virtualNetworkRuleName ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage @@ -240,7 +230,7 @@ const listByServerOperationSpec: msRest.OperationSpec = { Parameters.subscriptionId ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage @@ -266,7 +256,7 @@ const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { Parameters.virtualNetworkRuleName ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage @@ -303,7 +293,7 @@ const beginDeleteMethodOperationSpec: msRest.OperationSpec = { Parameters.subscriptionId ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage diff --git a/sdk/mysql/arm-mysql/src/operations/waitStatistics.ts b/sdk/mysql/arm-mysql/src/operations/waitStatistics.ts new file mode 100644 index 000000000000..7efbfea13ea3 --- /dev/null +++ b/sdk/mysql/arm-mysql/src/operations/waitStatistics.ts @@ -0,0 +1,209 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/waitStatisticsMappers"; +import * as Parameters from "../models/parameters"; +import { MySQLManagementClientContext } from "../mySQLManagementClientContext"; + +/** Class representing a WaitStatistics. */ +export class WaitStatistics { + private readonly client: MySQLManagementClientContext; + + /** + * Create a WaitStatistics. + * @param {MySQLManagementClientContext} client Reference to the service client. + */ + constructor(client: MySQLManagementClientContext) { + this.client = client; + } + + /** + * Retrieve wait statistics for specified identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param waitStatisticsId The Wait Statistic identifier. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, serverName: string, waitStatisticsId: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param waitStatisticsId The Wait Statistic identifier. + * @param callback The callback + */ + get(resourceGroupName: string, serverName: string, waitStatisticsId: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param waitStatisticsId The Wait Statistic identifier. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, serverName: string, waitStatisticsId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, serverName: string, waitStatisticsId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + waitStatisticsId, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Retrieve wait statistics for specified aggregation window. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param parameters The required parameters for retrieving wait statistics. + * @param [options] The optional parameters + * @returns Promise + */ + listByServer(resourceGroupName: string, serverName: string, parameters: Models.WaitStatisticsInput, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param parameters The required parameters for retrieving wait statistics. + * @param callback The callback + */ + listByServer(resourceGroupName: string, serverName: string, parameters: Models.WaitStatisticsInput, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param parameters The required parameters for retrieving wait statistics. + * @param options The optional parameters + * @param callback The callback + */ + listByServer(resourceGroupName: string, serverName: string, parameters: Models.WaitStatisticsInput, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByServer(resourceGroupName: string, serverName: string, parameters: Models.WaitStatisticsInput, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + parameters, + options + }, + listByServerOperationSpec, + callback) as Promise; + } + + /** + * Retrieve wait statistics for specified aggregation window. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByServerNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByServerNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listByServerNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByServerNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByServerNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}/waitStatistics/{waitStatisticsId}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.waitStatisticsId + ], + queryParameters: [ + Parameters.apiVersion2 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.WaitStatistic + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByServerOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}/waitStatistics", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.serverName + ], + queryParameters: [ + Parameters.apiVersion2 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.WaitStatisticsInput, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.WaitStatisticsResultList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByServerNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.WaitStatisticsResultList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/mysql/arm-mysql/tsconfig.json b/sdk/mysql/arm-mysql/tsconfig.json index 87bbf5b5fa49..422b584abd5e 100644 --- a/sdk/mysql/arm-mysql/tsconfig.json +++ b/sdk/mysql/arm-mysql/tsconfig.json @@ -9,7 +9,7 @@ "esModuleInterop": true, "allowSyntheticDefaultImports": true, "forceConsistentCasingInFileNames": true, - "lib": ["es6"], + "lib": ["es6", "dom"], "declaration": true, "outDir": "./esm", "importHelpers": true