This repository has been archived by the owner on May 5, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 564
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2489 from Azure/restapi_auto_sql/resource-manager
[AutoPR] sql/resource-manager
- Loading branch information
Showing
79 changed files
with
26,430 additions
and
11,730 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,38 @@ | ||
# Microsoft Azure SDK for Node.js - SQLManagement | ||
# Microsoft Azure SDK for Node.js - SqlManagementClient | ||
This project provides a Node.js package for accessing Azure. Right now it supports: | ||
- **Node.js version 6.x.x or higher** | ||
|
||
## Features | ||
|
||
This project provides a Node.js package that makes it easy to manage Microsoft Azure SQL. | ||
## Minimum node.js version >= 6.x.x | ||
|
||
## How to Install | ||
|
||
```bash | ||
npm install azure-arm-sql | ||
``` | ||
|
||
## How to Use | ||
|
||
### Authentication, client creation and listing servers as an example | ||
|
||
```javascript | ||
const msRestAzure = require('ms-rest-azure'); | ||
const SQLManagement = require("azure-arm-sql"); | ||
// Interactive Login | ||
// It provides a url and code that needs to be copied and pasted in a browser and authenticated over there. If successful, | ||
// the user will get a DeviceTokenCredentials object. | ||
msRestAzure.interactiveLogin().then((credentials) => { | ||
let client = new SQLManagement(credentials, 'your-subscription-id'); | ||
return client.servers.list(); | ||
}).then((servers) => { | ||
console.log('List of servers:'); | ||
console.dir(servers, {depth: null, colors: true}); | ||
## How to use | ||
|
||
### Authentication, client creation and get recoverableDatabases as an example. | ||
|
||
```javascript | ||
const msRestAzure = require("ms-rest-azure"); | ||
const SqlManagementClient = require("azure-arm-sql"); | ||
msRestAzure.interactiveLogin().then((creds) => { | ||
const subscriptionId = "<Subscription_Id>"; | ||
const client = new SqlManagementClient(creds, subscriptionId); | ||
const resourceGroupName = "testresourceGroupName"; | ||
const serverName = "testserverName"; | ||
const databaseName = "testdatabaseName"; | ||
return client.recoverableDatabases.get(resourceGroupName, serverName, databaseName).then((result) => { | ||
console.log("The result is:"); | ||
console.log(result); | ||
}); | ||
}).catch((err) => { | ||
console.log('An error ocurred'); | ||
console.dir(err, {depth: null, colors: true}); | ||
}); | ||
``` | ||
console.log('An error ocurred:'); | ||
console.dir(err, {depth: null, colors: true}); | ||
}); | ||
|
||
## Related projects | ||
|
||
- [Microsoft Azure SDK for Node.js](https://github.com/Azure/azure-sdk-for-node) | ||
- [Microsoft Azure SDK for Node.js](https://github.com/Azure/azure-sdk-for-node) |
88 changes: 88 additions & 0 deletions
88
lib/services/sqlManagement2/lib/models/automaticTuningOptions.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
/* | ||
* 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'; | ||
|
||
/** | ||
* Automatic tuning properties for individual advisors. | ||
* | ||
*/ | ||
class AutomaticTuningOptions { | ||
/** | ||
* Create a AutomaticTuningOptions. | ||
* @member {string} [desiredState] Automatic tuning option desired state. | ||
* Possible values include: 'Off', 'On', 'Default' | ||
* @member {string} [actualState] Automatic tuning option actual state. | ||
* Possible values include: 'Off', 'On' | ||
* @member {number} [reasonCode] Reason code if desired and actual state are | ||
* different. | ||
* @member {string} [reasonDesc] Reason description if desired and actual | ||
* state are different. Possible values include: 'Default', 'Disabled', | ||
* 'AutoConfigured', 'InheritedFromServer', 'QueryStoreOff', | ||
* 'QueryStoreReadOnly', 'NotSupported' | ||
*/ | ||
constructor() { | ||
} | ||
|
||
/** | ||
* Defines the metadata of AutomaticTuningOptions | ||
* | ||
* @returns {object} metadata of AutomaticTuningOptions | ||
* | ||
*/ | ||
mapper() { | ||
return { | ||
required: false, | ||
serializedName: 'AutomaticTuningOptions', | ||
type: { | ||
name: 'Composite', | ||
className: 'AutomaticTuningOptions', | ||
modelProperties: { | ||
desiredState: { | ||
required: false, | ||
serializedName: 'desiredState', | ||
type: { | ||
name: 'Enum', | ||
allowedValues: [ 'Off', 'On', 'Default' ] | ||
} | ||
}, | ||
actualState: { | ||
required: false, | ||
readOnly: true, | ||
serializedName: 'actualState', | ||
type: { | ||
name: 'Enum', | ||
allowedValues: [ 'Off', 'On' ] | ||
} | ||
}, | ||
reasonCode: { | ||
required: false, | ||
readOnly: true, | ||
serializedName: 'reasonCode', | ||
type: { | ||
name: 'Number' | ||
} | ||
}, | ||
reasonDesc: { | ||
required: false, | ||
readOnly: true, | ||
serializedName: 'reasonDesc', | ||
type: { | ||
name: 'Enum', | ||
allowedValues: [ 'Default', 'Disabled', 'AutoConfigured', 'InheritedFromServer', 'QueryStoreOff', 'QueryStoreReadOnly', 'NotSupported' ] | ||
} | ||
} | ||
} | ||
} | ||
}; | ||
} | ||
} | ||
|
||
module.exports = AutomaticTuningOptions; |
87 changes: 87 additions & 0 deletions
87
lib/services/sqlManagement2/lib/models/automaticTuningServerOptions.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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. | ||
*/ | ||
|
||
'use strict'; | ||
|
||
/** | ||
* Automatic tuning properties for individual advisors. | ||
* | ||
*/ | ||
class AutomaticTuningServerOptions { | ||
/** | ||
* Create a AutomaticTuningServerOptions. | ||
* @member {string} [desiredState] Automatic tuning option desired state. | ||
* Possible values include: 'Off', 'On', 'Default' | ||
* @member {string} [actualState] Automatic tuning option actual state. | ||
* Possible values include: 'Off', 'On' | ||
* @member {number} [reasonCode] Reason code if desired and actual state are | ||
* different. | ||
* @member {string} [reasonDesc] Reason description if desired and actual | ||
* state are different. Possible values include: 'Default', 'Disabled', | ||
* 'AutoConfigured' | ||
*/ | ||
constructor() { | ||
} | ||
|
||
/** | ||
* Defines the metadata of AutomaticTuningServerOptions | ||
* | ||
* @returns {object} metadata of AutomaticTuningServerOptions | ||
* | ||
*/ | ||
mapper() { | ||
return { | ||
required: false, | ||
serializedName: 'AutomaticTuningServerOptions', | ||
type: { | ||
name: 'Composite', | ||
className: 'AutomaticTuningServerOptions', | ||
modelProperties: { | ||
desiredState: { | ||
required: false, | ||
serializedName: 'desiredState', | ||
type: { | ||
name: 'Enum', | ||
allowedValues: [ 'Off', 'On', 'Default' ] | ||
} | ||
}, | ||
actualState: { | ||
required: false, | ||
readOnly: true, | ||
serializedName: 'actualState', | ||
type: { | ||
name: 'Enum', | ||
allowedValues: [ 'Off', 'On' ] | ||
} | ||
}, | ||
reasonCode: { | ||
required: false, | ||
readOnly: true, | ||
serializedName: 'reasonCode', | ||
type: { | ||
name: 'Number' | ||
} | ||
}, | ||
reasonDesc: { | ||
required: false, | ||
readOnly: true, | ||
serializedName: 'reasonDesc', | ||
type: { | ||
name: 'Enum', | ||
allowedValues: [ 'Default', 'Disabled', 'AutoConfigured' ] | ||
} | ||
} | ||
} | ||
} | ||
}; | ||
} | ||
} | ||
|
||
module.exports = AutomaticTuningServerOptions; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
53 changes: 53 additions & 0 deletions
53
lib/services/sqlManagement2/lib/models/createDatabaseRestorePointDefinition.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
/* | ||
* 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'; | ||
|
||
/** | ||
* Contains the information necessary to perform a create database restore | ||
* point operation. | ||
* | ||
*/ | ||
class CreateDatabaseRestorePointDefinition { | ||
/** | ||
* Create a CreateDatabaseRestorePointDefinition. | ||
* @member {string} restorePointLabel The restore point label to apply | ||
*/ | ||
constructor() { | ||
} | ||
|
||
/** | ||
* Defines the metadata of CreateDatabaseRestorePointDefinition | ||
* | ||
* @returns {object} metadata of CreateDatabaseRestorePointDefinition | ||
* | ||
*/ | ||
mapper() { | ||
return { | ||
required: false, | ||
serializedName: 'CreateDatabaseRestorePointDefinition', | ||
type: { | ||
name: 'Composite', | ||
className: 'CreateDatabaseRestorePointDefinition', | ||
modelProperties: { | ||
restorePointLabel: { | ||
required: true, | ||
serializedName: 'restorePointLabel', | ||
type: { | ||
name: 'String' | ||
} | ||
} | ||
} | ||
} | ||
}; | ||
} | ||
} | ||
|
||
module.exports = CreateDatabaseRestorePointDefinition; |
Oops, something went wrong.