Skip to content
This repository has been archived by the owner on May 5, 2023. It is now read-only.

[AutoPR] mariadb/resource-manager #3589

Merged
5 commits merged into from
Sep 13, 2018
Merged
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
21 changes: 21 additions & 0 deletions lib/services/mariadbManagement/LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
The MIT License (MIT)

Copyright (c) 2018 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
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
42 changes: 42 additions & 0 deletions lib/services/mariadbManagement/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
---
uid: azure-arm-mariadb
summary: *content

---
# Microsoft Azure SDK for Node.js - MariaDBManagementClient
This project provides a Node.js package for accessing Azure. Right now it supports:
- **Node.js version 6.x.x or higher**

## Features


## How to Install

```bash
npm install azure-arm-mariadb
```

## How to use

### Authentication, client creation and get servers as an example.

```javascript
const msRestAzure = require("ms-rest-azure");
const MariaDBManagementClient = require("azure-arm-mariadb");
msRestAzure.interactiveLogin().then((creds) => {
const subscriptionId = "<Subscription_Id>";
const client = new MariaDBManagementClient(creds, subscriptionId);
const resourceGroupName = "testresourceGroupName";
const serverName = "testserverName";
return client.servers.get(resourceGroupName, serverName).then((result) => {
console.log("The result is:");
console.log(result);
});
}).catch((err) => {
console.log('An error occurred:');
console.dir(err, {depth: null, colors: true});
});

## Related projects

- [Microsoft Azure SDK for Node.js](https://github.com/Azure/azure-sdk-for-node)
70 changes: 70 additions & 0 deletions lib/services/mariadbManagement/lib/mariaDBManagementClient.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
/*
* 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 { ServiceClientCredentials } from 'ms-rest';
import { AzureServiceClient, AzureServiceClientOptions } from 'ms-rest-azure';
import * as models from "./models";
import * as operations from "./operations";

export default class MariaDBManagementClient extends AzureServiceClient {
/**
* Initializes a new instance of the MariaDBManagementClient class.
* @constructor
*
* @class
* @param {credentials} credentials - Credentials needed for the client to connect to Azure.
*
* @param {string} subscriptionId - The subscription ID that identifies an Azure subscription.
*
* @param {string} [baseUri] - The base URI of the service.
*
* @param {object} [options] - The parameter options
*
* @param {Array} [options.filters] - Filters to be added to the request pipeline
*
* @param {object} [options.requestOptions] - Options for the underlying request object
* {@link https://github.com/request/request#requestoptions-callback Options doc}
*
* @param {boolean} [options.noRetryPolicy] - If set to true, turn off default retry policy
*
* @param {string} [options.acceptLanguage] - The preferred language for the response.
*
* @param {number} [options.longRunningOperationRetryTimeout] - The retry timeout in seconds for Long Running Operations. Default value is 30.
*
* @param {boolean} [options.generateClientRequestId] - Whether a unique x-ms-client-request-id should be generated. When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true.
*
*/
constructor(credentials: ServiceClientCredentials, subscriptionId: string, baseUri?: string, options?: AzureServiceClientOptions);

credentials: ServiceClientCredentials;

subscriptionId: string;

apiVersion: string;

acceptLanguage: string;

longRunningOperationRetryTimeout: number;

generateClientRequestId: boolean;

// Operation groups
servers: operations.Servers;
firewallRules: operations.FirewallRules;
databases: operations.Databases;
configurations: operations.Configurations;
logFiles: operations.LogFiles;
locationBasedPerformanceTier: operations.LocationBasedPerformanceTier;
checkNameAvailability: operations.CheckNameAvailability;
serverSecurityAlertPolicies: operations.ServerSecurityAlertPolicies;
operations: operations.Operations;
}

export { MariaDBManagementClient, models as MariaDBManagementModels };
93 changes: 93 additions & 0 deletions lib/services/mariadbManagement/lib/mariaDBManagementClient.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
/*
* 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.
*/

/* jshint latedef:false */
/* jshint forin:false */
/* jshint noempty:false */

'use strict';

const msRest = require('ms-rest');
const msRestAzure = require('ms-rest-azure');
const ServiceClient = msRestAzure.AzureServiceClient;

const models = require('./models');
const operations = require('./operations');


/** Class representing a MariaDBManagementClient. */
class MariaDBManagementClient extends ServiceClient {
/**
* Create a MariaDBManagementClient.
* @param {credentials} credentials - Credentials needed for the client to connect to Azure.
* @param {string} subscriptionId - The subscription ID that identifies an Azure subscription.
* @param {string} [baseUri] - The base URI of the service.
* @param {object} [options] - The parameter options
* @param {Array} [options.filters] - Filters to be added to the request pipeline
* @param {object} [options.requestOptions] - Options for the underlying request object
* {@link https://github.com/request/request#requestoptions-callback Options doc}
* @param {boolean} [options.noRetryPolicy] - If set to true, turn off default retry policy
* @param {string} [options.acceptLanguage] - The preferred language for the response.
* @param {number} [options.longRunningOperationRetryTimeout] - The retry timeout in seconds for Long Running Operations. Default value is 30.
* @param {boolean} [options.generateClientRequestId] - Whether a unique x-ms-client-request-id should be generated. When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true.
*/
constructor(credentials, subscriptionId, baseUri, options) {
if (credentials === null || credentials === undefined) {
throw new Error('\'credentials\' cannot be null.');
}
if (subscriptionId === null || subscriptionId === undefined) {
throw new Error('\'subscriptionId\' cannot be null.');
}

if (!options) options = {};

super(credentials, options);

this.apiVersion = '2018-06-01-preview';
this.acceptLanguage = 'en-US';
this.longRunningOperationRetryTimeout = 30;
this.generateClientRequestId = true;
this.baseUri = baseUri;
if (!this.baseUri) {
this.baseUri = 'https://management.azure.com';
}
this.credentials = credentials;
this.subscriptionId = subscriptionId;

let packageInfo = this.getPackageJsonInfo(__dirname);
this.addUserAgentInfo(`${packageInfo.name}/${packageInfo.version}`);
if(options.acceptLanguage !== null && options.acceptLanguage !== undefined) {
this.acceptLanguage = options.acceptLanguage;
}
if(options.longRunningOperationRetryTimeout !== null && options.longRunningOperationRetryTimeout !== undefined) {
this.longRunningOperationRetryTimeout = options.longRunningOperationRetryTimeout;
}
if(options.generateClientRequestId !== null && options.generateClientRequestId !== undefined) {
this.generateClientRequestId = options.generateClientRequestId;
}
this.servers = new operations.Servers(this);
this.firewallRules = new operations.FirewallRules(this);
this.databases = new operations.Databases(this);
this.configurations = new operations.Configurations(this);
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.models = models;
msRest.addSerializationMixin(this);
}

}

module.exports = MariaDBManagementClient;
module.exports['default'] = MariaDBManagementClient;
module.exports.MariaDBManagementClient = MariaDBManagementClient;
module.exports.MariaDBManagementModels = models;
124 changes: 124 additions & 0 deletions lib/services/mariadbManagement/lib/models/configuration.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
/*
* 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.
*/

'use strict';

const models = require('./index');

/**
* Represents a Configuration.
*
* @extends models['ProxyResource']
*/
class Configuration extends models['ProxyResource'] {
/**
* Create a Configuration.
* @member {string} [value] Value of the configuration.
* @member {string} [description] Description of the configuration.
* @member {string} [defaultValue] Default value of the configuration.
* @member {string} [dataType] Data type of the configuration.
* @member {string} [allowedValues] Allowed values of the configuration.
* @member {string} [source] Source of the configuration.
*/
constructor() {
super();
}

/**
* Defines the metadata of Configuration
*
* @returns {object} metadata of Configuration
*
*/
mapper() {
return {
required: false,
serializedName: 'Configuration',
type: {
name: 'Composite',
className: 'Configuration',
modelProperties: {
id: {
required: false,
readOnly: true,
serializedName: 'id',
type: {
name: 'String'
}
},
name: {
required: false,
readOnly: true,
serializedName: 'name',
type: {
name: 'String'
}
},
type: {
required: false,
readOnly: true,
serializedName: 'type',
type: {
name: 'String'
}
},
value: {
required: false,
serializedName: 'properties.value',
type: {
name: 'String'
}
},
description: {
required: false,
readOnly: true,
serializedName: 'properties.description',
type: {
name: 'String'
}
},
defaultValue: {
required: false,
readOnly: true,
serializedName: 'properties.defaultValue',
type: {
name: 'String'
}
},
dataType: {
required: false,
readOnly: true,
serializedName: 'properties.dataType',
type: {
name: 'String'
}
},
allowedValues: {
required: false,
readOnly: true,
serializedName: 'properties.allowedValues',
type: {
name: 'String'
}
},
source: {
required: false,
serializedName: 'properties.source',
type: {
name: 'String'
}
}
}
}
};
}
}

module.exports = Configuration;
Loading