Apply review comments
This commit is contained in:
Родитель
751a7f25d6
Коммит
6a2c8721f5
|
@ -36,7 +36,7 @@ This library support management certificate authentication. To authenticate the
|
|||
var fs = require('fs'),
|
||||
computeManagement = require('azure-mgmt-compute');
|
||||
|
||||
var computeManagementClient = computeManagement.createComputeManagementClient(new common.CertificateCloudCredentials({
|
||||
var computeManagementClient = computeManagement.createComputeManagementClient(computeManagement.createCertificateCloudCredentials({
|
||||
subscriptionId: '<your subscription id>',
|
||||
pem: fs.readFileSync('<your pem file>')
|
||||
}));
|
||||
|
|
|
@ -35,4 +35,20 @@ exports.ComputeManagementClient = ComputeManagementClient;
|
|||
*/
|
||||
exports.createComputeManagementClient = function (credentials, baseUri) {
|
||||
return new exports.ComputeManagementClient.ComputeManagementClient(credentials, baseUri);
|
||||
};
|
||||
|
||||
var common = require('azure-common');
|
||||
|
||||
/**
|
||||
* Creates a new CertificateCloudCredentials object.
|
||||
* Either a pair of cert / key values need to be pass or a pem file location.
|
||||
*
|
||||
* @param {string} credentials.subscription The subscription identifier.
|
||||
* @param {string} [credentials.cert] The certificate.
|
||||
* @param {string} [credentials.key] The certificate key.
|
||||
* @param {string} [credentials.pem] The PEM file content.
|
||||
* @return {CertificateCloudCredentials}
|
||||
*/
|
||||
exports.createCertificateCloudCredentials = function (credentials) {
|
||||
return new common.CertificateCloudCredentials(credentials);
|
||||
};
|
|
@ -33,7 +33,7 @@ This library support management certificate authentication. To authenticate the
|
|||
var fs = require('fs'),
|
||||
management = require('azure-mgmt');
|
||||
|
||||
var managementClient = management.createManagementClient(new common.CertificateCloudCredentials({
|
||||
var managementClient = management.createManagementClient(management.createCertificateCloudCredentials({
|
||||
subscriptionId: '<your subscription id>',
|
||||
pem: fs.readFileSync('<your pem file>')
|
||||
}));
|
||||
|
|
|
@ -59,4 +59,20 @@ exports.ServiceManagementService = ServiceManagementService;
|
|||
*/
|
||||
exports.createServiceManagementService = function (subscriptionId, authentication, hostOptions) {
|
||||
return new ServiceManagementService(subscriptionId, authentication, hostOptions);
|
||||
};
|
||||
|
||||
var common = require('azure-common');
|
||||
|
||||
/**
|
||||
* Creates a new CertificateCloudCredentials object.
|
||||
* Either a pair of cert / key values need to be pass or a pem file location.
|
||||
*
|
||||
* @param {string} credentials.subscription The subscription identifier.
|
||||
* @param {string} [credentials.cert] The certificate.
|
||||
* @param {string} [credentials.key] The certificate key.
|
||||
* @param {string} [credentials.pem] The PEM file content.
|
||||
* @return {CertificateCloudCredentials}
|
||||
*/
|
||||
exports.createCertificateCloudCredentials = function (credentials) {
|
||||
return new common.CertificateCloudCredentials(credentials);
|
||||
};
|
|
@ -33,7 +33,7 @@ This library support management certificate authentication. To authenticate the
|
|||
var fs = require('fs'),
|
||||
vnetManagement = require('azure-mgmt-vnet');
|
||||
|
||||
var vnetManagementClient = vnetManagement.createVirtualNetworkManagementClient(new common.CertificateCloudCredentials({
|
||||
var vnetManagementClient = vnetManagement.createVirtualNetworkManagementClient(vnetManagement.createCertificateCloudCredentials({
|
||||
subscriptionId: '<your subscription id>',
|
||||
pem: fs.readFileSync('<your pem file>')
|
||||
}));
|
||||
|
|
|
@ -32,4 +32,20 @@ exports.VirtualNetworkManagementClient = VirtualNetworkManagementClient;
|
|||
*/
|
||||
exports.createVirtualNetworkManagementClient = function (credentials, baseUri) {
|
||||
return new exports.VirtualNetworkManagementClient.VirtualNetworkManagementClient(credentials, baseUri);
|
||||
};
|
||||
|
||||
var common = require('azure-common');
|
||||
|
||||
/**
|
||||
* Creates a new CertificateCloudCredentials object.
|
||||
* Either a pair of cert / key values need to be pass or a pem file location.
|
||||
*
|
||||
* @param {string} credentials.subscription The subscription identifier.
|
||||
* @param {string} [credentials.cert] The certificate.
|
||||
* @param {string} [credentials.key] The certificate key.
|
||||
* @param {string} [credentials.pem] The PEM file content.
|
||||
* @return {CertificateCloudCredentials}
|
||||
*/
|
||||
exports.createCertificateCloudCredentials = function (credentials) {
|
||||
return new common.CertificateCloudCredentials(credentials);
|
||||
};
|
|
@ -32,4 +32,20 @@ exports.SchedulerClient = SchedulerClient;
|
|||
*/
|
||||
exports.createSchedulerClient = function (credentials, baseUri) {
|
||||
return new exports.SchedulerClient.SchedulerClient(credentials, baseUri);
|
||||
};
|
||||
|
||||
var common = require('azure-common');
|
||||
|
||||
/**
|
||||
* Creates a new CertificateCloudCredentials object.
|
||||
* Either a pair of cert / key values need to be pass or a pem file location.
|
||||
*
|
||||
* @param {string} credentials.subscription The subscription identifier.
|
||||
* @param {string} [credentials.cert] The certificate.
|
||||
* @param {string} [credentials.key] The certificate key.
|
||||
* @param {string} [credentials.pem] The PEM file content.
|
||||
* @return {CertificateCloudCredentials}
|
||||
*/
|
||||
exports.createCertificateCloudCredentials = function (credentials) {
|
||||
return new common.CertificateCloudCredentials(credentials);
|
||||
};
|
|
@ -30,11 +30,11 @@ This library support management certificate authentication. To authenticate the
|
|||
```javascript
|
||||
var schedulerManagement = require('azure-mgmt-scheduler');
|
||||
|
||||
var schedulerManagementClient = schedulerManagement.createSchedulerManagementClient({
|
||||
var schedulerManagementClient = schedulerManagement.createSchedulerManagementClient(schedulerManagement.createCloudCertificateCredentials({
|
||||
subscriptionId: '<your subscription id>',
|
||||
certvalue: "<your management certificate value>",
|
||||
keyvalue: "<your management certificate key value>"
|
||||
});
|
||||
certvalue: '<your management certificate value>',
|
||||
keyvalue: '<your management certificate key value>'
|
||||
}));
|
||||
```
|
||||
|
||||
### Manage Job Collection
|
||||
|
|
|
@ -32,4 +32,20 @@ exports.SchedulerManagementClient = SchedulerManagementClient;
|
|||
*/
|
||||
exports.createSchedulerManagementClient = function (credentials, baseUri) {
|
||||
return new exports.SchedulerManagementClient.SchedulerManagementClient(credentials, baseUri);
|
||||
};
|
||||
|
||||
var common = require('azure-common');
|
||||
|
||||
/**
|
||||
* Creates a new CertificateCloudCredentials object.
|
||||
* Either a pair of cert / key values need to be pass or a pem file location.
|
||||
*
|
||||
* @param {string} credentials.subscription The subscription identifier.
|
||||
* @param {string} [credentials.cert] The certificate.
|
||||
* @param {string} [credentials.key] The certificate key.
|
||||
* @param {string} [credentials.pem] The PEM file content.
|
||||
* @return {CertificateCloudCredentials}
|
||||
*/
|
||||
exports.createCertificateCloudCredentials = function (credentials) {
|
||||
return new common.CertificateCloudCredentials(credentials);
|
||||
};
|
|
@ -34,7 +34,7 @@ This library support management certificate authentication. To authenticate the
|
|||
var fs = require('fs'),
|
||||
sbManagement = require('azure-mgmt-sb');
|
||||
|
||||
var sbManagementClient = sbManagement.createServiceBusManagementClient(new common.CertificateCloudCredentials({
|
||||
var sbManagementClient = sbManagement.createServiceBusManagementClient(sbManagement.createCertificateCloudCredentials({
|
||||
subscriptionId: '<your subscription id>',
|
||||
pem: fs.readFileSync('<your pem file>')
|
||||
}));
|
||||
|
|
|
@ -65,4 +65,20 @@ exports.ServiceBusManagementClient = require('./serviceBusManagementClient');
|
|||
*/
|
||||
exports.createServiceBusManagementClient = function (credentials, baseUri) {
|
||||
return new exports.ServiceBusManagementClient.ServiceBusManagementClient(credentials, baseUri);
|
||||
};
|
||||
|
||||
var common = require('azure-common');
|
||||
|
||||
/**
|
||||
* Creates a new CertificateCloudCredentials object.
|
||||
* Either a pair of cert / key values need to be pass or a pem file location.
|
||||
*
|
||||
* @param {string} credentials.subscription The subscription identifier.
|
||||
* @param {string} [credentials.cert] The certificate.
|
||||
* @param {string} [credentials.key] The certificate key.
|
||||
* @param {string} [credentials.pem] The PEM file content.
|
||||
* @return {CertificateCloudCredentials}
|
||||
*/
|
||||
exports.createCertificateCloudCredentials = function (credentials) {
|
||||
return new common.CertificateCloudCredentials(credentials);
|
||||
};
|
|
@ -37,7 +37,7 @@ This library support management certificate authentication. To authenticate the
|
|||
var fs = require('fs'),
|
||||
sqlManagement = require('azure-mgmt-sql');
|
||||
|
||||
var sqlManagementClient = sqlManagement.createSqlManagementClient(new common.CertificateCloudCredentials({
|
||||
var sqlManagementClient = sqlManagement.createSqlManagementClient(sqlManagement.createCertificateCloudCredentials({
|
||||
subscriptionId: '<your subscription id>',
|
||||
pem: fs.readFileSync('<your pem file>')
|
||||
}));
|
||||
|
|
|
@ -65,4 +65,20 @@ exports.SqlManagementClient = require('./sqlManagementClient');
|
|||
*/
|
||||
exports.createSqlManagementClient = function (credentials, baseUri) {
|
||||
return new exports.SqlManagementClient.SqlManagementClient(credentials, baseUri);
|
||||
};
|
||||
|
||||
var common = require('azure-common');
|
||||
|
||||
/**
|
||||
* Creates a new CertificateCloudCredentials object.
|
||||
* Either a pair of cert / key values need to be pass or a pem file location.
|
||||
*
|
||||
* @param {string} credentials.subscription The subscription identifier.
|
||||
* @param {string} [credentials.cert] The certificate.
|
||||
* @param {string} [credentials.key] The certificate key.
|
||||
* @param {string} [credentials.pem] The PEM file content.
|
||||
* @return {CertificateCloudCredentials}
|
||||
*/
|
||||
exports.createCertificateCloudCredentials = function (credentials) {
|
||||
return new common.CertificateCloudCredentials(credentials);
|
||||
};
|
|
@ -31,7 +31,7 @@ This library support management certificate authentication. To authenticate the
|
|||
var fs = require('fs'),
|
||||
storageManagement = require('azure-mgmt-storage');
|
||||
|
||||
var storageManagementClient = storageManagement.createStorageManagementClient(new common.CertificateCloudCredentials({
|
||||
var storageManagementClient = storageManagement.createStorageManagementClient(storageManagement.createCertificateCloudCredentials({
|
||||
subscriptionId: '<your subscription id>',
|
||||
pem: fs.readFileSync('<your pem file>')
|
||||
}));
|
||||
|
|
|
@ -32,4 +32,20 @@ exports.StorageManagementClient = StorageManagementClient;
|
|||
*/
|
||||
exports.createStorageManagementClient = function (credentials, baseUri) {
|
||||
return new exports.StorageManagementClient.StorageManagementClient(credentials, baseUri);
|
||||
};
|
||||
|
||||
var common = require('azure-common');
|
||||
|
||||
/**
|
||||
* Creates a new CertificateCloudCredentials object.
|
||||
* Either a pair of cert / key values need to be pass or a pem file location.
|
||||
*
|
||||
* @param {string} credentials.subscription The subscription identifier.
|
||||
* @param {string} [credentials.cert] The certificate.
|
||||
* @param {string} [credentials.key] The certificate key.
|
||||
* @param {string} [credentials.pem] The PEM file content.
|
||||
* @return {CertificateCloudCredentials}
|
||||
*/
|
||||
exports.createCertificateCloudCredentials = function (credentials) {
|
||||
return new common.CertificateCloudCredentials(credentials);
|
||||
};
|
|
@ -30,11 +30,11 @@ This library support management certificate authentication. To authenticate the
|
|||
```javascript
|
||||
var storeManagement = require('azure-mgmt-store');
|
||||
|
||||
var storeManagementClient = storeManagement.createStoreManagementClient({
|
||||
var storeManagementClient = storeManagement.createStoreManagementClient(storeManagement.createCertificateCloudCredentials({
|
||||
subscriptionId: '<your subscription id>',
|
||||
certvalue: "<your management certificate value>",
|
||||
keyvalue: "<your management certificate key value>"
|
||||
});
|
||||
certvalue: '<your management certificate value>',
|
||||
keyvalue: '<your management certificate key value>'
|
||||
}));
|
||||
```
|
||||
|
||||
### Manage Add-On
|
||||
|
|
|
@ -32,4 +32,20 @@ exports.StoreManagementClient = StoreManagementClient;
|
|||
*/
|
||||
exports.createStoreManagementClient = function (credentials, baseUri) {
|
||||
return new exports.StoreManagementClient.StoreManagementClient(credentials, baseUri);
|
||||
};
|
||||
|
||||
var common = require('azure-common');
|
||||
|
||||
/**
|
||||
* Creates a new CertificateCloudCredentials object.
|
||||
* Either a pair of cert / key values need to be pass or a pem file location.
|
||||
*
|
||||
* @param {string} credentials.subscription The subscription identifier.
|
||||
* @param {string} [credentials.cert] The certificate.
|
||||
* @param {string} [credentials.key] The certificate key.
|
||||
* @param {string} [credentials.pem] The PEM file content.
|
||||
* @return {CertificateCloudCredentials}
|
||||
*/
|
||||
exports.createCertificateCloudCredentials = function (credentials) {
|
||||
return new common.CertificateCloudCredentials(credentials);
|
||||
};
|
|
@ -32,7 +32,7 @@ This library support management certificate authentication. To authenticate the
|
|||
var fs = require('fs'),
|
||||
webSiteManagement = require('azure-mgmt-website');
|
||||
|
||||
var webSiteManagementClient = webSiteManagement.createWebsiteManagementClient(new common.CertificateCloudCredentials({
|
||||
var webSiteManagementClient = webSiteManagement.createWebsiteManagementClient(webSiteManagement.createCertificateCloudCredentials({
|
||||
subscriptionId: '<your subscription id>',
|
||||
pem: fs.readFileSync('<your pem file>')
|
||||
}));
|
||||
|
|
|
@ -56,4 +56,20 @@ exports.WebsiteManagementService = WebsiteManagementService;
|
|||
*/
|
||||
exports.createWebsiteManagementService = function (subscriptionId, authentication, hostOptions) {
|
||||
return new WebsiteManagementService(subscriptionId, authentication, hostOptions);
|
||||
};
|
||||
|
||||
var common = require('azure-common');
|
||||
|
||||
/**
|
||||
* Creates a new CertificateCloudCredentials object.
|
||||
* Either a pair of cert / key values need to be pass or a pem file location.
|
||||
*
|
||||
* @param {string} credentials.subscription The subscription identifier.
|
||||
* @param {string} [credentials.cert] The certificate.
|
||||
* @param {string} [credentials.key] The certificate key.
|
||||
* @param {string} [credentials.pem] The PEM file content.
|
||||
* @return {CertificateCloudCredentials}
|
||||
*/
|
||||
exports.createCertificateCloudCredentials = function (credentials) {
|
||||
return new common.CertificateCloudCredentials(credentials);
|
||||
};
|
Загрузка…
Ссылка в новой задаче