Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion sdk/mariadb/arm-mariadb/LICENSE.txt
Original file line number Diff line number Diff line change
@@ -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
Expand Down
5 changes: 3 additions & 2 deletions sdk/mariadb/arm-mariadb/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,9 @@ npm install @azure/arm-mariadb

##### 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
Expand Down Expand Up @@ -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%2Fmariadb%2Farm-mariadb%2FREADME.png)
![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js/sdk/mariadb/arm-mariadb/README.png)
14 changes: 7 additions & 7 deletions sdk/mariadb/arm-mariadb/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
"description": "MariaDBManagementClient Library with typescript type definitions for node.js and browser.",
"version": "1.4.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",
Expand All @@ -20,11 +20,11 @@
"module": "./esm/mariaDBManagementClient.js",
"types": "./esm/mariaDBManagementClient.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/mariadb/arm-mariadb",
"repository": {
Expand Down
2 changes: 1 addition & 1 deletion sdk/mariadb/arm-mariadb/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const config = {
*/`
},
plugins: [
nodeResolve({ module: true }),
nodeResolve({ mainFields: ['module', 'main'] }),
sourcemaps()
]
};
Expand Down
88 changes: 85 additions & 3 deletions sdk/mariadb/arm-mariadb/src/mariaDBManagementClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 { MariaDBManagementClientContext } from "./mariaDBManagementClientContext";

Expand All @@ -26,13 +28,22 @@ class MariaDBManagementClient extends MariaDBManagementClientContext {
logFiles: operations.LogFiles;
locationBasedPerformanceTier: operations.LocationBasedPerformanceTier;
checkNameAvailability: operations.CheckNameAvailability;
serverSecurityAlertPolicies: operations.ServerSecurityAlertPolicies;
operations: operations.Operations;
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;
serverSecurityAlertPolicies: operations.ServerSecurityAlertPolicies;

/**
* Initializes a new instance of the MariaDBManagementClient 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.MariaDBManagementClientOptions) {
Expand All @@ -46,12 +57,83 @@ class MariaDBManagementClient extends MariaDBManagementClientContext {
this.logFiles = new operations.LogFiles(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.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.serverSecurityAlertPolicies = new operations.ServerSecurityAlertPolicies(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<msRest.RestResponse>
*/
createRecommendedActionSession(resourceGroupName: string, serverName: string, advisorName: string, databaseName: string, options?: msRest.RequestOptionsBase): Promise<msRest.RestResponse> {
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<msRestAzure.LROPoller>
*/
beginCreateRecommendedActionSession(resourceGroupName: string, serverName: string, advisorName: string, databaseName: string, options?: msRest.RequestOptionsBase): Promise<msRestAzure.LROPoller> {
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.DBforMariaDB/servers/{serverName}/advisors/{advisorName}/createRecommendedActionSession",
urlParameters: [
Parameters.subscriptionId,
Parameters.resourceGroupName,
Parameters.serverName,
Parameters.advisorName
],
queryParameters: [
Parameters.apiVersion,
Parameters.databaseName
],
headerParameters: [
Parameters.acceptLanguage
],
responses: {
200: {},
202: {},
default: {
bodyMapper: Mappers.CloudError
}
},
serializer
};

export {
MariaDBManagementClient,
Expand Down
4 changes: 2 additions & 2 deletions sdk/mariadb/arm-mariadb/src/mariaDBManagementClientContext.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ const packageVersion = "1.4.0";

export class MariaDBManagementClientContext extends msRestAzure.AzureServiceClient {
credentials: msRest.ServiceClientCredentials;
subscriptionId: string;
apiVersion?: string;
subscriptionId: string;

/**
* Initializes a new instance of the MariaDBManagementClient 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.MariaDBManagementClientOptions) {
Expand Down
40 changes: 40 additions & 0 deletions sdk/mariadb/arm-mariadb/src/models/advisorsMappers.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
/*
* 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,
Server,
ServerPrivateEndpointConnection,
ServerPrivateEndpointConnectionProperties,
ServerPrivateLinkServiceConnectionStateProperty,
ServerSecurityAlertPolicy,
Sku,
StorageProfile,
TrackedResource,
VirtualNetworkRule,
WaitStatistic
} from "../models/mappers";
17 changes: 16 additions & 1 deletion sdk/mariadb/arm-mariadb/src/models/configurationsMappers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,33 @@

export {
discriminators,
Advisor,
AzureEntityResource,
BaseResource,
CloudError,
Configuration,
ConfigurationListResult,
Database,
FirewallRule,
LogFile,
PrivateEndpointConnection,
PrivateEndpointProperty,
PrivateLinkResource,
PrivateLinkResourceProperties,
PrivateLinkServiceConnectionStateProperty,
ProxyResource,
QueryStatistic,
QueryText,
RecommendationAction,
Resource,
Server,
ServerPrivateEndpointConnection,
ServerPrivateEndpointConnectionProperties,
ServerPrivateLinkServiceConnectionStateProperty,
ServerSecurityAlertPolicy,
Sku,
StorageProfile,
TrackedResource,
VirtualNetworkRule
VirtualNetworkRule,
WaitStatistic
} from "../models/mappers";
17 changes: 16 additions & 1 deletion sdk/mariadb/arm-mariadb/src/models/databasesMappers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,33 @@

export {
discriminators,
Advisor,
AzureEntityResource,
BaseResource,
CloudError,
Configuration,
Database,
DatabaseListResult,
FirewallRule,
LogFile,
PrivateEndpointConnection,
PrivateEndpointProperty,
PrivateLinkResource,
PrivateLinkResourceProperties,
PrivateLinkServiceConnectionStateProperty,
ProxyResource,
QueryStatistic,
QueryText,
RecommendationAction,
Resource,
Server,
ServerPrivateEndpointConnection,
ServerPrivateEndpointConnectionProperties,
ServerPrivateLinkServiceConnectionStateProperty,
ServerSecurityAlertPolicy,
Sku,
StorageProfile,
TrackedResource,
VirtualNetworkRule
VirtualNetworkRule,
WaitStatistic
} from "../models/mappers";
17 changes: 16 additions & 1 deletion sdk/mariadb/arm-mariadb/src/models/firewallRulesMappers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,33 @@

export {
discriminators,
Advisor,
AzureEntityResource,
BaseResource,
CloudError,
Configuration,
Database,
FirewallRule,
FirewallRuleListResult,
LogFile,
PrivateEndpointConnection,
PrivateEndpointProperty,
PrivateLinkResource,
PrivateLinkResourceProperties,
PrivateLinkServiceConnectionStateProperty,
ProxyResource,
QueryStatistic,
QueryText,
RecommendationAction,
Resource,
Server,
ServerPrivateEndpointConnection,
ServerPrivateEndpointConnectionProperties,
ServerPrivateLinkServiceConnectionStateProperty,
ServerSecurityAlertPolicy,
Sku,
StorageProfile,
TrackedResource,
VirtualNetworkRule
VirtualNetworkRule,
WaitStatistic
} from "../models/mappers";
Loading