diff --git a/lib/services/automationManagement/lib/automationClient.d.ts b/lib/services/automationManagement/lib/automationClient.d.ts index fc9ad09913..beb15e0986 100644 --- a/lib/services/automationManagement/lib/automationClient.d.ts +++ b/lib/services/automationManagement/lib/automationClient.d.ts @@ -13,28 +13,6 @@ import { AzureServiceClient, AzureServiceClientOptions } from 'ms-rest-azure'; import * as models from "./models"; import * as operations from "./operations"; -/** - * AutomationClientOptions for AutomationClient. - */ -declare interface AutomationClientOptions extends AzureServiceClientOptions { - /** - * @property {string} [clientRequestId] - Identifies this specific client request. - */ - clientRequestId?: string; - /** - * @property {string} [acceptLanguage] - Gets or sets the preferred language for the response. - */ - acceptLanguage?: string; - /** - * @property {number} [longRunningOperationRetryTimeout] - Gets or sets the retry timeout in seconds for Long Running Operations. Default value is 30. - */ - longRunningOperationRetryTimeout?: number; - /** - * @property {boolean} [generateClientRequestId] - When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. - */ - generateClientRequestId?: boolean; -} - export default class AutomationClient extends AzureServiceClient { /** * Initializes a new instance of the AutomationClient class. @@ -45,10 +23,6 @@ export default class AutomationClient extends AzureServiceClient { * * @param {string} subscriptionId - Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. * - * @param {string} resourceGroupName - The resource group name. - * - * @param {string} automationAccountName - The name of the automation account. - * * @param {string} [baseUri] - The base URI of the service. * * @param {object} [options] - The parameter options @@ -60,8 +34,6 @@ export default class AutomationClient extends AzureServiceClient { * * @param {boolean} [options.noRetryPolicy] - If set to true, turn off default retry policy * - * @param {string} [options.clientRequestId] - Identifies this specific client request. - * * @param {string} [options.acceptLanguage] - Gets or sets the preferred language for the response. * * @param {number} [options.longRunningOperationRetryTimeout] - Gets or sets the retry timeout in seconds for Long Running Operations. Default value is 30. @@ -69,18 +41,12 @@ export default class AutomationClient extends AzureServiceClient { * @param {boolean} [options.generateClientRequestId] - 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, resourceGroupName: string, automationAccountName: string, baseUri?: string, options?: AutomationClientOptions); + constructor(credentials: ServiceClientCredentials, subscriptionId: string, baseUri?: string, options?: AzureServiceClientOptions); credentials: ServiceClientCredentials; subscriptionId: string; - resourceGroupName: string; - - clientRequestId: string; - - automationAccountName: string; - acceptLanguage: string; longRunningOperationRetryTimeout: number; diff --git a/lib/services/automationManagement/lib/automationClient.js b/lib/services/automationManagement/lib/automationClient.js index 59eda98fcc..539adbc19f 100644 --- a/lib/services/automationManagement/lib/automationClient.js +++ b/lib/services/automationManagement/lib/automationClient.js @@ -28,32 +28,23 @@ class AutomationClient extends ServiceClient { * Create a AutomationClient. * @param {credentials} credentials - Credentials needed for the client to connect to Azure. * @param {string} subscriptionId - Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - * @param {string} resourceGroupName - The resource group name. - * @param {string} automationAccountName - The name of the automation account. * @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.clientRequestId] - Identifies this specific client request. * @param {string} [options.acceptLanguage] - Gets or sets the preferred language for the response. * @param {number} [options.longRunningOperationRetryTimeout] - Gets or sets the retry timeout in seconds for Long Running Operations. Default value is 30. * @param {boolean} [options.generateClientRequestId] - 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, resourceGroupName, automationAccountName, baseUri, options) { + 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 (resourceGroupName === null || resourceGroupName === undefined) { - throw new Error('\'resourceGroupName\' cannot be null.'); - } - if (automationAccountName === null || automationAccountName === undefined) { - throw new Error('\'automationAccountName\' cannot be null.'); - } if (!options) options = {}; @@ -68,14 +59,9 @@ class AutomationClient extends ServiceClient { } this.credentials = credentials; this.subscriptionId = subscriptionId; - this.resourceGroupName = resourceGroupName; - this.automationAccountName = automationAccountName; let packageInfo = this.getPackageJsonInfo(__dirname); this.addUserAgentInfo(`${packageInfo.name}/${packageInfo.version}`); - if(options.clientRequestId !== null && options.clientRequestId !== undefined) { - this.clientRequestId = options.clientRequestId; - } if(options.acceptLanguage !== null && options.acceptLanguage !== undefined) { this.acceptLanguage = options.acceptLanguage; } diff --git a/lib/services/automationManagement/lib/operations/activityOperations.js b/lib/services/automationManagement/lib/operations/activityOperations.js index 4a5bc93aa6..7a133d3778 100644 --- a/lib/services/automationManagement/lib/operations/activityOperations.js +++ b/lib/services/automationManagement/lib/operations/activityOperations.js @@ -18,6 +18,8 @@ const WebResource = msRest.WebResource; * Retrieve the activity in the module identified by module name and activity * name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} moduleName The name of module. @@ -42,7 +44,7 @@ const WebResource = msRest.WebResource; * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _get(automationAccountName, moduleName, activityName, options, callback) { +function _get(resourceGroupName, automationAccountName, moduleName, activityName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -55,13 +57,13 @@ function _get(automationAccountName, moduleName, activityName, options, callback let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -86,7 +88,7 @@ function _get(automationAccountName, moduleName, activityName, options, callback // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/modules/{moduleName}/activities/{activityName}'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{moduleName}', encodeURIComponent(moduleName)); requestUrl = requestUrl.replace('{activityName}', encodeURIComponent(activityName)); @@ -178,6 +180,8 @@ function _get(automationAccountName, moduleName, activityName, options, callback /** * Retrieve a list of activities in the module identified by module name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} moduleName The name of module. @@ -200,7 +204,7 @@ function _get(automationAccountName, moduleName, activityName, options, callback * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _listByModule(automationAccountName, moduleName, options, callback) { +function _listByModule(resourceGroupName, automationAccountName, moduleName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -213,13 +217,13 @@ function _listByModule(automationAccountName, moduleName, options, callback) { let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -241,7 +245,7 @@ function _listByModule(automationAccountName, moduleName, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/modules/{moduleName}/activities'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{moduleName}', encodeURIComponent(moduleName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -474,6 +478,8 @@ class ActivityOperations { * Retrieve the activity in the module identified by module name and activity * name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} moduleName The name of module. @@ -491,11 +497,11 @@ class ActivityOperations { * * @reject {Error} - The error object. */ - getWithHttpOperationResponse(automationAccountName, moduleName, activityName, options) { + getWithHttpOperationResponse(resourceGroupName, automationAccountName, moduleName, activityName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._get(automationAccountName, moduleName, activityName, options, (err, result, request, response) => { + self._get(resourceGroupName, automationAccountName, moduleName, activityName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -509,6 +515,8 @@ class ActivityOperations { * Retrieve the activity in the module identified by module name and activity * name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} moduleName The name of module. @@ -542,7 +550,7 @@ class ActivityOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - get(automationAccountName, moduleName, activityName, options, optionalCallback) { + get(resourceGroupName, automationAccountName, moduleName, activityName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -551,20 +559,22 @@ class ActivityOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._get(automationAccountName, moduleName, activityName, options, (err, result, request, response) => { + self._get(resourceGroupName, automationAccountName, moduleName, activityName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._get(automationAccountName, moduleName, activityName, options, optionalCallback); + return self._get(resourceGroupName, automationAccountName, moduleName, activityName, options, optionalCallback); } } /** * Retrieve a list of activities in the module identified by module name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} moduleName The name of module. @@ -580,11 +590,11 @@ class ActivityOperations { * * @reject {Error} - The error object. */ - listByModuleWithHttpOperationResponse(automationAccountName, moduleName, options) { + listByModuleWithHttpOperationResponse(resourceGroupName, automationAccountName, moduleName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._listByModule(automationAccountName, moduleName, options, (err, result, request, response) => { + self._listByModule(resourceGroupName, automationAccountName, moduleName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -597,6 +607,8 @@ class ActivityOperations { /** * Retrieve a list of activities in the module identified by module name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} moduleName The name of module. @@ -628,7 +640,7 @@ class ActivityOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - listByModule(automationAccountName, moduleName, options, optionalCallback) { + listByModule(resourceGroupName, automationAccountName, moduleName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -637,14 +649,14 @@ class ActivityOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._listByModule(automationAccountName, moduleName, options, (err, result, request, response) => { + self._listByModule(resourceGroupName, automationAccountName, moduleName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._listByModule(automationAccountName, moduleName, options, optionalCallback); + return self._listByModule(resourceGroupName, automationAccountName, moduleName, options, optionalCallback); } } diff --git a/lib/services/automationManagement/lib/operations/agentRegistrationInformation.js b/lib/services/automationManagement/lib/operations/agentRegistrationInformation.js index c16cca7b04..f5addd99d9 100644 --- a/lib/services/automationManagement/lib/operations/agentRegistrationInformation.js +++ b/lib/services/automationManagement/lib/operations/agentRegistrationInformation.js @@ -17,6 +17,8 @@ const WebResource = msRest.WebResource; /** * Retrieve the automation agent registration information. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -37,7 +39,7 @@ const WebResource = msRest.WebResource; * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _get(automationAccountName, options, callback) { +function _get(resourceGroupName, automationAccountName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -50,13 +52,13 @@ function _get(automationAccountName, options, callback) { let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -75,7 +77,7 @@ function _get(automationAccountName, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/agentRegistrationInformation'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; @@ -165,6 +167,8 @@ function _get(automationAccountName, options, callback) { /** * Regenerate a primary or secondary agent registration key * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} parameters The name of the agent registration key to be @@ -199,7 +203,7 @@ function _get(automationAccountName, options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _regenerateKey(automationAccountName, parameters, options, callback) { +function _regenerateKey(resourceGroupName, automationAccountName, parameters, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -212,13 +216,13 @@ function _regenerateKey(automationAccountName, parameters, options, callback) { let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -240,7 +244,7 @@ function _regenerateKey(automationAccountName, parameters, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/agentRegistrationInformation/regenerateKey'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; @@ -356,6 +360,8 @@ class AgentRegistrationInformation { /** * Retrieve the automation agent registration information. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -369,11 +375,11 @@ class AgentRegistrationInformation { * * @reject {Error} - The error object. */ - getWithHttpOperationResponse(automationAccountName, options) { + getWithHttpOperationResponse(resourceGroupName, automationAccountName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._get(automationAccountName, options, (err, result, request, response) => { + self._get(resourceGroupName, automationAccountName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -386,6 +392,8 @@ class AgentRegistrationInformation { /** * Retrieve the automation agent registration information. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -415,7 +423,7 @@ class AgentRegistrationInformation { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - get(automationAccountName, options, optionalCallback) { + get(resourceGroupName, automationAccountName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -424,20 +432,22 @@ class AgentRegistrationInformation { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._get(automationAccountName, options, (err, result, request, response) => { + self._get(resourceGroupName, automationAccountName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._get(automationAccountName, options, optionalCallback); + return self._get(resourceGroupName, automationAccountName, options, optionalCallback); } } /** * Regenerate a primary or secondary agent registration key * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} parameters The name of the agent registration key to be @@ -465,11 +475,11 @@ class AgentRegistrationInformation { * * @reject {Error} - The error object. */ - regenerateKeyWithHttpOperationResponse(automationAccountName, parameters, options) { + regenerateKeyWithHttpOperationResponse(resourceGroupName, automationAccountName, parameters, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._regenerateKey(automationAccountName, parameters, options, (err, result, request, response) => { + self._regenerateKey(resourceGroupName, automationAccountName, parameters, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -482,6 +492,8 @@ class AgentRegistrationInformation { /** * Regenerate a primary or secondary agent registration key * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} parameters The name of the agent registration key to be @@ -525,7 +537,7 @@ class AgentRegistrationInformation { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - regenerateKey(automationAccountName, parameters, options, optionalCallback) { + regenerateKey(resourceGroupName, automationAccountName, parameters, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -534,14 +546,14 @@ class AgentRegistrationInformation { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._regenerateKey(automationAccountName, parameters, options, (err, result, request, response) => { + self._regenerateKey(resourceGroupName, automationAccountName, parameters, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._regenerateKey(automationAccountName, parameters, options, optionalCallback); + return self._regenerateKey(resourceGroupName, automationAccountName, parameters, options, optionalCallback); } } diff --git a/lib/services/automationManagement/lib/operations/certificateOperations.js b/lib/services/automationManagement/lib/operations/certificateOperations.js index 85dd4c0f19..9663038a97 100644 --- a/lib/services/automationManagement/lib/operations/certificateOperations.js +++ b/lib/services/automationManagement/lib/operations/certificateOperations.js @@ -17,6 +17,8 @@ const WebResource = msRest.WebResource; /** * Delete the certificate. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} certificateName The name of certificate. @@ -38,7 +40,7 @@ const WebResource = msRest.WebResource; * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _deleteMethod(automationAccountName, certificateName, options, callback) { +function _deleteMethod(resourceGroupName, automationAccountName, certificateName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -51,13 +53,13 @@ function _deleteMethod(automationAccountName, certificateName, options, callback let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -79,7 +81,7 @@ function _deleteMethod(automationAccountName, certificateName, options, callback // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/certificates/{certificateName}'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{certificateName}', encodeURIComponent(certificateName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -153,6 +155,8 @@ function _deleteMethod(automationAccountName, certificateName, options, callback /** * Retrieve the certificate identified by certificate name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} certificateName The name of certificate. @@ -175,7 +179,7 @@ function _deleteMethod(automationAccountName, certificateName, options, callback * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _get(automationAccountName, certificateName, options, callback) { +function _get(resourceGroupName, automationAccountName, certificateName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -188,13 +192,13 @@ function _get(automationAccountName, certificateName, options, callback) { let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -216,7 +220,7 @@ function _get(automationAccountName, certificateName, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/certificates/{certificateName}'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{certificateName}', encodeURIComponent(certificateName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -307,6 +311,8 @@ function _get(automationAccountName, certificateName, options, callback) { /** * Create a certificate. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} certificateName The parameters supplied to the create or @@ -347,7 +353,7 @@ function _get(automationAccountName, certificateName, options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _createOrUpdate(automationAccountName, certificateName, parameters, options, callback) { +function _createOrUpdate(resourceGroupName, automationAccountName, certificateName, parameters, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -360,13 +366,13 @@ function _createOrUpdate(automationAccountName, certificateName, parameters, opt let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -391,7 +397,7 @@ function _createOrUpdate(automationAccountName, certificateName, parameters, opt // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/certificates/{certificateName}'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{certificateName}', encodeURIComponent(certificateName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -513,6 +519,8 @@ function _createOrUpdate(automationAccountName, certificateName, parameters, opt /** * Update a certificate. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} certificateName The parameters supplied to the update @@ -544,7 +552,7 @@ function _createOrUpdate(automationAccountName, certificateName, parameters, opt * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _update(automationAccountName, certificateName, parameters, options, callback) { +function _update(resourceGroupName, automationAccountName, certificateName, parameters, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -557,13 +565,13 @@ function _update(automationAccountName, certificateName, parameters, options, ca let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -588,7 +596,7 @@ function _update(automationAccountName, certificateName, parameters, options, ca // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/certificates/{certificateName}'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{certificateName}', encodeURIComponent(certificateName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -693,6 +701,8 @@ function _update(automationAccountName, certificateName, parameters, options, ca /** * Retrieve a list of certificates. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -713,7 +723,7 @@ function _update(automationAccountName, certificateName, parameters, options, ca * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _listByAutomationAccount(automationAccountName, options, callback) { +function _listByAutomationAccount(resourceGroupName, automationAccountName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -726,13 +736,13 @@ function _listByAutomationAccount(automationAccountName, options, callback) { let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -751,7 +761,7 @@ function _listByAutomationAccount(automationAccountName, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/certificates'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; @@ -985,6 +995,8 @@ class CertificateOperations { /** * Delete the certificate. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} certificateName The name of certificate. @@ -1000,11 +1012,11 @@ class CertificateOperations { * * @reject {Error} - The error object. */ - deleteMethodWithHttpOperationResponse(automationAccountName, certificateName, options) { + deleteMethodWithHttpOperationResponse(resourceGroupName, automationAccountName, certificateName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._deleteMethod(automationAccountName, certificateName, options, (err, result, request, response) => { + self._deleteMethod(resourceGroupName, automationAccountName, certificateName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1017,6 +1029,8 @@ class CertificateOperations { /** * Delete the certificate. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} certificateName The name of certificate. @@ -1047,7 +1061,7 @@ class CertificateOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(automationAccountName, certificateName, options, optionalCallback) { + deleteMethod(resourceGroupName, automationAccountName, certificateName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1056,20 +1070,22 @@ class CertificateOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._deleteMethod(automationAccountName, certificateName, options, (err, result, request, response) => { + self._deleteMethod(resourceGroupName, automationAccountName, certificateName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._deleteMethod(automationAccountName, certificateName, options, optionalCallback); + return self._deleteMethod(resourceGroupName, automationAccountName, certificateName, options, optionalCallback); } } /** * Retrieve the certificate identified by certificate name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} certificateName The name of certificate. @@ -1085,11 +1101,11 @@ class CertificateOperations { * * @reject {Error} - The error object. */ - getWithHttpOperationResponse(automationAccountName, certificateName, options) { + getWithHttpOperationResponse(resourceGroupName, automationAccountName, certificateName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._get(automationAccountName, certificateName, options, (err, result, request, response) => { + self._get(resourceGroupName, automationAccountName, certificateName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1102,6 +1118,8 @@ class CertificateOperations { /** * Retrieve the certificate identified by certificate name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} certificateName The name of certificate. @@ -1133,7 +1151,7 @@ class CertificateOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - get(automationAccountName, certificateName, options, optionalCallback) { + get(resourceGroupName, automationAccountName, certificateName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1142,20 +1160,22 @@ class CertificateOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._get(automationAccountName, certificateName, options, (err, result, request, response) => { + self._get(resourceGroupName, automationAccountName, certificateName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._get(automationAccountName, certificateName, options, optionalCallback); + return self._get(resourceGroupName, automationAccountName, certificateName, options, optionalCallback); } } /** * Create a certificate. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} certificateName The parameters supplied to the create or @@ -1189,11 +1209,11 @@ class CertificateOperations { * * @reject {Error} - The error object. */ - createOrUpdateWithHttpOperationResponse(automationAccountName, certificateName, parameters, options) { + createOrUpdateWithHttpOperationResponse(resourceGroupName, automationAccountName, certificateName, parameters, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._createOrUpdate(automationAccountName, certificateName, parameters, options, (err, result, request, response) => { + self._createOrUpdate(resourceGroupName, automationAccountName, certificateName, parameters, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1206,6 +1226,8 @@ class CertificateOperations { /** * Create a certificate. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} certificateName The parameters supplied to the create or @@ -1255,7 +1277,7 @@ class CertificateOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - createOrUpdate(automationAccountName, certificateName, parameters, options, optionalCallback) { + createOrUpdate(resourceGroupName, automationAccountName, certificateName, parameters, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1264,20 +1286,22 @@ class CertificateOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._createOrUpdate(automationAccountName, certificateName, parameters, options, (err, result, request, response) => { + self._createOrUpdate(resourceGroupName, automationAccountName, certificateName, parameters, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._createOrUpdate(automationAccountName, certificateName, parameters, options, optionalCallback); + return self._createOrUpdate(resourceGroupName, automationAccountName, certificateName, parameters, options, optionalCallback); } } /** * Update a certificate. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} certificateName The parameters supplied to the update @@ -1302,11 +1326,11 @@ class CertificateOperations { * * @reject {Error} - The error object. */ - updateWithHttpOperationResponse(automationAccountName, certificateName, parameters, options) { + updateWithHttpOperationResponse(resourceGroupName, automationAccountName, certificateName, parameters, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._update(automationAccountName, certificateName, parameters, options, (err, result, request, response) => { + self._update(resourceGroupName, automationAccountName, certificateName, parameters, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1319,6 +1343,8 @@ class CertificateOperations { /** * Update a certificate. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} certificateName The parameters supplied to the update @@ -1359,7 +1385,7 @@ class CertificateOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - update(automationAccountName, certificateName, parameters, options, optionalCallback) { + update(resourceGroupName, automationAccountName, certificateName, parameters, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1368,20 +1394,22 @@ class CertificateOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._update(automationAccountName, certificateName, parameters, options, (err, result, request, response) => { + self._update(resourceGroupName, automationAccountName, certificateName, parameters, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._update(automationAccountName, certificateName, parameters, options, optionalCallback); + return self._update(resourceGroupName, automationAccountName, certificateName, parameters, options, optionalCallback); } } /** * Retrieve a list of certificates. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -1395,11 +1423,11 @@ class CertificateOperations { * * @reject {Error} - The error object. */ - listByAutomationAccountWithHttpOperationResponse(automationAccountName, options) { + listByAutomationAccountWithHttpOperationResponse(resourceGroupName, automationAccountName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._listByAutomationAccount(automationAccountName, options, (err, result, request, response) => { + self._listByAutomationAccount(resourceGroupName, automationAccountName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1412,6 +1440,8 @@ class CertificateOperations { /** * Retrieve a list of certificates. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -1441,7 +1471,7 @@ class CertificateOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - listByAutomationAccount(automationAccountName, options, optionalCallback) { + listByAutomationAccount(resourceGroupName, automationAccountName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1450,14 +1480,14 @@ class CertificateOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._listByAutomationAccount(automationAccountName, options, (err, result, request, response) => { + self._listByAutomationAccount(resourceGroupName, automationAccountName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._listByAutomationAccount(automationAccountName, options, optionalCallback); + return self._listByAutomationAccount(resourceGroupName, automationAccountName, options, optionalCallback); } } diff --git a/lib/services/automationManagement/lib/operations/connectionOperations.js b/lib/services/automationManagement/lib/operations/connectionOperations.js index 01927ca169..42da11809a 100644 --- a/lib/services/automationManagement/lib/operations/connectionOperations.js +++ b/lib/services/automationManagement/lib/operations/connectionOperations.js @@ -17,6 +17,8 @@ const WebResource = msRest.WebResource; /** * Delete the connection. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} connectionName The name of connection. @@ -39,7 +41,7 @@ const WebResource = msRest.WebResource; * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _deleteMethod(automationAccountName, connectionName, options, callback) { +function _deleteMethod(resourceGroupName, automationAccountName, connectionName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -52,13 +54,13 @@ function _deleteMethod(automationAccountName, connectionName, options, callback) let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -80,7 +82,7 @@ function _deleteMethod(automationAccountName, connectionName, options, callback) // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/connections/{connectionName}'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{connectionName}', encodeURIComponent(connectionName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -171,6 +173,8 @@ function _deleteMethod(automationAccountName, connectionName, options, callback) /** * Retrieve the connection identified by connection name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} connectionName The name of connection. @@ -193,7 +197,7 @@ function _deleteMethod(automationAccountName, connectionName, options, callback) * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _get(automationAccountName, connectionName, options, callback) { +function _get(resourceGroupName, automationAccountName, connectionName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -206,13 +210,13 @@ function _get(automationAccountName, connectionName, options, callback) { let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -234,7 +238,7 @@ function _get(automationAccountName, connectionName, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/connections/{connectionName}'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{connectionName}', encodeURIComponent(connectionName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -325,6 +329,8 @@ function _get(automationAccountName, connectionName, options, callback) { /** * Create or update a connection. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} connectionName The parameters supplied to the create or @@ -365,7 +371,7 @@ function _get(automationAccountName, connectionName, options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _createOrUpdate(automationAccountName, connectionName, parameters, options, callback) { +function _createOrUpdate(resourceGroupName, automationAccountName, connectionName, parameters, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -378,13 +384,13 @@ function _createOrUpdate(automationAccountName, connectionName, parameters, opti let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -409,7 +415,7 @@ function _createOrUpdate(automationAccountName, connectionName, parameters, opti // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/connections/{connectionName}'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{connectionName}', encodeURIComponent(connectionName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -531,6 +537,8 @@ function _createOrUpdate(automationAccountName, connectionName, parameters, opti /** * Update a connection. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} connectionName The parameters supplied to the update a @@ -565,7 +573,7 @@ function _createOrUpdate(automationAccountName, connectionName, parameters, opti * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _update(automationAccountName, connectionName, parameters, options, callback) { +function _update(resourceGroupName, automationAccountName, connectionName, parameters, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -578,13 +586,13 @@ function _update(automationAccountName, connectionName, parameters, options, cal let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -609,7 +617,7 @@ function _update(automationAccountName, connectionName, parameters, options, cal // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/connections/{connectionName}'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{connectionName}', encodeURIComponent(connectionName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -714,6 +722,8 @@ function _update(automationAccountName, connectionName, parameters, options, cal /** * Retrieve a list of connections. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -734,7 +744,7 @@ function _update(automationAccountName, connectionName, parameters, options, cal * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _listByAutomationAccount(automationAccountName, options, callback) { +function _listByAutomationAccount(resourceGroupName, automationAccountName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -747,13 +757,13 @@ function _listByAutomationAccount(automationAccountName, options, callback) { let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -772,7 +782,7 @@ function _listByAutomationAccount(automationAccountName, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/connections'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; @@ -1006,6 +1016,8 @@ class ConnectionOperations { /** * Delete the connection. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} connectionName The name of connection. @@ -1021,11 +1033,11 @@ class ConnectionOperations { * * @reject {Error} - The error object. */ - deleteMethodWithHttpOperationResponse(automationAccountName, connectionName, options) { + deleteMethodWithHttpOperationResponse(resourceGroupName, automationAccountName, connectionName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._deleteMethod(automationAccountName, connectionName, options, (err, result, request, response) => { + self._deleteMethod(resourceGroupName, automationAccountName, connectionName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1038,6 +1050,8 @@ class ConnectionOperations { /** * Delete the connection. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} connectionName The name of connection. @@ -1069,7 +1083,7 @@ class ConnectionOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(automationAccountName, connectionName, options, optionalCallback) { + deleteMethod(resourceGroupName, automationAccountName, connectionName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1078,20 +1092,22 @@ class ConnectionOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._deleteMethod(automationAccountName, connectionName, options, (err, result, request, response) => { + self._deleteMethod(resourceGroupName, automationAccountName, connectionName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._deleteMethod(automationAccountName, connectionName, options, optionalCallback); + return self._deleteMethod(resourceGroupName, automationAccountName, connectionName, options, optionalCallback); } } /** * Retrieve the connection identified by connection name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} connectionName The name of connection. @@ -1107,11 +1123,11 @@ class ConnectionOperations { * * @reject {Error} - The error object. */ - getWithHttpOperationResponse(automationAccountName, connectionName, options) { + getWithHttpOperationResponse(resourceGroupName, automationAccountName, connectionName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._get(automationAccountName, connectionName, options, (err, result, request, response) => { + self._get(resourceGroupName, automationAccountName, connectionName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1124,6 +1140,8 @@ class ConnectionOperations { /** * Retrieve the connection identified by connection name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} connectionName The name of connection. @@ -1155,7 +1173,7 @@ class ConnectionOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - get(automationAccountName, connectionName, options, optionalCallback) { + get(resourceGroupName, automationAccountName, connectionName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1164,20 +1182,22 @@ class ConnectionOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._get(automationAccountName, connectionName, options, (err, result, request, response) => { + self._get(resourceGroupName, automationAccountName, connectionName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._get(automationAccountName, connectionName, options, optionalCallback); + return self._get(resourceGroupName, automationAccountName, connectionName, options, optionalCallback); } } /** * Create or update a connection. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} connectionName The parameters supplied to the create or @@ -1211,11 +1231,11 @@ class ConnectionOperations { * * @reject {Error} - The error object. */ - createOrUpdateWithHttpOperationResponse(automationAccountName, connectionName, parameters, options) { + createOrUpdateWithHttpOperationResponse(resourceGroupName, automationAccountName, connectionName, parameters, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._createOrUpdate(automationAccountName, connectionName, parameters, options, (err, result, request, response) => { + self._createOrUpdate(resourceGroupName, automationAccountName, connectionName, parameters, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1228,6 +1248,8 @@ class ConnectionOperations { /** * Create or update a connection. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} connectionName The parameters supplied to the create or @@ -1277,7 +1299,7 @@ class ConnectionOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - createOrUpdate(automationAccountName, connectionName, parameters, options, optionalCallback) { + createOrUpdate(resourceGroupName, automationAccountName, connectionName, parameters, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1286,20 +1308,22 @@ class ConnectionOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._createOrUpdate(automationAccountName, connectionName, parameters, options, (err, result, request, response) => { + self._createOrUpdate(resourceGroupName, automationAccountName, connectionName, parameters, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._createOrUpdate(automationAccountName, connectionName, parameters, options, optionalCallback); + return self._createOrUpdate(resourceGroupName, automationAccountName, connectionName, parameters, options, optionalCallback); } } /** * Update a connection. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} connectionName The parameters supplied to the update a @@ -1327,11 +1351,11 @@ class ConnectionOperations { * * @reject {Error} - The error object. */ - updateWithHttpOperationResponse(automationAccountName, connectionName, parameters, options) { + updateWithHttpOperationResponse(resourceGroupName, automationAccountName, connectionName, parameters, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._update(automationAccountName, connectionName, parameters, options, (err, result, request, response) => { + self._update(resourceGroupName, automationAccountName, connectionName, parameters, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1344,6 +1368,8 @@ class ConnectionOperations { /** * Update a connection. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} connectionName The parameters supplied to the update a @@ -1387,7 +1413,7 @@ class ConnectionOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - update(automationAccountName, connectionName, parameters, options, optionalCallback) { + update(resourceGroupName, automationAccountName, connectionName, parameters, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1396,20 +1422,22 @@ class ConnectionOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._update(automationAccountName, connectionName, parameters, options, (err, result, request, response) => { + self._update(resourceGroupName, automationAccountName, connectionName, parameters, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._update(automationAccountName, connectionName, parameters, options, optionalCallback); + return self._update(resourceGroupName, automationAccountName, connectionName, parameters, options, optionalCallback); } } /** * Retrieve a list of connections. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -1423,11 +1451,11 @@ class ConnectionOperations { * * @reject {Error} - The error object. */ - listByAutomationAccountWithHttpOperationResponse(automationAccountName, options) { + listByAutomationAccountWithHttpOperationResponse(resourceGroupName, automationAccountName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._listByAutomationAccount(automationAccountName, options, (err, result, request, response) => { + self._listByAutomationAccount(resourceGroupName, automationAccountName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1440,6 +1468,8 @@ class ConnectionOperations { /** * Retrieve a list of connections. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -1469,7 +1499,7 @@ class ConnectionOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - listByAutomationAccount(automationAccountName, options, optionalCallback) { + listByAutomationAccount(resourceGroupName, automationAccountName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1478,14 +1508,14 @@ class ConnectionOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._listByAutomationAccount(automationAccountName, options, (err, result, request, response) => { + self._listByAutomationAccount(resourceGroupName, automationAccountName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._listByAutomationAccount(automationAccountName, options, optionalCallback); + return self._listByAutomationAccount(resourceGroupName, automationAccountName, options, optionalCallback); } } diff --git a/lib/services/automationManagement/lib/operations/connectionTypeOperations.js b/lib/services/automationManagement/lib/operations/connectionTypeOperations.js index fc53b8f316..5f99b02be3 100644 --- a/lib/services/automationManagement/lib/operations/connectionTypeOperations.js +++ b/lib/services/automationManagement/lib/operations/connectionTypeOperations.js @@ -17,6 +17,8 @@ const WebResource = msRest.WebResource; /** * Delete the connectiontype. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} connectionTypeName The name of connectiontype. @@ -38,7 +40,7 @@ const WebResource = msRest.WebResource; * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _deleteMethod(automationAccountName, connectionTypeName, options, callback) { +function _deleteMethod(resourceGroupName, automationAccountName, connectionTypeName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -51,13 +53,13 @@ function _deleteMethod(automationAccountName, connectionTypeName, options, callb let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -79,7 +81,7 @@ function _deleteMethod(automationAccountName, connectionTypeName, options, callb // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/connectionTypes/{connectionTypeName}'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{connectionTypeName}', encodeURIComponent(connectionTypeName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -153,6 +155,8 @@ function _deleteMethod(automationAccountName, connectionTypeName, options, callb /** * Retrieve the connectiontype identified by connectiontype name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} connectionTypeName The name of connectiontype. @@ -175,7 +179,7 @@ function _deleteMethod(automationAccountName, connectionTypeName, options, callb * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _get(automationAccountName, connectionTypeName, options, callback) { +function _get(resourceGroupName, automationAccountName, connectionTypeName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -188,13 +192,13 @@ function _get(automationAccountName, connectionTypeName, options, callback) { let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -216,7 +220,7 @@ function _get(automationAccountName, connectionTypeName, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/connectionTypes/{connectionTypeName}'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{connectionTypeName}', encodeURIComponent(connectionTypeName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -307,6 +311,8 @@ function _get(automationAccountName, connectionTypeName, options, callback) { /** * Create a connectiontype. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} connectionTypeName The parameters supplied to the create or @@ -342,7 +348,7 @@ function _get(automationAccountName, connectionTypeName, options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _createOrUpdate(automationAccountName, connectionTypeName, parameters, options, callback) { +function _createOrUpdate(resourceGroupName, automationAccountName, connectionTypeName, parameters, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -355,13 +361,13 @@ function _createOrUpdate(automationAccountName, connectionTypeName, parameters, let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -386,7 +392,7 @@ function _createOrUpdate(automationAccountName, connectionTypeName, parameters, // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/connectionTypes/{connectionTypeName}'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{connectionTypeName}', encodeURIComponent(connectionTypeName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -508,6 +514,8 @@ function _createOrUpdate(automationAccountName, connectionTypeName, parameters, /** * Retrieve a list of connectiontypes. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -529,7 +537,7 @@ function _createOrUpdate(automationAccountName, connectionTypeName, parameters, * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _listByAutomationAccount(automationAccountName, options, callback) { +function _listByAutomationAccount(resourceGroupName, automationAccountName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -542,13 +550,13 @@ function _listByAutomationAccount(automationAccountName, options, callback) { let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -567,7 +575,7 @@ function _listByAutomationAccount(automationAccountName, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/connectionTypes'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; @@ -801,6 +809,8 @@ class ConnectionTypeOperations { /** * Delete the connectiontype. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} connectionTypeName The name of connectiontype. @@ -816,11 +826,11 @@ class ConnectionTypeOperations { * * @reject {Error} - The error object. */ - deleteMethodWithHttpOperationResponse(automationAccountName, connectionTypeName, options) { + deleteMethodWithHttpOperationResponse(resourceGroupName, automationAccountName, connectionTypeName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._deleteMethod(automationAccountName, connectionTypeName, options, (err, result, request, response) => { + self._deleteMethod(resourceGroupName, automationAccountName, connectionTypeName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -833,6 +843,8 @@ class ConnectionTypeOperations { /** * Delete the connectiontype. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} connectionTypeName The name of connectiontype. @@ -863,7 +875,7 @@ class ConnectionTypeOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(automationAccountName, connectionTypeName, options, optionalCallback) { + deleteMethod(resourceGroupName, automationAccountName, connectionTypeName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -872,20 +884,22 @@ class ConnectionTypeOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._deleteMethod(automationAccountName, connectionTypeName, options, (err, result, request, response) => { + self._deleteMethod(resourceGroupName, automationAccountName, connectionTypeName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._deleteMethod(automationAccountName, connectionTypeName, options, optionalCallback); + return self._deleteMethod(resourceGroupName, automationAccountName, connectionTypeName, options, optionalCallback); } } /** * Retrieve the connectiontype identified by connectiontype name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} connectionTypeName The name of connectiontype. @@ -901,11 +915,11 @@ class ConnectionTypeOperations { * * @reject {Error} - The error object. */ - getWithHttpOperationResponse(automationAccountName, connectionTypeName, options) { + getWithHttpOperationResponse(resourceGroupName, automationAccountName, connectionTypeName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._get(automationAccountName, connectionTypeName, options, (err, result, request, response) => { + self._get(resourceGroupName, automationAccountName, connectionTypeName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -918,6 +932,8 @@ class ConnectionTypeOperations { /** * Retrieve the connectiontype identified by connectiontype name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} connectionTypeName The name of connectiontype. @@ -949,7 +965,7 @@ class ConnectionTypeOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - get(automationAccountName, connectionTypeName, options, optionalCallback) { + get(resourceGroupName, automationAccountName, connectionTypeName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -958,20 +974,22 @@ class ConnectionTypeOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._get(automationAccountName, connectionTypeName, options, (err, result, request, response) => { + self._get(resourceGroupName, automationAccountName, connectionTypeName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._get(automationAccountName, connectionTypeName, options, optionalCallback); + return self._get(resourceGroupName, automationAccountName, connectionTypeName, options, optionalCallback); } } /** * Create a connectiontype. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} connectionTypeName The parameters supplied to the create or @@ -1000,11 +1018,11 @@ class ConnectionTypeOperations { * * @reject {Error} - The error object. */ - createOrUpdateWithHttpOperationResponse(automationAccountName, connectionTypeName, parameters, options) { + createOrUpdateWithHttpOperationResponse(resourceGroupName, automationAccountName, connectionTypeName, parameters, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._createOrUpdate(automationAccountName, connectionTypeName, parameters, options, (err, result, request, response) => { + self._createOrUpdate(resourceGroupName, automationAccountName, connectionTypeName, parameters, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1017,6 +1035,8 @@ class ConnectionTypeOperations { /** * Create a connectiontype. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} connectionTypeName The parameters supplied to the create or @@ -1061,7 +1081,7 @@ class ConnectionTypeOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - createOrUpdate(automationAccountName, connectionTypeName, parameters, options, optionalCallback) { + createOrUpdate(resourceGroupName, automationAccountName, connectionTypeName, parameters, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1070,20 +1090,22 @@ class ConnectionTypeOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._createOrUpdate(automationAccountName, connectionTypeName, parameters, options, (err, result, request, response) => { + self._createOrUpdate(resourceGroupName, automationAccountName, connectionTypeName, parameters, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._createOrUpdate(automationAccountName, connectionTypeName, parameters, options, optionalCallback); + return self._createOrUpdate(resourceGroupName, automationAccountName, connectionTypeName, parameters, options, optionalCallback); } } /** * Retrieve a list of connectiontypes. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -1097,11 +1119,11 @@ class ConnectionTypeOperations { * * @reject {Error} - The error object. */ - listByAutomationAccountWithHttpOperationResponse(automationAccountName, options) { + listByAutomationAccountWithHttpOperationResponse(resourceGroupName, automationAccountName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._listByAutomationAccount(automationAccountName, options, (err, result, request, response) => { + self._listByAutomationAccount(resourceGroupName, automationAccountName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1114,6 +1136,8 @@ class ConnectionTypeOperations { /** * Retrieve a list of connectiontypes. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -1144,7 +1168,7 @@ class ConnectionTypeOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - listByAutomationAccount(automationAccountName, options, optionalCallback) { + listByAutomationAccount(resourceGroupName, automationAccountName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1153,14 +1177,14 @@ class ConnectionTypeOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._listByAutomationAccount(automationAccountName, options, (err, result, request, response) => { + self._listByAutomationAccount(resourceGroupName, automationAccountName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._listByAutomationAccount(automationAccountName, options, optionalCallback); + return self._listByAutomationAccount(resourceGroupName, automationAccountName, options, optionalCallback); } } diff --git a/lib/services/automationManagement/lib/operations/credentialOperations.js b/lib/services/automationManagement/lib/operations/credentialOperations.js index 2f7b0283a0..68c96bf0b3 100644 --- a/lib/services/automationManagement/lib/operations/credentialOperations.js +++ b/lib/services/automationManagement/lib/operations/credentialOperations.js @@ -17,6 +17,8 @@ const WebResource = msRest.WebResource; /** * Delete the credential. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} credentialName The name of credential. @@ -38,7 +40,7 @@ const WebResource = msRest.WebResource; * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _deleteMethod(automationAccountName, credentialName, options, callback) { +function _deleteMethod(resourceGroupName, automationAccountName, credentialName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -51,13 +53,13 @@ function _deleteMethod(automationAccountName, credentialName, options, callback) let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -79,7 +81,7 @@ function _deleteMethod(automationAccountName, credentialName, options, callback) // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/credentials/{credentialName}'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{credentialName}', encodeURIComponent(credentialName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -153,6 +155,8 @@ function _deleteMethod(automationAccountName, credentialName, options, callback) /** * Retrieve the credential identified by credential name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} credentialName The name of credential. @@ -175,7 +179,7 @@ function _deleteMethod(automationAccountName, credentialName, options, callback) * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _get(automationAccountName, credentialName, options, callback) { +function _get(resourceGroupName, automationAccountName, credentialName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -188,13 +192,13 @@ function _get(automationAccountName, credentialName, options, callback) { let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -216,7 +220,7 @@ function _get(automationAccountName, credentialName, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/credentials/{credentialName}'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{credentialName}', encodeURIComponent(credentialName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -307,6 +311,8 @@ function _get(automationAccountName, credentialName, options, callback) { /** * Create a credential. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} credentialName The parameters supplied to the create or @@ -344,7 +350,7 @@ function _get(automationAccountName, credentialName, options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _createOrUpdate(automationAccountName, credentialName, parameters, options, callback) { +function _createOrUpdate(resourceGroupName, automationAccountName, credentialName, parameters, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -357,13 +363,13 @@ function _createOrUpdate(automationAccountName, credentialName, parameters, opti let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -388,7 +394,7 @@ function _createOrUpdate(automationAccountName, credentialName, parameters, opti // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/credentials/{credentialName}'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{credentialName}', encodeURIComponent(credentialName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -510,6 +516,8 @@ function _createOrUpdate(automationAccountName, credentialName, parameters, opti /** * Update a credential. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} credentialName The parameters supplied to the Update @@ -547,7 +555,7 @@ function _createOrUpdate(automationAccountName, credentialName, parameters, opti * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _update(automationAccountName, credentialName, parameters, options, callback) { +function _update(resourceGroupName, automationAccountName, credentialName, parameters, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -560,13 +568,13 @@ function _update(automationAccountName, credentialName, parameters, options, cal let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -591,7 +599,7 @@ function _update(automationAccountName, credentialName, parameters, options, cal // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/credentials/{credentialName}'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{credentialName}', encodeURIComponent(credentialName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -696,6 +704,8 @@ function _update(automationAccountName, credentialName, parameters, options, cal /** * Retrieve a list of credentials. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -716,7 +726,7 @@ function _update(automationAccountName, credentialName, parameters, options, cal * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _listByAutomationAccount(automationAccountName, options, callback) { +function _listByAutomationAccount(resourceGroupName, automationAccountName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -729,13 +739,13 @@ function _listByAutomationAccount(automationAccountName, options, callback) { let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -754,7 +764,7 @@ function _listByAutomationAccount(automationAccountName, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/credentials'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; @@ -986,6 +996,8 @@ class CredentialOperations { /** * Delete the credential. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} credentialName The name of credential. @@ -1001,11 +1013,11 @@ class CredentialOperations { * * @reject {Error} - The error object. */ - deleteMethodWithHttpOperationResponse(automationAccountName, credentialName, options) { + deleteMethodWithHttpOperationResponse(resourceGroupName, automationAccountName, credentialName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._deleteMethod(automationAccountName, credentialName, options, (err, result, request, response) => { + self._deleteMethod(resourceGroupName, automationAccountName, credentialName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1018,6 +1030,8 @@ class CredentialOperations { /** * Delete the credential. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} credentialName The name of credential. @@ -1048,7 +1062,7 @@ class CredentialOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(automationAccountName, credentialName, options, optionalCallback) { + deleteMethod(resourceGroupName, automationAccountName, credentialName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1057,20 +1071,22 @@ class CredentialOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._deleteMethod(automationAccountName, credentialName, options, (err, result, request, response) => { + self._deleteMethod(resourceGroupName, automationAccountName, credentialName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._deleteMethod(automationAccountName, credentialName, options, optionalCallback); + return self._deleteMethod(resourceGroupName, automationAccountName, credentialName, options, optionalCallback); } } /** * Retrieve the credential identified by credential name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} credentialName The name of credential. @@ -1086,11 +1102,11 @@ class CredentialOperations { * * @reject {Error} - The error object. */ - getWithHttpOperationResponse(automationAccountName, credentialName, options) { + getWithHttpOperationResponse(resourceGroupName, automationAccountName, credentialName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._get(automationAccountName, credentialName, options, (err, result, request, response) => { + self._get(resourceGroupName, automationAccountName, credentialName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1103,6 +1119,8 @@ class CredentialOperations { /** * Retrieve the credential identified by credential name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} credentialName The name of credential. @@ -1134,7 +1152,7 @@ class CredentialOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - get(automationAccountName, credentialName, options, optionalCallback) { + get(resourceGroupName, automationAccountName, credentialName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1143,20 +1161,22 @@ class CredentialOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._get(automationAccountName, credentialName, options, (err, result, request, response) => { + self._get(resourceGroupName, automationAccountName, credentialName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._get(automationAccountName, credentialName, options, optionalCallback); + return self._get(resourceGroupName, automationAccountName, credentialName, options, optionalCallback); } } /** * Create a credential. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} credentialName The parameters supplied to the create or @@ -1187,11 +1207,11 @@ class CredentialOperations { * * @reject {Error} - The error object. */ - createOrUpdateWithHttpOperationResponse(automationAccountName, credentialName, parameters, options) { + createOrUpdateWithHttpOperationResponse(resourceGroupName, automationAccountName, credentialName, parameters, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._createOrUpdate(automationAccountName, credentialName, parameters, options, (err, result, request, response) => { + self._createOrUpdate(resourceGroupName, automationAccountName, credentialName, parameters, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1204,6 +1224,8 @@ class CredentialOperations { /** * Create a credential. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} credentialName The parameters supplied to the create or @@ -1250,7 +1272,7 @@ class CredentialOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - createOrUpdate(automationAccountName, credentialName, parameters, options, optionalCallback) { + createOrUpdate(resourceGroupName, automationAccountName, credentialName, parameters, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1259,20 +1281,22 @@ class CredentialOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._createOrUpdate(automationAccountName, credentialName, parameters, options, (err, result, request, response) => { + self._createOrUpdate(resourceGroupName, automationAccountName, credentialName, parameters, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._createOrUpdate(automationAccountName, credentialName, parameters, options, optionalCallback); + return self._createOrUpdate(resourceGroupName, automationAccountName, credentialName, parameters, options, optionalCallback); } } /** * Update a credential. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} credentialName The parameters supplied to the Update @@ -1303,11 +1327,11 @@ class CredentialOperations { * * @reject {Error} - The error object. */ - updateWithHttpOperationResponse(automationAccountName, credentialName, parameters, options) { + updateWithHttpOperationResponse(resourceGroupName, automationAccountName, credentialName, parameters, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._update(automationAccountName, credentialName, parameters, options, (err, result, request, response) => { + self._update(resourceGroupName, automationAccountName, credentialName, parameters, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1320,6 +1344,8 @@ class CredentialOperations { /** * Update a credential. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} credentialName The parameters supplied to the Update @@ -1366,7 +1392,7 @@ class CredentialOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - update(automationAccountName, credentialName, parameters, options, optionalCallback) { + update(resourceGroupName, automationAccountName, credentialName, parameters, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1375,20 +1401,22 @@ class CredentialOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._update(automationAccountName, credentialName, parameters, options, (err, result, request, response) => { + self._update(resourceGroupName, automationAccountName, credentialName, parameters, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._update(automationAccountName, credentialName, parameters, options, optionalCallback); + return self._update(resourceGroupName, automationAccountName, credentialName, parameters, options, optionalCallback); } } /** * Retrieve a list of credentials. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -1402,11 +1430,11 @@ class CredentialOperations { * * @reject {Error} - The error object. */ - listByAutomationAccountWithHttpOperationResponse(automationAccountName, options) { + listByAutomationAccountWithHttpOperationResponse(resourceGroupName, automationAccountName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._listByAutomationAccount(automationAccountName, options, (err, result, request, response) => { + self._listByAutomationAccount(resourceGroupName, automationAccountName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1419,6 +1447,8 @@ class CredentialOperations { /** * Retrieve a list of credentials. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -1448,7 +1478,7 @@ class CredentialOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - listByAutomationAccount(automationAccountName, options, optionalCallback) { + listByAutomationAccount(resourceGroupName, automationAccountName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1457,14 +1487,14 @@ class CredentialOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._listByAutomationAccount(automationAccountName, options, (err, result, request, response) => { + self._listByAutomationAccount(resourceGroupName, automationAccountName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._listByAutomationAccount(automationAccountName, options, optionalCallback); + return self._listByAutomationAccount(resourceGroupName, automationAccountName, options, optionalCallback); } } diff --git a/lib/services/automationManagement/lib/operations/dscCompilationJobOperations.js b/lib/services/automationManagement/lib/operations/dscCompilationJobOperations.js index 413df5947c..641962720d 100644 --- a/lib/services/automationManagement/lib/operations/dscCompilationJobOperations.js +++ b/lib/services/automationManagement/lib/operations/dscCompilationJobOperations.js @@ -17,6 +17,8 @@ const WebResource = msRest.WebResource; /** * Creates the Dsc compilation job of the configuration. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {uuid} compilationJobId The the DSC configuration Id. @@ -61,7 +63,7 @@ const WebResource = msRest.WebResource; * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _create(automationAccountName, compilationJobId, parameters, options, callback) { +function _create(resourceGroupName, automationAccountName, compilationJobId, parameters, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -74,13 +76,13 @@ function _create(automationAccountName, compilationJobId, parameters, options, c let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -105,7 +107,7 @@ function _create(automationAccountName, compilationJobId, parameters, options, c // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/compilationjobs/{compilationJobId}'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{compilationJobId}', encodeURIComponent(compilationJobId.toString())); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -210,6 +212,8 @@ function _create(automationAccountName, compilationJobId, parameters, options, c /** * Retrieve the Dsc configuration compilation job identified by job id. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {uuid} compilationJobId The Dsc configuration compilation job id. @@ -232,7 +236,7 @@ function _create(automationAccountName, compilationJobId, parameters, options, c * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _get(automationAccountName, compilationJobId, options, callback) { +function _get(resourceGroupName, automationAccountName, compilationJobId, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -245,13 +249,13 @@ function _get(automationAccountName, compilationJobId, options, callback) { let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -273,7 +277,7 @@ function _get(automationAccountName, compilationJobId, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/compilationjobs/{compilationJobId}'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{compilationJobId}', encodeURIComponent(compilationJobId.toString())); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -364,6 +368,8 @@ function _get(automationAccountName, compilationJobId, options, callback) { /** * Retrieve a list of dsc compilation jobs. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -387,7 +393,7 @@ function _get(automationAccountName, compilationJobId, options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _listByAutomationAccount(automationAccountName, options, callback) { +function _listByAutomationAccount(resourceGroupName, automationAccountName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -401,13 +407,13 @@ function _listByAutomationAccount(automationAccountName, options, callback) { let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -429,7 +435,7 @@ function _listByAutomationAccount(automationAccountName, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/compilationjobs'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; @@ -522,6 +528,8 @@ function _listByAutomationAccount(automationAccountName, options, callback) { /** * Retrieve the job stream identified by job stream id. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {uuid} jobId The job id. @@ -546,7 +554,7 @@ function _listByAutomationAccount(automationAccountName, options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _getStream(automationAccountName, jobId, jobStreamId, options, callback) { +function _getStream(resourceGroupName, automationAccountName, jobId, jobStreamId, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -559,13 +567,13 @@ function _getStream(automationAccountName, jobId, jobStreamId, options, callback let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -590,7 +598,7 @@ function _getStream(automationAccountName, jobId, jobStreamId, options, callback // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/compilationjobs/{jobId}/streams/{jobStreamId}'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{jobId}', encodeURIComponent(jobId.toString())); requestUrl = requestUrl.replace('{jobStreamId}', encodeURIComponent(jobStreamId)); @@ -826,6 +834,8 @@ class DscCompilationJobOperations { /** * Creates the Dsc compilation job of the configuration. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {uuid} compilationJobId The the DSC configuration Id. @@ -863,11 +873,11 @@ class DscCompilationJobOperations { * * @reject {Error} - The error object. */ - createWithHttpOperationResponse(automationAccountName, compilationJobId, parameters, options) { + createWithHttpOperationResponse(resourceGroupName, automationAccountName, compilationJobId, parameters, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._create(automationAccountName, compilationJobId, parameters, options, (err, result, request, response) => { + self._create(resourceGroupName, automationAccountName, compilationJobId, parameters, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -880,6 +890,8 @@ class DscCompilationJobOperations { /** * Creates the Dsc compilation job of the configuration. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {uuid} compilationJobId The the DSC configuration Id. @@ -933,7 +945,7 @@ class DscCompilationJobOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - create(automationAccountName, compilationJobId, parameters, options, optionalCallback) { + create(resourceGroupName, automationAccountName, compilationJobId, parameters, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -942,20 +954,22 @@ class DscCompilationJobOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._create(automationAccountName, compilationJobId, parameters, options, (err, result, request, response) => { + self._create(resourceGroupName, automationAccountName, compilationJobId, parameters, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._create(automationAccountName, compilationJobId, parameters, options, optionalCallback); + return self._create(resourceGroupName, automationAccountName, compilationJobId, parameters, options, optionalCallback); } } /** * Retrieve the Dsc configuration compilation job identified by job id. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {uuid} compilationJobId The Dsc configuration compilation job id. @@ -971,11 +985,11 @@ class DscCompilationJobOperations { * * @reject {Error} - The error object. */ - getWithHttpOperationResponse(automationAccountName, compilationJobId, options) { + getWithHttpOperationResponse(resourceGroupName, automationAccountName, compilationJobId, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._get(automationAccountName, compilationJobId, options, (err, result, request, response) => { + self._get(resourceGroupName, automationAccountName, compilationJobId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -988,6 +1002,8 @@ class DscCompilationJobOperations { /** * Retrieve the Dsc configuration compilation job identified by job id. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {uuid} compilationJobId The Dsc configuration compilation job id. @@ -1019,7 +1035,7 @@ class DscCompilationJobOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - get(automationAccountName, compilationJobId, options, optionalCallback) { + get(resourceGroupName, automationAccountName, compilationJobId, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1028,20 +1044,22 @@ class DscCompilationJobOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._get(automationAccountName, compilationJobId, options, (err, result, request, response) => { + self._get(resourceGroupName, automationAccountName, compilationJobId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._get(automationAccountName, compilationJobId, options, optionalCallback); + return self._get(resourceGroupName, automationAccountName, compilationJobId, options, optionalCallback); } } /** * Retrieve a list of dsc compilation jobs. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -1057,11 +1075,11 @@ class DscCompilationJobOperations { * * @reject {Error} - The error object. */ - listByAutomationAccountWithHttpOperationResponse(automationAccountName, options) { + listByAutomationAccountWithHttpOperationResponse(resourceGroupName, automationAccountName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._listByAutomationAccount(automationAccountName, options, (err, result, request, response) => { + self._listByAutomationAccount(resourceGroupName, automationAccountName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1074,6 +1092,8 @@ class DscCompilationJobOperations { /** * Retrieve a list of dsc compilation jobs. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -1106,7 +1126,7 @@ class DscCompilationJobOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - listByAutomationAccount(automationAccountName, options, optionalCallback) { + listByAutomationAccount(resourceGroupName, automationAccountName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1115,20 +1135,22 @@ class DscCompilationJobOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._listByAutomationAccount(automationAccountName, options, (err, result, request, response) => { + self._listByAutomationAccount(resourceGroupName, automationAccountName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._listByAutomationAccount(automationAccountName, options, optionalCallback); + return self._listByAutomationAccount(resourceGroupName, automationAccountName, options, optionalCallback); } } /** * Retrieve the job stream identified by job stream id. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {uuid} jobId The job id. @@ -1146,11 +1168,11 @@ class DscCompilationJobOperations { * * @reject {Error} - The error object. */ - getStreamWithHttpOperationResponse(automationAccountName, jobId, jobStreamId, options) { + getStreamWithHttpOperationResponse(resourceGroupName, automationAccountName, jobId, jobStreamId, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._getStream(automationAccountName, jobId, jobStreamId, options, (err, result, request, response) => { + self._getStream(resourceGroupName, automationAccountName, jobId, jobStreamId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1163,6 +1185,8 @@ class DscCompilationJobOperations { /** * Retrieve the job stream identified by job stream id. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {uuid} jobId The job id. @@ -1196,7 +1220,7 @@ class DscCompilationJobOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getStream(automationAccountName, jobId, jobStreamId, options, optionalCallback) { + getStream(resourceGroupName, automationAccountName, jobId, jobStreamId, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1205,14 +1229,14 @@ class DscCompilationJobOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getStream(automationAccountName, jobId, jobStreamId, options, (err, result, request, response) => { + self._getStream(resourceGroupName, automationAccountName, jobId, jobStreamId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getStream(automationAccountName, jobId, jobStreamId, options, optionalCallback); + return self._getStream(resourceGroupName, automationAccountName, jobId, jobStreamId, options, optionalCallback); } } diff --git a/lib/services/automationManagement/lib/operations/dscCompilationJobStream.js b/lib/services/automationManagement/lib/operations/dscCompilationJobStream.js index 4afe189714..31a252d987 100644 --- a/lib/services/automationManagement/lib/operations/dscCompilationJobStream.js +++ b/lib/services/automationManagement/lib/operations/dscCompilationJobStream.js @@ -17,6 +17,8 @@ const WebResource = msRest.WebResource; /** * Retrieve all the job streams for the compilation Job. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {uuid} jobId The job id. @@ -39,7 +41,7 @@ const WebResource = msRest.WebResource; * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _listByJob(automationAccountName, jobId, options, callback) { +function _listByJob(resourceGroupName, automationAccountName, jobId, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -52,13 +54,13 @@ function _listByJob(automationAccountName, jobId, options, callback) { let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -80,7 +82,7 @@ function _listByJob(automationAccountName, jobId, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/compilationjobs/{jobId}/streams/'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{jobId}', encodeURIComponent(jobId.toString())); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -182,6 +184,8 @@ class DscCompilationJobStream { /** * Retrieve all the job streams for the compilation Job. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {uuid} jobId The job id. @@ -197,11 +201,11 @@ class DscCompilationJobStream { * * @reject {Error} - The error object. */ - listByJobWithHttpOperationResponse(automationAccountName, jobId, options) { + listByJobWithHttpOperationResponse(resourceGroupName, automationAccountName, jobId, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._listByJob(automationAccountName, jobId, options, (err, result, request, response) => { + self._listByJob(resourceGroupName, automationAccountName, jobId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -214,6 +218,8 @@ class DscCompilationJobStream { /** * Retrieve all the job streams for the compilation Job. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {uuid} jobId The job id. @@ -245,7 +251,7 @@ class DscCompilationJobStream { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - listByJob(automationAccountName, jobId, options, optionalCallback) { + listByJob(resourceGroupName, automationAccountName, jobId, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -254,14 +260,14 @@ class DscCompilationJobStream { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._listByJob(automationAccountName, jobId, options, (err, result, request, response) => { + self._listByJob(resourceGroupName, automationAccountName, jobId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._listByJob(automationAccountName, jobId, options, optionalCallback); + return self._listByJob(resourceGroupName, automationAccountName, jobId, options, optionalCallback); } } diff --git a/lib/services/automationManagement/lib/operations/dscConfigurationOperations.js b/lib/services/automationManagement/lib/operations/dscConfigurationOperations.js index c80ee3ac53..6b19bcf05c 100644 --- a/lib/services/automationManagement/lib/operations/dscConfigurationOperations.js +++ b/lib/services/automationManagement/lib/operations/dscConfigurationOperations.js @@ -17,6 +17,8 @@ const WebResource = msRest.WebResource; /** * Delete the dsc configuration identified by configuration name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} configurationName The configuration name. @@ -38,7 +40,7 @@ const WebResource = msRest.WebResource; * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _deleteMethod(automationAccountName, configurationName, options, callback) { +function _deleteMethod(resourceGroupName, automationAccountName, configurationName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -51,13 +53,13 @@ function _deleteMethod(automationAccountName, configurationName, options, callba let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -79,7 +81,7 @@ function _deleteMethod(automationAccountName, configurationName, options, callba // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/configurations/{configurationName}'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{configurationName}', encodeURIComponent(configurationName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -153,6 +155,8 @@ function _deleteMethod(automationAccountName, configurationName, options, callba /** * Retrieve the configuration identified by configuration name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} configurationName The configuration name. @@ -175,7 +179,7 @@ function _deleteMethod(automationAccountName, configurationName, options, callba * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _get(automationAccountName, configurationName, options, callback) { +function _get(resourceGroupName, automationAccountName, configurationName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -188,13 +192,13 @@ function _get(automationAccountName, configurationName, options, callback) { let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -216,7 +220,7 @@ function _get(automationAccountName, configurationName, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/configurations/{configurationName}'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{configurationName}', encodeURIComponent(configurationName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -307,6 +311,8 @@ function _get(automationAccountName, configurationName, options, callback) { /** * Create the configuration identified by configuration name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} configurationName The create or update parameters for @@ -370,7 +376,7 @@ function _get(automationAccountName, configurationName, options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _createOrUpdate(automationAccountName, configurationName, parameters, options, callback) { +function _createOrUpdate(resourceGroupName, automationAccountName, configurationName, parameters, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -383,13 +389,13 @@ function _createOrUpdate(automationAccountName, configurationName, parameters, o let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -414,7 +420,7 @@ function _createOrUpdate(automationAccountName, configurationName, parameters, o // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/configurations/{configurationName}'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{configurationName}', encodeURIComponent(configurationName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -536,6 +542,8 @@ function _createOrUpdate(automationAccountName, configurationName, parameters, o /** * Retrieve the configuration script identified by configuration name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} configurationName The configuration name. @@ -557,7 +565,7 @@ function _createOrUpdate(automationAccountName, configurationName, parameters, o * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _getContent(automationAccountName, configurationName, options, callback) { +function _getContent(resourceGroupName, automationAccountName, configurationName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -570,13 +578,13 @@ function _getContent(automationAccountName, configurationName, options, callback let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -598,7 +606,7 @@ function _getContent(automationAccountName, configurationName, options, callback // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/configurations/{configurationName}/content'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{configurationName}', encodeURIComponent(configurationName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -695,6 +703,8 @@ function _getContent(automationAccountName, configurationName, options, callback /** * Retrieve a list of configurations. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -716,7 +726,7 @@ function _getContent(automationAccountName, configurationName, options, callback * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _listByAutomationAccount(automationAccountName, options, callback) { +function _listByAutomationAccount(resourceGroupName, automationAccountName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -729,13 +739,13 @@ function _listByAutomationAccount(automationAccountName, options, callback) { let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -754,7 +764,7 @@ function _listByAutomationAccount(automationAccountName, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/configurations'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; @@ -989,6 +999,8 @@ class DscConfigurationOperations { /** * Delete the dsc configuration identified by configuration name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} configurationName The configuration name. @@ -1004,11 +1016,11 @@ class DscConfigurationOperations { * * @reject {Error} - The error object. */ - deleteMethodWithHttpOperationResponse(automationAccountName, configurationName, options) { + deleteMethodWithHttpOperationResponse(resourceGroupName, automationAccountName, configurationName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._deleteMethod(automationAccountName, configurationName, options, (err, result, request, response) => { + self._deleteMethod(resourceGroupName, automationAccountName, configurationName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1021,6 +1033,8 @@ class DscConfigurationOperations { /** * Delete the dsc configuration identified by configuration name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} configurationName The configuration name. @@ -1051,7 +1065,7 @@ class DscConfigurationOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(automationAccountName, configurationName, options, optionalCallback) { + deleteMethod(resourceGroupName, automationAccountName, configurationName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1060,20 +1074,22 @@ class DscConfigurationOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._deleteMethod(automationAccountName, configurationName, options, (err, result, request, response) => { + self._deleteMethod(resourceGroupName, automationAccountName, configurationName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._deleteMethod(automationAccountName, configurationName, options, optionalCallback); + return self._deleteMethod(resourceGroupName, automationAccountName, configurationName, options, optionalCallback); } } /** * Retrieve the configuration identified by configuration name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} configurationName The configuration name. @@ -1089,11 +1105,11 @@ class DscConfigurationOperations { * * @reject {Error} - The error object. */ - getWithHttpOperationResponse(automationAccountName, configurationName, options) { + getWithHttpOperationResponse(resourceGroupName, automationAccountName, configurationName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._get(automationAccountName, configurationName, options, (err, result, request, response) => { + self._get(resourceGroupName, automationAccountName, configurationName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1106,6 +1122,8 @@ class DscConfigurationOperations { /** * Retrieve the configuration identified by configuration name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} configurationName The configuration name. @@ -1137,7 +1155,7 @@ class DscConfigurationOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - get(automationAccountName, configurationName, options, optionalCallback) { + get(resourceGroupName, automationAccountName, configurationName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1146,20 +1164,22 @@ class DscConfigurationOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._get(automationAccountName, configurationName, options, (err, result, request, response) => { + self._get(resourceGroupName, automationAccountName, configurationName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._get(automationAccountName, configurationName, options, optionalCallback); + return self._get(resourceGroupName, automationAccountName, configurationName, options, optionalCallback); } } /** * Create the configuration identified by configuration name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} configurationName The create or update parameters for @@ -1216,11 +1236,11 @@ class DscConfigurationOperations { * * @reject {Error} - The error object. */ - createOrUpdateWithHttpOperationResponse(automationAccountName, configurationName, parameters, options) { + createOrUpdateWithHttpOperationResponse(resourceGroupName, automationAccountName, configurationName, parameters, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._createOrUpdate(automationAccountName, configurationName, parameters, options, (err, result, request, response) => { + self._createOrUpdate(resourceGroupName, automationAccountName, configurationName, parameters, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1233,6 +1253,8 @@ class DscConfigurationOperations { /** * Create the configuration identified by configuration name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} configurationName The create or update parameters for @@ -1305,7 +1327,7 @@ class DscConfigurationOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - createOrUpdate(automationAccountName, configurationName, parameters, options, optionalCallback) { + createOrUpdate(resourceGroupName, automationAccountName, configurationName, parameters, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1314,20 +1336,22 @@ class DscConfigurationOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._createOrUpdate(automationAccountName, configurationName, parameters, options, (err, result, request, response) => { + self._createOrUpdate(resourceGroupName, automationAccountName, configurationName, parameters, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._createOrUpdate(automationAccountName, configurationName, parameters, options, optionalCallback); + return self._createOrUpdate(resourceGroupName, automationAccountName, configurationName, parameters, options, optionalCallback); } } /** * Retrieve the configuration script identified by configuration name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} configurationName The configuration name. @@ -1343,11 +1367,11 @@ class DscConfigurationOperations { * * @reject {Error} - The error object. */ - getContentWithHttpOperationResponse(automationAccountName, configurationName, options) { + getContentWithHttpOperationResponse(resourceGroupName, automationAccountName, configurationName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._getContent(automationAccountName, configurationName, options, (err, result, request, response) => { + self._getContent(resourceGroupName, automationAccountName, configurationName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1360,6 +1384,8 @@ class DscConfigurationOperations { /** * Retrieve the configuration script identified by configuration name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} configurationName The configuration name. @@ -1390,7 +1416,7 @@ class DscConfigurationOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getContent(automationAccountName, configurationName, options, optionalCallback) { + getContent(resourceGroupName, automationAccountName, configurationName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1399,20 +1425,22 @@ class DscConfigurationOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getContent(automationAccountName, configurationName, options, (err, result, request, response) => { + self._getContent(resourceGroupName, automationAccountName, configurationName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getContent(automationAccountName, configurationName, options, optionalCallback); + return self._getContent(resourceGroupName, automationAccountName, configurationName, options, optionalCallback); } } /** * Retrieve a list of configurations. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -1426,11 +1454,11 @@ class DscConfigurationOperations { * * @reject {Error} - The error object. */ - listByAutomationAccountWithHttpOperationResponse(automationAccountName, options) { + listByAutomationAccountWithHttpOperationResponse(resourceGroupName, automationAccountName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._listByAutomationAccount(automationAccountName, options, (err, result, request, response) => { + self._listByAutomationAccount(resourceGroupName, automationAccountName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1443,6 +1471,8 @@ class DscConfigurationOperations { /** * Retrieve a list of configurations. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -1473,7 +1503,7 @@ class DscConfigurationOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - listByAutomationAccount(automationAccountName, options, optionalCallback) { + listByAutomationAccount(resourceGroupName, automationAccountName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1482,14 +1512,14 @@ class DscConfigurationOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._listByAutomationAccount(automationAccountName, options, (err, result, request, response) => { + self._listByAutomationAccount(resourceGroupName, automationAccountName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._listByAutomationAccount(automationAccountName, options, optionalCallback); + return self._listByAutomationAccount(resourceGroupName, automationAccountName, options, optionalCallback); } } diff --git a/lib/services/automationManagement/lib/operations/dscNodeConfigurationOperations.js b/lib/services/automationManagement/lib/operations/dscNodeConfigurationOperations.js index 324a545465..54dc7f4b1f 100644 --- a/lib/services/automationManagement/lib/operations/dscNodeConfigurationOperations.js +++ b/lib/services/automationManagement/lib/operations/dscNodeConfigurationOperations.js @@ -17,6 +17,8 @@ const WebResource = msRest.WebResource; /** * Delete the Dsc node configurations by node configuration. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} nodeConfigurationName The Dsc node configuration name. @@ -38,7 +40,7 @@ const WebResource = msRest.WebResource; * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _deleteMethod(automationAccountName, nodeConfigurationName, options, callback) { +function _deleteMethod(resourceGroupName, automationAccountName, nodeConfigurationName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -51,13 +53,13 @@ function _deleteMethod(automationAccountName, nodeConfigurationName, options, ca let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -79,7 +81,7 @@ function _deleteMethod(automationAccountName, nodeConfigurationName, options, ca // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/nodeConfigurations/{nodeConfigurationName}'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{nodeConfigurationName}', encodeURIComponent(nodeConfigurationName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -153,6 +155,8 @@ function _deleteMethod(automationAccountName, nodeConfigurationName, options, ca /** * Retrieve the Dsc node configurations by node configuration. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} nodeConfigurationName The Dsc node configuration name. @@ -175,7 +179,7 @@ function _deleteMethod(automationAccountName, nodeConfigurationName, options, ca * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _get(automationAccountName, nodeConfigurationName, options, callback) { +function _get(resourceGroupName, automationAccountName, nodeConfigurationName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -188,13 +192,13 @@ function _get(automationAccountName, nodeConfigurationName, options, callback) { let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -216,7 +220,7 @@ function _get(automationAccountName, nodeConfigurationName, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/nodeConfigurations/{nodeConfigurationName}'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{nodeConfigurationName}', encodeURIComponent(nodeConfigurationName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -307,6 +311,8 @@ function _get(automationAccountName, nodeConfigurationName, options, callback) { /** * Create the node configuration identified by node configuration name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} nodeConfigurationName The create or update parameters for @@ -363,7 +369,7 @@ function _get(automationAccountName, nodeConfigurationName, options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _createOrUpdate(automationAccountName, nodeConfigurationName, parameters, options, callback) { +function _createOrUpdate(resourceGroupName, automationAccountName, nodeConfigurationName, parameters, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -376,13 +382,13 @@ function _createOrUpdate(automationAccountName, nodeConfigurationName, parameter let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -407,7 +413,7 @@ function _createOrUpdate(automationAccountName, nodeConfigurationName, parameter // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/nodeConfigurations/{nodeConfigurationName}'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{nodeConfigurationName}', encodeURIComponent(nodeConfigurationName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -512,6 +518,8 @@ function _createOrUpdate(automationAccountName, nodeConfigurationName, parameter /** * Retrieve a list of dsc node configurations. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -535,7 +543,7 @@ function _createOrUpdate(automationAccountName, nodeConfigurationName, parameter * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _listByAutomationAccount(automationAccountName, options, callback) { +function _listByAutomationAccount(resourceGroupName, automationAccountName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -549,13 +557,13 @@ function _listByAutomationAccount(automationAccountName, options, callback) { let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -577,7 +585,7 @@ function _listByAutomationAccount(automationAccountName, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/nodeConfigurations'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; @@ -814,6 +822,8 @@ class DscNodeConfigurationOperations { /** * Delete the Dsc node configurations by node configuration. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} nodeConfigurationName The Dsc node configuration name. @@ -829,11 +839,11 @@ class DscNodeConfigurationOperations { * * @reject {Error} - The error object. */ - deleteMethodWithHttpOperationResponse(automationAccountName, nodeConfigurationName, options) { + deleteMethodWithHttpOperationResponse(resourceGroupName, automationAccountName, nodeConfigurationName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._deleteMethod(automationAccountName, nodeConfigurationName, options, (err, result, request, response) => { + self._deleteMethod(resourceGroupName, automationAccountName, nodeConfigurationName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -846,6 +856,8 @@ class DscNodeConfigurationOperations { /** * Delete the Dsc node configurations by node configuration. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} nodeConfigurationName The Dsc node configuration name. @@ -876,7 +888,7 @@ class DscNodeConfigurationOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(automationAccountName, nodeConfigurationName, options, optionalCallback) { + deleteMethod(resourceGroupName, automationAccountName, nodeConfigurationName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -885,20 +897,22 @@ class DscNodeConfigurationOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._deleteMethod(automationAccountName, nodeConfigurationName, options, (err, result, request, response) => { + self._deleteMethod(resourceGroupName, automationAccountName, nodeConfigurationName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._deleteMethod(automationAccountName, nodeConfigurationName, options, optionalCallback); + return self._deleteMethod(resourceGroupName, automationAccountName, nodeConfigurationName, options, optionalCallback); } } /** * Retrieve the Dsc node configurations by node configuration. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} nodeConfigurationName The Dsc node configuration name. @@ -914,11 +928,11 @@ class DscNodeConfigurationOperations { * * @reject {Error} - The error object. */ - getWithHttpOperationResponse(automationAccountName, nodeConfigurationName, options) { + getWithHttpOperationResponse(resourceGroupName, automationAccountName, nodeConfigurationName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._get(automationAccountName, nodeConfigurationName, options, (err, result, request, response) => { + self._get(resourceGroupName, automationAccountName, nodeConfigurationName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -931,6 +945,8 @@ class DscNodeConfigurationOperations { /** * Retrieve the Dsc node configurations by node configuration. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} nodeConfigurationName The Dsc node configuration name. @@ -962,7 +978,7 @@ class DscNodeConfigurationOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - get(automationAccountName, nodeConfigurationName, options, optionalCallback) { + get(resourceGroupName, automationAccountName, nodeConfigurationName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -971,20 +987,22 @@ class DscNodeConfigurationOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._get(automationAccountName, nodeConfigurationName, options, (err, result, request, response) => { + self._get(resourceGroupName, automationAccountName, nodeConfigurationName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._get(automationAccountName, nodeConfigurationName, options, optionalCallback); + return self._get(resourceGroupName, automationAccountName, nodeConfigurationName, options, optionalCallback); } } /** * Create the node configuration identified by node configuration name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} nodeConfigurationName The create or update parameters for @@ -1034,11 +1052,11 @@ class DscNodeConfigurationOperations { * * @reject {Error} - The error object. */ - createOrUpdateWithHttpOperationResponse(automationAccountName, nodeConfigurationName, parameters, options) { + createOrUpdateWithHttpOperationResponse(resourceGroupName, automationAccountName, nodeConfigurationName, parameters, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._createOrUpdate(automationAccountName, nodeConfigurationName, parameters, options, (err, result, request, response) => { + self._createOrUpdate(resourceGroupName, automationAccountName, nodeConfigurationName, parameters, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1051,6 +1069,8 @@ class DscNodeConfigurationOperations { /** * Create the node configuration identified by node configuration name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} nodeConfigurationName The create or update parameters for @@ -1116,7 +1136,7 @@ class DscNodeConfigurationOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - createOrUpdate(automationAccountName, nodeConfigurationName, parameters, options, optionalCallback) { + createOrUpdate(resourceGroupName, automationAccountName, nodeConfigurationName, parameters, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1125,20 +1145,22 @@ class DscNodeConfigurationOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._createOrUpdate(automationAccountName, nodeConfigurationName, parameters, options, (err, result, request, response) => { + self._createOrUpdate(resourceGroupName, automationAccountName, nodeConfigurationName, parameters, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._createOrUpdate(automationAccountName, nodeConfigurationName, parameters, options, optionalCallback); + return self._createOrUpdate(resourceGroupName, automationAccountName, nodeConfigurationName, parameters, options, optionalCallback); } } /** * Retrieve a list of dsc node configurations. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -1154,11 +1176,11 @@ class DscNodeConfigurationOperations { * * @reject {Error} - The error object. */ - listByAutomationAccountWithHttpOperationResponse(automationAccountName, options) { + listByAutomationAccountWithHttpOperationResponse(resourceGroupName, automationAccountName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._listByAutomationAccount(automationAccountName, options, (err, result, request, response) => { + self._listByAutomationAccount(resourceGroupName, automationAccountName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1171,6 +1193,8 @@ class DscNodeConfigurationOperations { /** * Retrieve a list of dsc node configurations. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -1203,7 +1227,7 @@ class DscNodeConfigurationOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - listByAutomationAccount(automationAccountName, options, optionalCallback) { + listByAutomationAccount(resourceGroupName, automationAccountName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1212,14 +1236,14 @@ class DscNodeConfigurationOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._listByAutomationAccount(automationAccountName, options, (err, result, request, response) => { + self._listByAutomationAccount(resourceGroupName, automationAccountName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._listByAutomationAccount(automationAccountName, options, optionalCallback); + return self._listByAutomationAccount(resourceGroupName, automationAccountName, options, optionalCallback); } } diff --git a/lib/services/automationManagement/lib/operations/dscNodeOperations.js b/lib/services/automationManagement/lib/operations/dscNodeOperations.js index ad3a2e48e8..de8644ff57 100644 --- a/lib/services/automationManagement/lib/operations/dscNodeOperations.js +++ b/lib/services/automationManagement/lib/operations/dscNodeOperations.js @@ -17,6 +17,8 @@ const WebResource = msRest.WebResource; /** * Delete the dsc node identified by node id. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName Automation account name. * * @param {string} nodeId The node id. @@ -39,7 +41,7 @@ const WebResource = msRest.WebResource; * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _deleteMethod(automationAccountName, nodeId, options, callback) { +function _deleteMethod(resourceGroupName, automationAccountName, nodeId, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -52,13 +54,13 @@ function _deleteMethod(automationAccountName, nodeId, options, callback) { let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -80,7 +82,7 @@ function _deleteMethod(automationAccountName, nodeId, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/nodes/{nodeId}'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{nodeId}', encodeURIComponent(nodeId)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -171,6 +173,8 @@ function _deleteMethod(automationAccountName, nodeId, options, callback) { /** * Retrieve the dsc node identified by node id. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} nodeId The node id. @@ -193,7 +197,7 @@ function _deleteMethod(automationAccountName, nodeId, options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _get(automationAccountName, nodeId, options, callback) { +function _get(resourceGroupName, automationAccountName, nodeId, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -206,13 +210,13 @@ function _get(automationAccountName, nodeId, options, callback) { let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -234,7 +238,7 @@ function _get(automationAccountName, nodeId, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/nodes/{nodeId}'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{nodeId}', encodeURIComponent(nodeId)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -325,6 +329,8 @@ function _get(automationAccountName, nodeId, options, callback) { /** * Update the dsc node. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} nodeId Parameters supplied to the update dsc node. @@ -357,7 +363,7 @@ function _get(automationAccountName, nodeId, options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _update(automationAccountName, nodeId, parameters, options, callback) { +function _update(resourceGroupName, automationAccountName, nodeId, parameters, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -370,13 +376,13 @@ function _update(automationAccountName, nodeId, parameters, options, callback) { let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -401,7 +407,7 @@ function _update(automationAccountName, nodeId, parameters, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/nodes/{nodeId}'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{nodeId}', encodeURIComponent(nodeId)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -506,6 +512,8 @@ function _update(automationAccountName, nodeId, parameters, options, callback) { /** * Retrieve a list of dsc nodes. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -528,7 +536,7 @@ function _update(automationAccountName, nodeId, parameters, options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _listByAutomationAccount(automationAccountName, options, callback) { +function _listByAutomationAccount(resourceGroupName, automationAccountName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -542,13 +550,13 @@ function _listByAutomationAccount(automationAccountName, options, callback) { let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -570,7 +578,7 @@ function _listByAutomationAccount(automationAccountName, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/nodes'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; @@ -806,6 +814,8 @@ class DscNodeOperations { /** * Delete the dsc node identified by node id. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName Automation account name. * * @param {string} nodeId The node id. @@ -821,11 +831,11 @@ class DscNodeOperations { * * @reject {Error} - The error object. */ - deleteMethodWithHttpOperationResponse(automationAccountName, nodeId, options) { + deleteMethodWithHttpOperationResponse(resourceGroupName, automationAccountName, nodeId, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._deleteMethod(automationAccountName, nodeId, options, (err, result, request, response) => { + self._deleteMethod(resourceGroupName, automationAccountName, nodeId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -838,6 +848,8 @@ class DscNodeOperations { /** * Delete the dsc node identified by node id. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName Automation account name. * * @param {string} nodeId The node id. @@ -869,7 +881,7 @@ class DscNodeOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(automationAccountName, nodeId, options, optionalCallback) { + deleteMethod(resourceGroupName, automationAccountName, nodeId, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -878,20 +890,22 @@ class DscNodeOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._deleteMethod(automationAccountName, nodeId, options, (err, result, request, response) => { + self._deleteMethod(resourceGroupName, automationAccountName, nodeId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._deleteMethod(automationAccountName, nodeId, options, optionalCallback); + return self._deleteMethod(resourceGroupName, automationAccountName, nodeId, options, optionalCallback); } } /** * Retrieve the dsc node identified by node id. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} nodeId The node id. @@ -907,11 +921,11 @@ class DscNodeOperations { * * @reject {Error} - The error object. */ - getWithHttpOperationResponse(automationAccountName, nodeId, options) { + getWithHttpOperationResponse(resourceGroupName, automationAccountName, nodeId, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._get(automationAccountName, nodeId, options, (err, result, request, response) => { + self._get(resourceGroupName, automationAccountName, nodeId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -924,6 +938,8 @@ class DscNodeOperations { /** * Retrieve the dsc node identified by node id. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} nodeId The node id. @@ -955,7 +971,7 @@ class DscNodeOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - get(automationAccountName, nodeId, options, optionalCallback) { + get(resourceGroupName, automationAccountName, nodeId, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -964,20 +980,22 @@ class DscNodeOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._get(automationAccountName, nodeId, options, (err, result, request, response) => { + self._get(resourceGroupName, automationAccountName, nodeId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._get(automationAccountName, nodeId, options, optionalCallback); + return self._get(resourceGroupName, automationAccountName, nodeId, options, optionalCallback); } } /** * Update the dsc node. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} nodeId Parameters supplied to the update dsc node. @@ -1003,11 +1021,11 @@ class DscNodeOperations { * * @reject {Error} - The error object. */ - updateWithHttpOperationResponse(automationAccountName, nodeId, parameters, options) { + updateWithHttpOperationResponse(resourceGroupName, automationAccountName, nodeId, parameters, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._update(automationAccountName, nodeId, parameters, options, (err, result, request, response) => { + self._update(resourceGroupName, automationAccountName, nodeId, parameters, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1020,6 +1038,8 @@ class DscNodeOperations { /** * Update the dsc node. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} nodeId Parameters supplied to the update dsc node. @@ -1061,7 +1081,7 @@ class DscNodeOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - update(automationAccountName, nodeId, parameters, options, optionalCallback) { + update(resourceGroupName, automationAccountName, nodeId, parameters, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1070,20 +1090,22 @@ class DscNodeOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._update(automationAccountName, nodeId, parameters, options, (err, result, request, response) => { + self._update(resourceGroupName, automationAccountName, nodeId, parameters, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._update(automationAccountName, nodeId, parameters, options, optionalCallback); + return self._update(resourceGroupName, automationAccountName, nodeId, parameters, options, optionalCallback); } } /** * Retrieve a list of dsc nodes. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -1099,11 +1121,11 @@ class DscNodeOperations { * * @reject {Error} - The error object. */ - listByAutomationAccountWithHttpOperationResponse(automationAccountName, options) { + listByAutomationAccountWithHttpOperationResponse(resourceGroupName, automationAccountName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._listByAutomationAccount(automationAccountName, options, (err, result, request, response) => { + self._listByAutomationAccount(resourceGroupName, automationAccountName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1116,6 +1138,8 @@ class DscNodeOperations { /** * Retrieve a list of dsc nodes. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -1147,7 +1171,7 @@ class DscNodeOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - listByAutomationAccount(automationAccountName, options, optionalCallback) { + listByAutomationAccount(resourceGroupName, automationAccountName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1156,14 +1180,14 @@ class DscNodeOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._listByAutomationAccount(automationAccountName, options, (err, result, request, response) => { + self._listByAutomationAccount(resourceGroupName, automationAccountName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._listByAutomationAccount(automationAccountName, options, optionalCallback); + return self._listByAutomationAccount(resourceGroupName, automationAccountName, options, optionalCallback); } } diff --git a/lib/services/automationManagement/lib/operations/fields.js b/lib/services/automationManagement/lib/operations/fields.js index dcfadd3d8f..bad55aa687 100644 --- a/lib/services/automationManagement/lib/operations/fields.js +++ b/lib/services/automationManagement/lib/operations/fields.js @@ -17,6 +17,8 @@ const WebResource = msRest.WebResource; /** * Retrieve a list of fields of a given type identified by module name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} moduleName The name of module. @@ -41,7 +43,7 @@ const WebResource = msRest.WebResource; * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _listByType(automationAccountName, moduleName, typeName, options, callback) { +function _listByType(resourceGroupName, automationAccountName, moduleName, typeName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -54,13 +56,13 @@ function _listByType(automationAccountName, moduleName, typeName, options, callb let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -85,7 +87,7 @@ function _listByType(automationAccountName, moduleName, typeName, options, callb // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/modules/{moduleName}/types/{typeName}/fields'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{moduleName}', encodeURIComponent(moduleName)); requestUrl = requestUrl.replace('{typeName}', encodeURIComponent(typeName)); @@ -188,6 +190,8 @@ class Fields { /** * Retrieve a list of fields of a given type identified by module name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} moduleName The name of module. @@ -205,11 +209,11 @@ class Fields { * * @reject {Error} - The error object. */ - listByTypeWithHttpOperationResponse(automationAccountName, moduleName, typeName, options) { + listByTypeWithHttpOperationResponse(resourceGroupName, automationAccountName, moduleName, typeName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._listByType(automationAccountName, moduleName, typeName, options, (err, result, request, response) => { + self._listByType(resourceGroupName, automationAccountName, moduleName, typeName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -222,6 +226,8 @@ class Fields { /** * Retrieve a list of fields of a given type identified by module name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} moduleName The name of module. @@ -255,7 +261,7 @@ class Fields { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - listByType(automationAccountName, moduleName, typeName, options, optionalCallback) { + listByType(resourceGroupName, automationAccountName, moduleName, typeName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -264,14 +270,14 @@ class Fields { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._listByType(automationAccountName, moduleName, typeName, options, (err, result, request, response) => { + self._listByType(resourceGroupName, automationAccountName, moduleName, typeName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._listByType(automationAccountName, moduleName, typeName, options, optionalCallback); + return self._listByType(resourceGroupName, automationAccountName, moduleName, typeName, options, optionalCallback); } } diff --git a/lib/services/automationManagement/lib/operations/hybridRunbookWorkerGroupOperations.js b/lib/services/automationManagement/lib/operations/hybridRunbookWorkerGroupOperations.js index 327e721335..a4fe69fd98 100644 --- a/lib/services/automationManagement/lib/operations/hybridRunbookWorkerGroupOperations.js +++ b/lib/services/automationManagement/lib/operations/hybridRunbookWorkerGroupOperations.js @@ -17,6 +17,8 @@ const WebResource = msRest.WebResource; /** * Delete a hybrid runbook worker group. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName Automation account name. * * @param {string} hybridRunbookWorkerGroupName The hybrid runbook worker group @@ -39,7 +41,7 @@ const WebResource = msRest.WebResource; * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _deleteMethod(automationAccountName, hybridRunbookWorkerGroupName, options, callback) { +function _deleteMethod(resourceGroupName, automationAccountName, hybridRunbookWorkerGroupName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -52,13 +54,13 @@ function _deleteMethod(automationAccountName, hybridRunbookWorkerGroupName, opti let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -80,7 +82,7 @@ function _deleteMethod(automationAccountName, hybridRunbookWorkerGroupName, opti // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/hybridRunbookWorkerGroups/{hybridRunbookWorkerGroupName}'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{hybridRunbookWorkerGroupName}', encodeURIComponent(hybridRunbookWorkerGroupName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -154,6 +156,8 @@ function _deleteMethod(automationAccountName, hybridRunbookWorkerGroupName, opti /** * Retrieve a hybrid runbook worker group. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} hybridRunbookWorkerGroupName The hybrid runbook worker group @@ -178,7 +182,7 @@ function _deleteMethod(automationAccountName, hybridRunbookWorkerGroupName, opti * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _get(automationAccountName, hybridRunbookWorkerGroupName, options, callback) { +function _get(resourceGroupName, automationAccountName, hybridRunbookWorkerGroupName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -191,13 +195,13 @@ function _get(automationAccountName, hybridRunbookWorkerGroupName, options, call let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -219,7 +223,7 @@ function _get(automationAccountName, hybridRunbookWorkerGroupName, options, call // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/hybridRunbookWorkerGroups/{hybridRunbookWorkerGroupName}'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{hybridRunbookWorkerGroupName}', encodeURIComponent(hybridRunbookWorkerGroupName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -310,6 +314,8 @@ function _get(automationAccountName, hybridRunbookWorkerGroupName, options, call /** * Update a hybrid runbook worker group. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} hybridRunbookWorkerGroupName The hybrid runbook worker group @@ -342,7 +348,7 @@ function _get(automationAccountName, hybridRunbookWorkerGroupName, options, call * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _update(automationAccountName, hybridRunbookWorkerGroupName, parameters, options, callback) { +function _update(resourceGroupName, automationAccountName, hybridRunbookWorkerGroupName, parameters, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -355,13 +361,13 @@ function _update(automationAccountName, hybridRunbookWorkerGroupName, parameters let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -386,7 +392,7 @@ function _update(automationAccountName, hybridRunbookWorkerGroupName, parameters // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/hybridRunbookWorkerGroups/{hybridRunbookWorkerGroupName}'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{hybridRunbookWorkerGroupName}', encodeURIComponent(hybridRunbookWorkerGroupName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -491,6 +497,8 @@ function _update(automationAccountName, hybridRunbookWorkerGroupName, parameters /** * Retrieve a list of hybrid runbook worker groups. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -512,7 +520,7 @@ function _update(automationAccountName, hybridRunbookWorkerGroupName, parameters * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _listByAutomationAccount(automationAccountName, options, callback) { +function _listByAutomationAccount(resourceGroupName, automationAccountName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -525,13 +533,13 @@ function _listByAutomationAccount(automationAccountName, options, callback) { let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -550,7 +558,7 @@ function _listByAutomationAccount(automationAccountName, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/hybridRunbookWorkerGroups'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; @@ -784,6 +792,8 @@ class HybridRunbookWorkerGroupOperations { /** * Delete a hybrid runbook worker group. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName Automation account name. * * @param {string} hybridRunbookWorkerGroupName The hybrid runbook worker group @@ -800,11 +810,11 @@ class HybridRunbookWorkerGroupOperations { * * @reject {Error} - The error object. */ - deleteMethodWithHttpOperationResponse(automationAccountName, hybridRunbookWorkerGroupName, options) { + deleteMethodWithHttpOperationResponse(resourceGroupName, automationAccountName, hybridRunbookWorkerGroupName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._deleteMethod(automationAccountName, hybridRunbookWorkerGroupName, options, (err, result, request, response) => { + self._deleteMethod(resourceGroupName, automationAccountName, hybridRunbookWorkerGroupName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -817,6 +827,8 @@ class HybridRunbookWorkerGroupOperations { /** * Delete a hybrid runbook worker group. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName Automation account name. * * @param {string} hybridRunbookWorkerGroupName The hybrid runbook worker group @@ -848,7 +860,7 @@ class HybridRunbookWorkerGroupOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(automationAccountName, hybridRunbookWorkerGroupName, options, optionalCallback) { + deleteMethod(resourceGroupName, automationAccountName, hybridRunbookWorkerGroupName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -857,20 +869,22 @@ class HybridRunbookWorkerGroupOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._deleteMethod(automationAccountName, hybridRunbookWorkerGroupName, options, (err, result, request, response) => { + self._deleteMethod(resourceGroupName, automationAccountName, hybridRunbookWorkerGroupName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._deleteMethod(automationAccountName, hybridRunbookWorkerGroupName, options, optionalCallback); + return self._deleteMethod(resourceGroupName, automationAccountName, hybridRunbookWorkerGroupName, options, optionalCallback); } } /** * Retrieve a hybrid runbook worker group. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} hybridRunbookWorkerGroupName The hybrid runbook worker group @@ -887,11 +901,11 @@ class HybridRunbookWorkerGroupOperations { * * @reject {Error} - The error object. */ - getWithHttpOperationResponse(automationAccountName, hybridRunbookWorkerGroupName, options) { + getWithHttpOperationResponse(resourceGroupName, automationAccountName, hybridRunbookWorkerGroupName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._get(automationAccountName, hybridRunbookWorkerGroupName, options, (err, result, request, response) => { + self._get(resourceGroupName, automationAccountName, hybridRunbookWorkerGroupName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -904,6 +918,8 @@ class HybridRunbookWorkerGroupOperations { /** * Retrieve a hybrid runbook worker group. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} hybridRunbookWorkerGroupName The hybrid runbook worker group @@ -937,7 +953,7 @@ class HybridRunbookWorkerGroupOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - get(automationAccountName, hybridRunbookWorkerGroupName, options, optionalCallback) { + get(resourceGroupName, automationAccountName, hybridRunbookWorkerGroupName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -946,20 +962,22 @@ class HybridRunbookWorkerGroupOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._get(automationAccountName, hybridRunbookWorkerGroupName, options, (err, result, request, response) => { + self._get(resourceGroupName, automationAccountName, hybridRunbookWorkerGroupName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._get(automationAccountName, hybridRunbookWorkerGroupName, options, optionalCallback); + return self._get(resourceGroupName, automationAccountName, hybridRunbookWorkerGroupName, options, optionalCallback); } } /** * Update a hybrid runbook worker group. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} hybridRunbookWorkerGroupName The hybrid runbook worker group @@ -984,11 +1002,11 @@ class HybridRunbookWorkerGroupOperations { * * @reject {Error} - The error object. */ - updateWithHttpOperationResponse(automationAccountName, hybridRunbookWorkerGroupName, parameters, options) { + updateWithHttpOperationResponse(resourceGroupName, automationAccountName, hybridRunbookWorkerGroupName, parameters, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._update(automationAccountName, hybridRunbookWorkerGroupName, parameters, options, (err, result, request, response) => { + self._update(resourceGroupName, automationAccountName, hybridRunbookWorkerGroupName, parameters, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1001,6 +1019,8 @@ class HybridRunbookWorkerGroupOperations { /** * Update a hybrid runbook worker group. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} hybridRunbookWorkerGroupName The hybrid runbook worker group @@ -1042,7 +1062,7 @@ class HybridRunbookWorkerGroupOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - update(automationAccountName, hybridRunbookWorkerGroupName, parameters, options, optionalCallback) { + update(resourceGroupName, automationAccountName, hybridRunbookWorkerGroupName, parameters, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1051,20 +1071,22 @@ class HybridRunbookWorkerGroupOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._update(automationAccountName, hybridRunbookWorkerGroupName, parameters, options, (err, result, request, response) => { + self._update(resourceGroupName, automationAccountName, hybridRunbookWorkerGroupName, parameters, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._update(automationAccountName, hybridRunbookWorkerGroupName, parameters, options, optionalCallback); + return self._update(resourceGroupName, automationAccountName, hybridRunbookWorkerGroupName, parameters, options, optionalCallback); } } /** * Retrieve a list of hybrid runbook worker groups. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -1078,11 +1100,11 @@ class HybridRunbookWorkerGroupOperations { * * @reject {Error} - The error object. */ - listByAutomationAccountWithHttpOperationResponse(automationAccountName, options) { + listByAutomationAccountWithHttpOperationResponse(resourceGroupName, automationAccountName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._listByAutomationAccount(automationAccountName, options, (err, result, request, response) => { + self._listByAutomationAccount(resourceGroupName, automationAccountName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1095,6 +1117,8 @@ class HybridRunbookWorkerGroupOperations { /** * Retrieve a list of hybrid runbook worker groups. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -1125,7 +1149,7 @@ class HybridRunbookWorkerGroupOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - listByAutomationAccount(automationAccountName, options, optionalCallback) { + listByAutomationAccount(resourceGroupName, automationAccountName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1134,14 +1158,14 @@ class HybridRunbookWorkerGroupOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._listByAutomationAccount(automationAccountName, options, (err, result, request, response) => { + self._listByAutomationAccount(resourceGroupName, automationAccountName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._listByAutomationAccount(automationAccountName, options, optionalCallback); + return self._listByAutomationAccount(resourceGroupName, automationAccountName, options, optionalCallback); } } diff --git a/lib/services/automationManagement/lib/operations/index.d.ts b/lib/services/automationManagement/lib/operations/index.d.ts index 2041f688c2..157a4348c3 100644 --- a/lib/services/automationManagement/lib/operations/index.d.ts +++ b/lib/services/automationManagement/lib/operations/index.d.ts @@ -782,6 +782,8 @@ export interface CertificateOperations { /** * Delete the certificate. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} certificateName The name of certificate. @@ -797,11 +799,13 @@ export interface CertificateOperations { * * @reject {Error|ServiceError} - The error object. */ - deleteMethodWithHttpOperationResponse(automationAccountName: string, certificateName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + deleteMethodWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, certificateName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Delete the certificate. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} certificateName The name of certificate. @@ -832,14 +836,16 @@ export interface CertificateOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(automationAccountName: string, certificateName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - deleteMethod(automationAccountName: string, certificateName: string, callback: ServiceCallback): void; - deleteMethod(automationAccountName: string, certificateName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, automationAccountName: string, certificateName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + deleteMethod(resourceGroupName: string, automationAccountName: string, certificateName: string, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, automationAccountName: string, certificateName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Retrieve the certificate identified by certificate name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} certificateName The name of certificate. @@ -855,11 +861,13 @@ export interface CertificateOperations { * * @reject {Error|ServiceError} - The error object. */ - getWithHttpOperationResponse(automationAccountName: string, certificateName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, certificateName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieve the certificate identified by certificate name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} certificateName The name of certificate. @@ -891,14 +899,16 @@ export interface CertificateOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - get(automationAccountName: string, certificateName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - get(automationAccountName: string, certificateName: string, callback: ServiceCallback): void; - get(automationAccountName: string, certificateName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + get(resourceGroupName: string, automationAccountName: string, certificateName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + get(resourceGroupName: string, automationAccountName: string, certificateName: string, callback: ServiceCallback): void; + get(resourceGroupName: string, automationAccountName: string, certificateName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Create a certificate. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} certificateName The parameters supplied to the create or @@ -932,11 +942,13 @@ export interface CertificateOperations { * * @reject {Error|ServiceError} - The error object. */ - createOrUpdateWithHttpOperationResponse(automationAccountName: string, certificateName: string, parameters: models.CertificateCreateOrUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + createOrUpdateWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, certificateName: string, parameters: models.CertificateCreateOrUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Create a certificate. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} certificateName The parameters supplied to the create or @@ -986,14 +998,16 @@ export interface CertificateOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - createOrUpdate(automationAccountName: string, certificateName: string, parameters: models.CertificateCreateOrUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - createOrUpdate(automationAccountName: string, certificateName: string, parameters: models.CertificateCreateOrUpdateParameters, callback: ServiceCallback): void; - createOrUpdate(automationAccountName: string, certificateName: string, parameters: models.CertificateCreateOrUpdateParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, automationAccountName: string, certificateName: string, parameters: models.CertificateCreateOrUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + createOrUpdate(resourceGroupName: string, automationAccountName: string, certificateName: string, parameters: models.CertificateCreateOrUpdateParameters, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, automationAccountName: string, certificateName: string, parameters: models.CertificateCreateOrUpdateParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Update a certificate. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} certificateName The parameters supplied to the update @@ -1018,11 +1032,13 @@ export interface CertificateOperations { * * @reject {Error|ServiceError} - The error object. */ - updateWithHttpOperationResponse(automationAccountName: string, certificateName: string, parameters: models.CertificateUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + updateWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, certificateName: string, parameters: models.CertificateUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Update a certificate. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} certificateName The parameters supplied to the update @@ -1063,14 +1079,16 @@ export interface CertificateOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - update(automationAccountName: string, certificateName: string, parameters: models.CertificateUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - update(automationAccountName: string, certificateName: string, parameters: models.CertificateUpdateParameters, callback: ServiceCallback): void; - update(automationAccountName: string, certificateName: string, parameters: models.CertificateUpdateParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + update(resourceGroupName: string, automationAccountName: string, certificateName: string, parameters: models.CertificateUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + update(resourceGroupName: string, automationAccountName: string, certificateName: string, parameters: models.CertificateUpdateParameters, callback: ServiceCallback): void; + update(resourceGroupName: string, automationAccountName: string, certificateName: string, parameters: models.CertificateUpdateParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Retrieve a list of certificates. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -1084,11 +1102,13 @@ export interface CertificateOperations { * * @reject {Error|ServiceError} - The error object. */ - listByAutomationAccountWithHttpOperationResponse(automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listByAutomationAccountWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieve a list of certificates. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -1118,9 +1138,9 @@ export interface CertificateOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listByAutomationAccount(automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listByAutomationAccount(automationAccountName: string, callback: ServiceCallback): void; - listByAutomationAccount(automationAccountName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listByAutomationAccount(resourceGroupName: string, automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listByAutomationAccount(resourceGroupName: string, automationAccountName: string, callback: ServiceCallback): void; + listByAutomationAccount(resourceGroupName: string, automationAccountName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -1192,6 +1212,8 @@ export interface ConnectionOperations { /** * Delete the connection. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} connectionName The name of connection. @@ -1207,11 +1229,13 @@ export interface ConnectionOperations { * * @reject {Error|ServiceError} - The error object. */ - deleteMethodWithHttpOperationResponse(automationAccountName: string, connectionName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + deleteMethodWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, connectionName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Delete the connection. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} connectionName The name of connection. @@ -1243,14 +1267,16 @@ export interface ConnectionOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(automationAccountName: string, connectionName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - deleteMethod(automationAccountName: string, connectionName: string, callback: ServiceCallback): void; - deleteMethod(automationAccountName: string, connectionName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, automationAccountName: string, connectionName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + deleteMethod(resourceGroupName: string, automationAccountName: string, connectionName: string, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, automationAccountName: string, connectionName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Retrieve the connection identified by connection name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} connectionName The name of connection. @@ -1266,11 +1292,13 @@ export interface ConnectionOperations { * * @reject {Error|ServiceError} - The error object. */ - getWithHttpOperationResponse(automationAccountName: string, connectionName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, connectionName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieve the connection identified by connection name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} connectionName The name of connection. @@ -1302,14 +1330,16 @@ export interface ConnectionOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - get(automationAccountName: string, connectionName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - get(automationAccountName: string, connectionName: string, callback: ServiceCallback): void; - get(automationAccountName: string, connectionName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + get(resourceGroupName: string, automationAccountName: string, connectionName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + get(resourceGroupName: string, automationAccountName: string, connectionName: string, callback: ServiceCallback): void; + get(resourceGroupName: string, automationAccountName: string, connectionName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Create or update a connection. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} connectionName The parameters supplied to the create or @@ -1343,11 +1373,13 @@ export interface ConnectionOperations { * * @reject {Error|ServiceError} - The error object. */ - createOrUpdateWithHttpOperationResponse(automationAccountName: string, connectionName: string, parameters: models.ConnectionCreateOrUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + createOrUpdateWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, connectionName: string, parameters: models.ConnectionCreateOrUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Create or update a connection. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} connectionName The parameters supplied to the create or @@ -1397,14 +1429,16 @@ export interface ConnectionOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - createOrUpdate(automationAccountName: string, connectionName: string, parameters: models.ConnectionCreateOrUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - createOrUpdate(automationAccountName: string, connectionName: string, parameters: models.ConnectionCreateOrUpdateParameters, callback: ServiceCallback): void; - createOrUpdate(automationAccountName: string, connectionName: string, parameters: models.ConnectionCreateOrUpdateParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, automationAccountName: string, connectionName: string, parameters: models.ConnectionCreateOrUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + createOrUpdate(resourceGroupName: string, automationAccountName: string, connectionName: string, parameters: models.ConnectionCreateOrUpdateParameters, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, automationAccountName: string, connectionName: string, parameters: models.ConnectionCreateOrUpdateParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Update a connection. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} connectionName The parameters supplied to the update a @@ -1432,11 +1466,13 @@ export interface ConnectionOperations { * * @reject {Error|ServiceError} - The error object. */ - updateWithHttpOperationResponse(automationAccountName: string, connectionName: string, parameters: models.ConnectionUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + updateWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, connectionName: string, parameters: models.ConnectionUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Update a connection. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} connectionName The parameters supplied to the update a @@ -1480,14 +1516,16 @@ export interface ConnectionOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - update(automationAccountName: string, connectionName: string, parameters: models.ConnectionUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - update(automationAccountName: string, connectionName: string, parameters: models.ConnectionUpdateParameters, callback: ServiceCallback): void; - update(automationAccountName: string, connectionName: string, parameters: models.ConnectionUpdateParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + update(resourceGroupName: string, automationAccountName: string, connectionName: string, parameters: models.ConnectionUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + update(resourceGroupName: string, automationAccountName: string, connectionName: string, parameters: models.ConnectionUpdateParameters, callback: ServiceCallback): void; + update(resourceGroupName: string, automationAccountName: string, connectionName: string, parameters: models.ConnectionUpdateParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Retrieve a list of connections. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -1501,11 +1539,13 @@ export interface ConnectionOperations { * * @reject {Error|ServiceError} - The error object. */ - listByAutomationAccountWithHttpOperationResponse(automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listByAutomationAccountWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieve a list of connections. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -1535,9 +1575,9 @@ export interface ConnectionOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listByAutomationAccount(automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listByAutomationAccount(automationAccountName: string, callback: ServiceCallback): void; - listByAutomationAccount(automationAccountName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listByAutomationAccount(resourceGroupName: string, automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listByAutomationAccount(resourceGroupName: string, automationAccountName: string, callback: ServiceCallback): void; + listByAutomationAccount(resourceGroupName: string, automationAccountName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -1609,6 +1649,8 @@ export interface ConnectionTypeOperations { /** * Delete the connectiontype. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} connectionTypeName The name of connectiontype. @@ -1624,11 +1666,13 @@ export interface ConnectionTypeOperations { * * @reject {Error|ServiceError} - The error object. */ - deleteMethodWithHttpOperationResponse(automationAccountName: string, connectionTypeName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + deleteMethodWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, connectionTypeName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Delete the connectiontype. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} connectionTypeName The name of connectiontype. @@ -1659,14 +1703,16 @@ export interface ConnectionTypeOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(automationAccountName: string, connectionTypeName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - deleteMethod(automationAccountName: string, connectionTypeName: string, callback: ServiceCallback): void; - deleteMethod(automationAccountName: string, connectionTypeName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, automationAccountName: string, connectionTypeName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + deleteMethod(resourceGroupName: string, automationAccountName: string, connectionTypeName: string, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, automationAccountName: string, connectionTypeName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Retrieve the connectiontype identified by connectiontype name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} connectionTypeName The name of connectiontype. @@ -1682,11 +1728,13 @@ export interface ConnectionTypeOperations { * * @reject {Error|ServiceError} - The error object. */ - getWithHttpOperationResponse(automationAccountName: string, connectionTypeName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, connectionTypeName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieve the connectiontype identified by connectiontype name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} connectionTypeName The name of connectiontype. @@ -1718,14 +1766,16 @@ export interface ConnectionTypeOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - get(automationAccountName: string, connectionTypeName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - get(automationAccountName: string, connectionTypeName: string, callback: ServiceCallback): void; - get(automationAccountName: string, connectionTypeName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + get(resourceGroupName: string, automationAccountName: string, connectionTypeName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + get(resourceGroupName: string, automationAccountName: string, connectionTypeName: string, callback: ServiceCallback): void; + get(resourceGroupName: string, automationAccountName: string, connectionTypeName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Create a connectiontype. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} connectionTypeName The parameters supplied to the create or @@ -1754,11 +1804,13 @@ export interface ConnectionTypeOperations { * * @reject {Error|ServiceError} - The error object. */ - createOrUpdateWithHttpOperationResponse(automationAccountName: string, connectionTypeName: string, parameters: models.ConnectionTypeCreateOrUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + createOrUpdateWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, connectionTypeName: string, parameters: models.ConnectionTypeCreateOrUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Create a connectiontype. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} connectionTypeName The parameters supplied to the create or @@ -1803,14 +1855,16 @@ export interface ConnectionTypeOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - createOrUpdate(automationAccountName: string, connectionTypeName: string, parameters: models.ConnectionTypeCreateOrUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - createOrUpdate(automationAccountName: string, connectionTypeName: string, parameters: models.ConnectionTypeCreateOrUpdateParameters, callback: ServiceCallback): void; - createOrUpdate(automationAccountName: string, connectionTypeName: string, parameters: models.ConnectionTypeCreateOrUpdateParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, automationAccountName: string, connectionTypeName: string, parameters: models.ConnectionTypeCreateOrUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + createOrUpdate(resourceGroupName: string, automationAccountName: string, connectionTypeName: string, parameters: models.ConnectionTypeCreateOrUpdateParameters, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, automationAccountName: string, connectionTypeName: string, parameters: models.ConnectionTypeCreateOrUpdateParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Retrieve a list of connectiontypes. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -1824,11 +1878,13 @@ export interface ConnectionTypeOperations { * * @reject {Error|ServiceError} - The error object. */ - listByAutomationAccountWithHttpOperationResponse(automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listByAutomationAccountWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieve a list of connectiontypes. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -1859,9 +1915,9 @@ export interface ConnectionTypeOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listByAutomationAccount(automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listByAutomationAccount(automationAccountName: string, callback: ServiceCallback): void; - listByAutomationAccount(automationAccountName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listByAutomationAccount(resourceGroupName: string, automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listByAutomationAccount(resourceGroupName: string, automationAccountName: string, callback: ServiceCallback): void; + listByAutomationAccount(resourceGroupName: string, automationAccountName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -1934,6 +1990,8 @@ export interface CredentialOperations { /** * Delete the credential. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} credentialName The name of credential. @@ -1949,11 +2007,13 @@ export interface CredentialOperations { * * @reject {Error|ServiceError} - The error object. */ - deleteMethodWithHttpOperationResponse(automationAccountName: string, credentialName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + deleteMethodWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, credentialName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Delete the credential. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} credentialName The name of credential. @@ -1984,14 +2044,16 @@ export interface CredentialOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(automationAccountName: string, credentialName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - deleteMethod(automationAccountName: string, credentialName: string, callback: ServiceCallback): void; - deleteMethod(automationAccountName: string, credentialName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, automationAccountName: string, credentialName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + deleteMethod(resourceGroupName: string, automationAccountName: string, credentialName: string, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, automationAccountName: string, credentialName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Retrieve the credential identified by credential name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} credentialName The name of credential. @@ -2007,11 +2069,13 @@ export interface CredentialOperations { * * @reject {Error|ServiceError} - The error object. */ - getWithHttpOperationResponse(automationAccountName: string, credentialName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, credentialName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieve the credential identified by credential name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} credentialName The name of credential. @@ -2043,14 +2107,16 @@ export interface CredentialOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - get(automationAccountName: string, credentialName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - get(automationAccountName: string, credentialName: string, callback: ServiceCallback): void; - get(automationAccountName: string, credentialName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + get(resourceGroupName: string, automationAccountName: string, credentialName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + get(resourceGroupName: string, automationAccountName: string, credentialName: string, callback: ServiceCallback): void; + get(resourceGroupName: string, automationAccountName: string, credentialName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Create a credential. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} credentialName The parameters supplied to the create or @@ -2081,11 +2147,13 @@ export interface CredentialOperations { * * @reject {Error|ServiceError} - The error object. */ - createOrUpdateWithHttpOperationResponse(automationAccountName: string, credentialName: string, parameters: models.CredentialCreateOrUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + createOrUpdateWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, credentialName: string, parameters: models.CredentialCreateOrUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Create a credential. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} credentialName The parameters supplied to the create or @@ -2132,14 +2200,16 @@ export interface CredentialOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - createOrUpdate(automationAccountName: string, credentialName: string, parameters: models.CredentialCreateOrUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - createOrUpdate(automationAccountName: string, credentialName: string, parameters: models.CredentialCreateOrUpdateParameters, callback: ServiceCallback): void; - createOrUpdate(automationAccountName: string, credentialName: string, parameters: models.CredentialCreateOrUpdateParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, automationAccountName: string, credentialName: string, parameters: models.CredentialCreateOrUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + createOrUpdate(resourceGroupName: string, automationAccountName: string, credentialName: string, parameters: models.CredentialCreateOrUpdateParameters, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, automationAccountName: string, credentialName: string, parameters: models.CredentialCreateOrUpdateParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Update a credential. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} credentialName The parameters supplied to the Update @@ -2170,11 +2240,13 @@ export interface CredentialOperations { * * @reject {Error|ServiceError} - The error object. */ - updateWithHttpOperationResponse(automationAccountName: string, credentialName: string, parameters: models.CredentialUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + updateWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, credentialName: string, parameters: models.CredentialUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Update a credential. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} credentialName The parameters supplied to the Update @@ -2221,14 +2293,16 @@ export interface CredentialOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - update(automationAccountName: string, credentialName: string, parameters: models.CredentialUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - update(automationAccountName: string, credentialName: string, parameters: models.CredentialUpdateParameters, callback: ServiceCallback): void; - update(automationAccountName: string, credentialName: string, parameters: models.CredentialUpdateParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + update(resourceGroupName: string, automationAccountName: string, credentialName: string, parameters: models.CredentialUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + update(resourceGroupName: string, automationAccountName: string, credentialName: string, parameters: models.CredentialUpdateParameters, callback: ServiceCallback): void; + update(resourceGroupName: string, automationAccountName: string, credentialName: string, parameters: models.CredentialUpdateParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Retrieve a list of credentials. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -2242,11 +2316,13 @@ export interface CredentialOperations { * * @reject {Error|ServiceError} - The error object. */ - listByAutomationAccountWithHttpOperationResponse(automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listByAutomationAccountWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieve a list of credentials. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -2276,9 +2352,9 @@ export interface CredentialOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listByAutomationAccount(automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listByAutomationAccount(automationAccountName: string, callback: ServiceCallback): void; - listByAutomationAccount(automationAccountName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listByAutomationAccount(resourceGroupName: string, automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listByAutomationAccount(resourceGroupName: string, automationAccountName: string, callback: ServiceCallback): void; + listByAutomationAccount(resourceGroupName: string, automationAccountName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -2350,6 +2426,8 @@ export interface DscCompilationJobOperations { /** * Creates the Dsc compilation job of the configuration. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {uuid} compilationJobId The the DSC configuration Id. @@ -2387,11 +2465,13 @@ export interface DscCompilationJobOperations { * * @reject {Error|ServiceError} - The error object. */ - createWithHttpOperationResponse(automationAccountName: string, compilationJobId: string, parameters: models.DscCompilationJobCreateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + createWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, compilationJobId: string, parameters: models.DscCompilationJobCreateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Creates the Dsc compilation job of the configuration. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {uuid} compilationJobId The the DSC configuration Id. @@ -2445,14 +2525,16 @@ export interface DscCompilationJobOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - create(automationAccountName: string, compilationJobId: string, parameters: models.DscCompilationJobCreateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - create(automationAccountName: string, compilationJobId: string, parameters: models.DscCompilationJobCreateParameters, callback: ServiceCallback): void; - create(automationAccountName: string, compilationJobId: string, parameters: models.DscCompilationJobCreateParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + create(resourceGroupName: string, automationAccountName: string, compilationJobId: string, parameters: models.DscCompilationJobCreateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + create(resourceGroupName: string, automationAccountName: string, compilationJobId: string, parameters: models.DscCompilationJobCreateParameters, callback: ServiceCallback): void; + create(resourceGroupName: string, automationAccountName: string, compilationJobId: string, parameters: models.DscCompilationJobCreateParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Retrieve the Dsc configuration compilation job identified by job id. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {uuid} compilationJobId The Dsc configuration compilation job id. @@ -2468,11 +2550,13 @@ export interface DscCompilationJobOperations { * * @reject {Error|ServiceError} - The error object. */ - getWithHttpOperationResponse(automationAccountName: string, compilationJobId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, compilationJobId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieve the Dsc configuration compilation job identified by job id. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {uuid} compilationJobId The Dsc configuration compilation job id. @@ -2504,14 +2588,16 @@ export interface DscCompilationJobOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - get(automationAccountName: string, compilationJobId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - get(automationAccountName: string, compilationJobId: string, callback: ServiceCallback): void; - get(automationAccountName: string, compilationJobId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + get(resourceGroupName: string, automationAccountName: string, compilationJobId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + get(resourceGroupName: string, automationAccountName: string, compilationJobId: string, callback: ServiceCallback): void; + get(resourceGroupName: string, automationAccountName: string, compilationJobId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Retrieve a list of dsc compilation jobs. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -2527,11 +2613,13 @@ export interface DscCompilationJobOperations { * * @reject {Error|ServiceError} - The error object. */ - listByAutomationAccountWithHttpOperationResponse(automationAccountName: string, options?: { filter? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; + listByAutomationAccountWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, options?: { filter? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieve a list of dsc compilation jobs. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -2564,14 +2652,16 @@ export interface DscCompilationJobOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listByAutomationAccount(automationAccountName: string, options?: { filter? : string, customHeaders? : { [headerName: string]: string; } }): Promise; - listByAutomationAccount(automationAccountName: string, callback: ServiceCallback): void; - listByAutomationAccount(automationAccountName: string, options: { filter? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listByAutomationAccount(resourceGroupName: string, automationAccountName: string, options?: { filter? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + listByAutomationAccount(resourceGroupName: string, automationAccountName: string, callback: ServiceCallback): void; + listByAutomationAccount(resourceGroupName: string, automationAccountName: string, options: { filter? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Retrieve the job stream identified by job stream id. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {uuid} jobId The job id. @@ -2589,11 +2679,13 @@ export interface DscCompilationJobOperations { * * @reject {Error|ServiceError} - The error object. */ - getStreamWithHttpOperationResponse(automationAccountName: string, jobId: string, jobStreamId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getStreamWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, jobId: string, jobStreamId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieve the job stream identified by job stream id. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {uuid} jobId The job id. @@ -2627,9 +2719,9 @@ export interface DscCompilationJobOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - getStream(automationAccountName: string, jobId: string, jobStreamId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - getStream(automationAccountName: string, jobId: string, jobStreamId: string, callback: ServiceCallback): void; - getStream(automationAccountName: string, jobId: string, jobStreamId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + getStream(resourceGroupName: string, automationAccountName: string, jobId: string, jobStreamId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + getStream(resourceGroupName: string, automationAccountName: string, jobId: string, jobStreamId: string, callback: ServiceCallback): void; + getStream(resourceGroupName: string, automationAccountName: string, jobId: string, jobStreamId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -2702,6 +2794,8 @@ export interface DscCompilationJobStream { /** * Retrieve all the job streams for the compilation Job. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {uuid} jobId The job id. @@ -2717,11 +2811,13 @@ export interface DscCompilationJobStream { * * @reject {Error|ServiceError} - The error object. */ - listByJobWithHttpOperationResponse(automationAccountName: string, jobId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listByJobWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, jobId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieve all the job streams for the compilation Job. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {uuid} jobId The job id. @@ -2753,9 +2849,9 @@ export interface DscCompilationJobStream { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listByJob(automationAccountName: string, jobId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listByJob(automationAccountName: string, jobId: string, callback: ServiceCallback): void; - listByJob(automationAccountName: string, jobId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listByJob(resourceGroupName: string, automationAccountName: string, jobId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listByJob(resourceGroupName: string, automationAccountName: string, jobId: string, callback: ServiceCallback): void; + listByJob(resourceGroupName: string, automationAccountName: string, jobId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; } /** @@ -2770,6 +2866,8 @@ export interface DscConfigurationOperations { /** * Delete the dsc configuration identified by configuration name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} configurationName The configuration name. @@ -2785,11 +2883,13 @@ export interface DscConfigurationOperations { * * @reject {Error|ServiceError} - The error object. */ - deleteMethodWithHttpOperationResponse(automationAccountName: string, configurationName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + deleteMethodWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, configurationName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Delete the dsc configuration identified by configuration name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} configurationName The configuration name. @@ -2820,14 +2920,16 @@ export interface DscConfigurationOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(automationAccountName: string, configurationName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - deleteMethod(automationAccountName: string, configurationName: string, callback: ServiceCallback): void; - deleteMethod(automationAccountName: string, configurationName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, automationAccountName: string, configurationName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + deleteMethod(resourceGroupName: string, automationAccountName: string, configurationName: string, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, automationAccountName: string, configurationName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Retrieve the configuration identified by configuration name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} configurationName The configuration name. @@ -2843,11 +2945,13 @@ export interface DscConfigurationOperations { * * @reject {Error|ServiceError} - The error object. */ - getWithHttpOperationResponse(automationAccountName: string, configurationName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, configurationName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieve the configuration identified by configuration name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} configurationName The configuration name. @@ -2879,14 +2983,16 @@ export interface DscConfigurationOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - get(automationAccountName: string, configurationName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - get(automationAccountName: string, configurationName: string, callback: ServiceCallback): void; - get(automationAccountName: string, configurationName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + get(resourceGroupName: string, automationAccountName: string, configurationName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + get(resourceGroupName: string, automationAccountName: string, configurationName: string, callback: ServiceCallback): void; + get(resourceGroupName: string, automationAccountName: string, configurationName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Create the configuration identified by configuration name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} configurationName The create or update parameters for @@ -2943,11 +3049,13 @@ export interface DscConfigurationOperations { * * @reject {Error|ServiceError} - The error object. */ - createOrUpdateWithHttpOperationResponse(automationAccountName: string, configurationName: string, parameters: models.DscConfigurationCreateOrUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + createOrUpdateWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, configurationName: string, parameters: models.DscConfigurationCreateOrUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Create the configuration identified by configuration name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} configurationName The create or update parameters for @@ -3020,14 +3128,16 @@ export interface DscConfigurationOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - createOrUpdate(automationAccountName: string, configurationName: string, parameters: models.DscConfigurationCreateOrUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - createOrUpdate(automationAccountName: string, configurationName: string, parameters: models.DscConfigurationCreateOrUpdateParameters, callback: ServiceCallback): void; - createOrUpdate(automationAccountName: string, configurationName: string, parameters: models.DscConfigurationCreateOrUpdateParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, automationAccountName: string, configurationName: string, parameters: models.DscConfigurationCreateOrUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + createOrUpdate(resourceGroupName: string, automationAccountName: string, configurationName: string, parameters: models.DscConfigurationCreateOrUpdateParameters, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, automationAccountName: string, configurationName: string, parameters: models.DscConfigurationCreateOrUpdateParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Retrieve the configuration script identified by configuration name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} configurationName The configuration name. @@ -3043,11 +3153,13 @@ export interface DscConfigurationOperations { * * @reject {Error|ServiceError} - The error object. */ - getContentWithHttpOperationResponse(automationAccountName: string, configurationName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getContentWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, configurationName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieve the configuration script identified by configuration name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} configurationName The configuration name. @@ -3078,14 +3190,16 @@ export interface DscConfigurationOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - getContent(automationAccountName: string, configurationName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - getContent(automationAccountName: string, configurationName: string, callback: ServiceCallback): void; - getContent(automationAccountName: string, configurationName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + getContent(resourceGroupName: string, automationAccountName: string, configurationName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + getContent(resourceGroupName: string, automationAccountName: string, configurationName: string, callback: ServiceCallback): void; + getContent(resourceGroupName: string, automationAccountName: string, configurationName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Retrieve a list of configurations. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -3099,11 +3213,13 @@ export interface DscConfigurationOperations { * * @reject {Error|ServiceError} - The error object. */ - listByAutomationAccountWithHttpOperationResponse(automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listByAutomationAccountWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieve a list of configurations. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -3134,9 +3250,9 @@ export interface DscConfigurationOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listByAutomationAccount(automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listByAutomationAccount(automationAccountName: string, callback: ServiceCallback): void; - listByAutomationAccount(automationAccountName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listByAutomationAccount(resourceGroupName: string, automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listByAutomationAccount(resourceGroupName: string, automationAccountName: string, callback: ServiceCallback): void; + listByAutomationAccount(resourceGroupName: string, automationAccountName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -3209,6 +3325,8 @@ export interface AgentRegistrationInformation { /** * Retrieve the automation agent registration information. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -3222,11 +3340,13 @@ export interface AgentRegistrationInformation { * * @reject {Error|ServiceError} - The error object. */ - getWithHttpOperationResponse(automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieve the automation agent registration information. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -3256,14 +3376,16 @@ export interface AgentRegistrationInformation { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - get(automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - get(automationAccountName: string, callback: ServiceCallback): void; - get(automationAccountName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + get(resourceGroupName: string, automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + get(resourceGroupName: string, automationAccountName: string, callback: ServiceCallback): void; + get(resourceGroupName: string, automationAccountName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Regenerate a primary or secondary agent registration key * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} parameters The name of the agent registration key to be @@ -3291,11 +3413,13 @@ export interface AgentRegistrationInformation { * * @reject {Error|ServiceError} - The error object. */ - regenerateKeyWithHttpOperationResponse(automationAccountName: string, parameters: models.AgentRegistrationRegenerateKeyParameter, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + regenerateKeyWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, parameters: models.AgentRegistrationRegenerateKeyParameter, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Regenerate a primary or secondary agent registration key * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} parameters The name of the agent registration key to be @@ -3339,9 +3463,9 @@ export interface AgentRegistrationInformation { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - regenerateKey(automationAccountName: string, parameters: models.AgentRegistrationRegenerateKeyParameter, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - regenerateKey(automationAccountName: string, parameters: models.AgentRegistrationRegenerateKeyParameter, callback: ServiceCallback): void; - regenerateKey(automationAccountName: string, parameters: models.AgentRegistrationRegenerateKeyParameter, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + regenerateKey(resourceGroupName: string, automationAccountName: string, parameters: models.AgentRegistrationRegenerateKeyParameter, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + regenerateKey(resourceGroupName: string, automationAccountName: string, parameters: models.AgentRegistrationRegenerateKeyParameter, callback: ServiceCallback): void; + regenerateKey(resourceGroupName: string, automationAccountName: string, parameters: models.AgentRegistrationRegenerateKeyParameter, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; } /** @@ -3356,6 +3480,8 @@ export interface DscNodeOperations { /** * Delete the dsc node identified by node id. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName Automation account name. * * @param {string} nodeId The node id. @@ -3371,11 +3497,13 @@ export interface DscNodeOperations { * * @reject {Error|ServiceError} - The error object. */ - deleteMethodWithHttpOperationResponse(automationAccountName: string, nodeId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + deleteMethodWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, nodeId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Delete the dsc node identified by node id. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName Automation account name. * * @param {string} nodeId The node id. @@ -3407,14 +3535,16 @@ export interface DscNodeOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(automationAccountName: string, nodeId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - deleteMethod(automationAccountName: string, nodeId: string, callback: ServiceCallback): void; - deleteMethod(automationAccountName: string, nodeId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, automationAccountName: string, nodeId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + deleteMethod(resourceGroupName: string, automationAccountName: string, nodeId: string, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, automationAccountName: string, nodeId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Retrieve the dsc node identified by node id. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} nodeId The node id. @@ -3430,11 +3560,13 @@ export interface DscNodeOperations { * * @reject {Error|ServiceError} - The error object. */ - getWithHttpOperationResponse(automationAccountName: string, nodeId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, nodeId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieve the dsc node identified by node id. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} nodeId The node id. @@ -3466,14 +3598,16 @@ export interface DscNodeOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - get(automationAccountName: string, nodeId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - get(automationAccountName: string, nodeId: string, callback: ServiceCallback): void; - get(automationAccountName: string, nodeId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + get(resourceGroupName: string, automationAccountName: string, nodeId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + get(resourceGroupName: string, automationAccountName: string, nodeId: string, callback: ServiceCallback): void; + get(resourceGroupName: string, automationAccountName: string, nodeId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Update the dsc node. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} nodeId Parameters supplied to the update dsc node. @@ -3499,11 +3633,13 @@ export interface DscNodeOperations { * * @reject {Error|ServiceError} - The error object. */ - updateWithHttpOperationResponse(automationAccountName: string, nodeId: string, parameters: models.DscNodeUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + updateWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, nodeId: string, parameters: models.DscNodeUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Update the dsc node. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} nodeId Parameters supplied to the update dsc node. @@ -3545,14 +3681,16 @@ export interface DscNodeOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - update(automationAccountName: string, nodeId: string, parameters: models.DscNodeUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - update(automationAccountName: string, nodeId: string, parameters: models.DscNodeUpdateParameters, callback: ServiceCallback): void; - update(automationAccountName: string, nodeId: string, parameters: models.DscNodeUpdateParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + update(resourceGroupName: string, automationAccountName: string, nodeId: string, parameters: models.DscNodeUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + update(resourceGroupName: string, automationAccountName: string, nodeId: string, parameters: models.DscNodeUpdateParameters, callback: ServiceCallback): void; + update(resourceGroupName: string, automationAccountName: string, nodeId: string, parameters: models.DscNodeUpdateParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Retrieve a list of dsc nodes. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -3568,11 +3706,13 @@ export interface DscNodeOperations { * * @reject {Error|ServiceError} - The error object. */ - listByAutomationAccountWithHttpOperationResponse(automationAccountName: string, options?: { filter? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; + listByAutomationAccountWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, options?: { filter? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieve a list of dsc nodes. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -3604,9 +3744,9 @@ export interface DscNodeOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listByAutomationAccount(automationAccountName: string, options?: { filter? : string, customHeaders? : { [headerName: string]: string; } }): Promise; - listByAutomationAccount(automationAccountName: string, callback: ServiceCallback): void; - listByAutomationAccount(automationAccountName: string, options: { filter? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listByAutomationAccount(resourceGroupName: string, automationAccountName: string, options?: { filter? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + listByAutomationAccount(resourceGroupName: string, automationAccountName: string, callback: ServiceCallback): void; + listByAutomationAccount(resourceGroupName: string, automationAccountName: string, options: { filter? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -3678,6 +3818,8 @@ export interface NodeReports { /** * Retrieve the Dsc node report list by node id. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} nodeId The parameters supplied to the list operation. @@ -3695,11 +3837,13 @@ export interface NodeReports { * * @reject {Error|ServiceError} - The error object. */ - listByNodeWithHttpOperationResponse(automationAccountName: string, nodeId: string, options?: { filter? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; + listByNodeWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, nodeId: string, options?: { filter? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieve the Dsc node report list by node id. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} nodeId The parameters supplied to the list operation. @@ -3734,14 +3878,16 @@ export interface NodeReports { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listByNode(automationAccountName: string, nodeId: string, options?: { filter? : string, customHeaders? : { [headerName: string]: string; } }): Promise; - listByNode(automationAccountName: string, nodeId: string, callback: ServiceCallback): void; - listByNode(automationAccountName: string, nodeId: string, options: { filter? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listByNode(resourceGroupName: string, automationAccountName: string, nodeId: string, options?: { filter? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + listByNode(resourceGroupName: string, automationAccountName: string, nodeId: string, callback: ServiceCallback): void; + listByNode(resourceGroupName: string, automationAccountName: string, nodeId: string, options: { filter? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Retrieve the Dsc node report data by node id and report id. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} nodeId The Dsc node id. @@ -3759,11 +3905,13 @@ export interface NodeReports { * * @reject {Error|ServiceError} - The error object. */ - getWithHttpOperationResponse(automationAccountName: string, nodeId: string, reportId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, nodeId: string, reportId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieve the Dsc node report data by node id and report id. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} nodeId The Dsc node id. @@ -3797,14 +3945,16 @@ export interface NodeReports { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - get(automationAccountName: string, nodeId: string, reportId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - get(automationAccountName: string, nodeId: string, reportId: string, callback: ServiceCallback): void; - get(automationAccountName: string, nodeId: string, reportId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + get(resourceGroupName: string, automationAccountName: string, nodeId: string, reportId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + get(resourceGroupName: string, automationAccountName: string, nodeId: string, reportId: string, callback: ServiceCallback): void; + get(resourceGroupName: string, automationAccountName: string, nodeId: string, reportId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Retrieve the Dsc node reports by node id and report id. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} nodeId The Dsc node id. @@ -3822,11 +3972,13 @@ export interface NodeReports { * * @reject {Error|ServiceError} - The error object. */ - getContentWithHttpOperationResponse(automationAccountName: string, nodeId: string, reportId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getContentWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, nodeId: string, reportId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieve the Dsc node reports by node id and report id. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} nodeId The Dsc node id. @@ -3859,9 +4011,9 @@ export interface NodeReports { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - getContent(automationAccountName: string, nodeId: string, reportId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - getContent(automationAccountName: string, nodeId: string, reportId: string, callback: ServiceCallback): void; - getContent(automationAccountName: string, nodeId: string, reportId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + getContent(resourceGroupName: string, automationAccountName: string, nodeId: string, reportId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + getContent(resourceGroupName: string, automationAccountName: string, nodeId: string, reportId: string, callback: ServiceCallback): void; + getContent(resourceGroupName: string, automationAccountName: string, nodeId: string, reportId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -3934,6 +4086,8 @@ export interface DscNodeConfigurationOperations { /** * Delete the Dsc node configurations by node configuration. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} nodeConfigurationName The Dsc node configuration name. @@ -3949,11 +4103,13 @@ export interface DscNodeConfigurationOperations { * * @reject {Error|ServiceError} - The error object. */ - deleteMethodWithHttpOperationResponse(automationAccountName: string, nodeConfigurationName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + deleteMethodWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, nodeConfigurationName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Delete the Dsc node configurations by node configuration. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} nodeConfigurationName The Dsc node configuration name. @@ -3984,14 +4140,16 @@ export interface DscNodeConfigurationOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(automationAccountName: string, nodeConfigurationName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - deleteMethod(automationAccountName: string, nodeConfigurationName: string, callback: ServiceCallback): void; - deleteMethod(automationAccountName: string, nodeConfigurationName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, automationAccountName: string, nodeConfigurationName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + deleteMethod(resourceGroupName: string, automationAccountName: string, nodeConfigurationName: string, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, automationAccountName: string, nodeConfigurationName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Retrieve the Dsc node configurations by node configuration. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} nodeConfigurationName The Dsc node configuration name. @@ -4007,11 +4165,13 @@ export interface DscNodeConfigurationOperations { * * @reject {Error|ServiceError} - The error object. */ - getWithHttpOperationResponse(automationAccountName: string, nodeConfigurationName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, nodeConfigurationName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieve the Dsc node configurations by node configuration. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} nodeConfigurationName The Dsc node configuration name. @@ -4043,14 +4203,16 @@ export interface DscNodeConfigurationOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - get(automationAccountName: string, nodeConfigurationName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - get(automationAccountName: string, nodeConfigurationName: string, callback: ServiceCallback): void; - get(automationAccountName: string, nodeConfigurationName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + get(resourceGroupName: string, automationAccountName: string, nodeConfigurationName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + get(resourceGroupName: string, automationAccountName: string, nodeConfigurationName: string, callback: ServiceCallback): void; + get(resourceGroupName: string, automationAccountName: string, nodeConfigurationName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Create the node configuration identified by node configuration name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} nodeConfigurationName The create or update parameters for @@ -4100,11 +4262,13 @@ export interface DscNodeConfigurationOperations { * * @reject {Error|ServiceError} - The error object. */ - createOrUpdateWithHttpOperationResponse(automationAccountName: string, nodeConfigurationName: string, parameters: models.DscNodeConfigurationCreateOrUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + createOrUpdateWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, nodeConfigurationName: string, parameters: models.DscNodeConfigurationCreateOrUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Create the node configuration identified by node configuration name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} nodeConfigurationName The create or update parameters for @@ -4170,14 +4334,16 @@ export interface DscNodeConfigurationOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - createOrUpdate(automationAccountName: string, nodeConfigurationName: string, parameters: models.DscNodeConfigurationCreateOrUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - createOrUpdate(automationAccountName: string, nodeConfigurationName: string, parameters: models.DscNodeConfigurationCreateOrUpdateParameters, callback: ServiceCallback): void; - createOrUpdate(automationAccountName: string, nodeConfigurationName: string, parameters: models.DscNodeConfigurationCreateOrUpdateParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, automationAccountName: string, nodeConfigurationName: string, parameters: models.DscNodeConfigurationCreateOrUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + createOrUpdate(resourceGroupName: string, automationAccountName: string, nodeConfigurationName: string, parameters: models.DscNodeConfigurationCreateOrUpdateParameters, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, automationAccountName: string, nodeConfigurationName: string, parameters: models.DscNodeConfigurationCreateOrUpdateParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Retrieve a list of dsc node configurations. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -4193,11 +4359,13 @@ export interface DscNodeConfigurationOperations { * * @reject {Error|ServiceError} - The error object. */ - listByAutomationAccountWithHttpOperationResponse(automationAccountName: string, options?: { filter? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; + listByAutomationAccountWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, options?: { filter? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieve a list of dsc node configurations. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -4230,9 +4398,9 @@ export interface DscNodeConfigurationOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listByAutomationAccount(automationAccountName: string, options?: { filter? : string, customHeaders? : { [headerName: string]: string; } }): Promise; - listByAutomationAccount(automationAccountName: string, callback: ServiceCallback): void; - listByAutomationAccount(automationAccountName: string, options: { filter? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listByAutomationAccount(resourceGroupName: string, automationAccountName: string, options?: { filter? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + listByAutomationAccount(resourceGroupName: string, automationAccountName: string, callback: ServiceCallback): void; + listByAutomationAccount(resourceGroupName: string, automationAccountName: string, options: { filter? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -4305,6 +4473,8 @@ export interface HybridRunbookWorkerGroupOperations { /** * Delete a hybrid runbook worker group. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName Automation account name. * * @param {string} hybridRunbookWorkerGroupName The hybrid runbook worker group @@ -4321,11 +4491,13 @@ export interface HybridRunbookWorkerGroupOperations { * * @reject {Error|ServiceError} - The error object. */ - deleteMethodWithHttpOperationResponse(automationAccountName: string, hybridRunbookWorkerGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + deleteMethodWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, hybridRunbookWorkerGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Delete a hybrid runbook worker group. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName Automation account name. * * @param {string} hybridRunbookWorkerGroupName The hybrid runbook worker group @@ -4357,14 +4529,16 @@ export interface HybridRunbookWorkerGroupOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(automationAccountName: string, hybridRunbookWorkerGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - deleteMethod(automationAccountName: string, hybridRunbookWorkerGroupName: string, callback: ServiceCallback): void; - deleteMethod(automationAccountName: string, hybridRunbookWorkerGroupName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, automationAccountName: string, hybridRunbookWorkerGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + deleteMethod(resourceGroupName: string, automationAccountName: string, hybridRunbookWorkerGroupName: string, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, automationAccountName: string, hybridRunbookWorkerGroupName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Retrieve a hybrid runbook worker group. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} hybridRunbookWorkerGroupName The hybrid runbook worker group @@ -4381,11 +4555,13 @@ export interface HybridRunbookWorkerGroupOperations { * * @reject {Error|ServiceError} - The error object. */ - getWithHttpOperationResponse(automationAccountName: string, hybridRunbookWorkerGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, hybridRunbookWorkerGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieve a hybrid runbook worker group. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} hybridRunbookWorkerGroupName The hybrid runbook worker group @@ -4419,14 +4595,16 @@ export interface HybridRunbookWorkerGroupOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - get(automationAccountName: string, hybridRunbookWorkerGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - get(automationAccountName: string, hybridRunbookWorkerGroupName: string, callback: ServiceCallback): void; - get(automationAccountName: string, hybridRunbookWorkerGroupName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + get(resourceGroupName: string, automationAccountName: string, hybridRunbookWorkerGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + get(resourceGroupName: string, automationAccountName: string, hybridRunbookWorkerGroupName: string, callback: ServiceCallback): void; + get(resourceGroupName: string, automationAccountName: string, hybridRunbookWorkerGroupName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Update a hybrid runbook worker group. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} hybridRunbookWorkerGroupName The hybrid runbook worker group @@ -4451,11 +4629,13 @@ export interface HybridRunbookWorkerGroupOperations { * * @reject {Error|ServiceError} - The error object. */ - updateWithHttpOperationResponse(automationAccountName: string, hybridRunbookWorkerGroupName: string, parameters: models.HybridRunbookWorkerGroupUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + updateWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, hybridRunbookWorkerGroupName: string, parameters: models.HybridRunbookWorkerGroupUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Update a hybrid runbook worker group. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} hybridRunbookWorkerGroupName The hybrid runbook worker group @@ -4497,14 +4677,16 @@ export interface HybridRunbookWorkerGroupOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - update(automationAccountName: string, hybridRunbookWorkerGroupName: string, parameters: models.HybridRunbookWorkerGroupUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - update(automationAccountName: string, hybridRunbookWorkerGroupName: string, parameters: models.HybridRunbookWorkerGroupUpdateParameters, callback: ServiceCallback): void; - update(automationAccountName: string, hybridRunbookWorkerGroupName: string, parameters: models.HybridRunbookWorkerGroupUpdateParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + update(resourceGroupName: string, automationAccountName: string, hybridRunbookWorkerGroupName: string, parameters: models.HybridRunbookWorkerGroupUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + update(resourceGroupName: string, automationAccountName: string, hybridRunbookWorkerGroupName: string, parameters: models.HybridRunbookWorkerGroupUpdateParameters, callback: ServiceCallback): void; + update(resourceGroupName: string, automationAccountName: string, hybridRunbookWorkerGroupName: string, parameters: models.HybridRunbookWorkerGroupUpdateParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Retrieve a list of hybrid runbook worker groups. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -4518,11 +4700,13 @@ export interface HybridRunbookWorkerGroupOperations { * * @reject {Error|ServiceError} - The error object. */ - listByAutomationAccountWithHttpOperationResponse(automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listByAutomationAccountWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieve a list of hybrid runbook worker groups. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -4553,9 +4737,9 @@ export interface HybridRunbookWorkerGroupOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listByAutomationAccount(automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listByAutomationAccount(automationAccountName: string, callback: ServiceCallback): void; - listByAutomationAccount(automationAccountName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listByAutomationAccount(resourceGroupName: string, automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listByAutomationAccount(resourceGroupName: string, automationAccountName: string, callback: ServiceCallback): void; + listByAutomationAccount(resourceGroupName: string, automationAccountName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -4628,6 +4812,8 @@ export interface JobScheduleOperations { /** * Delete the job schedule identified by job schedule name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {uuid} jobScheduleId The job schedule name. @@ -4643,11 +4829,13 @@ export interface JobScheduleOperations { * * @reject {Error|ServiceError} - The error object. */ - deleteMethodWithHttpOperationResponse(automationAccountName: string, jobScheduleId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + deleteMethodWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, jobScheduleId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Delete the job schedule identified by job schedule name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {uuid} jobScheduleId The job schedule name. @@ -4678,14 +4866,16 @@ export interface JobScheduleOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(automationAccountName: string, jobScheduleId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - deleteMethod(automationAccountName: string, jobScheduleId: string, callback: ServiceCallback): void; - deleteMethod(automationAccountName: string, jobScheduleId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, automationAccountName: string, jobScheduleId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + deleteMethod(resourceGroupName: string, automationAccountName: string, jobScheduleId: string, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, automationAccountName: string, jobScheduleId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Retrieve the job schedule identified by job schedule name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {uuid} jobScheduleId The job schedule name. @@ -4701,11 +4891,13 @@ export interface JobScheduleOperations { * * @reject {Error|ServiceError} - The error object. */ - getWithHttpOperationResponse(automationAccountName: string, jobScheduleId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, jobScheduleId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieve the job schedule identified by job schedule name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {uuid} jobScheduleId The job schedule name. @@ -4737,14 +4929,16 @@ export interface JobScheduleOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - get(automationAccountName: string, jobScheduleId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - get(automationAccountName: string, jobScheduleId: string, callback: ServiceCallback): void; - get(automationAccountName: string, jobScheduleId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + get(resourceGroupName: string, automationAccountName: string, jobScheduleId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + get(resourceGroupName: string, automationAccountName: string, jobScheduleId: string, callback: ServiceCallback): void; + get(resourceGroupName: string, automationAccountName: string, jobScheduleId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Create a job schedule. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {uuid} jobScheduleId The job schedule name. @@ -4779,11 +4973,13 @@ export interface JobScheduleOperations { * * @reject {Error|ServiceError} - The error object. */ - createWithHttpOperationResponse(automationAccountName: string, jobScheduleId: string, parameters: models.JobScheduleCreateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + createWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, jobScheduleId: string, parameters: models.JobScheduleCreateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Create a job schedule. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {uuid} jobScheduleId The job schedule name. @@ -4834,14 +5030,16 @@ export interface JobScheduleOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - create(automationAccountName: string, jobScheduleId: string, parameters: models.JobScheduleCreateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - create(automationAccountName: string, jobScheduleId: string, parameters: models.JobScheduleCreateParameters, callback: ServiceCallback): void; - create(automationAccountName: string, jobScheduleId: string, parameters: models.JobScheduleCreateParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + create(resourceGroupName: string, automationAccountName: string, jobScheduleId: string, parameters: models.JobScheduleCreateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + create(resourceGroupName: string, automationAccountName: string, jobScheduleId: string, parameters: models.JobScheduleCreateParameters, callback: ServiceCallback): void; + create(resourceGroupName: string, automationAccountName: string, jobScheduleId: string, parameters: models.JobScheduleCreateParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Retrieve a list of job schedules. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -4855,11 +5053,13 @@ export interface JobScheduleOperations { * * @reject {Error|ServiceError} - The error object. */ - listByAutomationAccountWithHttpOperationResponse(automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listByAutomationAccountWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieve a list of job schedules. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -4889,9 +5089,9 @@ export interface JobScheduleOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listByAutomationAccount(automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listByAutomationAccount(automationAccountName: string, callback: ServiceCallback): void; - listByAutomationAccount(automationAccountName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listByAutomationAccount(resourceGroupName: string, automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listByAutomationAccount(resourceGroupName: string, automationAccountName: string, callback: ServiceCallback): void; + listByAutomationAccount(resourceGroupName: string, automationAccountName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -4963,6 +5163,8 @@ export interface LinkedWorkspaceOperations { /** * Retrieve the linked workspace for the account id. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -4976,11 +5178,13 @@ export interface LinkedWorkspaceOperations { * * @reject {Error|ServiceError} - The error object. */ - getWithHttpOperationResponse(automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieve the linked workspace for the account id. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -5010,9 +5214,9 @@ export interface LinkedWorkspaceOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - get(automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - get(automationAccountName: string, callback: ServiceCallback): void; - get(automationAccountName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + get(resourceGroupName: string, automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + get(resourceGroupName: string, automationAccountName: string, callback: ServiceCallback): void; + get(resourceGroupName: string, automationAccountName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; } /** @@ -5028,6 +5232,8 @@ export interface ActivityOperations { * Retrieve the activity in the module identified by module name and activity * name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} moduleName The name of module. @@ -5045,12 +5251,14 @@ export interface ActivityOperations { * * @reject {Error|ServiceError} - The error object. */ - getWithHttpOperationResponse(automationAccountName: string, moduleName: string, activityName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, moduleName: string, activityName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieve the activity in the module identified by module name and activity * name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} moduleName The name of module. @@ -5084,14 +5292,16 @@ export interface ActivityOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - get(automationAccountName: string, moduleName: string, activityName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - get(automationAccountName: string, moduleName: string, activityName: string, callback: ServiceCallback): void; - get(automationAccountName: string, moduleName: string, activityName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + get(resourceGroupName: string, automationAccountName: string, moduleName: string, activityName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + get(resourceGroupName: string, automationAccountName: string, moduleName: string, activityName: string, callback: ServiceCallback): void; + get(resourceGroupName: string, automationAccountName: string, moduleName: string, activityName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Retrieve a list of activities in the module identified by module name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} moduleName The name of module. @@ -5107,11 +5317,13 @@ export interface ActivityOperations { * * @reject {Error|ServiceError} - The error object. */ - listByModuleWithHttpOperationResponse(automationAccountName: string, moduleName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listByModuleWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, moduleName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieve a list of activities in the module identified by module name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} moduleName The name of module. @@ -5143,9 +5355,9 @@ export interface ActivityOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listByModule(automationAccountName: string, moduleName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listByModule(automationAccountName: string, moduleName: string, callback: ServiceCallback): void; - listByModule(automationAccountName: string, moduleName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listByModule(resourceGroupName: string, automationAccountName: string, moduleName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listByModule(resourceGroupName: string, automationAccountName: string, moduleName: string, callback: ServiceCallback): void; + listByModule(resourceGroupName: string, automationAccountName: string, moduleName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -5217,6 +5429,8 @@ export interface ModuleOperations { /** * Delete the module by name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} moduleName The module name. @@ -5232,11 +5446,13 @@ export interface ModuleOperations { * * @reject {Error|ServiceError} - The error object. */ - deleteMethodWithHttpOperationResponse(automationAccountName: string, moduleName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + deleteMethodWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, moduleName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Delete the module by name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} moduleName The module name. @@ -5267,14 +5483,16 @@ export interface ModuleOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(automationAccountName: string, moduleName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - deleteMethod(automationAccountName: string, moduleName: string, callback: ServiceCallback): void; - deleteMethod(automationAccountName: string, moduleName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, automationAccountName: string, moduleName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + deleteMethod(resourceGroupName: string, automationAccountName: string, moduleName: string, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, automationAccountName: string, moduleName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Retrieve the module identified by module name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} moduleName The module name. @@ -5290,11 +5508,13 @@ export interface ModuleOperations { * * @reject {Error|ServiceError} - The error object. */ - getWithHttpOperationResponse(automationAccountName: string, moduleName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, moduleName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieve the module identified by module name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} moduleName The module name. @@ -5326,14 +5546,16 @@ export interface ModuleOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - get(automationAccountName: string, moduleName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - get(automationAccountName: string, moduleName: string, callback: ServiceCallback): void; - get(automationAccountName: string, moduleName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + get(resourceGroupName: string, automationAccountName: string, moduleName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + get(resourceGroupName: string, automationAccountName: string, moduleName: string, callback: ServiceCallback): void; + get(resourceGroupName: string, automationAccountName: string, moduleName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Create or Update the module identified by module name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} moduleName The name of module. @@ -5375,11 +5597,13 @@ export interface ModuleOperations { * * @reject {Error|ServiceError} - The error object. */ - createOrUpdateWithHttpOperationResponse(automationAccountName: string, moduleName: string, parameters: models.ModuleCreateOrUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + createOrUpdateWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, moduleName: string, parameters: models.ModuleCreateOrUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Create or Update the module identified by module name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} moduleName The name of module. @@ -5437,14 +5661,16 @@ export interface ModuleOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - createOrUpdate(automationAccountName: string, moduleName: string, parameters: models.ModuleCreateOrUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - createOrUpdate(automationAccountName: string, moduleName: string, parameters: models.ModuleCreateOrUpdateParameters, callback: ServiceCallback): void; - createOrUpdate(automationAccountName: string, moduleName: string, parameters: models.ModuleCreateOrUpdateParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, automationAccountName: string, moduleName: string, parameters: models.ModuleCreateOrUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + createOrUpdate(resourceGroupName: string, automationAccountName: string, moduleName: string, parameters: models.ModuleCreateOrUpdateParameters, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, automationAccountName: string, moduleName: string, parameters: models.ModuleCreateOrUpdateParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Update the module identified by module name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} moduleName The name of module. @@ -5487,11 +5713,13 @@ export interface ModuleOperations { * * @reject {Error|ServiceError} - The error object. */ - updateWithHttpOperationResponse(automationAccountName: string, moduleName: string, parameters: models.ModuleUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + updateWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, moduleName: string, parameters: models.ModuleUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Update the module identified by module name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} moduleName The name of module. @@ -5550,14 +5778,16 @@ export interface ModuleOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - update(automationAccountName: string, moduleName: string, parameters: models.ModuleUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - update(automationAccountName: string, moduleName: string, parameters: models.ModuleUpdateParameters, callback: ServiceCallback): void; - update(automationAccountName: string, moduleName: string, parameters: models.ModuleUpdateParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + update(resourceGroupName: string, automationAccountName: string, moduleName: string, parameters: models.ModuleUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + update(resourceGroupName: string, automationAccountName: string, moduleName: string, parameters: models.ModuleUpdateParameters, callback: ServiceCallback): void; + update(resourceGroupName: string, automationAccountName: string, moduleName: string, parameters: models.ModuleUpdateParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Retrieve a list of modules. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -5571,11 +5801,13 @@ export interface ModuleOperations { * * @reject {Error|ServiceError} - The error object. */ - listByAutomationAccountWithHttpOperationResponse(automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listByAutomationAccountWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieve a list of modules. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -5605,9 +5837,9 @@ export interface ModuleOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listByAutomationAccount(automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listByAutomationAccount(automationAccountName: string, callback: ServiceCallback): void; - listByAutomationAccount(automationAccountName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listByAutomationAccount(resourceGroupName: string, automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listByAutomationAccount(resourceGroupName: string, automationAccountName: string, callback: ServiceCallback): void; + listByAutomationAccount(resourceGroupName: string, automationAccountName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -5679,6 +5911,8 @@ export interface ObjectDataTypes { /** * Retrieve a list of fields of a given type identified by module name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} moduleName The name of module. @@ -5696,11 +5930,13 @@ export interface ObjectDataTypes { * * @reject {Error|ServiceError} - The error object. */ - listFieldsByModuleAndTypeWithHttpOperationResponse(automationAccountName: string, moduleName: string, typeName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listFieldsByModuleAndTypeWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, moduleName: string, typeName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieve a list of fields of a given type identified by module name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} moduleName The name of module. @@ -5734,14 +5970,16 @@ export interface ObjectDataTypes { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listFieldsByModuleAndType(automationAccountName: string, moduleName: string, typeName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listFieldsByModuleAndType(automationAccountName: string, moduleName: string, typeName: string, callback: ServiceCallback): void; - listFieldsByModuleAndType(automationAccountName: string, moduleName: string, typeName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listFieldsByModuleAndType(resourceGroupName: string, automationAccountName: string, moduleName: string, typeName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listFieldsByModuleAndType(resourceGroupName: string, automationAccountName: string, moduleName: string, typeName: string, callback: ServiceCallback): void; + listFieldsByModuleAndType(resourceGroupName: string, automationAccountName: string, moduleName: string, typeName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Retrieve a list of fields of a given type across all accessible modules. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} typeName The name of type. @@ -5757,11 +5995,13 @@ export interface ObjectDataTypes { * * @reject {Error|ServiceError} - The error object. */ - listFieldsByTypeWithHttpOperationResponse(automationAccountName: string, typeName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listFieldsByTypeWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, typeName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieve a list of fields of a given type across all accessible modules. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} typeName The name of type. @@ -5793,9 +6033,9 @@ export interface ObjectDataTypes { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listFieldsByType(automationAccountName: string, typeName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listFieldsByType(automationAccountName: string, typeName: string, callback: ServiceCallback): void; - listFieldsByType(automationAccountName: string, typeName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listFieldsByType(resourceGroupName: string, automationAccountName: string, typeName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listFieldsByType(resourceGroupName: string, automationAccountName: string, typeName: string, callback: ServiceCallback): void; + listFieldsByType(resourceGroupName: string, automationAccountName: string, typeName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; } /** @@ -5810,6 +6050,8 @@ export interface Fields { /** * Retrieve a list of fields of a given type identified by module name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} moduleName The name of module. @@ -5827,11 +6069,13 @@ export interface Fields { * * @reject {Error|ServiceError} - The error object. */ - listByTypeWithHttpOperationResponse(automationAccountName: string, moduleName: string, typeName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listByTypeWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, moduleName: string, typeName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieve a list of fields of a given type identified by module name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} moduleName The name of module. @@ -5865,9 +6109,9 @@ export interface Fields { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listByType(automationAccountName: string, moduleName: string, typeName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listByType(automationAccountName: string, moduleName: string, typeName: string, callback: ServiceCallback): void; - listByType(automationAccountName: string, moduleName: string, typeName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listByType(resourceGroupName: string, automationAccountName: string, moduleName: string, typeName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listByType(resourceGroupName: string, automationAccountName: string, moduleName: string, typeName: string, callback: ServiceCallback): void; + listByType(resourceGroupName: string, automationAccountName: string, moduleName: string, typeName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; } /** @@ -5882,6 +6126,8 @@ export interface RunbookDraftOperations { /** * Retrieve the content of runbook draft identified by runbook name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -5897,11 +6143,13 @@ export interface RunbookDraftOperations { * * @reject {Error|ServiceError} - The error object. */ - getContentWithHttpOperationResponse(automationAccountName: string, runbookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getContentWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, runbookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieve the content of runbook draft identified by runbook name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -5932,14 +6180,16 @@ export interface RunbookDraftOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - getContent(automationAccountName: string, runbookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - getContent(automationAccountName: string, runbookName: string, callback: ServiceCallback): void; - getContent(automationAccountName: string, runbookName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + getContent(resourceGroupName: string, automationAccountName: string, runbookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + getContent(resourceGroupName: string, automationAccountName: string, runbookName: string, callback: ServiceCallback): void; + getContent(resourceGroupName: string, automationAccountName: string, runbookName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Replaces the runbook draft content. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -5957,11 +6207,13 @@ export interface RunbookDraftOperations { * * @reject {Error|ServiceError} - The error object. */ - replaceContentWithHttpOperationResponse(automationAccountName: string, runbookName: string, runbookContent: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + replaceContentWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, runbookName: string, runbookContent: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Replaces the runbook draft content. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -5994,14 +6246,16 @@ export interface RunbookDraftOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - replaceContent(automationAccountName: string, runbookName: string, runbookContent: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - replaceContent(automationAccountName: string, runbookName: string, runbookContent: string, callback: ServiceCallback): void; - replaceContent(automationAccountName: string, runbookName: string, runbookContent: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + replaceContent(resourceGroupName: string, automationAccountName: string, runbookName: string, runbookContent: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + replaceContent(resourceGroupName: string, automationAccountName: string, runbookName: string, runbookContent: string, callback: ServiceCallback): void; + replaceContent(resourceGroupName: string, automationAccountName: string, runbookName: string, runbookContent: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Retrieve the runbook draft identified by runbook name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -6017,11 +6271,13 @@ export interface RunbookDraftOperations { * * @reject {Error|ServiceError} - The error object. */ - getWithHttpOperationResponse(automationAccountName: string, runbookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, runbookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieve the runbook draft identified by runbook name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -6053,14 +6309,16 @@ export interface RunbookDraftOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - get(automationAccountName: string, runbookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - get(automationAccountName: string, runbookName: string, callback: ServiceCallback): void; - get(automationAccountName: string, runbookName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + get(resourceGroupName: string, automationAccountName: string, runbookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + get(resourceGroupName: string, automationAccountName: string, runbookName: string, callback: ServiceCallback): void; + get(resourceGroupName: string, automationAccountName: string, runbookName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Publish runbook draft. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The parameters supplied to the publish runbook @@ -6077,11 +6335,13 @@ export interface RunbookDraftOperations { * * @reject {Error|ServiceError} - The error object. */ - publishWithHttpOperationResponse(automationAccountName: string, runbookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + publishWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, runbookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Publish runbook draft. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The parameters supplied to the publish runbook @@ -6113,14 +6373,16 @@ export interface RunbookDraftOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - publish(automationAccountName: string, runbookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - publish(automationAccountName: string, runbookName: string, callback: ServiceCallback): void; - publish(automationAccountName: string, runbookName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + publish(resourceGroupName: string, automationAccountName: string, runbookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + publish(resourceGroupName: string, automationAccountName: string, runbookName: string, callback: ServiceCallback): void; + publish(resourceGroupName: string, automationAccountName: string, runbookName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Undo draft edit to last known published state identified by runbook name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -6136,11 +6398,13 @@ export interface RunbookDraftOperations { * * @reject {Error|ServiceError} - The error object. */ - undoEditWithHttpOperationResponse(automationAccountName: string, runbookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + undoEditWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, runbookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Undo draft edit to last known published state identified by runbook name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -6173,14 +6437,16 @@ export interface RunbookDraftOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - undoEdit(automationAccountName: string, runbookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - undoEdit(automationAccountName: string, runbookName: string, callback: ServiceCallback): void; - undoEdit(automationAccountName: string, runbookName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + undoEdit(resourceGroupName: string, automationAccountName: string, runbookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + undoEdit(resourceGroupName: string, automationAccountName: string, runbookName: string, callback: ServiceCallback): void; + undoEdit(resourceGroupName: string, automationAccountName: string, runbookName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Replaces the runbook draft content. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -6198,11 +6464,13 @@ export interface RunbookDraftOperations { * * @reject {Error|ServiceError} - The error object. */ - beginReplaceContentWithHttpOperationResponse(automationAccountName: string, runbookName: string, runbookContent: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginReplaceContentWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, runbookName: string, runbookContent: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Replaces the runbook draft content. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -6235,14 +6503,16 @@ export interface RunbookDraftOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginReplaceContent(automationAccountName: string, runbookName: string, runbookContent: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginReplaceContent(automationAccountName: string, runbookName: string, runbookContent: string, callback: ServiceCallback): void; - beginReplaceContent(automationAccountName: string, runbookName: string, runbookContent: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginReplaceContent(resourceGroupName: string, automationAccountName: string, runbookName: string, runbookContent: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginReplaceContent(resourceGroupName: string, automationAccountName: string, runbookName: string, runbookContent: string, callback: ServiceCallback): void; + beginReplaceContent(resourceGroupName: string, automationAccountName: string, runbookName: string, runbookContent: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Publish runbook draft. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The parameters supplied to the publish runbook @@ -6259,11 +6529,13 @@ export interface RunbookDraftOperations { * * @reject {Error|ServiceError} - The error object. */ - beginPublishWithHttpOperationResponse(automationAccountName: string, runbookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginPublishWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, runbookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Publish runbook draft. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The parameters supplied to the publish runbook @@ -6295,9 +6567,9 @@ export interface RunbookDraftOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginPublish(automationAccountName: string, runbookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginPublish(automationAccountName: string, runbookName: string, callback: ServiceCallback): void; - beginPublish(automationAccountName: string, runbookName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginPublish(resourceGroupName: string, automationAccountName: string, runbookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginPublish(resourceGroupName: string, automationAccountName: string, runbookName: string, callback: ServiceCallback): void; + beginPublish(resourceGroupName: string, automationAccountName: string, runbookName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; } /** @@ -6312,6 +6584,8 @@ export interface RunbookOperations { /** * Retrieve the content of runbook identified by runbook name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -6327,11 +6601,13 @@ export interface RunbookOperations { * * @reject {Error|ServiceError} - The error object. */ - getContentWithHttpOperationResponse(automationAccountName: string, runbookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getContentWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, runbookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieve the content of runbook identified by runbook name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -6362,14 +6638,16 @@ export interface RunbookOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - getContent(automationAccountName: string, runbookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - getContent(automationAccountName: string, runbookName: string, callback: ServiceCallback): void; - getContent(automationAccountName: string, runbookName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + getContent(resourceGroupName: string, automationAccountName: string, runbookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + getContent(resourceGroupName: string, automationAccountName: string, runbookName: string, callback: ServiceCallback): void; + getContent(resourceGroupName: string, automationAccountName: string, runbookName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Retrieve the runbook identified by runbook name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -6385,11 +6663,13 @@ export interface RunbookOperations { * * @reject {Error|ServiceError} - The error object. */ - getWithHttpOperationResponse(automationAccountName: string, runbookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, runbookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieve the runbook identified by runbook name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -6421,14 +6701,16 @@ export interface RunbookOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - get(automationAccountName: string, runbookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - get(automationAccountName: string, runbookName: string, callback: ServiceCallback): void; - get(automationAccountName: string, runbookName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + get(resourceGroupName: string, automationAccountName: string, runbookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + get(resourceGroupName: string, automationAccountName: string, runbookName: string, callback: ServiceCallback): void; + get(resourceGroupName: string, automationAccountName: string, runbookName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Create the runbook identified by runbook name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -6508,11 +6790,13 @@ export interface RunbookOperations { * * @reject {Error|ServiceError} - The error object. */ - createOrUpdateWithHttpOperationResponse(automationAccountName: string, runbookName: string, parameters: models.RunbookCreateOrUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + createOrUpdateWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, runbookName: string, parameters: models.RunbookCreateOrUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Create the runbook identified by runbook name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -6608,14 +6892,16 @@ export interface RunbookOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - createOrUpdate(automationAccountName: string, runbookName: string, parameters: models.RunbookCreateOrUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - createOrUpdate(automationAccountName: string, runbookName: string, parameters: models.RunbookCreateOrUpdateParameters, callback: ServiceCallback): void; - createOrUpdate(automationAccountName: string, runbookName: string, parameters: models.RunbookCreateOrUpdateParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, automationAccountName: string, runbookName: string, parameters: models.RunbookCreateOrUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + createOrUpdate(resourceGroupName: string, automationAccountName: string, runbookName: string, parameters: models.RunbookCreateOrUpdateParameters, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, automationAccountName: string, runbookName: string, parameters: models.RunbookCreateOrUpdateParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Update the runbook identified by runbook name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -6651,11 +6937,13 @@ export interface RunbookOperations { * * @reject {Error|ServiceError} - The error object. */ - updateWithHttpOperationResponse(automationAccountName: string, runbookName: string, parameters: models.RunbookUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + updateWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, runbookName: string, parameters: models.RunbookUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Update the runbook identified by runbook name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -6707,14 +6995,16 @@ export interface RunbookOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - update(automationAccountName: string, runbookName: string, parameters: models.RunbookUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - update(automationAccountName: string, runbookName: string, parameters: models.RunbookUpdateParameters, callback: ServiceCallback): void; - update(automationAccountName: string, runbookName: string, parameters: models.RunbookUpdateParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + update(resourceGroupName: string, automationAccountName: string, runbookName: string, parameters: models.RunbookUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + update(resourceGroupName: string, automationAccountName: string, runbookName: string, parameters: models.RunbookUpdateParameters, callback: ServiceCallback): void; + update(resourceGroupName: string, automationAccountName: string, runbookName: string, parameters: models.RunbookUpdateParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Delete the runbook by name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -6730,11 +7020,13 @@ export interface RunbookOperations { * * @reject {Error|ServiceError} - The error object. */ - deleteMethodWithHttpOperationResponse(automationAccountName: string, runbookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + deleteMethodWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, runbookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Delete the runbook by name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -6765,14 +7057,16 @@ export interface RunbookOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(automationAccountName: string, runbookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - deleteMethod(automationAccountName: string, runbookName: string, callback: ServiceCallback): void; - deleteMethod(automationAccountName: string, runbookName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, automationAccountName: string, runbookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + deleteMethod(resourceGroupName: string, automationAccountName: string, runbookName: string, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, automationAccountName: string, runbookName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Retrieve a list of runbooks. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -6786,11 +7080,13 @@ export interface RunbookOperations { * * @reject {Error|ServiceError} - The error object. */ - listByAutomationAccountWithHttpOperationResponse(automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listByAutomationAccountWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieve a list of runbooks. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -6820,9 +7116,9 @@ export interface RunbookOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listByAutomationAccount(automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listByAutomationAccount(automationAccountName: string, callback: ServiceCallback): void; - listByAutomationAccount(automationAccountName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listByAutomationAccount(resourceGroupName: string, automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listByAutomationAccount(resourceGroupName: string, automationAccountName: string, callback: ServiceCallback): void; + listByAutomationAccount(resourceGroupName: string, automationAccountName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -6895,6 +7191,8 @@ export interface TestJobStreams { * Retrieve a test job stream of the test job identified by runbook name and * stream id. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -6912,12 +7210,14 @@ export interface TestJobStreams { * * @reject {Error|ServiceError} - The error object. */ - getWithHttpOperationResponse(automationAccountName: string, runbookName: string, jobStreamId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, runbookName: string, jobStreamId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieve a test job stream of the test job identified by runbook name and * stream id. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -6951,14 +7251,16 @@ export interface TestJobStreams { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - get(automationAccountName: string, runbookName: string, jobStreamId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - get(automationAccountName: string, runbookName: string, jobStreamId: string, callback: ServiceCallback): void; - get(automationAccountName: string, runbookName: string, jobStreamId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + get(resourceGroupName: string, automationAccountName: string, runbookName: string, jobStreamId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + get(resourceGroupName: string, automationAccountName: string, runbookName: string, jobStreamId: string, callback: ServiceCallback): void; + get(resourceGroupName: string, automationAccountName: string, runbookName: string, jobStreamId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Retrieve a list of test job streams identified by runbook name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -6976,11 +7278,13 @@ export interface TestJobStreams { * * @reject {Error|ServiceError} - The error object. */ - listByTestJobWithHttpOperationResponse(automationAccountName: string, runbookName: string, options?: { filter? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; + listByTestJobWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, runbookName: string, options?: { filter? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieve a list of test job streams identified by runbook name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -7014,9 +7318,9 @@ export interface TestJobStreams { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listByTestJob(automationAccountName: string, runbookName: string, options?: { filter? : string, customHeaders? : { [headerName: string]: string; } }): Promise; - listByTestJob(automationAccountName: string, runbookName: string, callback: ServiceCallback): void; - listByTestJob(automationAccountName: string, runbookName: string, options: { filter? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listByTestJob(resourceGroupName: string, automationAccountName: string, runbookName: string, options?: { filter? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + listByTestJob(resourceGroupName: string, automationAccountName: string, runbookName: string, callback: ServiceCallback): void; + listByTestJob(resourceGroupName: string, automationAccountName: string, runbookName: string, options: { filter? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -7088,6 +7392,8 @@ export interface TestJobOperations { /** * Create a test job of the runbook. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The parameters supplied to the create test job @@ -7113,11 +7419,13 @@ export interface TestJobOperations { * * @reject {Error|ServiceError} - The error object. */ - createWithHttpOperationResponse(automationAccountName: string, runbookName: string, parameters: models.TestJobCreateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + createWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, runbookName: string, parameters: models.TestJobCreateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Create a test job of the runbook. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The parameters supplied to the create test job @@ -7159,14 +7467,16 @@ export interface TestJobOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - create(automationAccountName: string, runbookName: string, parameters: models.TestJobCreateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - create(automationAccountName: string, runbookName: string, parameters: models.TestJobCreateParameters, callback: ServiceCallback): void; - create(automationAccountName: string, runbookName: string, parameters: models.TestJobCreateParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + create(resourceGroupName: string, automationAccountName: string, runbookName: string, parameters: models.TestJobCreateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + create(resourceGroupName: string, automationAccountName: string, runbookName: string, parameters: models.TestJobCreateParameters, callback: ServiceCallback): void; + create(resourceGroupName: string, automationAccountName: string, runbookName: string, parameters: models.TestJobCreateParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Retrieve the test job for the specified runbook. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -7182,11 +7492,13 @@ export interface TestJobOperations { * * @reject {Error|ServiceError} - The error object. */ - getWithHttpOperationResponse(automationAccountName: string, runbookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, runbookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieve the test job for the specified runbook. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -7218,14 +7530,16 @@ export interface TestJobOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - get(automationAccountName: string, runbookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - get(automationAccountName: string, runbookName: string, callback: ServiceCallback): void; - get(automationAccountName: string, runbookName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + get(resourceGroupName: string, automationAccountName: string, runbookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + get(resourceGroupName: string, automationAccountName: string, runbookName: string, callback: ServiceCallback): void; + get(resourceGroupName: string, automationAccountName: string, runbookName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Resume the test job. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -7241,11 +7555,13 @@ export interface TestJobOperations { * * @reject {Error|ServiceError} - The error object. */ - resumeWithHttpOperationResponse(automationAccountName: string, runbookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + resumeWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, runbookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Resume the test job. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -7276,14 +7592,16 @@ export interface TestJobOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - resume(automationAccountName: string, runbookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - resume(automationAccountName: string, runbookName: string, callback: ServiceCallback): void; - resume(automationAccountName: string, runbookName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + resume(resourceGroupName: string, automationAccountName: string, runbookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + resume(resourceGroupName: string, automationAccountName: string, runbookName: string, callback: ServiceCallback): void; + resume(resourceGroupName: string, automationAccountName: string, runbookName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Stop the test job. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -7299,11 +7617,13 @@ export interface TestJobOperations { * * @reject {Error|ServiceError} - The error object. */ - stopWithHttpOperationResponse(automationAccountName: string, runbookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + stopWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, runbookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Stop the test job. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -7334,14 +7654,16 @@ export interface TestJobOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - stop(automationAccountName: string, runbookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - stop(automationAccountName: string, runbookName: string, callback: ServiceCallback): void; - stop(automationAccountName: string, runbookName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + stop(resourceGroupName: string, automationAccountName: string, runbookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + stop(resourceGroupName: string, automationAccountName: string, runbookName: string, callback: ServiceCallback): void; + stop(resourceGroupName: string, automationAccountName: string, runbookName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Suspend the test job. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -7357,11 +7679,13 @@ export interface TestJobOperations { * * @reject {Error|ServiceError} - The error object. */ - suspendWithHttpOperationResponse(automationAccountName: string, runbookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + suspendWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, runbookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Suspend the test job. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -7392,9 +7716,9 @@ export interface TestJobOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - suspend(automationAccountName: string, runbookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - suspend(automationAccountName: string, runbookName: string, callback: ServiceCallback): void; - suspend(automationAccountName: string, runbookName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + suspend(resourceGroupName: string, automationAccountName: string, runbookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + suspend(resourceGroupName: string, automationAccountName: string, runbookName: string, callback: ServiceCallback): void; + suspend(resourceGroupName: string, automationAccountName: string, runbookName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; } /** @@ -7409,6 +7733,8 @@ export interface ScheduleOperations { /** * Create a schedule. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} scheduleName The schedule name. @@ -7459,11 +7785,13 @@ export interface ScheduleOperations { * * @reject {Error|ServiceError} - The error object. */ - createOrUpdateWithHttpOperationResponse(automationAccountName: string, scheduleName: string, parameters: models.ScheduleCreateOrUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + createOrUpdateWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, scheduleName: string, parameters: models.ScheduleCreateOrUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Create a schedule. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} scheduleName The schedule name. @@ -7530,14 +7858,16 @@ export interface ScheduleOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - createOrUpdate(automationAccountName: string, scheduleName: string, parameters: models.ScheduleCreateOrUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - createOrUpdate(automationAccountName: string, scheduleName: string, parameters: models.ScheduleCreateOrUpdateParameters, callback: ServiceCallback): void; - createOrUpdate(automationAccountName: string, scheduleName: string, parameters: models.ScheduleCreateOrUpdateParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, automationAccountName: string, scheduleName: string, parameters: models.ScheduleCreateOrUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + createOrUpdate(resourceGroupName: string, automationAccountName: string, scheduleName: string, parameters: models.ScheduleCreateOrUpdateParameters, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, automationAccountName: string, scheduleName: string, parameters: models.ScheduleCreateOrUpdateParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Update the schedule identified by schedule name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} scheduleName The schedule name. @@ -7564,11 +7894,13 @@ export interface ScheduleOperations { * * @reject {Error|ServiceError} - The error object. */ - updateWithHttpOperationResponse(automationAccountName: string, scheduleName: string, parameters: models.ScheduleUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + updateWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, scheduleName: string, parameters: models.ScheduleUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Update the schedule identified by schedule name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} scheduleName The schedule name. @@ -7611,14 +7943,16 @@ export interface ScheduleOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - update(automationAccountName: string, scheduleName: string, parameters: models.ScheduleUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - update(automationAccountName: string, scheduleName: string, parameters: models.ScheduleUpdateParameters, callback: ServiceCallback): void; - update(automationAccountName: string, scheduleName: string, parameters: models.ScheduleUpdateParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + update(resourceGroupName: string, automationAccountName: string, scheduleName: string, parameters: models.ScheduleUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + update(resourceGroupName: string, automationAccountName: string, scheduleName: string, parameters: models.ScheduleUpdateParameters, callback: ServiceCallback): void; + update(resourceGroupName: string, automationAccountName: string, scheduleName: string, parameters: models.ScheduleUpdateParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Retrieve the schedule identified by schedule name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} scheduleName The schedule name. @@ -7634,11 +7968,13 @@ export interface ScheduleOperations { * * @reject {Error|ServiceError} - The error object. */ - getWithHttpOperationResponse(automationAccountName: string, scheduleName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, scheduleName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieve the schedule identified by schedule name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} scheduleName The schedule name. @@ -7670,14 +8006,16 @@ export interface ScheduleOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - get(automationAccountName: string, scheduleName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - get(automationAccountName: string, scheduleName: string, callback: ServiceCallback): void; - get(automationAccountName: string, scheduleName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + get(resourceGroupName: string, automationAccountName: string, scheduleName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + get(resourceGroupName: string, automationAccountName: string, scheduleName: string, callback: ServiceCallback): void; + get(resourceGroupName: string, automationAccountName: string, scheduleName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Delete the schedule identified by schedule name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} scheduleName The schedule name. @@ -7693,11 +8031,13 @@ export interface ScheduleOperations { * * @reject {Error|ServiceError} - The error object. */ - deleteMethodWithHttpOperationResponse(automationAccountName: string, scheduleName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + deleteMethodWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, scheduleName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Delete the schedule identified by schedule name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} scheduleName The schedule name. @@ -7728,14 +8068,16 @@ export interface ScheduleOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(automationAccountName: string, scheduleName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - deleteMethod(automationAccountName: string, scheduleName: string, callback: ServiceCallback): void; - deleteMethod(automationAccountName: string, scheduleName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, automationAccountName: string, scheduleName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + deleteMethod(resourceGroupName: string, automationAccountName: string, scheduleName: string, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, automationAccountName: string, scheduleName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Retrieve a list of schedules. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -7749,11 +8091,13 @@ export interface ScheduleOperations { * * @reject {Error|ServiceError} - The error object. */ - listByAutomationAccountWithHttpOperationResponse(automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listByAutomationAccountWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieve a list of schedules. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -7783,9 +8127,9 @@ export interface ScheduleOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listByAutomationAccount(automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listByAutomationAccount(automationAccountName: string, callback: ServiceCallback): void; - listByAutomationAccount(automationAccountName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listByAutomationAccount(resourceGroupName: string, automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listByAutomationAccount(resourceGroupName: string, automationAccountName: string, callback: ServiceCallback): void; + listByAutomationAccount(resourceGroupName: string, automationAccountName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -7857,6 +8201,8 @@ export interface VariableOperations { /** * Create a variable. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} variableName The variable name. @@ -7885,11 +8231,13 @@ export interface VariableOperations { * * @reject {Error|ServiceError} - The error object. */ - createOrUpdateWithHttpOperationResponse(automationAccountName: string, variableName: string, parameters: models.VariableCreateOrUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + createOrUpdateWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, variableName: string, parameters: models.VariableCreateOrUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Create a variable. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} variableName The variable name. @@ -7934,14 +8282,16 @@ export interface VariableOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - createOrUpdate(automationAccountName: string, variableName: string, parameters: models.VariableCreateOrUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - createOrUpdate(automationAccountName: string, variableName: string, parameters: models.VariableCreateOrUpdateParameters, callback: ServiceCallback): void; - createOrUpdate(automationAccountName: string, variableName: string, parameters: models.VariableCreateOrUpdateParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, automationAccountName: string, variableName: string, parameters: models.VariableCreateOrUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + createOrUpdate(resourceGroupName: string, automationAccountName: string, variableName: string, parameters: models.VariableCreateOrUpdateParameters, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, automationAccountName: string, variableName: string, parameters: models.VariableCreateOrUpdateParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Update a variable. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} variableName The variable name. @@ -7967,11 +8317,13 @@ export interface VariableOperations { * * @reject {Error|ServiceError} - The error object. */ - updateWithHttpOperationResponse(automationAccountName: string, variableName: string, parameters: models.VariableUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + updateWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, variableName: string, parameters: models.VariableUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Update a variable. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} variableName The variable name. @@ -8013,14 +8365,16 @@ export interface VariableOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - update(automationAccountName: string, variableName: string, parameters: models.VariableUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - update(automationAccountName: string, variableName: string, parameters: models.VariableUpdateParameters, callback: ServiceCallback): void; - update(automationAccountName: string, variableName: string, parameters: models.VariableUpdateParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + update(resourceGroupName: string, automationAccountName: string, variableName: string, parameters: models.VariableUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + update(resourceGroupName: string, automationAccountName: string, variableName: string, parameters: models.VariableUpdateParameters, callback: ServiceCallback): void; + update(resourceGroupName: string, automationAccountName: string, variableName: string, parameters: models.VariableUpdateParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Delete the variable. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} variableName The name of variable. @@ -8036,11 +8390,13 @@ export interface VariableOperations { * * @reject {Error|ServiceError} - The error object. */ - deleteMethodWithHttpOperationResponse(automationAccountName: string, variableName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + deleteMethodWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, variableName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Delete the variable. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} variableName The name of variable. @@ -8071,14 +8427,16 @@ export interface VariableOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(automationAccountName: string, variableName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - deleteMethod(automationAccountName: string, variableName: string, callback: ServiceCallback): void; - deleteMethod(automationAccountName: string, variableName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, automationAccountName: string, variableName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + deleteMethod(resourceGroupName: string, automationAccountName: string, variableName: string, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, automationAccountName: string, variableName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Retrieve the variable identified by variable name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} variableName The name of variable. @@ -8094,11 +8452,13 @@ export interface VariableOperations { * * @reject {Error|ServiceError} - The error object. */ - getWithHttpOperationResponse(automationAccountName: string, variableName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, variableName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieve the variable identified by variable name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} variableName The name of variable. @@ -8130,14 +8490,16 @@ export interface VariableOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - get(automationAccountName: string, variableName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - get(automationAccountName: string, variableName: string, callback: ServiceCallback): void; - get(automationAccountName: string, variableName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + get(resourceGroupName: string, automationAccountName: string, variableName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + get(resourceGroupName: string, automationAccountName: string, variableName: string, callback: ServiceCallback): void; + get(resourceGroupName: string, automationAccountName: string, variableName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Retrieve a list of variables. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -8151,11 +8513,13 @@ export interface VariableOperations { * * @reject {Error|ServiceError} - The error object. */ - listByAutomationAccountWithHttpOperationResponse(automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listByAutomationAccountWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieve a list of variables. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -8185,9 +8549,9 @@ export interface VariableOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listByAutomationAccount(automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listByAutomationAccount(automationAccountName: string, callback: ServiceCallback): void; - listByAutomationAccount(automationAccountName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listByAutomationAccount(resourceGroupName: string, automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listByAutomationAccount(resourceGroupName: string, automationAccountName: string, callback: ServiceCallback): void; + listByAutomationAccount(resourceGroupName: string, automationAccountName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -8259,6 +8623,8 @@ export interface WebhookOperations { /** * Generates a Uri for use in creating a webhook. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -8272,11 +8638,13 @@ export interface WebhookOperations { * * @reject {Error|ServiceError} - The error object. */ - generateUriWithHttpOperationResponse(automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + generateUriWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Generates a Uri for use in creating a webhook. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -8305,14 +8673,16 @@ export interface WebhookOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - generateUri(automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - generateUri(automationAccountName: string, callback: ServiceCallback): void; - generateUri(automationAccountName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + generateUri(resourceGroupName: string, automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + generateUri(resourceGroupName: string, automationAccountName: string, callback: ServiceCallback): void; + generateUri(resourceGroupName: string, automationAccountName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Delete the webhook by name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} webhookName The webhook name. @@ -8328,11 +8698,13 @@ export interface WebhookOperations { * * @reject {Error|ServiceError} - The error object. */ - deleteMethodWithHttpOperationResponse(automationAccountName: string, webhookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + deleteMethodWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, webhookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Delete the webhook by name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} webhookName The webhook name. @@ -8363,14 +8735,16 @@ export interface WebhookOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(automationAccountName: string, webhookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - deleteMethod(automationAccountName: string, webhookName: string, callback: ServiceCallback): void; - deleteMethod(automationAccountName: string, webhookName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, automationAccountName: string, webhookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + deleteMethod(resourceGroupName: string, automationAccountName: string, webhookName: string, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, automationAccountName: string, webhookName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Retrieve the webhook identified by webhook name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} webhookName The webhook name. @@ -8386,11 +8760,13 @@ export interface WebhookOperations { * * @reject {Error|ServiceError} - The error object. */ - getWithHttpOperationResponse(automationAccountName: string, webhookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, webhookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieve the webhook identified by webhook name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} webhookName The webhook name. @@ -8422,14 +8798,16 @@ export interface WebhookOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - get(automationAccountName: string, webhookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - get(automationAccountName: string, webhookName: string, callback: ServiceCallback): void; - get(automationAccountName: string, webhookName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + get(resourceGroupName: string, automationAccountName: string, webhookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + get(resourceGroupName: string, automationAccountName: string, webhookName: string, callback: ServiceCallback): void; + get(resourceGroupName: string, automationAccountName: string, webhookName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Create the webhook identified by webhook name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} webhookName The webhook name. @@ -8467,11 +8845,13 @@ export interface WebhookOperations { * * @reject {Error|ServiceError} - The error object. */ - createOrUpdateWithHttpOperationResponse(automationAccountName: string, webhookName: string, parameters: models.WebhookCreateOrUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + createOrUpdateWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, webhookName: string, parameters: models.WebhookCreateOrUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Create the webhook identified by webhook name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} webhookName The webhook name. @@ -8525,14 +8905,16 @@ export interface WebhookOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - createOrUpdate(automationAccountName: string, webhookName: string, parameters: models.WebhookCreateOrUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - createOrUpdate(automationAccountName: string, webhookName: string, parameters: models.WebhookCreateOrUpdateParameters, callback: ServiceCallback): void; - createOrUpdate(automationAccountName: string, webhookName: string, parameters: models.WebhookCreateOrUpdateParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, automationAccountName: string, webhookName: string, parameters: models.WebhookCreateOrUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + createOrUpdate(resourceGroupName: string, automationAccountName: string, webhookName: string, parameters: models.WebhookCreateOrUpdateParameters, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, automationAccountName: string, webhookName: string, parameters: models.WebhookCreateOrUpdateParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Update the webhook identified by webhook name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} webhookName The webhook name. @@ -8564,11 +8946,13 @@ export interface WebhookOperations { * * @reject {Error|ServiceError} - The error object. */ - updateWithHttpOperationResponse(automationAccountName: string, webhookName: string, parameters: models.WebhookUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + updateWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, webhookName: string, parameters: models.WebhookUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Update the webhook identified by webhook name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} webhookName The webhook name. @@ -8616,14 +9000,16 @@ export interface WebhookOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - update(automationAccountName: string, webhookName: string, parameters: models.WebhookUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - update(automationAccountName: string, webhookName: string, parameters: models.WebhookUpdateParameters, callback: ServiceCallback): void; - update(automationAccountName: string, webhookName: string, parameters: models.WebhookUpdateParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + update(resourceGroupName: string, automationAccountName: string, webhookName: string, parameters: models.WebhookUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + update(resourceGroupName: string, automationAccountName: string, webhookName: string, parameters: models.WebhookUpdateParameters, callback: ServiceCallback): void; + update(resourceGroupName: string, automationAccountName: string, webhookName: string, parameters: models.WebhookUpdateParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Retrieve a list of webhooks. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -8639,11 +9025,13 @@ export interface WebhookOperations { * * @reject {Error|ServiceError} - The error object. */ - listByAutomationAccountWithHttpOperationResponse(automationAccountName: string, options?: { filter? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; + listByAutomationAccountWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, options?: { filter? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieve a list of webhooks. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -8675,9 +9063,9 @@ export interface WebhookOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listByAutomationAccount(automationAccountName: string, options?: { filter? : string, customHeaders? : { [headerName: string]: string; } }): Promise; - listByAutomationAccount(automationAccountName: string, callback: ServiceCallback): void; - listByAutomationAccount(automationAccountName: string, options: { filter? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listByAutomationAccount(resourceGroupName: string, automationAccountName: string, options?: { filter? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + listByAutomationAccount(resourceGroupName: string, automationAccountName: string, callback: ServiceCallback): void; + listByAutomationAccount(resourceGroupName: string, automationAccountName: string, options: { filter? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -8749,6 +9137,10 @@ export interface SoftwareUpdateConfigurations { /** * Create a new software update configuration with the name given in the URI. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {string} softwareUpdateConfigurationName The name of the software * update configuration to be created. * @@ -8858,6 +9250,9 @@ export interface SoftwareUpdateConfigurations { * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -8867,11 +9262,15 @@ export interface SoftwareUpdateConfigurations { * * @reject {Error|ServiceError} - The error object. */ - createWithHttpOperationResponse(softwareUpdateConfigurationName: string, parameters: models.SoftwareUpdateConfiguration, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + createWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, softwareUpdateConfigurationName: string, parameters: models.SoftwareUpdateConfiguration, options?: { clientRequestId? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Create a new software update configuration with the name given in the URI. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {string} softwareUpdateConfigurationName The name of the software * update configuration to be created. * @@ -8981,6 +9380,9 @@ export interface SoftwareUpdateConfigurations { * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -9007,19 +9409,26 @@ export interface SoftwareUpdateConfigurations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - create(softwareUpdateConfigurationName: string, parameters: models.SoftwareUpdateConfiguration, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - create(softwareUpdateConfigurationName: string, parameters: models.SoftwareUpdateConfiguration, callback: ServiceCallback): void; - create(softwareUpdateConfigurationName: string, parameters: models.SoftwareUpdateConfiguration, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + create(resourceGroupName: string, automationAccountName: string, softwareUpdateConfigurationName: string, parameters: models.SoftwareUpdateConfiguration, options?: { clientRequestId? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + create(resourceGroupName: string, automationAccountName: string, softwareUpdateConfigurationName: string, parameters: models.SoftwareUpdateConfiguration, callback: ServiceCallback): void; + create(resourceGroupName: string, automationAccountName: string, softwareUpdateConfigurationName: string, parameters: models.SoftwareUpdateConfiguration, options: { clientRequestId? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Get a single software update configuration by name. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {string} softwareUpdateConfigurationName The name of the software * update configuration to be created. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -9029,16 +9438,23 @@ export interface SoftwareUpdateConfigurations { * * @reject {Error|ServiceError} - The error object. */ - getByNameWithHttpOperationResponse(softwareUpdateConfigurationName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getByNameWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, softwareUpdateConfigurationName: string, options?: { clientRequestId? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Get a single software update configuration by name. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {string} softwareUpdateConfigurationName The name of the software * update configuration to be created. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -9065,19 +9481,26 @@ export interface SoftwareUpdateConfigurations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - getByName(softwareUpdateConfigurationName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - getByName(softwareUpdateConfigurationName: string, callback: ServiceCallback): void; - getByName(softwareUpdateConfigurationName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + getByName(resourceGroupName: string, automationAccountName: string, softwareUpdateConfigurationName: string, options?: { clientRequestId? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + getByName(resourceGroupName: string, automationAccountName: string, softwareUpdateConfigurationName: string, callback: ServiceCallback): void; + getByName(resourceGroupName: string, automationAccountName: string, softwareUpdateConfigurationName: string, options: { clientRequestId? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * delete a specific software update configuration. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {string} softwareUpdateConfigurationName The name of the software * update configuration to be created. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -9087,16 +9510,23 @@ export interface SoftwareUpdateConfigurations { * * @reject {Error|ServiceError} - The error object. */ - deleteMethodWithHttpOperationResponse(softwareUpdateConfigurationName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + deleteMethodWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, softwareUpdateConfigurationName: string, options?: { clientRequestId? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; /** * delete a specific software update configuration. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {string} softwareUpdateConfigurationName The name of the software * update configuration to be created. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -9121,16 +9551,23 @@ export interface SoftwareUpdateConfigurations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(softwareUpdateConfigurationName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - deleteMethod(softwareUpdateConfigurationName: string, callback: ServiceCallback): void; - deleteMethod(softwareUpdateConfigurationName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, automationAccountName: string, softwareUpdateConfigurationName: string, options?: { clientRequestId? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + deleteMethod(resourceGroupName: string, automationAccountName: string, softwareUpdateConfigurationName: string, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, automationAccountName: string, softwareUpdateConfigurationName: string, options: { clientRequestId? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Get all software update configurations for the account. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {string} [options.filter] The filter to apply on the operation. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -9142,13 +9579,20 @@ export interface SoftwareUpdateConfigurations { * * @reject {Error|ServiceError} - The error object. */ - listWithHttpOperationResponse(options?: { filter? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; + listWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, options?: { clientRequestId? : string, filter? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Get all software update configurations for the account. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {string} [options.filter] The filter to apply on the operation. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -9177,9 +9621,9 @@ export interface SoftwareUpdateConfigurations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - list(options?: { filter? : string, customHeaders? : { [headerName: string]: string; } }): Promise; - list(callback: ServiceCallback): void; - list(options: { filter? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + list(resourceGroupName: string, automationAccountName: string, options?: { clientRequestId? : string, filter? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + list(resourceGroupName: string, automationAccountName: string, callback: ServiceCallback): void; + list(resourceGroupName: string, automationAccountName: string, options: { clientRequestId? : string, filter? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; } /** @@ -9194,11 +9638,18 @@ export interface SoftwareUpdateConfigurationRuns { /** * Get a single software update configuration Run by Id. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {uuid} softwareUpdateConfigurationRunId The Id of the software update * configuration run. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -9208,16 +9659,23 @@ export interface SoftwareUpdateConfigurationRuns { * * @reject {Error|ServiceError} - The error object. */ - getByIdWithHttpOperationResponse(softwareUpdateConfigurationRunId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getByIdWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, softwareUpdateConfigurationRunId: string, options?: { clientRequestId? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Get a single software update configuration Run by Id. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {uuid} softwareUpdateConfigurationRunId The Id of the software update * configuration run. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -9244,16 +9702,23 @@ export interface SoftwareUpdateConfigurationRuns { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - getById(softwareUpdateConfigurationRunId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - getById(softwareUpdateConfigurationRunId: string, callback: ServiceCallback): void; - getById(softwareUpdateConfigurationRunId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + getById(resourceGroupName: string, automationAccountName: string, softwareUpdateConfigurationRunId: string, options?: { clientRequestId? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + getById(resourceGroupName: string, automationAccountName: string, softwareUpdateConfigurationRunId: string, callback: ServiceCallback): void; + getById(resourceGroupName: string, automationAccountName: string, softwareUpdateConfigurationRunId: string, options: { clientRequestId? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Return list of software update configuration runs * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {string} [options.filter] The filter to apply on the operation. You * can use the following filters: 'properties/osType', 'properties/status', * 'properties/startTime', and 'properties/softwareUpdateConfiguration/name' @@ -9273,13 +9738,20 @@ export interface SoftwareUpdateConfigurationRuns { * * @reject {Error|ServiceError} - The error object. */ - listWithHttpOperationResponse(options?: { filter? : string, skip? : string, top? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; + listWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, options?: { clientRequestId? : string, filter? : string, skip? : string, top? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Return list of software update configuration runs * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {string} [options.filter] The filter to apply on the operation. You * can use the following filters: 'properties/osType', 'properties/status', * 'properties/startTime', and 'properties/softwareUpdateConfiguration/name' @@ -9316,9 +9788,9 @@ export interface SoftwareUpdateConfigurationRuns { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - list(options?: { filter? : string, skip? : string, top? : string, customHeaders? : { [headerName: string]: string; } }): Promise; - list(callback: ServiceCallback): void; - list(options: { filter? : string, skip? : string, top? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + list(resourceGroupName: string, automationAccountName: string, options?: { clientRequestId? : string, filter? : string, skip? : string, top? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + list(resourceGroupName: string, automationAccountName: string, callback: ServiceCallback): void; + list(resourceGroupName: string, automationAccountName: string, options: { clientRequestId? : string, filter? : string, skip? : string, top? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; } /** @@ -9333,11 +9805,18 @@ export interface SoftwareUpdateConfigurationMachineRuns { /** * Get a single software update configuration machine run by Id. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {uuid} softwareUpdateConfigurationMachineRunId The Id of the software * update configuration machine run. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -9347,16 +9826,23 @@ export interface SoftwareUpdateConfigurationMachineRuns { * * @reject {Error|ServiceError} - The error object. */ - getByIdWithHttpOperationResponse(softwareUpdateConfigurationMachineRunId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getByIdWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, softwareUpdateConfigurationMachineRunId: string, options?: { clientRequestId? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Get a single software update configuration machine run by Id. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {uuid} softwareUpdateConfigurationMachineRunId The Id of the software * update configuration machine run. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -9383,16 +9869,23 @@ export interface SoftwareUpdateConfigurationMachineRuns { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - getById(softwareUpdateConfigurationMachineRunId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - getById(softwareUpdateConfigurationMachineRunId: string, callback: ServiceCallback): void; - getById(softwareUpdateConfigurationMachineRunId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + getById(resourceGroupName: string, automationAccountName: string, softwareUpdateConfigurationMachineRunId: string, options?: { clientRequestId? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + getById(resourceGroupName: string, automationAccountName: string, softwareUpdateConfigurationMachineRunId: string, callback: ServiceCallback): void; + getById(resourceGroupName: string, automationAccountName: string, softwareUpdateConfigurationMachineRunId: string, options: { clientRequestId? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Return list of software update configuration machine runs * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {string} [options.filter] The filter to apply on the operation. You * can use the following filters: 'properties/osType', 'properties/status', * 'properties/startTime', and 'properties/softwareUpdateConfiguration/name' @@ -9412,13 +9905,20 @@ export interface SoftwareUpdateConfigurationMachineRuns { * * @reject {Error|ServiceError} - The error object. */ - listWithHttpOperationResponse(options?: { filter? : string, skip? : string, top? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; + listWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, options?: { clientRequestId? : string, filter? : string, skip? : string, top? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Return list of software update configuration machine runs * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {string} [options.filter] The filter to apply on the operation. You * can use the following filters: 'properties/osType', 'properties/status', * 'properties/startTime', and 'properties/softwareUpdateConfiguration/name' @@ -9456,9 +9956,9 @@ export interface SoftwareUpdateConfigurationMachineRuns { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - list(options?: { filter? : string, skip? : string, top? : string, customHeaders? : { [headerName: string]: string; } }): Promise; - list(callback: ServiceCallback): void; - list(options: { filter? : string, skip? : string, top? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + list(resourceGroupName: string, automationAccountName: string, options?: { clientRequestId? : string, filter? : string, skip? : string, top? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + list(resourceGroupName: string, automationAccountName: string, callback: ServiceCallback): void; + list(resourceGroupName: string, automationAccountName: string, options: { clientRequestId? : string, filter? : string, skip? : string, top? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; } /** @@ -9473,6 +9973,8 @@ export interface SourceControlOperations { /** * Create a source control. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} sourceControlName The source control name. @@ -9516,11 +10018,13 @@ export interface SourceControlOperations { * * @reject {Error|ServiceError} - The error object. */ - createOrUpdateWithHttpOperationResponse(automationAccountName: string, sourceControlName: string, parameters: models.SourceControlCreateOrUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + createOrUpdateWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, sourceControlName: string, parameters: models.SourceControlCreateOrUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Create a source control. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} sourceControlName The source control name. @@ -9580,14 +10084,16 @@ export interface SourceControlOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - createOrUpdate(automationAccountName: string, sourceControlName: string, parameters: models.SourceControlCreateOrUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - createOrUpdate(automationAccountName: string, sourceControlName: string, parameters: models.SourceControlCreateOrUpdateParameters, callback: ServiceCallback): void; - createOrUpdate(automationAccountName: string, sourceControlName: string, parameters: models.SourceControlCreateOrUpdateParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, automationAccountName: string, sourceControlName: string, parameters: models.SourceControlCreateOrUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + createOrUpdate(resourceGroupName: string, automationAccountName: string, sourceControlName: string, parameters: models.SourceControlCreateOrUpdateParameters, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, automationAccountName: string, sourceControlName: string, parameters: models.SourceControlCreateOrUpdateParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Update a source control. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} sourceControlName The source control name. @@ -9624,11 +10130,13 @@ export interface SourceControlOperations { * * @reject {Error|ServiceError} - The error object. */ - updateWithHttpOperationResponse(automationAccountName: string, sourceControlName: string, parameters: models.SourceControlUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + updateWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, sourceControlName: string, parameters: models.SourceControlUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Update a source control. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} sourceControlName The source control name. @@ -9681,14 +10189,16 @@ export interface SourceControlOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - update(automationAccountName: string, sourceControlName: string, parameters: models.SourceControlUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - update(automationAccountName: string, sourceControlName: string, parameters: models.SourceControlUpdateParameters, callback: ServiceCallback): void; - update(automationAccountName: string, sourceControlName: string, parameters: models.SourceControlUpdateParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + update(resourceGroupName: string, automationAccountName: string, sourceControlName: string, parameters: models.SourceControlUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + update(resourceGroupName: string, automationAccountName: string, sourceControlName: string, parameters: models.SourceControlUpdateParameters, callback: ServiceCallback): void; + update(resourceGroupName: string, automationAccountName: string, sourceControlName: string, parameters: models.SourceControlUpdateParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Delete the source control. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} sourceControlName The name of source control. @@ -9704,11 +10214,13 @@ export interface SourceControlOperations { * * @reject {Error|ServiceError} - The error object. */ - deleteMethodWithHttpOperationResponse(automationAccountName: string, sourceControlName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + deleteMethodWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, sourceControlName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Delete the source control. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} sourceControlName The name of source control. @@ -9739,14 +10251,16 @@ export interface SourceControlOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(automationAccountName: string, sourceControlName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - deleteMethod(automationAccountName: string, sourceControlName: string, callback: ServiceCallback): void; - deleteMethod(automationAccountName: string, sourceControlName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, automationAccountName: string, sourceControlName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + deleteMethod(resourceGroupName: string, automationAccountName: string, sourceControlName: string, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, automationAccountName: string, sourceControlName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Retrieve the source control identified by source control name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} sourceControlName The name of source control. @@ -9762,11 +10276,13 @@ export interface SourceControlOperations { * * @reject {Error|ServiceError} - The error object. */ - getWithHttpOperationResponse(automationAccountName: string, sourceControlName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, sourceControlName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieve the source control identified by source control name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} sourceControlName The name of source control. @@ -9798,14 +10314,16 @@ export interface SourceControlOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - get(automationAccountName: string, sourceControlName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - get(automationAccountName: string, sourceControlName: string, callback: ServiceCallback): void; - get(automationAccountName: string, sourceControlName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + get(resourceGroupName: string, automationAccountName: string, sourceControlName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + get(resourceGroupName: string, automationAccountName: string, sourceControlName: string, callback: ServiceCallback): void; + get(resourceGroupName: string, automationAccountName: string, sourceControlName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Retrieve a list of source controls. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -9821,11 +10339,13 @@ export interface SourceControlOperations { * * @reject {Error|ServiceError} - The error object. */ - listByAutomationAccountWithHttpOperationResponse(automationAccountName: string, options?: { filter? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; + listByAutomationAccountWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, options?: { filter? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieve a list of source controls. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -9858,9 +10378,9 @@ export interface SourceControlOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listByAutomationAccount(automationAccountName: string, options?: { filter? : string, customHeaders? : { [headerName: string]: string; } }): Promise; - listByAutomationAccount(automationAccountName: string, callback: ServiceCallback): void; - listByAutomationAccount(automationAccountName: string, options: { filter? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listByAutomationAccount(resourceGroupName: string, automationAccountName: string, options?: { filter? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + listByAutomationAccount(resourceGroupName: string, automationAccountName: string, callback: ServiceCallback): void; + listByAutomationAccount(resourceGroupName: string, automationAccountName: string, options: { filter? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -9933,6 +10453,8 @@ export interface SourceControlSyncJobOperations { /** * Creates the sync job for a source control. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} sourceControlName The source control name. @@ -9950,11 +10472,13 @@ export interface SourceControlSyncJobOperations { * * @reject {Error|ServiceError} - The error object. */ - createWithHttpOperationResponse(automationAccountName: string, sourceControlName: string, sourceControlSyncJobId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + createWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, sourceControlName: string, sourceControlSyncJobId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Creates the sync job for a source control. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} sourceControlName The source control name. @@ -9988,14 +10512,16 @@ export interface SourceControlSyncJobOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - create(automationAccountName: string, sourceControlName: string, sourceControlSyncJobId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - create(automationAccountName: string, sourceControlName: string, sourceControlSyncJobId: string, callback: ServiceCallback): void; - create(automationAccountName: string, sourceControlName: string, sourceControlSyncJobId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + create(resourceGroupName: string, automationAccountName: string, sourceControlName: string, sourceControlSyncJobId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + create(resourceGroupName: string, automationAccountName: string, sourceControlName: string, sourceControlSyncJobId: string, callback: ServiceCallback): void; + create(resourceGroupName: string, automationAccountName: string, sourceControlName: string, sourceControlSyncJobId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Retrieve the source control sync job identified by job id. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} sourceControlName The source control name. @@ -10013,11 +10539,13 @@ export interface SourceControlSyncJobOperations { * * @reject {Error|ServiceError} - The error object. */ - getWithHttpOperationResponse(automationAccountName: string, sourceControlName: string, sourceControlSyncJobId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, sourceControlName: string, sourceControlSyncJobId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieve the source control sync job identified by job id. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} sourceControlName The source control name. @@ -10052,14 +10580,16 @@ export interface SourceControlSyncJobOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - get(automationAccountName: string, sourceControlName: string, sourceControlSyncJobId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - get(automationAccountName: string, sourceControlName: string, sourceControlSyncJobId: string, callback: ServiceCallback): void; - get(automationAccountName: string, sourceControlName: string, sourceControlSyncJobId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + get(resourceGroupName: string, automationAccountName: string, sourceControlName: string, sourceControlSyncJobId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + get(resourceGroupName: string, automationAccountName: string, sourceControlName: string, sourceControlSyncJobId: string, callback: ServiceCallback): void; + get(resourceGroupName: string, automationAccountName: string, sourceControlName: string, sourceControlSyncJobId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Retrieve a list of source control sync jobs. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} sourceControlName The source control name. @@ -10077,11 +10607,13 @@ export interface SourceControlSyncJobOperations { * * @reject {Error|ServiceError} - The error object. */ - listByAutomationAccountWithHttpOperationResponse(automationAccountName: string, sourceControlName: string, options?: { filter? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; + listByAutomationAccountWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, sourceControlName: string, options?: { filter? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieve a list of source control sync jobs. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} sourceControlName The source control name. @@ -10116,9 +10648,9 @@ export interface SourceControlSyncJobOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listByAutomationAccount(automationAccountName: string, sourceControlName: string, options?: { filter? : string, customHeaders? : { [headerName: string]: string; } }): Promise; - listByAutomationAccount(automationAccountName: string, sourceControlName: string, callback: ServiceCallback): void; - listByAutomationAccount(automationAccountName: string, sourceControlName: string, options: { filter? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listByAutomationAccount(resourceGroupName: string, automationAccountName: string, sourceControlName: string, options?: { filter? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + listByAutomationAccount(resourceGroupName: string, automationAccountName: string, sourceControlName: string, callback: ServiceCallback): void; + listByAutomationAccount(resourceGroupName: string, automationAccountName: string, sourceControlName: string, options: { filter? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -10191,10 +10723,17 @@ export interface JobOperations { /** * Retrieve the job output identified by job name. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {string} jobName The name of the job to be created. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -10204,15 +10743,22 @@ export interface JobOperations { * * @reject {Error|ServiceError} - The error object. */ - getOutputWithHttpOperationResponse(jobName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getOutputWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, jobName: string, options?: { clientRequestId? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieve the job output identified by job name. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {string} jobName The name of the job to be created. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -10237,18 +10783,25 @@ export interface JobOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - getOutput(jobName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - getOutput(jobName: string, callback: ServiceCallback): void; - getOutput(jobName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + getOutput(resourceGroupName: string, automationAccountName: string, jobName: string, options?: { clientRequestId? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + getOutput(resourceGroupName: string, automationAccountName: string, jobName: string, callback: ServiceCallback): void; + getOutput(resourceGroupName: string, automationAccountName: string, jobName: string, options: { clientRequestId? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Retrieve the runbook content of the job identified by job name. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {string} jobName The job name. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -10258,15 +10811,22 @@ export interface JobOperations { * * @reject {Error|ServiceError} - The error object. */ - getRunbookContentWithHttpOperationResponse(jobName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getRunbookContentWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, jobName: string, options?: { clientRequestId? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieve the runbook content of the job identified by job name. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {string} jobName The job name. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -10291,18 +10851,25 @@ export interface JobOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - getRunbookContent(jobName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - getRunbookContent(jobName: string, callback: ServiceCallback): void; - getRunbookContent(jobName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + getRunbookContent(resourceGroupName: string, automationAccountName: string, jobName: string, options?: { clientRequestId? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + getRunbookContent(resourceGroupName: string, automationAccountName: string, jobName: string, callback: ServiceCallback): void; + getRunbookContent(resourceGroupName: string, automationAccountName: string, jobName: string, options: { clientRequestId? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Suspend the job identified by job name. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {string} jobName The job name. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -10312,15 +10879,22 @@ export interface JobOperations { * * @reject {Error|ServiceError} - The error object. */ - suspendWithHttpOperationResponse(jobName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + suspendWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, jobName: string, options?: { clientRequestId? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Suspend the job identified by job name. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {string} jobName The job name. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -10345,18 +10919,25 @@ export interface JobOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - suspend(jobName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - suspend(jobName: string, callback: ServiceCallback): void; - suspend(jobName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + suspend(resourceGroupName: string, automationAccountName: string, jobName: string, options?: { clientRequestId? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + suspend(resourceGroupName: string, automationAccountName: string, jobName: string, callback: ServiceCallback): void; + suspend(resourceGroupName: string, automationAccountName: string, jobName: string, options: { clientRequestId? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Stop the job identified by jobName. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {string} jobName The job name. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -10366,15 +10947,22 @@ export interface JobOperations { * * @reject {Error|ServiceError} - The error object. */ - stopWithHttpOperationResponse(jobName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + stopWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, jobName: string, options?: { clientRequestId? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Stop the job identified by jobName. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {string} jobName The job name. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -10399,18 +10987,25 @@ export interface JobOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - stop(jobName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - stop(jobName: string, callback: ServiceCallback): void; - stop(jobName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + stop(resourceGroupName: string, automationAccountName: string, jobName: string, options?: { clientRequestId? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + stop(resourceGroupName: string, automationAccountName: string, jobName: string, callback: ServiceCallback): void; + stop(resourceGroupName: string, automationAccountName: string, jobName: string, options: { clientRequestId? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Retrieve the job identified by job name. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {string} jobName The job name. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -10420,15 +11015,22 @@ export interface JobOperations { * * @reject {Error|ServiceError} - The error object. */ - getWithHttpOperationResponse(jobName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, jobName: string, options?: { clientRequestId? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieve the job identified by job name. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {string} jobName The job name. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -10454,14 +11056,18 @@ export interface JobOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - get(jobName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - get(jobName: string, callback: ServiceCallback): void; - get(jobName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + get(resourceGroupName: string, automationAccountName: string, jobName: string, options?: { clientRequestId? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + get(resourceGroupName: string, automationAccountName: string, jobName: string, callback: ServiceCallback): void; + get(resourceGroupName: string, automationAccountName: string, jobName: string, options: { clientRequestId? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Create a job of the runbook. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {string} jobName The job name. * * @param {object} parameters The parameters supplied to the create job @@ -10480,6 +11086,9 @@ export interface JobOperations { * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -10489,11 +11098,15 @@ export interface JobOperations { * * @reject {Error|ServiceError} - The error object. */ - createWithHttpOperationResponse(jobName: string, parameters: models.JobCreateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + createWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, jobName: string, parameters: models.JobCreateParameters, options?: { clientRequestId? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Create a job of the runbook. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {string} jobName The job name. * * @param {object} parameters The parameters supplied to the create job @@ -10512,6 +11125,9 @@ export interface JobOperations { * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -10537,18 +11153,25 @@ export interface JobOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - create(jobName: string, parameters: models.JobCreateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - create(jobName: string, parameters: models.JobCreateParameters, callback: ServiceCallback): void; - create(jobName: string, parameters: models.JobCreateParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + create(resourceGroupName: string, automationAccountName: string, jobName: string, parameters: models.JobCreateParameters, options?: { clientRequestId? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + create(resourceGroupName: string, automationAccountName: string, jobName: string, parameters: models.JobCreateParameters, callback: ServiceCallback): void; + create(resourceGroupName: string, automationAccountName: string, jobName: string, parameters: models.JobCreateParameters, options: { clientRequestId? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Retrieve a list of jobs. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {object} [options] Optional Parameters. * * @param {string} [options.filter] The filter to apply on the operation. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -10558,15 +11181,22 @@ export interface JobOperations { * * @reject {Error|ServiceError} - The error object. */ - listByAutomationAccountWithHttpOperationResponse(options?: { filter? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; + listByAutomationAccountWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, options?: { filter? : string, clientRequestId? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieve a list of jobs. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {object} [options] Optional Parameters. * * @param {string} [options.filter] The filter to apply on the operation. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -10592,18 +11222,25 @@ export interface JobOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listByAutomationAccount(options?: { filter? : string, customHeaders? : { [headerName: string]: string; } }): Promise; - listByAutomationAccount(callback: ServiceCallback): void; - listByAutomationAccount(options: { filter? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listByAutomationAccount(resourceGroupName: string, automationAccountName: string, options?: { filter? : string, clientRequestId? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + listByAutomationAccount(resourceGroupName: string, automationAccountName: string, callback: ServiceCallback): void; + listByAutomationAccount(resourceGroupName: string, automationAccountName: string, options: { filter? : string, clientRequestId? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Resume the job identified by jobName. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {string} jobName The job name. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -10613,15 +11250,22 @@ export interface JobOperations { * * @reject {Error|ServiceError} - The error object. */ - resumeWithHttpOperationResponse(jobName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + resumeWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, jobName: string, options?: { clientRequestId? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Resume the job identified by jobName. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {string} jobName The job name. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -10646,9 +11290,9 @@ export interface JobOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - resume(jobName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - resume(jobName: string, callback: ServiceCallback): void; - resume(jobName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + resume(resourceGroupName: string, automationAccountName: string, jobName: string, options?: { clientRequestId? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + resume(resourceGroupName: string, automationAccountName: string, jobName: string, callback: ServiceCallback): void; + resume(resourceGroupName: string, automationAccountName: string, jobName: string, options: { clientRequestId? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -10659,6 +11303,9 @@ export interface JobOperations { * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -10668,7 +11315,7 @@ export interface JobOperations { * * @reject {Error|ServiceError} - The error object. */ - listByAutomationAccountNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listByAutomationAccountNextWithHttpOperationResponse(nextPageLink: string, options?: { clientRequestId? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieve a list of jobs. @@ -10678,6 +11325,9 @@ export interface JobOperations { * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -10703,9 +11353,9 @@ export interface JobOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listByAutomationAccountNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listByAutomationAccountNext(nextPageLink: string, options?: { clientRequestId? : string, customHeaders? : { [headerName: string]: string; } }): Promise; listByAutomationAccountNext(nextPageLink: string, callback: ServiceCallback): void; - listByAutomationAccountNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listByAutomationAccountNext(nextPageLink: string, options: { clientRequestId? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; } /** @@ -10720,12 +11370,19 @@ export interface JobStreamOperations { /** * Retrieve the job stream identified by job stream id. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {string} jobName The job name. * * @param {string} jobStreamId The job stream id. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -10735,17 +11392,24 @@ export interface JobStreamOperations { * * @reject {Error|ServiceError} - The error object. */ - getWithHttpOperationResponse(jobName: string, jobStreamId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, jobName: string, jobStreamId: string, options?: { clientRequestId? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieve the job stream identified by job stream id. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {string} jobName The job name. * * @param {string} jobStreamId The job stream id. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -10771,20 +11435,27 @@ export interface JobStreamOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - get(jobName: string, jobStreamId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - get(jobName: string, jobStreamId: string, callback: ServiceCallback): void; - get(jobName: string, jobStreamId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + get(resourceGroupName: string, automationAccountName: string, jobName: string, jobStreamId: string, options?: { clientRequestId? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + get(resourceGroupName: string, automationAccountName: string, jobName: string, jobStreamId: string, callback: ServiceCallback): void; + get(resourceGroupName: string, automationAccountName: string, jobName: string, jobStreamId: string, options: { clientRequestId? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Retrieve a list of jobs streams identified by job name. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {string} jobName The job name. * * @param {object} [options] Optional Parameters. * * @param {string} [options.filter] The filter to apply on the operation. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -10794,17 +11465,24 @@ export interface JobStreamOperations { * * @reject {Error|ServiceError} - The error object. */ - listByJobWithHttpOperationResponse(jobName: string, options?: { filter? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; + listByJobWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, jobName: string, options?: { filter? : string, clientRequestId? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieve a list of jobs streams identified by job name. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {string} jobName The job name. * * @param {object} [options] Optional Parameters. * * @param {string} [options.filter] The filter to apply on the operation. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -10830,9 +11508,9 @@ export interface JobStreamOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listByJob(jobName: string, options?: { filter? : string, customHeaders? : { [headerName: string]: string; } }): Promise; - listByJob(jobName: string, callback: ServiceCallback): void; - listByJob(jobName: string, options: { filter? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listByJob(resourceGroupName: string, automationAccountName: string, jobName: string, options?: { filter? : string, clientRequestId? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + listByJob(resourceGroupName: string, automationAccountName: string, jobName: string, callback: ServiceCallback): void; + listByJob(resourceGroupName: string, automationAccountName: string, jobName: string, options: { filter? : string, clientRequestId? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -10843,6 +11521,9 @@ export interface JobStreamOperations { * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -10852,7 +11533,7 @@ export interface JobStreamOperations { * * @reject {Error|ServiceError} - The error object. */ - listByJobNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listByJobNextWithHttpOperationResponse(nextPageLink: string, options?: { clientRequestId? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieve a list of jobs streams identified by job name. @@ -10862,6 +11543,9 @@ export interface JobStreamOperations { * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -10887,7 +11571,7 @@ export interface JobStreamOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listByJobNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listByJobNext(nextPageLink: string, options?: { clientRequestId? : string, customHeaders? : { [headerName: string]: string; } }): Promise; listByJobNext(nextPageLink: string, callback: ServiceCallback): void; - listByJobNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listByJobNext(nextPageLink: string, options: { clientRequestId? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; } diff --git a/lib/services/automationManagement/lib/operations/jobOperations.js b/lib/services/automationManagement/lib/operations/jobOperations.js index 05c64386ee..fac6162054 100644 --- a/lib/services/automationManagement/lib/operations/jobOperations.js +++ b/lib/services/automationManagement/lib/operations/jobOperations.js @@ -17,10 +17,17 @@ const WebResource = msRest.WebResource; /** * Retrieve the job output identified by job name. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {string} jobName The name of the job to be created. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -36,7 +43,7 @@ const WebResource = msRest.WebResource; * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _getOutput(jobName, options, callback) { +function _getOutput(resourceGroupName, automationAccountName, jobName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -46,29 +53,30 @@ function _getOutput(jobName, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } + let clientRequestId = (options && options.clientRequestId !== undefined) ? options.clientRequestId : undefined; let apiVersion = '2017-05-15-preview'; // Validate try { if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } - if (this.client.automationAccountName === null || this.client.automationAccountName === undefined || typeof this.client.automationAccountName.valueOf() !== 'string') { - throw new Error('this.client.automationAccountName cannot be null or undefined and it must be of type string.'); + if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { + throw new Error('automationAccountName cannot be null or undefined and it must be of type string.'); } if (jobName === null || jobName === undefined || typeof jobName.valueOf() !== 'string') { throw new Error('jobName cannot be null or undefined and it must be of type string.'); } - if (this.client.clientRequestId !== null && this.client.clientRequestId !== undefined && typeof this.client.clientRequestId.valueOf() !== 'string') { - throw new Error('this.client.clientRequestId must be of type string.'); + if (clientRequestId !== null && clientRequestId !== undefined && typeof clientRequestId.valueOf() !== 'string') { + throw new Error('clientRequestId must be of type string.'); } if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { throw new Error('this.client.acceptLanguage must be of type string.'); @@ -81,8 +89,8 @@ function _getOutput(jobName, options, callback) { let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/jobs/{jobName}/output'; requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); - requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(this.client.automationAccountName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{jobName}', encodeURIComponent(jobName)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); @@ -100,8 +108,8 @@ function _getOutput(jobName, options, callback) { if (this.client.generateClientRequestId) { httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); } - if (this.client.clientRequestId !== undefined && this.client.clientRequestId !== null) { - httpRequest.headers['clientRequestId'] = this.client.clientRequestId; + if (clientRequestId !== undefined && clientRequestId !== null) { + httpRequest.headers['clientRequestId'] = clientRequestId; } if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { httpRequest.headers['accept-language'] = this.client.acceptLanguage; @@ -179,10 +187,17 @@ function _getOutput(jobName, options, callback) { /** * Retrieve the runbook content of the job identified by job name. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {string} jobName The job name. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -198,7 +213,7 @@ function _getOutput(jobName, options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _getRunbookContent(jobName, options, callback) { +function _getRunbookContent(resourceGroupName, automationAccountName, jobName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -208,29 +223,30 @@ function _getRunbookContent(jobName, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } + let clientRequestId = (options && options.clientRequestId !== undefined) ? options.clientRequestId : undefined; let apiVersion = '2017-05-15-preview'; // Validate try { if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } - if (this.client.automationAccountName === null || this.client.automationAccountName === undefined || typeof this.client.automationAccountName.valueOf() !== 'string') { - throw new Error('this.client.automationAccountName cannot be null or undefined and it must be of type string.'); + if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { + throw new Error('automationAccountName cannot be null or undefined and it must be of type string.'); } if (jobName === null || jobName === undefined || typeof jobName.valueOf() !== 'string') { throw new Error('jobName cannot be null or undefined and it must be of type string.'); } - if (this.client.clientRequestId !== null && this.client.clientRequestId !== undefined && typeof this.client.clientRequestId.valueOf() !== 'string') { - throw new Error('this.client.clientRequestId must be of type string.'); + if (clientRequestId !== null && clientRequestId !== undefined && typeof clientRequestId.valueOf() !== 'string') { + throw new Error('clientRequestId must be of type string.'); } if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { throw new Error('this.client.acceptLanguage must be of type string.'); @@ -243,8 +259,8 @@ function _getRunbookContent(jobName, options, callback) { let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/jobs/{jobName}/runbookContent'; requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); - requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(this.client.automationAccountName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{jobName}', encodeURIComponent(jobName)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); @@ -262,8 +278,8 @@ function _getRunbookContent(jobName, options, callback) { if (this.client.generateClientRequestId) { httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); } - if (this.client.clientRequestId !== undefined && this.client.clientRequestId !== null) { - httpRequest.headers['clientRequestId'] = this.client.clientRequestId; + if (clientRequestId !== undefined && clientRequestId !== null) { + httpRequest.headers['clientRequestId'] = clientRequestId; } if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { httpRequest.headers['accept-language'] = this.client.acceptLanguage; @@ -341,10 +357,17 @@ function _getRunbookContent(jobName, options, callback) { /** * Suspend the job identified by job name. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {string} jobName The job name. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -360,7 +383,7 @@ function _getRunbookContent(jobName, options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _suspend(jobName, options, callback) { +function _suspend(resourceGroupName, automationAccountName, jobName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -370,29 +393,30 @@ function _suspend(jobName, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } + let clientRequestId = (options && options.clientRequestId !== undefined) ? options.clientRequestId : undefined; let apiVersion = '2017-05-15-preview'; // Validate try { if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } - if (this.client.automationAccountName === null || this.client.automationAccountName === undefined || typeof this.client.automationAccountName.valueOf() !== 'string') { - throw new Error('this.client.automationAccountName cannot be null or undefined and it must be of type string.'); + if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { + throw new Error('automationAccountName cannot be null or undefined and it must be of type string.'); } if (jobName === null || jobName === undefined || typeof jobName.valueOf() !== 'string') { throw new Error('jobName cannot be null or undefined and it must be of type string.'); } - if (this.client.clientRequestId !== null && this.client.clientRequestId !== undefined && typeof this.client.clientRequestId.valueOf() !== 'string') { - throw new Error('this.client.clientRequestId must be of type string.'); + if (clientRequestId !== null && clientRequestId !== undefined && typeof clientRequestId.valueOf() !== 'string') { + throw new Error('clientRequestId must be of type string.'); } if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { throw new Error('this.client.acceptLanguage must be of type string.'); @@ -405,8 +429,8 @@ function _suspend(jobName, options, callback) { let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/jobs/{jobName}/suspend'; requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); - requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(this.client.automationAccountName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{jobName}', encodeURIComponent(jobName)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); @@ -424,8 +448,8 @@ function _suspend(jobName, options, callback) { if (this.client.generateClientRequestId) { httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); } - if (this.client.clientRequestId !== undefined && this.client.clientRequestId !== null) { - httpRequest.headers['clientRequestId'] = this.client.clientRequestId; + if (clientRequestId !== undefined && clientRequestId !== null) { + httpRequest.headers['clientRequestId'] = clientRequestId; } if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { httpRequest.headers['accept-language'] = this.client.acceptLanguage; @@ -481,10 +505,17 @@ function _suspend(jobName, options, callback) { /** * Stop the job identified by jobName. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {string} jobName The job name. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -500,7 +531,7 @@ function _suspend(jobName, options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _stop(jobName, options, callback) { +function _stop(resourceGroupName, automationAccountName, jobName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -510,20 +541,21 @@ function _stop(jobName, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } + let clientRequestId = (options && options.clientRequestId !== undefined) ? options.clientRequestId : undefined; let apiVersion = '2017-05-15-preview'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } - if (this.client.automationAccountName === null || this.client.automationAccountName === undefined || typeof this.client.automationAccountName.valueOf() !== 'string') { - throw new Error('this.client.automationAccountName cannot be null or undefined and it must be of type string.'); + if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { + throw new Error('automationAccountName cannot be null or undefined and it must be of type string.'); } if (jobName === null || jobName === undefined || typeof jobName.valueOf() !== 'string') { throw new Error('jobName cannot be null or undefined and it must be of type string.'); @@ -531,8 +563,8 @@ function _stop(jobName, options, callback) { if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); } - if (this.client.clientRequestId !== null && this.client.clientRequestId !== undefined && typeof this.client.clientRequestId.valueOf() !== 'string') { - throw new Error('this.client.clientRequestId must be of type string.'); + if (clientRequestId !== null && clientRequestId !== undefined && typeof clientRequestId.valueOf() !== 'string') { + throw new Error('clientRequestId must be of type string.'); } if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { throw new Error('this.client.acceptLanguage must be of type string.'); @@ -544,8 +576,8 @@ function _stop(jobName, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/jobs/{jobName}/stop'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); - requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(this.client.automationAccountName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{jobName}', encodeURIComponent(jobName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; @@ -564,8 +596,8 @@ function _stop(jobName, options, callback) { if (this.client.generateClientRequestId) { httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); } - if (this.client.clientRequestId !== undefined && this.client.clientRequestId !== null) { - httpRequest.headers['clientRequestId'] = this.client.clientRequestId; + if (clientRequestId !== undefined && clientRequestId !== null) { + httpRequest.headers['clientRequestId'] = clientRequestId; } if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { httpRequest.headers['accept-language'] = this.client.acceptLanguage; @@ -621,10 +653,17 @@ function _stop(jobName, options, callback) { /** * Retrieve the job identified by job name. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {string} jobName The job name. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -641,7 +680,7 @@ function _stop(jobName, options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _get(jobName, options, callback) { +function _get(resourceGroupName, automationAccountName, jobName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -651,29 +690,30 @@ function _get(jobName, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } + let clientRequestId = (options && options.clientRequestId !== undefined) ? options.clientRequestId : undefined; let apiVersion = '2017-05-15-preview'; // Validate try { if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } - if (this.client.automationAccountName === null || this.client.automationAccountName === undefined || typeof this.client.automationAccountName.valueOf() !== 'string') { - throw new Error('this.client.automationAccountName cannot be null or undefined and it must be of type string.'); + if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { + throw new Error('automationAccountName cannot be null or undefined and it must be of type string.'); } if (jobName === null || jobName === undefined || typeof jobName.valueOf() !== 'string') { throw new Error('jobName cannot be null or undefined and it must be of type string.'); } - if (this.client.clientRequestId !== null && this.client.clientRequestId !== undefined && typeof this.client.clientRequestId.valueOf() !== 'string') { - throw new Error('this.client.clientRequestId must be of type string.'); + if (clientRequestId !== null && clientRequestId !== undefined && typeof clientRequestId.valueOf() !== 'string') { + throw new Error('clientRequestId must be of type string.'); } if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { throw new Error('this.client.acceptLanguage must be of type string.'); @@ -686,8 +726,8 @@ function _get(jobName, options, callback) { let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/jobs/{jobName}'; requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); - requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(this.client.automationAccountName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{jobName}', encodeURIComponent(jobName)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); @@ -705,8 +745,8 @@ function _get(jobName, options, callback) { if (this.client.generateClientRequestId) { httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); } - if (this.client.clientRequestId !== undefined && this.client.clientRequestId !== null) { - httpRequest.headers['clientRequestId'] = this.client.clientRequestId; + if (clientRequestId !== undefined && clientRequestId !== null) { + httpRequest.headers['clientRequestId'] = clientRequestId; } if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { httpRequest.headers['accept-language'] = this.client.acceptLanguage; @@ -779,6 +819,10 @@ function _get(jobName, options, callback) { /** * Create a job of the runbook. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {string} jobName The job name. * * @param {object} parameters The parameters supplied to the create job @@ -797,6 +841,9 @@ function _get(jobName, options, callback) { * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -813,7 +860,7 @@ function _get(jobName, options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _create(jobName, parameters, options, callback) { +function _create(resourceGroupName, automationAccountName, jobName, parameters, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -823,23 +870,24 @@ function _create(jobName, parameters, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } + let clientRequestId = (options && options.clientRequestId !== undefined) ? options.clientRequestId : undefined; let apiVersion = '2017-05-15-preview'; // Validate try { if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } - if (this.client.automationAccountName === null || this.client.automationAccountName === undefined || typeof this.client.automationAccountName.valueOf() !== 'string') { - throw new Error('this.client.automationAccountName cannot be null or undefined and it must be of type string.'); + if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { + throw new Error('automationAccountName cannot be null or undefined and it must be of type string.'); } if (jobName === null || jobName === undefined || typeof jobName.valueOf() !== 'string') { throw new Error('jobName cannot be null or undefined and it must be of type string.'); @@ -847,8 +895,8 @@ function _create(jobName, parameters, options, callback) { if (parameters === null || parameters === undefined) { throw new Error('parameters cannot be null or undefined.'); } - if (this.client.clientRequestId !== null && this.client.clientRequestId !== undefined && typeof this.client.clientRequestId.valueOf() !== 'string') { - throw new Error('this.client.clientRequestId must be of type string.'); + if (clientRequestId !== null && clientRequestId !== undefined && typeof clientRequestId.valueOf() !== 'string') { + throw new Error('clientRequestId must be of type string.'); } if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { throw new Error('this.client.acceptLanguage must be of type string.'); @@ -861,8 +909,8 @@ function _create(jobName, parameters, options, callback) { let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/jobs/{jobName}'; requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); - requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(this.client.automationAccountName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{jobName}', encodeURIComponent(jobName)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); @@ -880,8 +928,8 @@ function _create(jobName, parameters, options, callback) { if (this.client.generateClientRequestId) { httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); } - if (this.client.clientRequestId !== undefined && this.client.clientRequestId !== null) { - httpRequest.headers['clientRequestId'] = this.client.clientRequestId; + if (clientRequestId !== undefined && clientRequestId !== null) { + httpRequest.headers['clientRequestId'] = clientRequestId; } if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { httpRequest.headers['accept-language'] = this.client.acceptLanguage; @@ -968,10 +1016,17 @@ function _create(jobName, parameters, options, callback) { /** * Retrieve a list of jobs. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {object} [options] Optional Parameters. * * @param {string} [options.filter] The filter to apply on the operation. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -988,7 +1043,7 @@ function _create(jobName, parameters, options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _listByAutomationAccount(options, callback) { +function _listByAutomationAccount(resourceGroupName, automationAccountName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -999,20 +1054,21 @@ function _listByAutomationAccount(options, callback) { throw new Error('callback cannot be null.'); } let filter = (options && options.filter !== undefined) ? options.filter : undefined; + let clientRequestId = (options && options.clientRequestId !== undefined) ? options.clientRequestId : undefined; let apiVersion = '2017-05-15-preview'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } - if (this.client.automationAccountName === null || this.client.automationAccountName === undefined || typeof this.client.automationAccountName.valueOf() !== 'string') { - throw new Error('this.client.automationAccountName cannot be null or undefined and it must be of type string.'); + if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { + throw new Error('automationAccountName cannot be null or undefined and it must be of type string.'); } if (filter !== null && filter !== undefined && typeof filter.valueOf() !== 'string') { throw new Error('filter must be of type string.'); @@ -1020,8 +1076,8 @@ function _listByAutomationAccount(options, callback) { if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); } - if (this.client.clientRequestId !== null && this.client.clientRequestId !== undefined && typeof this.client.clientRequestId.valueOf() !== 'string') { - throw new Error('this.client.clientRequestId must be of type string.'); + if (clientRequestId !== null && clientRequestId !== undefined && typeof clientRequestId.valueOf() !== 'string') { + throw new Error('clientRequestId must be of type string.'); } if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { throw new Error('this.client.acceptLanguage must be of type string.'); @@ -1033,8 +1089,8 @@ function _listByAutomationAccount(options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/jobs'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); - requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(this.client.automationAccountName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; if (filter !== null && filter !== undefined) { @@ -1055,8 +1111,8 @@ function _listByAutomationAccount(options, callback) { if (this.client.generateClientRequestId) { httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); } - if (this.client.clientRequestId !== undefined && this.client.clientRequestId !== null) { - httpRequest.headers['clientRequestId'] = this.client.clientRequestId; + if (clientRequestId !== undefined && clientRequestId !== null) { + httpRequest.headers['clientRequestId'] = clientRequestId; } if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { httpRequest.headers['accept-language'] = this.client.acceptLanguage; @@ -1129,10 +1185,17 @@ function _listByAutomationAccount(options, callback) { /** * Resume the job identified by jobName. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {string} jobName The job name. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -1148,7 +1211,7 @@ function _listByAutomationAccount(options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _resume(jobName, options, callback) { +function _resume(resourceGroupName, automationAccountName, jobName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -1158,20 +1221,21 @@ function _resume(jobName, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } + let clientRequestId = (options && options.clientRequestId !== undefined) ? options.clientRequestId : undefined; let apiVersion = '2017-05-15-preview'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } - if (this.client.automationAccountName === null || this.client.automationAccountName === undefined || typeof this.client.automationAccountName.valueOf() !== 'string') { - throw new Error('this.client.automationAccountName cannot be null or undefined and it must be of type string.'); + if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { + throw new Error('automationAccountName cannot be null or undefined and it must be of type string.'); } if (jobName === null || jobName === undefined || typeof jobName.valueOf() !== 'string') { throw new Error('jobName cannot be null or undefined and it must be of type string.'); @@ -1179,8 +1243,8 @@ function _resume(jobName, options, callback) { if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); } - if (this.client.clientRequestId !== null && this.client.clientRequestId !== undefined && typeof this.client.clientRequestId.valueOf() !== 'string') { - throw new Error('this.client.clientRequestId must be of type string.'); + if (clientRequestId !== null && clientRequestId !== undefined && typeof clientRequestId.valueOf() !== 'string') { + throw new Error('clientRequestId must be of type string.'); } if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { throw new Error('this.client.acceptLanguage must be of type string.'); @@ -1192,8 +1256,8 @@ function _resume(jobName, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/jobs/{jobName}/resume'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); - requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(this.client.automationAccountName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{jobName}', encodeURIComponent(jobName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; @@ -1212,8 +1276,8 @@ function _resume(jobName, options, callback) { if (this.client.generateClientRequestId) { httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); } - if (this.client.clientRequestId !== undefined && this.client.clientRequestId !== null) { - httpRequest.headers['clientRequestId'] = this.client.clientRequestId; + if (clientRequestId !== undefined && clientRequestId !== null) { + httpRequest.headers['clientRequestId'] = clientRequestId; } if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { httpRequest.headers['accept-language'] = this.client.acceptLanguage; @@ -1274,6 +1338,9 @@ function _resume(jobName, options, callback) { * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -1300,13 +1367,14 @@ function _listByAutomationAccountNext(nextPageLink, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } + let clientRequestId = (options && options.clientRequestId !== undefined) ? options.clientRequestId : undefined; // Validate try { if (nextPageLink === null || nextPageLink === undefined || typeof nextPageLink.valueOf() !== 'string') { throw new Error('nextPageLink cannot be null or undefined and it must be of type string.'); } - if (this.client.clientRequestId !== null && this.client.clientRequestId !== undefined && typeof this.client.clientRequestId.valueOf() !== 'string') { - throw new Error('this.client.clientRequestId must be of type string.'); + if (clientRequestId !== null && clientRequestId !== undefined && typeof clientRequestId.valueOf() !== 'string') { + throw new Error('clientRequestId must be of type string.'); } if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { throw new Error('this.client.acceptLanguage must be of type string.'); @@ -1329,8 +1397,8 @@ function _listByAutomationAccountNext(nextPageLink, options, callback) { if (this.client.generateClientRequestId) { httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); } - if (this.client.clientRequestId !== undefined && this.client.clientRequestId !== null) { - httpRequest.headers['clientRequestId'] = this.client.clientRequestId; + if (clientRequestId !== undefined && clientRequestId !== null) { + httpRequest.headers['clientRequestId'] = clientRequestId; } if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { httpRequest.headers['accept-language'] = this.client.acceptLanguage; @@ -1422,10 +1490,17 @@ class JobOperations { /** * Retrieve the job output identified by job name. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {string} jobName The name of the job to be created. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -1435,11 +1510,11 @@ class JobOperations { * * @reject {Error} - The error object. */ - getOutputWithHttpOperationResponse(jobName, options) { + getOutputWithHttpOperationResponse(resourceGroupName, automationAccountName, jobName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._getOutput(jobName, options, (err, result, request, response) => { + self._getOutput(resourceGroupName, automationAccountName, jobName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1452,10 +1527,17 @@ class JobOperations { /** * Retrieve the job output identified by job name. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {string} jobName The name of the job to be created. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -1480,7 +1562,7 @@ class JobOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getOutput(jobName, options, optionalCallback) { + getOutput(resourceGroupName, automationAccountName, jobName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1489,24 +1571,31 @@ class JobOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getOutput(jobName, options, (err, result, request, response) => { + self._getOutput(resourceGroupName, automationAccountName, jobName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getOutput(jobName, options, optionalCallback); + return self._getOutput(resourceGroupName, automationAccountName, jobName, options, optionalCallback); } } /** * Retrieve the runbook content of the job identified by job name. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {string} jobName The job name. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -1516,11 +1605,11 @@ class JobOperations { * * @reject {Error} - The error object. */ - getRunbookContentWithHttpOperationResponse(jobName, options) { + getRunbookContentWithHttpOperationResponse(resourceGroupName, automationAccountName, jobName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._getRunbookContent(jobName, options, (err, result, request, response) => { + self._getRunbookContent(resourceGroupName, automationAccountName, jobName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1533,10 +1622,17 @@ class JobOperations { /** * Retrieve the runbook content of the job identified by job name. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {string} jobName The job name. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -1561,7 +1657,7 @@ class JobOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getRunbookContent(jobName, options, optionalCallback) { + getRunbookContent(resourceGroupName, automationAccountName, jobName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1570,24 +1666,31 @@ class JobOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getRunbookContent(jobName, options, (err, result, request, response) => { + self._getRunbookContent(resourceGroupName, automationAccountName, jobName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getRunbookContent(jobName, options, optionalCallback); + return self._getRunbookContent(resourceGroupName, automationAccountName, jobName, options, optionalCallback); } } /** * Suspend the job identified by job name. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {string} jobName The job name. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -1597,11 +1700,11 @@ class JobOperations { * * @reject {Error} - The error object. */ - suspendWithHttpOperationResponse(jobName, options) { + suspendWithHttpOperationResponse(resourceGroupName, automationAccountName, jobName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._suspend(jobName, options, (err, result, request, response) => { + self._suspend(resourceGroupName, automationAccountName, jobName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1614,10 +1717,17 @@ class JobOperations { /** * Suspend the job identified by job name. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {string} jobName The job name. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -1642,7 +1752,7 @@ class JobOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - suspend(jobName, options, optionalCallback) { + suspend(resourceGroupName, automationAccountName, jobName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1651,24 +1761,31 @@ class JobOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._suspend(jobName, options, (err, result, request, response) => { + self._suspend(resourceGroupName, automationAccountName, jobName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._suspend(jobName, options, optionalCallback); + return self._suspend(resourceGroupName, automationAccountName, jobName, options, optionalCallback); } } /** * Stop the job identified by jobName. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {string} jobName The job name. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -1678,11 +1795,11 @@ class JobOperations { * * @reject {Error} - The error object. */ - stopWithHttpOperationResponse(jobName, options) { + stopWithHttpOperationResponse(resourceGroupName, automationAccountName, jobName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._stop(jobName, options, (err, result, request, response) => { + self._stop(resourceGroupName, automationAccountName, jobName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1695,10 +1812,17 @@ class JobOperations { /** * Stop the job identified by jobName. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {string} jobName The job name. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -1723,7 +1847,7 @@ class JobOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - stop(jobName, options, optionalCallback) { + stop(resourceGroupName, automationAccountName, jobName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1732,24 +1856,31 @@ class JobOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._stop(jobName, options, (err, result, request, response) => { + self._stop(resourceGroupName, automationAccountName, jobName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._stop(jobName, options, optionalCallback); + return self._stop(resourceGroupName, automationAccountName, jobName, options, optionalCallback); } } /** * Retrieve the job identified by job name. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {string} jobName The job name. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -1759,11 +1890,11 @@ class JobOperations { * * @reject {Error} - The error object. */ - getWithHttpOperationResponse(jobName, options) { + getWithHttpOperationResponse(resourceGroupName, automationAccountName, jobName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._get(jobName, options, (err, result, request, response) => { + self._get(resourceGroupName, automationAccountName, jobName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1776,10 +1907,17 @@ class JobOperations { /** * Retrieve the job identified by job name. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {string} jobName The job name. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -1805,7 +1943,7 @@ class JobOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - get(jobName, options, optionalCallback) { + get(resourceGroupName, automationAccountName, jobName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1814,20 +1952,24 @@ class JobOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._get(jobName, options, (err, result, request, response) => { + self._get(resourceGroupName, automationAccountName, jobName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._get(jobName, options, optionalCallback); + return self._get(resourceGroupName, automationAccountName, jobName, options, optionalCallback); } } /** * Create a job of the runbook. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {string} jobName The job name. * * @param {object} parameters The parameters supplied to the create job @@ -1846,6 +1988,9 @@ class JobOperations { * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -1855,11 +2000,11 @@ class JobOperations { * * @reject {Error} - The error object. */ - createWithHttpOperationResponse(jobName, parameters, options) { + createWithHttpOperationResponse(resourceGroupName, automationAccountName, jobName, parameters, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._create(jobName, parameters, options, (err, result, request, response) => { + self._create(resourceGroupName, automationAccountName, jobName, parameters, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1872,6 +2017,10 @@ class JobOperations { /** * Create a job of the runbook. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {string} jobName The job name. * * @param {object} parameters The parameters supplied to the create job @@ -1890,6 +2039,9 @@ class JobOperations { * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -1915,7 +2067,7 @@ class JobOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - create(jobName, parameters, options, optionalCallback) { + create(resourceGroupName, automationAccountName, jobName, parameters, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1924,24 +2076,31 @@ class JobOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._create(jobName, parameters, options, (err, result, request, response) => { + self._create(resourceGroupName, automationAccountName, jobName, parameters, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._create(jobName, parameters, options, optionalCallback); + return self._create(resourceGroupName, automationAccountName, jobName, parameters, options, optionalCallback); } } /** * Retrieve a list of jobs. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {object} [options] Optional Parameters. * * @param {string} [options.filter] The filter to apply on the operation. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -1951,11 +2110,11 @@ class JobOperations { * * @reject {Error} - The error object. */ - listByAutomationAccountWithHttpOperationResponse(options) { + listByAutomationAccountWithHttpOperationResponse(resourceGroupName, automationAccountName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._listByAutomationAccount(options, (err, result, request, response) => { + self._listByAutomationAccount(resourceGroupName, automationAccountName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1968,10 +2127,17 @@ class JobOperations { /** * Retrieve a list of jobs. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {object} [options] Optional Parameters. * * @param {string} [options.filter] The filter to apply on the operation. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -1997,7 +2163,7 @@ class JobOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - listByAutomationAccount(options, optionalCallback) { + listByAutomationAccount(resourceGroupName, automationAccountName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -2006,24 +2172,31 @@ class JobOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._listByAutomationAccount(options, (err, result, request, response) => { + self._listByAutomationAccount(resourceGroupName, automationAccountName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._listByAutomationAccount(options, optionalCallback); + return self._listByAutomationAccount(resourceGroupName, automationAccountName, options, optionalCallback); } } /** * Resume the job identified by jobName. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {string} jobName The job name. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -2033,11 +2206,11 @@ class JobOperations { * * @reject {Error} - The error object. */ - resumeWithHttpOperationResponse(jobName, options) { + resumeWithHttpOperationResponse(resourceGroupName, automationAccountName, jobName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._resume(jobName, options, (err, result, request, response) => { + self._resume(resourceGroupName, automationAccountName, jobName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -2050,10 +2223,17 @@ class JobOperations { /** * Resume the job identified by jobName. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {string} jobName The job name. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -2078,7 +2258,7 @@ class JobOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - resume(jobName, options, optionalCallback) { + resume(resourceGroupName, automationAccountName, jobName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -2087,14 +2267,14 @@ class JobOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._resume(jobName, options, (err, result, request, response) => { + self._resume(resourceGroupName, automationAccountName, jobName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._resume(jobName, options, optionalCallback); + return self._resume(resourceGroupName, automationAccountName, jobName, options, optionalCallback); } } @@ -2106,6 +2286,9 @@ class JobOperations { * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -2137,6 +2320,9 @@ class JobOperations { * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * diff --git a/lib/services/automationManagement/lib/operations/jobScheduleOperations.js b/lib/services/automationManagement/lib/operations/jobScheduleOperations.js index 073d28a536..1d2333cd93 100644 --- a/lib/services/automationManagement/lib/operations/jobScheduleOperations.js +++ b/lib/services/automationManagement/lib/operations/jobScheduleOperations.js @@ -17,6 +17,8 @@ const WebResource = msRest.WebResource; /** * Delete the job schedule identified by job schedule name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {uuid} jobScheduleId The job schedule name. @@ -38,7 +40,7 @@ const WebResource = msRest.WebResource; * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _deleteMethod(automationAccountName, jobScheduleId, options, callback) { +function _deleteMethod(resourceGroupName, automationAccountName, jobScheduleId, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -51,13 +53,13 @@ function _deleteMethod(automationAccountName, jobScheduleId, options, callback) let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -79,7 +81,7 @@ function _deleteMethod(automationAccountName, jobScheduleId, options, callback) // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/jobSchedules/{jobScheduleId}'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{jobScheduleId}', encodeURIComponent(jobScheduleId.toString())); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -153,6 +155,8 @@ function _deleteMethod(automationAccountName, jobScheduleId, options, callback) /** * Retrieve the job schedule identified by job schedule name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {uuid} jobScheduleId The job schedule name. @@ -175,7 +179,7 @@ function _deleteMethod(automationAccountName, jobScheduleId, options, callback) * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _get(automationAccountName, jobScheduleId, options, callback) { +function _get(resourceGroupName, automationAccountName, jobScheduleId, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -188,13 +192,13 @@ function _get(automationAccountName, jobScheduleId, options, callback) { let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -216,7 +220,7 @@ function _get(automationAccountName, jobScheduleId, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/jobSchedules/{jobScheduleId}'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{jobScheduleId}', encodeURIComponent(jobScheduleId.toString())); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -307,6 +311,8 @@ function _get(automationAccountName, jobScheduleId, options, callback) { /** * Create a job schedule. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {uuid} jobScheduleId The job schedule name. @@ -348,7 +354,7 @@ function _get(automationAccountName, jobScheduleId, options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _create(automationAccountName, jobScheduleId, parameters, options, callback) { +function _create(resourceGroupName, automationAccountName, jobScheduleId, parameters, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -361,13 +367,13 @@ function _create(automationAccountName, jobScheduleId, parameters, options, call let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -392,7 +398,7 @@ function _create(automationAccountName, jobScheduleId, parameters, options, call // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/jobSchedules/{jobScheduleId}'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{jobScheduleId}', encodeURIComponent(jobScheduleId.toString())); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -497,6 +503,8 @@ function _create(automationAccountName, jobScheduleId, parameters, options, call /** * Retrieve a list of job schedules. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -517,7 +525,7 @@ function _create(automationAccountName, jobScheduleId, parameters, options, call * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _listByAutomationAccount(automationAccountName, options, callback) { +function _listByAutomationAccount(resourceGroupName, automationAccountName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -530,13 +538,13 @@ function _listByAutomationAccount(automationAccountName, options, callback) { let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -555,7 +563,7 @@ function _listByAutomationAccount(automationAccountName, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/jobSchedules'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; @@ -788,6 +796,8 @@ class JobScheduleOperations { /** * Delete the job schedule identified by job schedule name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {uuid} jobScheduleId The job schedule name. @@ -803,11 +813,11 @@ class JobScheduleOperations { * * @reject {Error} - The error object. */ - deleteMethodWithHttpOperationResponse(automationAccountName, jobScheduleId, options) { + deleteMethodWithHttpOperationResponse(resourceGroupName, automationAccountName, jobScheduleId, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._deleteMethod(automationAccountName, jobScheduleId, options, (err, result, request, response) => { + self._deleteMethod(resourceGroupName, automationAccountName, jobScheduleId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -820,6 +830,8 @@ class JobScheduleOperations { /** * Delete the job schedule identified by job schedule name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {uuid} jobScheduleId The job schedule name. @@ -850,7 +862,7 @@ class JobScheduleOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(automationAccountName, jobScheduleId, options, optionalCallback) { + deleteMethod(resourceGroupName, automationAccountName, jobScheduleId, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -859,20 +871,22 @@ class JobScheduleOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._deleteMethod(automationAccountName, jobScheduleId, options, (err, result, request, response) => { + self._deleteMethod(resourceGroupName, automationAccountName, jobScheduleId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._deleteMethod(automationAccountName, jobScheduleId, options, optionalCallback); + return self._deleteMethod(resourceGroupName, automationAccountName, jobScheduleId, options, optionalCallback); } } /** * Retrieve the job schedule identified by job schedule name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {uuid} jobScheduleId The job schedule name. @@ -888,11 +902,11 @@ class JobScheduleOperations { * * @reject {Error} - The error object. */ - getWithHttpOperationResponse(automationAccountName, jobScheduleId, options) { + getWithHttpOperationResponse(resourceGroupName, automationAccountName, jobScheduleId, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._get(automationAccountName, jobScheduleId, options, (err, result, request, response) => { + self._get(resourceGroupName, automationAccountName, jobScheduleId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -905,6 +919,8 @@ class JobScheduleOperations { /** * Retrieve the job schedule identified by job schedule name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {uuid} jobScheduleId The job schedule name. @@ -936,7 +952,7 @@ class JobScheduleOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - get(automationAccountName, jobScheduleId, options, optionalCallback) { + get(resourceGroupName, automationAccountName, jobScheduleId, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -945,20 +961,22 @@ class JobScheduleOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._get(automationAccountName, jobScheduleId, options, (err, result, request, response) => { + self._get(resourceGroupName, automationAccountName, jobScheduleId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._get(automationAccountName, jobScheduleId, options, optionalCallback); + return self._get(resourceGroupName, automationAccountName, jobScheduleId, options, optionalCallback); } } /** * Create a job schedule. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {uuid} jobScheduleId The job schedule name. @@ -993,11 +1011,11 @@ class JobScheduleOperations { * * @reject {Error} - The error object. */ - createWithHttpOperationResponse(automationAccountName, jobScheduleId, parameters, options) { + createWithHttpOperationResponse(resourceGroupName, automationAccountName, jobScheduleId, parameters, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._create(automationAccountName, jobScheduleId, parameters, options, (err, result, request, response) => { + self._create(resourceGroupName, automationAccountName, jobScheduleId, parameters, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1010,6 +1028,8 @@ class JobScheduleOperations { /** * Create a job schedule. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {uuid} jobScheduleId The job schedule name. @@ -1060,7 +1080,7 @@ class JobScheduleOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - create(automationAccountName, jobScheduleId, parameters, options, optionalCallback) { + create(resourceGroupName, automationAccountName, jobScheduleId, parameters, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1069,20 +1089,22 @@ class JobScheduleOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._create(automationAccountName, jobScheduleId, parameters, options, (err, result, request, response) => { + self._create(resourceGroupName, automationAccountName, jobScheduleId, parameters, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._create(automationAccountName, jobScheduleId, parameters, options, optionalCallback); + return self._create(resourceGroupName, automationAccountName, jobScheduleId, parameters, options, optionalCallback); } } /** * Retrieve a list of job schedules. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -1096,11 +1118,11 @@ class JobScheduleOperations { * * @reject {Error} - The error object. */ - listByAutomationAccountWithHttpOperationResponse(automationAccountName, options) { + listByAutomationAccountWithHttpOperationResponse(resourceGroupName, automationAccountName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._listByAutomationAccount(automationAccountName, options, (err, result, request, response) => { + self._listByAutomationAccount(resourceGroupName, automationAccountName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1113,6 +1135,8 @@ class JobScheduleOperations { /** * Retrieve a list of job schedules. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -1142,7 +1166,7 @@ class JobScheduleOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - listByAutomationAccount(automationAccountName, options, optionalCallback) { + listByAutomationAccount(resourceGroupName, automationAccountName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1151,14 +1175,14 @@ class JobScheduleOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._listByAutomationAccount(automationAccountName, options, (err, result, request, response) => { + self._listByAutomationAccount(resourceGroupName, automationAccountName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._listByAutomationAccount(automationAccountName, options, optionalCallback); + return self._listByAutomationAccount(resourceGroupName, automationAccountName, options, optionalCallback); } } diff --git a/lib/services/automationManagement/lib/operations/jobStreamOperations.js b/lib/services/automationManagement/lib/operations/jobStreamOperations.js index 75db40543f..7527b8fad3 100644 --- a/lib/services/automationManagement/lib/operations/jobStreamOperations.js +++ b/lib/services/automationManagement/lib/operations/jobStreamOperations.js @@ -17,12 +17,19 @@ const WebResource = msRest.WebResource; /** * Retrieve the job stream identified by job stream id. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {string} jobName The job name. * * @param {string} jobStreamId The job stream id. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -39,7 +46,7 @@ const WebResource = msRest.WebResource; * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _get(jobName, jobStreamId, options, callback) { +function _get(resourceGroupName, automationAccountName, jobName, jobStreamId, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -49,23 +56,24 @@ function _get(jobName, jobStreamId, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } + let clientRequestId = (options && options.clientRequestId !== undefined) ? options.clientRequestId : undefined; let apiVersion = '2017-05-15-preview'; // Validate try { if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } - if (this.client.automationAccountName === null || this.client.automationAccountName === undefined || typeof this.client.automationAccountName.valueOf() !== 'string') { - throw new Error('this.client.automationAccountName cannot be null or undefined and it must be of type string.'); + if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { + throw new Error('automationAccountName cannot be null or undefined and it must be of type string.'); } if (jobName === null || jobName === undefined || typeof jobName.valueOf() !== 'string') { throw new Error('jobName cannot be null or undefined and it must be of type string.'); @@ -73,8 +81,8 @@ function _get(jobName, jobStreamId, options, callback) { if (jobStreamId === null || jobStreamId === undefined || typeof jobStreamId.valueOf() !== 'string') { throw new Error('jobStreamId cannot be null or undefined and it must be of type string.'); } - if (this.client.clientRequestId !== null && this.client.clientRequestId !== undefined && typeof this.client.clientRequestId.valueOf() !== 'string') { - throw new Error('this.client.clientRequestId must be of type string.'); + if (clientRequestId !== null && clientRequestId !== undefined && typeof clientRequestId.valueOf() !== 'string') { + throw new Error('clientRequestId must be of type string.'); } if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { throw new Error('this.client.acceptLanguage must be of type string.'); @@ -87,8 +95,8 @@ function _get(jobName, jobStreamId, options, callback) { let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/jobs/{jobName}/streams/{jobStreamId}'; requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); - requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(this.client.automationAccountName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{jobName}', encodeURIComponent(jobName)); requestUrl = requestUrl.replace('{jobStreamId}', encodeURIComponent(jobStreamId)); let queryParameters = []; @@ -107,8 +115,8 @@ function _get(jobName, jobStreamId, options, callback) { if (this.client.generateClientRequestId) { httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); } - if (this.client.clientRequestId !== undefined && this.client.clientRequestId !== null) { - httpRequest.headers['clientRequestId'] = this.client.clientRequestId; + if (clientRequestId !== undefined && clientRequestId !== null) { + httpRequest.headers['clientRequestId'] = clientRequestId; } if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { httpRequest.headers['accept-language'] = this.client.acceptLanguage; @@ -181,12 +189,19 @@ function _get(jobName, jobStreamId, options, callback) { /** * Retrieve a list of jobs streams identified by job name. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {string} jobName The job name. * * @param {object} [options] Optional Parameters. * * @param {string} [options.filter] The filter to apply on the operation. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -203,7 +218,7 @@ function _get(jobName, jobStreamId, options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _listByJob(jobName, options, callback) { +function _listByJob(resourceGroupName, automationAccountName, jobName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -214,20 +229,21 @@ function _listByJob(jobName, options, callback) { throw new Error('callback cannot be null.'); } let filter = (options && options.filter !== undefined) ? options.filter : undefined; + let clientRequestId = (options && options.clientRequestId !== undefined) ? options.clientRequestId : undefined; let apiVersion = '2017-05-15-preview'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } - if (this.client.automationAccountName === null || this.client.automationAccountName === undefined || typeof this.client.automationAccountName.valueOf() !== 'string') { - throw new Error('this.client.automationAccountName cannot be null or undefined and it must be of type string.'); + if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { + throw new Error('automationAccountName cannot be null or undefined and it must be of type string.'); } if (jobName === null || jobName === undefined || typeof jobName.valueOf() !== 'string') { throw new Error('jobName cannot be null or undefined and it must be of type string.'); @@ -238,8 +254,8 @@ function _listByJob(jobName, options, callback) { if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); } - if (this.client.clientRequestId !== null && this.client.clientRequestId !== undefined && typeof this.client.clientRequestId.valueOf() !== 'string') { - throw new Error('this.client.clientRequestId must be of type string.'); + if (clientRequestId !== null && clientRequestId !== undefined && typeof clientRequestId.valueOf() !== 'string') { + throw new Error('clientRequestId must be of type string.'); } if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { throw new Error('this.client.acceptLanguage must be of type string.'); @@ -251,8 +267,8 @@ function _listByJob(jobName, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/jobs/{jobName}/streams'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); - requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(this.client.automationAccountName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{jobName}', encodeURIComponent(jobName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; @@ -274,8 +290,8 @@ function _listByJob(jobName, options, callback) { if (this.client.generateClientRequestId) { httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); } - if (this.client.clientRequestId !== undefined && this.client.clientRequestId !== null) { - httpRequest.headers['clientRequestId'] = this.client.clientRequestId; + if (clientRequestId !== undefined && clientRequestId !== null) { + httpRequest.headers['clientRequestId'] = clientRequestId; } if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { httpRequest.headers['accept-language'] = this.client.acceptLanguage; @@ -353,6 +369,9 @@ function _listByJob(jobName, options, callback) { * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -379,13 +398,14 @@ function _listByJobNext(nextPageLink, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } + let clientRequestId = (options && options.clientRequestId !== undefined) ? options.clientRequestId : undefined; // Validate try { if (nextPageLink === null || nextPageLink === undefined || typeof nextPageLink.valueOf() !== 'string') { throw new Error('nextPageLink cannot be null or undefined and it must be of type string.'); } - if (this.client.clientRequestId !== null && this.client.clientRequestId !== undefined && typeof this.client.clientRequestId.valueOf() !== 'string') { - throw new Error('this.client.clientRequestId must be of type string.'); + if (clientRequestId !== null && clientRequestId !== undefined && typeof clientRequestId.valueOf() !== 'string') { + throw new Error('clientRequestId must be of type string.'); } if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { throw new Error('this.client.acceptLanguage must be of type string.'); @@ -408,8 +428,8 @@ function _listByJobNext(nextPageLink, options, callback) { if (this.client.generateClientRequestId) { httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); } - if (this.client.clientRequestId !== undefined && this.client.clientRequestId !== null) { - httpRequest.headers['clientRequestId'] = this.client.clientRequestId; + if (clientRequestId !== undefined && clientRequestId !== null) { + httpRequest.headers['clientRequestId'] = clientRequestId; } if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { httpRequest.headers['accept-language'] = this.client.acceptLanguage; @@ -495,12 +515,19 @@ class JobStreamOperations { /** * Retrieve the job stream identified by job stream id. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {string} jobName The job name. * * @param {string} jobStreamId The job stream id. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -510,11 +537,11 @@ class JobStreamOperations { * * @reject {Error} - The error object. */ - getWithHttpOperationResponse(jobName, jobStreamId, options) { + getWithHttpOperationResponse(resourceGroupName, automationAccountName, jobName, jobStreamId, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._get(jobName, jobStreamId, options, (err, result, request, response) => { + self._get(resourceGroupName, automationAccountName, jobName, jobStreamId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -527,12 +554,19 @@ class JobStreamOperations { /** * Retrieve the job stream identified by job stream id. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {string} jobName The job name. * * @param {string} jobStreamId The job stream id. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -558,7 +592,7 @@ class JobStreamOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - get(jobName, jobStreamId, options, optionalCallback) { + get(resourceGroupName, automationAccountName, jobName, jobStreamId, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -567,26 +601,33 @@ class JobStreamOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._get(jobName, jobStreamId, options, (err, result, request, response) => { + self._get(resourceGroupName, automationAccountName, jobName, jobStreamId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._get(jobName, jobStreamId, options, optionalCallback); + return self._get(resourceGroupName, automationAccountName, jobName, jobStreamId, options, optionalCallback); } } /** * Retrieve a list of jobs streams identified by job name. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {string} jobName The job name. * * @param {object} [options] Optional Parameters. * * @param {string} [options.filter] The filter to apply on the operation. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -596,11 +637,11 @@ class JobStreamOperations { * * @reject {Error} - The error object. */ - listByJobWithHttpOperationResponse(jobName, options) { + listByJobWithHttpOperationResponse(resourceGroupName, automationAccountName, jobName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._listByJob(jobName, options, (err, result, request, response) => { + self._listByJob(resourceGroupName, automationAccountName, jobName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -613,12 +654,19 @@ class JobStreamOperations { /** * Retrieve a list of jobs streams identified by job name. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {string} jobName The job name. * * @param {object} [options] Optional Parameters. * * @param {string} [options.filter] The filter to apply on the operation. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -644,7 +692,7 @@ class JobStreamOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - listByJob(jobName, options, optionalCallback) { + listByJob(resourceGroupName, automationAccountName, jobName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -653,14 +701,14 @@ class JobStreamOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._listByJob(jobName, options, (err, result, request, response) => { + self._listByJob(resourceGroupName, automationAccountName, jobName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._listByJob(jobName, options, optionalCallback); + return self._listByJob(resourceGroupName, automationAccountName, jobName, options, optionalCallback); } } @@ -672,6 +720,9 @@ class JobStreamOperations { * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -703,6 +754,9 @@ class JobStreamOperations { * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * diff --git a/lib/services/automationManagement/lib/operations/linkedWorkspaceOperations.js b/lib/services/automationManagement/lib/operations/linkedWorkspaceOperations.js index 1853bbf687..29ae1f29af 100644 --- a/lib/services/automationManagement/lib/operations/linkedWorkspaceOperations.js +++ b/lib/services/automationManagement/lib/operations/linkedWorkspaceOperations.js @@ -17,6 +17,8 @@ const WebResource = msRest.WebResource; /** * Retrieve the linked workspace for the account id. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -37,7 +39,7 @@ const WebResource = msRest.WebResource; * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _get(automationAccountName, options, callback) { +function _get(resourceGroupName, automationAccountName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -50,13 +52,13 @@ function _get(automationAccountName, options, callback) { let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -75,7 +77,7 @@ function _get(automationAccountName, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/linkedWorkspace'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; @@ -176,6 +178,8 @@ class LinkedWorkspaceOperations { /** * Retrieve the linked workspace for the account id. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -189,11 +193,11 @@ class LinkedWorkspaceOperations { * * @reject {Error} - The error object. */ - getWithHttpOperationResponse(automationAccountName, options) { + getWithHttpOperationResponse(resourceGroupName, automationAccountName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._get(automationAccountName, options, (err, result, request, response) => { + self._get(resourceGroupName, automationAccountName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -206,6 +210,8 @@ class LinkedWorkspaceOperations { /** * Retrieve the linked workspace for the account id. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -235,7 +241,7 @@ class LinkedWorkspaceOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - get(automationAccountName, options, optionalCallback) { + get(resourceGroupName, automationAccountName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -244,14 +250,14 @@ class LinkedWorkspaceOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._get(automationAccountName, options, (err, result, request, response) => { + self._get(resourceGroupName, automationAccountName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._get(automationAccountName, options, optionalCallback); + return self._get(resourceGroupName, automationAccountName, options, optionalCallback); } } diff --git a/lib/services/automationManagement/lib/operations/moduleOperations.js b/lib/services/automationManagement/lib/operations/moduleOperations.js index edef4bcdce..54438c961e 100644 --- a/lib/services/automationManagement/lib/operations/moduleOperations.js +++ b/lib/services/automationManagement/lib/operations/moduleOperations.js @@ -17,6 +17,8 @@ const WebResource = msRest.WebResource; /** * Delete the module by name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} moduleName The module name. @@ -38,7 +40,7 @@ const WebResource = msRest.WebResource; * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _deleteMethod(automationAccountName, moduleName, options, callback) { +function _deleteMethod(resourceGroupName, automationAccountName, moduleName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -51,13 +53,13 @@ function _deleteMethod(automationAccountName, moduleName, options, callback) { let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -79,7 +81,7 @@ function _deleteMethod(automationAccountName, moduleName, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/modules/{moduleName}'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{moduleName}', encodeURIComponent(moduleName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -153,6 +155,8 @@ function _deleteMethod(automationAccountName, moduleName, options, callback) { /** * Retrieve the module identified by module name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} moduleName The module name. @@ -175,7 +179,7 @@ function _deleteMethod(automationAccountName, moduleName, options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _get(automationAccountName, moduleName, options, callback) { +function _get(resourceGroupName, automationAccountName, moduleName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -188,13 +192,13 @@ function _get(automationAccountName, moduleName, options, callback) { let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -216,7 +220,7 @@ function _get(automationAccountName, moduleName, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/modules/{moduleName}'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{moduleName}', encodeURIComponent(moduleName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -307,6 +311,8 @@ function _get(automationAccountName, moduleName, options, callback) { /** * Create or Update the module identified by module name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} moduleName The name of module. @@ -355,7 +361,7 @@ function _get(automationAccountName, moduleName, options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _createOrUpdate(automationAccountName, moduleName, parameters, options, callback) { +function _createOrUpdate(resourceGroupName, automationAccountName, moduleName, parameters, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -368,13 +374,13 @@ function _createOrUpdate(automationAccountName, moduleName, parameters, options, let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -399,7 +405,7 @@ function _createOrUpdate(automationAccountName, moduleName, parameters, options, // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/modules/{moduleName}'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{moduleName}', encodeURIComponent(moduleName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -521,6 +527,8 @@ function _createOrUpdate(automationAccountName, moduleName, parameters, options, /** * Update the module identified by module name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} moduleName The name of module. @@ -570,7 +578,7 @@ function _createOrUpdate(automationAccountName, moduleName, parameters, options, * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _update(automationAccountName, moduleName, parameters, options, callback) { +function _update(resourceGroupName, automationAccountName, moduleName, parameters, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -583,13 +591,13 @@ function _update(automationAccountName, moduleName, parameters, options, callbac let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -614,7 +622,7 @@ function _update(automationAccountName, moduleName, parameters, options, callbac // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/modules/{moduleName}'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{moduleName}', encodeURIComponent(moduleName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -719,6 +727,8 @@ function _update(automationAccountName, moduleName, parameters, options, callbac /** * Retrieve a list of modules. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -739,7 +749,7 @@ function _update(automationAccountName, moduleName, parameters, options, callbac * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _listByAutomationAccount(automationAccountName, options, callback) { +function _listByAutomationAccount(resourceGroupName, automationAccountName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -752,13 +762,13 @@ function _listByAutomationAccount(automationAccountName, options, callback) { let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -777,7 +787,7 @@ function _listByAutomationAccount(automationAccountName, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/modules'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; @@ -1011,6 +1021,8 @@ class ModuleOperations { /** * Delete the module by name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} moduleName The module name. @@ -1026,11 +1038,11 @@ class ModuleOperations { * * @reject {Error} - The error object. */ - deleteMethodWithHttpOperationResponse(automationAccountName, moduleName, options) { + deleteMethodWithHttpOperationResponse(resourceGroupName, automationAccountName, moduleName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._deleteMethod(automationAccountName, moduleName, options, (err, result, request, response) => { + self._deleteMethod(resourceGroupName, automationAccountName, moduleName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1043,6 +1055,8 @@ class ModuleOperations { /** * Delete the module by name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} moduleName The module name. @@ -1073,7 +1087,7 @@ class ModuleOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(automationAccountName, moduleName, options, optionalCallback) { + deleteMethod(resourceGroupName, automationAccountName, moduleName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1082,20 +1096,22 @@ class ModuleOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._deleteMethod(automationAccountName, moduleName, options, (err, result, request, response) => { + self._deleteMethod(resourceGroupName, automationAccountName, moduleName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._deleteMethod(automationAccountName, moduleName, options, optionalCallback); + return self._deleteMethod(resourceGroupName, automationAccountName, moduleName, options, optionalCallback); } } /** * Retrieve the module identified by module name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} moduleName The module name. @@ -1111,11 +1127,11 @@ class ModuleOperations { * * @reject {Error} - The error object. */ - getWithHttpOperationResponse(automationAccountName, moduleName, options) { + getWithHttpOperationResponse(resourceGroupName, automationAccountName, moduleName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._get(automationAccountName, moduleName, options, (err, result, request, response) => { + self._get(resourceGroupName, automationAccountName, moduleName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1128,6 +1144,8 @@ class ModuleOperations { /** * Retrieve the module identified by module name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} moduleName The module name. @@ -1159,7 +1177,7 @@ class ModuleOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - get(automationAccountName, moduleName, options, optionalCallback) { + get(resourceGroupName, automationAccountName, moduleName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1168,20 +1186,22 @@ class ModuleOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._get(automationAccountName, moduleName, options, (err, result, request, response) => { + self._get(resourceGroupName, automationAccountName, moduleName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._get(automationAccountName, moduleName, options, optionalCallback); + return self._get(resourceGroupName, automationAccountName, moduleName, options, optionalCallback); } } /** * Create or Update the module identified by module name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} moduleName The name of module. @@ -1223,11 +1243,11 @@ class ModuleOperations { * * @reject {Error} - The error object. */ - createOrUpdateWithHttpOperationResponse(automationAccountName, moduleName, parameters, options) { + createOrUpdateWithHttpOperationResponse(resourceGroupName, automationAccountName, moduleName, parameters, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._createOrUpdate(automationAccountName, moduleName, parameters, options, (err, result, request, response) => { + self._createOrUpdate(resourceGroupName, automationAccountName, moduleName, parameters, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1240,6 +1260,8 @@ class ModuleOperations { /** * Create or Update the module identified by module name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} moduleName The name of module. @@ -1297,7 +1319,7 @@ class ModuleOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - createOrUpdate(automationAccountName, moduleName, parameters, options, optionalCallback) { + createOrUpdate(resourceGroupName, automationAccountName, moduleName, parameters, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1306,20 +1328,22 @@ class ModuleOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._createOrUpdate(automationAccountName, moduleName, parameters, options, (err, result, request, response) => { + self._createOrUpdate(resourceGroupName, automationAccountName, moduleName, parameters, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._createOrUpdate(automationAccountName, moduleName, parameters, options, optionalCallback); + return self._createOrUpdate(resourceGroupName, automationAccountName, moduleName, parameters, options, optionalCallback); } } /** * Update the module identified by module name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} moduleName The name of module. @@ -1362,11 +1386,11 @@ class ModuleOperations { * * @reject {Error} - The error object. */ - updateWithHttpOperationResponse(automationAccountName, moduleName, parameters, options) { + updateWithHttpOperationResponse(resourceGroupName, automationAccountName, moduleName, parameters, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._update(automationAccountName, moduleName, parameters, options, (err, result, request, response) => { + self._update(resourceGroupName, automationAccountName, moduleName, parameters, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1379,6 +1403,8 @@ class ModuleOperations { /** * Update the module identified by module name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} moduleName The name of module. @@ -1437,7 +1463,7 @@ class ModuleOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - update(automationAccountName, moduleName, parameters, options, optionalCallback) { + update(resourceGroupName, automationAccountName, moduleName, parameters, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1446,20 +1472,22 @@ class ModuleOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._update(automationAccountName, moduleName, parameters, options, (err, result, request, response) => { + self._update(resourceGroupName, automationAccountName, moduleName, parameters, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._update(automationAccountName, moduleName, parameters, options, optionalCallback); + return self._update(resourceGroupName, automationAccountName, moduleName, parameters, options, optionalCallback); } } /** * Retrieve a list of modules. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -1473,11 +1501,11 @@ class ModuleOperations { * * @reject {Error} - The error object. */ - listByAutomationAccountWithHttpOperationResponse(automationAccountName, options) { + listByAutomationAccountWithHttpOperationResponse(resourceGroupName, automationAccountName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._listByAutomationAccount(automationAccountName, options, (err, result, request, response) => { + self._listByAutomationAccount(resourceGroupName, automationAccountName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1490,6 +1518,8 @@ class ModuleOperations { /** * Retrieve a list of modules. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -1519,7 +1549,7 @@ class ModuleOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - listByAutomationAccount(automationAccountName, options, optionalCallback) { + listByAutomationAccount(resourceGroupName, automationAccountName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1528,14 +1558,14 @@ class ModuleOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._listByAutomationAccount(automationAccountName, options, (err, result, request, response) => { + self._listByAutomationAccount(resourceGroupName, automationAccountName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._listByAutomationAccount(automationAccountName, options, optionalCallback); + return self._listByAutomationAccount(resourceGroupName, automationAccountName, options, optionalCallback); } } diff --git a/lib/services/automationManagement/lib/operations/nodeReports.js b/lib/services/automationManagement/lib/operations/nodeReports.js index aea8ef8eb3..49e13fd659 100644 --- a/lib/services/automationManagement/lib/operations/nodeReports.js +++ b/lib/services/automationManagement/lib/operations/nodeReports.js @@ -17,6 +17,8 @@ const WebResource = msRest.WebResource; /** * Retrieve the Dsc node report list by node id. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} nodeId The parameters supplied to the list operation. @@ -42,7 +44,7 @@ const WebResource = msRest.WebResource; * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _listByNode(automationAccountName, nodeId, options, callback) { +function _listByNode(resourceGroupName, automationAccountName, nodeId, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -56,13 +58,13 @@ function _listByNode(automationAccountName, nodeId, options, callback) { let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -87,7 +89,7 @@ function _listByNode(automationAccountName, nodeId, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/nodes/{nodeId}/reports'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{nodeId}', encodeURIComponent(nodeId)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -181,6 +183,8 @@ function _listByNode(automationAccountName, nodeId, options, callback) { /** * Retrieve the Dsc node report data by node id and report id. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} nodeId The Dsc node id. @@ -205,7 +209,7 @@ function _listByNode(automationAccountName, nodeId, options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _get(automationAccountName, nodeId, reportId, options, callback) { +function _get(resourceGroupName, automationAccountName, nodeId, reportId, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -218,13 +222,13 @@ function _get(automationAccountName, nodeId, reportId, options, callback) { let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -249,7 +253,7 @@ function _get(automationAccountName, nodeId, reportId, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/nodes/{nodeId}/reports/{reportId}'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{nodeId}', encodeURIComponent(nodeId)); requestUrl = requestUrl.replace('{reportId}', encodeURIComponent(reportId)); @@ -341,6 +345,8 @@ function _get(automationAccountName, nodeId, reportId, options, callback) { /** * Retrieve the Dsc node reports by node id and report id. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} nodeId The Dsc node id. @@ -364,7 +370,7 @@ function _get(automationAccountName, nodeId, reportId, options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _getContent(automationAccountName, nodeId, reportId, options, callback) { +function _getContent(resourceGroupName, automationAccountName, nodeId, reportId, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -377,13 +383,13 @@ function _getContent(automationAccountName, nodeId, reportId, options, callback) let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -408,7 +414,7 @@ function _getContent(automationAccountName, nodeId, reportId, options, callback) // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/nodes/{nodeId}/reports/{reportId}/content'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{nodeId}', encodeURIComponent(nodeId)); requestUrl = requestUrl.replace('{reportId}', encodeURIComponent(reportId)); @@ -649,6 +655,8 @@ class NodeReports { /** * Retrieve the Dsc node report list by node id. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} nodeId The parameters supplied to the list operation. @@ -666,11 +674,11 @@ class NodeReports { * * @reject {Error} - The error object. */ - listByNodeWithHttpOperationResponse(automationAccountName, nodeId, options) { + listByNodeWithHttpOperationResponse(resourceGroupName, automationAccountName, nodeId, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._listByNode(automationAccountName, nodeId, options, (err, result, request, response) => { + self._listByNode(resourceGroupName, automationAccountName, nodeId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -683,6 +691,8 @@ class NodeReports { /** * Retrieve the Dsc node report list by node id. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} nodeId The parameters supplied to the list operation. @@ -717,7 +727,7 @@ class NodeReports { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - listByNode(automationAccountName, nodeId, options, optionalCallback) { + listByNode(resourceGroupName, automationAccountName, nodeId, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -726,20 +736,22 @@ class NodeReports { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._listByNode(automationAccountName, nodeId, options, (err, result, request, response) => { + self._listByNode(resourceGroupName, automationAccountName, nodeId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._listByNode(automationAccountName, nodeId, options, optionalCallback); + return self._listByNode(resourceGroupName, automationAccountName, nodeId, options, optionalCallback); } } /** * Retrieve the Dsc node report data by node id and report id. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} nodeId The Dsc node id. @@ -757,11 +769,11 @@ class NodeReports { * * @reject {Error} - The error object. */ - getWithHttpOperationResponse(automationAccountName, nodeId, reportId, options) { + getWithHttpOperationResponse(resourceGroupName, automationAccountName, nodeId, reportId, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._get(automationAccountName, nodeId, reportId, options, (err, result, request, response) => { + self._get(resourceGroupName, automationAccountName, nodeId, reportId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -774,6 +786,8 @@ class NodeReports { /** * Retrieve the Dsc node report data by node id and report id. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} nodeId The Dsc node id. @@ -807,7 +821,7 @@ class NodeReports { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - get(automationAccountName, nodeId, reportId, options, optionalCallback) { + get(resourceGroupName, automationAccountName, nodeId, reportId, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -816,20 +830,22 @@ class NodeReports { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._get(automationAccountName, nodeId, reportId, options, (err, result, request, response) => { + self._get(resourceGroupName, automationAccountName, nodeId, reportId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._get(automationAccountName, nodeId, reportId, options, optionalCallback); + return self._get(resourceGroupName, automationAccountName, nodeId, reportId, options, optionalCallback); } } /** * Retrieve the Dsc node reports by node id and report id. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} nodeId The Dsc node id. @@ -847,11 +863,11 @@ class NodeReports { * * @reject {Error} - The error object. */ - getContentWithHttpOperationResponse(automationAccountName, nodeId, reportId, options) { + getContentWithHttpOperationResponse(resourceGroupName, automationAccountName, nodeId, reportId, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._getContent(automationAccountName, nodeId, reportId, options, (err, result, request, response) => { + self._getContent(resourceGroupName, automationAccountName, nodeId, reportId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -864,6 +880,8 @@ class NodeReports { /** * Retrieve the Dsc node reports by node id and report id. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} nodeId The Dsc node id. @@ -896,7 +914,7 @@ class NodeReports { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getContent(automationAccountName, nodeId, reportId, options, optionalCallback) { + getContent(resourceGroupName, automationAccountName, nodeId, reportId, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -905,14 +923,14 @@ class NodeReports { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getContent(automationAccountName, nodeId, reportId, options, (err, result, request, response) => { + self._getContent(resourceGroupName, automationAccountName, nodeId, reportId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getContent(automationAccountName, nodeId, reportId, options, optionalCallback); + return self._getContent(resourceGroupName, automationAccountName, nodeId, reportId, options, optionalCallback); } } diff --git a/lib/services/automationManagement/lib/operations/objectDataTypes.js b/lib/services/automationManagement/lib/operations/objectDataTypes.js index 86d9aad839..5b3a4f44f7 100644 --- a/lib/services/automationManagement/lib/operations/objectDataTypes.js +++ b/lib/services/automationManagement/lib/operations/objectDataTypes.js @@ -17,6 +17,8 @@ const WebResource = msRest.WebResource; /** * Retrieve a list of fields of a given type identified by module name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} moduleName The name of module. @@ -41,7 +43,7 @@ const WebResource = msRest.WebResource; * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _listFieldsByModuleAndType(automationAccountName, moduleName, typeName, options, callback) { +function _listFieldsByModuleAndType(resourceGroupName, automationAccountName, moduleName, typeName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -54,13 +56,13 @@ function _listFieldsByModuleAndType(automationAccountName, moduleName, typeName, let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -85,7 +87,7 @@ function _listFieldsByModuleAndType(automationAccountName, moduleName, typeName, // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/modules/{moduleName}/objectDataTypes/{typeName}/fields'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{moduleName}', encodeURIComponent(moduleName)); requestUrl = requestUrl.replace('{typeName}', encodeURIComponent(typeName)); @@ -177,6 +179,8 @@ function _listFieldsByModuleAndType(automationAccountName, moduleName, typeName, /** * Retrieve a list of fields of a given type across all accessible modules. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} typeName The name of type. @@ -199,7 +203,7 @@ function _listFieldsByModuleAndType(automationAccountName, moduleName, typeName, * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _listFieldsByType(automationAccountName, typeName, options, callback) { +function _listFieldsByType(resourceGroupName, automationAccountName, typeName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -212,13 +216,13 @@ function _listFieldsByType(automationAccountName, typeName, options, callback) { let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -240,7 +244,7 @@ function _listFieldsByType(automationAccountName, typeName, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/objectDataTypes/{typeName}/fields'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{typeName}', encodeURIComponent(typeName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -343,6 +347,8 @@ class ObjectDataTypes { /** * Retrieve a list of fields of a given type identified by module name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} moduleName The name of module. @@ -360,11 +366,11 @@ class ObjectDataTypes { * * @reject {Error} - The error object. */ - listFieldsByModuleAndTypeWithHttpOperationResponse(automationAccountName, moduleName, typeName, options) { + listFieldsByModuleAndTypeWithHttpOperationResponse(resourceGroupName, automationAccountName, moduleName, typeName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._listFieldsByModuleAndType(automationAccountName, moduleName, typeName, options, (err, result, request, response) => { + self._listFieldsByModuleAndType(resourceGroupName, automationAccountName, moduleName, typeName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -377,6 +383,8 @@ class ObjectDataTypes { /** * Retrieve a list of fields of a given type identified by module name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} moduleName The name of module. @@ -410,7 +418,7 @@ class ObjectDataTypes { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - listFieldsByModuleAndType(automationAccountName, moduleName, typeName, options, optionalCallback) { + listFieldsByModuleAndType(resourceGroupName, automationAccountName, moduleName, typeName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -419,20 +427,22 @@ class ObjectDataTypes { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._listFieldsByModuleAndType(automationAccountName, moduleName, typeName, options, (err, result, request, response) => { + self._listFieldsByModuleAndType(resourceGroupName, automationAccountName, moduleName, typeName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._listFieldsByModuleAndType(automationAccountName, moduleName, typeName, options, optionalCallback); + return self._listFieldsByModuleAndType(resourceGroupName, automationAccountName, moduleName, typeName, options, optionalCallback); } } /** * Retrieve a list of fields of a given type across all accessible modules. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} typeName The name of type. @@ -448,11 +458,11 @@ class ObjectDataTypes { * * @reject {Error} - The error object. */ - listFieldsByTypeWithHttpOperationResponse(automationAccountName, typeName, options) { + listFieldsByTypeWithHttpOperationResponse(resourceGroupName, automationAccountName, typeName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._listFieldsByType(automationAccountName, typeName, options, (err, result, request, response) => { + self._listFieldsByType(resourceGroupName, automationAccountName, typeName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -465,6 +475,8 @@ class ObjectDataTypes { /** * Retrieve a list of fields of a given type across all accessible modules. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} typeName The name of type. @@ -496,7 +508,7 @@ class ObjectDataTypes { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - listFieldsByType(automationAccountName, typeName, options, optionalCallback) { + listFieldsByType(resourceGroupName, automationAccountName, typeName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -505,14 +517,14 @@ class ObjectDataTypes { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._listFieldsByType(automationAccountName, typeName, options, (err, result, request, response) => { + self._listFieldsByType(resourceGroupName, automationAccountName, typeName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._listFieldsByType(automationAccountName, typeName, options, optionalCallback); + return self._listFieldsByType(resourceGroupName, automationAccountName, typeName, options, optionalCallback); } } diff --git a/lib/services/automationManagement/lib/operations/runbookDraftOperations.js b/lib/services/automationManagement/lib/operations/runbookDraftOperations.js index e4e627796f..2bd90ce433 100644 --- a/lib/services/automationManagement/lib/operations/runbookDraftOperations.js +++ b/lib/services/automationManagement/lib/operations/runbookDraftOperations.js @@ -17,6 +17,8 @@ const WebResource = msRest.WebResource; /** * Retrieve the content of runbook draft identified by runbook name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -38,7 +40,7 @@ const WebResource = msRest.WebResource; * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _getContent(automationAccountName, runbookName, options, callback) { +function _getContent(resourceGroupName, automationAccountName, runbookName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -54,13 +56,13 @@ function _getContent(automationAccountName, runbookName, options, callback) { if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -80,7 +82,7 @@ function _getContent(automationAccountName, runbookName, options, callback) { let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/runbooks/{runbookName}/draft/content'; requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{runbookName}', encodeURIComponent(runbookName)); let queryParameters = []; @@ -176,6 +178,8 @@ function _getContent(automationAccountName, runbookName, options, callback) { /** * Replaces the runbook draft content. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -199,7 +203,7 @@ function _getContent(automationAccountName, runbookName, options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _replaceContent(automationAccountName, runbookName, runbookContent, options, callback) { +function _replaceContent(resourceGroupName, automationAccountName, runbookName, runbookContent, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -212,7 +216,7 @@ function _replaceContent(automationAccountName, runbookName, runbookContent, opt } // Send request - this.beginReplaceContent(automationAccountName, runbookName, runbookContent, options, (err, parsedResult, httpRequest, response) => { + this.beginReplaceContent(resourceGroupName, automationAccountName, runbookName, runbookContent, options, (err, parsedResult, httpRequest, response) => { if (err) return callback(err); let initialResult = new msRest.HttpOperationResponse(); @@ -240,6 +244,8 @@ function _replaceContent(automationAccountName, runbookName, runbookContent, opt /** * Retrieve the runbook draft identified by runbook name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -262,7 +268,7 @@ function _replaceContent(automationAccountName, runbookName, runbookContent, opt * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _get(automationAccountName, runbookName, options, callback) { +function _get(resourceGroupName, automationAccountName, runbookName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -278,13 +284,13 @@ function _get(automationAccountName, runbookName, options, callback) { if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -304,7 +310,7 @@ function _get(automationAccountName, runbookName, options, callback) { let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/runbooks/{runbookName}/draft'; requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{runbookName}', encodeURIComponent(runbookName)); let queryParameters = []; @@ -395,6 +401,8 @@ function _get(automationAccountName, runbookName, options, callback) { /** * Publish runbook draft. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The parameters supplied to the publish runbook @@ -417,7 +425,7 @@ function _get(automationAccountName, runbookName, options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _publish(automationAccountName, runbookName, options, callback) { +function _publish(resourceGroupName, automationAccountName, runbookName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -430,7 +438,7 @@ function _publish(automationAccountName, runbookName, options, callback) { } // Send request - this.beginPublish(automationAccountName, runbookName, options, (err, parsedResult, httpRequest, response) => { + this.beginPublish(resourceGroupName, automationAccountName, runbookName, options, (err, parsedResult, httpRequest, response) => { if (err) return callback(err); let initialResult = new msRest.HttpOperationResponse(); @@ -458,6 +466,8 @@ function _publish(automationAccountName, runbookName, options, callback) { /** * Undo draft edit to last known published state identified by runbook name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -481,7 +491,7 @@ function _publish(automationAccountName, runbookName, options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _undoEdit(automationAccountName, runbookName, options, callback) { +function _undoEdit(resourceGroupName, automationAccountName, runbookName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -497,13 +507,13 @@ function _undoEdit(automationAccountName, runbookName, options, callback) { if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -523,7 +533,7 @@ function _undoEdit(automationAccountName, runbookName, options, callback) { let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/runbooks/{runbookName}/draft/undoEdit'; requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{runbookName}', encodeURIComponent(runbookName)); let queryParameters = []; @@ -613,6 +623,8 @@ function _undoEdit(automationAccountName, runbookName, options, callback) { /** * Replaces the runbook draft content. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -636,7 +648,7 @@ function _undoEdit(automationAccountName, runbookName, options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _beginReplaceContent(automationAccountName, runbookName, runbookContent, options, callback) { +function _beginReplaceContent(resourceGroupName, automationAccountName, runbookName, runbookContent, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -652,13 +664,13 @@ function _beginReplaceContent(automationAccountName, runbookName, runbookContent if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -681,7 +693,7 @@ function _beginReplaceContent(automationAccountName, runbookName, runbookContent let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/runbooks/{runbookName}/draft/content'; requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{runbookName}', encodeURIComponent(runbookName)); let queryParameters = []; @@ -774,6 +786,8 @@ function _beginReplaceContent(automationAccountName, runbookName, runbookContent /** * Publish runbook draft. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The parameters supplied to the publish runbook @@ -796,7 +810,7 @@ function _beginReplaceContent(automationAccountName, runbookName, runbookContent * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _beginPublish(automationAccountName, runbookName, options, callback) { +function _beginPublish(resourceGroupName, automationAccountName, runbookName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -812,13 +826,13 @@ function _beginPublish(automationAccountName, runbookName, options, callback) { if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -838,7 +852,7 @@ function _beginPublish(automationAccountName, runbookName, options, callback) { let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/runbooks/{runbookName}/draft/publish'; requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{runbookName}', encodeURIComponent(runbookName)); let queryParameters = []; @@ -928,6 +942,8 @@ class RunbookDraftOperations { /** * Retrieve the content of runbook draft identified by runbook name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -943,11 +959,11 @@ class RunbookDraftOperations { * * @reject {Error} - The error object. */ - getContentWithHttpOperationResponse(automationAccountName, runbookName, options) { + getContentWithHttpOperationResponse(resourceGroupName, automationAccountName, runbookName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._getContent(automationAccountName, runbookName, options, (err, result, request, response) => { + self._getContent(resourceGroupName, automationAccountName, runbookName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -960,6 +976,8 @@ class RunbookDraftOperations { /** * Retrieve the content of runbook draft identified by runbook name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -990,7 +1008,7 @@ class RunbookDraftOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getContent(automationAccountName, runbookName, options, optionalCallback) { + getContent(resourceGroupName, automationAccountName, runbookName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -999,20 +1017,22 @@ class RunbookDraftOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getContent(automationAccountName, runbookName, options, (err, result, request, response) => { + self._getContent(resourceGroupName, automationAccountName, runbookName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getContent(automationAccountName, runbookName, options, optionalCallback); + return self._getContent(resourceGroupName, automationAccountName, runbookName, options, optionalCallback); } } /** * Replaces the runbook draft content. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -1030,11 +1050,11 @@ class RunbookDraftOperations { * * @reject {Error} - The error object. */ - replaceContentWithHttpOperationResponse(automationAccountName, runbookName, runbookContent, options) { + replaceContentWithHttpOperationResponse(resourceGroupName, automationAccountName, runbookName, runbookContent, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._replaceContent(automationAccountName, runbookName, runbookContent, options, (err, result, request, response) => { + self._replaceContent(resourceGroupName, automationAccountName, runbookName, runbookContent, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1047,6 +1067,8 @@ class RunbookDraftOperations { /** * Replaces the runbook draft content. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -1079,7 +1101,7 @@ class RunbookDraftOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - replaceContent(automationAccountName, runbookName, runbookContent, options, optionalCallback) { + replaceContent(resourceGroupName, automationAccountName, runbookName, runbookContent, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1088,20 +1110,22 @@ class RunbookDraftOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._replaceContent(automationAccountName, runbookName, runbookContent, options, (err, result, request, response) => { + self._replaceContent(resourceGroupName, automationAccountName, runbookName, runbookContent, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._replaceContent(automationAccountName, runbookName, runbookContent, options, optionalCallback); + return self._replaceContent(resourceGroupName, automationAccountName, runbookName, runbookContent, options, optionalCallback); } } /** * Retrieve the runbook draft identified by runbook name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -1117,11 +1141,11 @@ class RunbookDraftOperations { * * @reject {Error} - The error object. */ - getWithHttpOperationResponse(automationAccountName, runbookName, options) { + getWithHttpOperationResponse(resourceGroupName, automationAccountName, runbookName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._get(automationAccountName, runbookName, options, (err, result, request, response) => { + self._get(resourceGroupName, automationAccountName, runbookName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1134,6 +1158,8 @@ class RunbookDraftOperations { /** * Retrieve the runbook draft identified by runbook name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -1165,7 +1191,7 @@ class RunbookDraftOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - get(automationAccountName, runbookName, options, optionalCallback) { + get(resourceGroupName, automationAccountName, runbookName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1174,20 +1200,22 @@ class RunbookDraftOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._get(automationAccountName, runbookName, options, (err, result, request, response) => { + self._get(resourceGroupName, automationAccountName, runbookName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._get(automationAccountName, runbookName, options, optionalCallback); + return self._get(resourceGroupName, automationAccountName, runbookName, options, optionalCallback); } } /** * Publish runbook draft. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The parameters supplied to the publish runbook @@ -1204,11 +1232,11 @@ class RunbookDraftOperations { * * @reject {Error} - The error object. */ - publishWithHttpOperationResponse(automationAccountName, runbookName, options) { + publishWithHttpOperationResponse(resourceGroupName, automationAccountName, runbookName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._publish(automationAccountName, runbookName, options, (err, result, request, response) => { + self._publish(resourceGroupName, automationAccountName, runbookName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1221,6 +1249,8 @@ class RunbookDraftOperations { /** * Publish runbook draft. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The parameters supplied to the publish runbook @@ -1252,7 +1282,7 @@ class RunbookDraftOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - publish(automationAccountName, runbookName, options, optionalCallback) { + publish(resourceGroupName, automationAccountName, runbookName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1261,20 +1291,22 @@ class RunbookDraftOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._publish(automationAccountName, runbookName, options, (err, result, request, response) => { + self._publish(resourceGroupName, automationAccountName, runbookName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._publish(automationAccountName, runbookName, options, optionalCallback); + return self._publish(resourceGroupName, automationAccountName, runbookName, options, optionalCallback); } } /** * Undo draft edit to last known published state identified by runbook name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -1290,11 +1322,11 @@ class RunbookDraftOperations { * * @reject {Error} - The error object. */ - undoEditWithHttpOperationResponse(automationAccountName, runbookName, options) { + undoEditWithHttpOperationResponse(resourceGroupName, automationAccountName, runbookName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._undoEdit(automationAccountName, runbookName, options, (err, result, request, response) => { + self._undoEdit(resourceGroupName, automationAccountName, runbookName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1307,6 +1339,8 @@ class RunbookDraftOperations { /** * Undo draft edit to last known published state identified by runbook name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -1339,7 +1373,7 @@ class RunbookDraftOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - undoEdit(automationAccountName, runbookName, options, optionalCallback) { + undoEdit(resourceGroupName, automationAccountName, runbookName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1348,20 +1382,22 @@ class RunbookDraftOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._undoEdit(automationAccountName, runbookName, options, (err, result, request, response) => { + self._undoEdit(resourceGroupName, automationAccountName, runbookName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._undoEdit(automationAccountName, runbookName, options, optionalCallback); + return self._undoEdit(resourceGroupName, automationAccountName, runbookName, options, optionalCallback); } } /** * Replaces the runbook draft content. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -1379,11 +1415,11 @@ class RunbookDraftOperations { * * @reject {Error} - The error object. */ - beginReplaceContentWithHttpOperationResponse(automationAccountName, runbookName, runbookContent, options) { + beginReplaceContentWithHttpOperationResponse(resourceGroupName, automationAccountName, runbookName, runbookContent, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._beginReplaceContent(automationAccountName, runbookName, runbookContent, options, (err, result, request, response) => { + self._beginReplaceContent(resourceGroupName, automationAccountName, runbookName, runbookContent, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1396,6 +1432,8 @@ class RunbookDraftOperations { /** * Replaces the runbook draft content. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -1428,7 +1466,7 @@ class RunbookDraftOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - beginReplaceContent(automationAccountName, runbookName, runbookContent, options, optionalCallback) { + beginReplaceContent(resourceGroupName, automationAccountName, runbookName, runbookContent, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1437,20 +1475,22 @@ class RunbookDraftOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._beginReplaceContent(automationAccountName, runbookName, runbookContent, options, (err, result, request, response) => { + self._beginReplaceContent(resourceGroupName, automationAccountName, runbookName, runbookContent, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._beginReplaceContent(automationAccountName, runbookName, runbookContent, options, optionalCallback); + return self._beginReplaceContent(resourceGroupName, automationAccountName, runbookName, runbookContent, options, optionalCallback); } } /** * Publish runbook draft. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The parameters supplied to the publish runbook @@ -1467,11 +1507,11 @@ class RunbookDraftOperations { * * @reject {Error} - The error object. */ - beginPublishWithHttpOperationResponse(automationAccountName, runbookName, options) { + beginPublishWithHttpOperationResponse(resourceGroupName, automationAccountName, runbookName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._beginPublish(automationAccountName, runbookName, options, (err, result, request, response) => { + self._beginPublish(resourceGroupName, automationAccountName, runbookName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1484,6 +1524,8 @@ class RunbookDraftOperations { /** * Publish runbook draft. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The parameters supplied to the publish runbook @@ -1515,7 +1557,7 @@ class RunbookDraftOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - beginPublish(automationAccountName, runbookName, options, optionalCallback) { + beginPublish(resourceGroupName, automationAccountName, runbookName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1524,14 +1566,14 @@ class RunbookDraftOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._beginPublish(automationAccountName, runbookName, options, (err, result, request, response) => { + self._beginPublish(resourceGroupName, automationAccountName, runbookName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._beginPublish(automationAccountName, runbookName, options, optionalCallback); + return self._beginPublish(resourceGroupName, automationAccountName, runbookName, options, optionalCallback); } } diff --git a/lib/services/automationManagement/lib/operations/runbookOperations.js b/lib/services/automationManagement/lib/operations/runbookOperations.js index 727f2c4ed7..bc857a50b5 100644 --- a/lib/services/automationManagement/lib/operations/runbookOperations.js +++ b/lib/services/automationManagement/lib/operations/runbookOperations.js @@ -17,6 +17,8 @@ const WebResource = msRest.WebResource; /** * Retrieve the content of runbook identified by runbook name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -38,7 +40,7 @@ const WebResource = msRest.WebResource; * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _getContent(automationAccountName, runbookName, options, callback) { +function _getContent(resourceGroupName, automationAccountName, runbookName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -54,13 +56,13 @@ function _getContent(automationAccountName, runbookName, options, callback) { if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -80,7 +82,7 @@ function _getContent(automationAccountName, runbookName, options, callback) { let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/runbooks/{runbookName}/content'; requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{runbookName}', encodeURIComponent(runbookName)); let queryParameters = []; @@ -175,6 +177,8 @@ function _getContent(automationAccountName, runbookName, options, callback) { /** * Retrieve the runbook identified by runbook name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -197,7 +201,7 @@ function _getContent(automationAccountName, runbookName, options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _get(automationAccountName, runbookName, options, callback) { +function _get(resourceGroupName, automationAccountName, runbookName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -213,13 +217,13 @@ function _get(automationAccountName, runbookName, options, callback) { if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -239,7 +243,7 @@ function _get(automationAccountName, runbookName, options, callback) { let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/runbooks/{runbookName}'; requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{runbookName}', encodeURIComponent(runbookName)); let queryParameters = []; @@ -329,6 +333,8 @@ function _get(automationAccountName, runbookName, options, callback) { /** * Create the runbook identified by runbook name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -415,7 +421,7 @@ function _get(automationAccountName, runbookName, options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _createOrUpdate(automationAccountName, runbookName, parameters, options, callback) { +function _createOrUpdate(resourceGroupName, automationAccountName, runbookName, parameters, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -431,13 +437,13 @@ function _createOrUpdate(automationAccountName, runbookName, parameters, options if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -460,7 +466,7 @@ function _createOrUpdate(automationAccountName, runbookName, parameters, options let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/runbooks/{runbookName}'; requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{runbookName}', encodeURIComponent(runbookName)); let queryParameters = []; @@ -581,6 +587,8 @@ function _createOrUpdate(automationAccountName, runbookName, parameters, options /** * Update the runbook identified by runbook name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -623,7 +631,7 @@ function _createOrUpdate(automationAccountName, runbookName, parameters, options * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _update(automationAccountName, runbookName, parameters, options, callback) { +function _update(resourceGroupName, automationAccountName, runbookName, parameters, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -639,13 +647,13 @@ function _update(automationAccountName, runbookName, parameters, options, callba if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -668,7 +676,7 @@ function _update(automationAccountName, runbookName, parameters, options, callba let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/runbooks/{runbookName}'; requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{runbookName}', encodeURIComponent(runbookName)); let queryParameters = []; @@ -772,6 +780,8 @@ function _update(automationAccountName, runbookName, parameters, options, callba /** * Delete the runbook by name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -793,7 +803,7 @@ function _update(automationAccountName, runbookName, parameters, options, callba * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _deleteMethod(automationAccountName, runbookName, options, callback) { +function _deleteMethod(resourceGroupName, automationAccountName, runbookName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -809,13 +819,13 @@ function _deleteMethod(automationAccountName, runbookName, options, callback) { if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -835,7 +845,7 @@ function _deleteMethod(automationAccountName, runbookName, options, callback) { let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/runbooks/{runbookName}'; requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{runbookName}', encodeURIComponent(runbookName)); let queryParameters = []; @@ -908,6 +918,8 @@ function _deleteMethod(automationAccountName, runbookName, options, callback) { /** * Retrieve a list of runbooks. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -928,7 +940,7 @@ function _deleteMethod(automationAccountName, runbookName, options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _listByAutomationAccount(automationAccountName, options, callback) { +function _listByAutomationAccount(resourceGroupName, automationAccountName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -944,13 +956,13 @@ function _listByAutomationAccount(automationAccountName, options, callback) { if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -967,7 +979,7 @@ function _listByAutomationAccount(automationAccountName, options, callback) { let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/runbooks'; requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); @@ -1201,6 +1213,8 @@ class RunbookOperations { /** * Retrieve the content of runbook identified by runbook name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -1216,11 +1230,11 @@ class RunbookOperations { * * @reject {Error} - The error object. */ - getContentWithHttpOperationResponse(automationAccountName, runbookName, options) { + getContentWithHttpOperationResponse(resourceGroupName, automationAccountName, runbookName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._getContent(automationAccountName, runbookName, options, (err, result, request, response) => { + self._getContent(resourceGroupName, automationAccountName, runbookName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1233,6 +1247,8 @@ class RunbookOperations { /** * Retrieve the content of runbook identified by runbook name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -1263,7 +1279,7 @@ class RunbookOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getContent(automationAccountName, runbookName, options, optionalCallback) { + getContent(resourceGroupName, automationAccountName, runbookName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1272,20 +1288,22 @@ class RunbookOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getContent(automationAccountName, runbookName, options, (err, result, request, response) => { + self._getContent(resourceGroupName, automationAccountName, runbookName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getContent(automationAccountName, runbookName, options, optionalCallback); + return self._getContent(resourceGroupName, automationAccountName, runbookName, options, optionalCallback); } } /** * Retrieve the runbook identified by runbook name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -1301,11 +1319,11 @@ class RunbookOperations { * * @reject {Error} - The error object. */ - getWithHttpOperationResponse(automationAccountName, runbookName, options) { + getWithHttpOperationResponse(resourceGroupName, automationAccountName, runbookName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._get(automationAccountName, runbookName, options, (err, result, request, response) => { + self._get(resourceGroupName, automationAccountName, runbookName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1318,6 +1336,8 @@ class RunbookOperations { /** * Retrieve the runbook identified by runbook name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -1349,7 +1369,7 @@ class RunbookOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - get(automationAccountName, runbookName, options, optionalCallback) { + get(resourceGroupName, automationAccountName, runbookName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1358,20 +1378,22 @@ class RunbookOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._get(automationAccountName, runbookName, options, (err, result, request, response) => { + self._get(resourceGroupName, automationAccountName, runbookName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._get(automationAccountName, runbookName, options, optionalCallback); + return self._get(resourceGroupName, automationAccountName, runbookName, options, optionalCallback); } } /** * Create the runbook identified by runbook name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -1451,11 +1473,11 @@ class RunbookOperations { * * @reject {Error} - The error object. */ - createOrUpdateWithHttpOperationResponse(automationAccountName, runbookName, parameters, options) { + createOrUpdateWithHttpOperationResponse(resourceGroupName, automationAccountName, runbookName, parameters, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._createOrUpdate(automationAccountName, runbookName, parameters, options, (err, result, request, response) => { + self._createOrUpdate(resourceGroupName, automationAccountName, runbookName, parameters, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1468,6 +1490,8 @@ class RunbookOperations { /** * Create the runbook identified by runbook name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -1563,7 +1587,7 @@ class RunbookOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - createOrUpdate(automationAccountName, runbookName, parameters, options, optionalCallback) { + createOrUpdate(resourceGroupName, automationAccountName, runbookName, parameters, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1572,20 +1596,22 @@ class RunbookOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._createOrUpdate(automationAccountName, runbookName, parameters, options, (err, result, request, response) => { + self._createOrUpdate(resourceGroupName, automationAccountName, runbookName, parameters, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._createOrUpdate(automationAccountName, runbookName, parameters, options, optionalCallback); + return self._createOrUpdate(resourceGroupName, automationAccountName, runbookName, parameters, options, optionalCallback); } } /** * Update the runbook identified by runbook name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -1621,11 +1647,11 @@ class RunbookOperations { * * @reject {Error} - The error object. */ - updateWithHttpOperationResponse(automationAccountName, runbookName, parameters, options) { + updateWithHttpOperationResponse(resourceGroupName, automationAccountName, runbookName, parameters, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._update(automationAccountName, runbookName, parameters, options, (err, result, request, response) => { + self._update(resourceGroupName, automationAccountName, runbookName, parameters, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1638,6 +1664,8 @@ class RunbookOperations { /** * Update the runbook identified by runbook name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -1689,7 +1717,7 @@ class RunbookOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - update(automationAccountName, runbookName, parameters, options, optionalCallback) { + update(resourceGroupName, automationAccountName, runbookName, parameters, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1698,20 +1726,22 @@ class RunbookOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._update(automationAccountName, runbookName, parameters, options, (err, result, request, response) => { + self._update(resourceGroupName, automationAccountName, runbookName, parameters, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._update(automationAccountName, runbookName, parameters, options, optionalCallback); + return self._update(resourceGroupName, automationAccountName, runbookName, parameters, options, optionalCallback); } } /** * Delete the runbook by name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -1727,11 +1757,11 @@ class RunbookOperations { * * @reject {Error} - The error object. */ - deleteMethodWithHttpOperationResponse(automationAccountName, runbookName, options) { + deleteMethodWithHttpOperationResponse(resourceGroupName, automationAccountName, runbookName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._deleteMethod(automationAccountName, runbookName, options, (err, result, request, response) => { + self._deleteMethod(resourceGroupName, automationAccountName, runbookName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1744,6 +1774,8 @@ class RunbookOperations { /** * Delete the runbook by name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -1774,7 +1806,7 @@ class RunbookOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(automationAccountName, runbookName, options, optionalCallback) { + deleteMethod(resourceGroupName, automationAccountName, runbookName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1783,20 +1815,22 @@ class RunbookOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._deleteMethod(automationAccountName, runbookName, options, (err, result, request, response) => { + self._deleteMethod(resourceGroupName, automationAccountName, runbookName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._deleteMethod(automationAccountName, runbookName, options, optionalCallback); + return self._deleteMethod(resourceGroupName, automationAccountName, runbookName, options, optionalCallback); } } /** * Retrieve a list of runbooks. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -1810,11 +1844,11 @@ class RunbookOperations { * * @reject {Error} - The error object. */ - listByAutomationAccountWithHttpOperationResponse(automationAccountName, options) { + listByAutomationAccountWithHttpOperationResponse(resourceGroupName, automationAccountName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._listByAutomationAccount(automationAccountName, options, (err, result, request, response) => { + self._listByAutomationAccount(resourceGroupName, automationAccountName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1827,6 +1861,8 @@ class RunbookOperations { /** * Retrieve a list of runbooks. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -1856,7 +1892,7 @@ class RunbookOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - listByAutomationAccount(automationAccountName, options, optionalCallback) { + listByAutomationAccount(resourceGroupName, automationAccountName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1865,14 +1901,14 @@ class RunbookOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._listByAutomationAccount(automationAccountName, options, (err, result, request, response) => { + self._listByAutomationAccount(resourceGroupName, automationAccountName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._listByAutomationAccount(automationAccountName, options, optionalCallback); + return self._listByAutomationAccount(resourceGroupName, automationAccountName, options, optionalCallback); } } diff --git a/lib/services/automationManagement/lib/operations/scheduleOperations.js b/lib/services/automationManagement/lib/operations/scheduleOperations.js index 48f5c87207..ab725860f2 100644 --- a/lib/services/automationManagement/lib/operations/scheduleOperations.js +++ b/lib/services/automationManagement/lib/operations/scheduleOperations.js @@ -17,6 +17,8 @@ const WebResource = msRest.WebResource; /** * Create a schedule. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} scheduleName The schedule name. @@ -74,7 +76,7 @@ const WebResource = msRest.WebResource; * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _createOrUpdate(automationAccountName, scheduleName, parameters, options, callback) { +function _createOrUpdate(resourceGroupName, automationAccountName, scheduleName, parameters, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -87,13 +89,13 @@ function _createOrUpdate(automationAccountName, scheduleName, parameters, option let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -118,7 +120,7 @@ function _createOrUpdate(automationAccountName, scheduleName, parameters, option // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/schedules/{scheduleName}'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{scheduleName}', encodeURIComponent(scheduleName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -223,6 +225,8 @@ function _createOrUpdate(automationAccountName, scheduleName, parameters, option /** * Update the schedule identified by schedule name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} scheduleName The schedule name. @@ -256,7 +260,7 @@ function _createOrUpdate(automationAccountName, scheduleName, parameters, option * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _update(automationAccountName, scheduleName, parameters, options, callback) { +function _update(resourceGroupName, automationAccountName, scheduleName, parameters, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -269,13 +273,13 @@ function _update(automationAccountName, scheduleName, parameters, options, callb let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -300,7 +304,7 @@ function _update(automationAccountName, scheduleName, parameters, options, callb // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/schedules/{scheduleName}'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{scheduleName}', encodeURIComponent(scheduleName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -405,6 +409,8 @@ function _update(automationAccountName, scheduleName, parameters, options, callb /** * Retrieve the schedule identified by schedule name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} scheduleName The schedule name. @@ -427,7 +433,7 @@ function _update(automationAccountName, scheduleName, parameters, options, callb * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _get(automationAccountName, scheduleName, options, callback) { +function _get(resourceGroupName, automationAccountName, scheduleName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -440,13 +446,13 @@ function _get(automationAccountName, scheduleName, options, callback) { let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -468,7 +474,7 @@ function _get(automationAccountName, scheduleName, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/schedules/{scheduleName}'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{scheduleName}', encodeURIComponent(scheduleName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -559,6 +565,8 @@ function _get(automationAccountName, scheduleName, options, callback) { /** * Delete the schedule identified by schedule name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} scheduleName The schedule name. @@ -580,7 +588,7 @@ function _get(automationAccountName, scheduleName, options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _deleteMethod(automationAccountName, scheduleName, options, callback) { +function _deleteMethod(resourceGroupName, automationAccountName, scheduleName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -593,13 +601,13 @@ function _deleteMethod(automationAccountName, scheduleName, options, callback) { let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -621,7 +629,7 @@ function _deleteMethod(automationAccountName, scheduleName, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/schedules/{scheduleName}'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{scheduleName}', encodeURIComponent(scheduleName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -695,6 +703,8 @@ function _deleteMethod(automationAccountName, scheduleName, options, callback) { /** * Retrieve a list of schedules. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -715,7 +725,7 @@ function _deleteMethod(automationAccountName, scheduleName, options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _listByAutomationAccount(automationAccountName, options, callback) { +function _listByAutomationAccount(resourceGroupName, automationAccountName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -728,13 +738,13 @@ function _listByAutomationAccount(automationAccountName, options, callback) { let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -753,7 +763,7 @@ function _listByAutomationAccount(automationAccountName, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/schedules'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; @@ -987,6 +997,8 @@ class ScheduleOperations { /** * Create a schedule. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} scheduleName The schedule name. @@ -1037,11 +1049,11 @@ class ScheduleOperations { * * @reject {Error} - The error object. */ - createOrUpdateWithHttpOperationResponse(automationAccountName, scheduleName, parameters, options) { + createOrUpdateWithHttpOperationResponse(resourceGroupName, automationAccountName, scheduleName, parameters, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._createOrUpdate(automationAccountName, scheduleName, parameters, options, (err, result, request, response) => { + self._createOrUpdate(resourceGroupName, automationAccountName, scheduleName, parameters, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1054,6 +1066,8 @@ class ScheduleOperations { /** * Create a schedule. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} scheduleName The schedule name. @@ -1120,7 +1134,7 @@ class ScheduleOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - createOrUpdate(automationAccountName, scheduleName, parameters, options, optionalCallback) { + createOrUpdate(resourceGroupName, automationAccountName, scheduleName, parameters, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1129,20 +1143,22 @@ class ScheduleOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._createOrUpdate(automationAccountName, scheduleName, parameters, options, (err, result, request, response) => { + self._createOrUpdate(resourceGroupName, automationAccountName, scheduleName, parameters, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._createOrUpdate(automationAccountName, scheduleName, parameters, options, optionalCallback); + return self._createOrUpdate(resourceGroupName, automationAccountName, scheduleName, parameters, options, optionalCallback); } } /** * Update the schedule identified by schedule name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} scheduleName The schedule name. @@ -1169,11 +1185,11 @@ class ScheduleOperations { * * @reject {Error} - The error object. */ - updateWithHttpOperationResponse(automationAccountName, scheduleName, parameters, options) { + updateWithHttpOperationResponse(resourceGroupName, automationAccountName, scheduleName, parameters, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._update(automationAccountName, scheduleName, parameters, options, (err, result, request, response) => { + self._update(resourceGroupName, automationAccountName, scheduleName, parameters, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1186,6 +1202,8 @@ class ScheduleOperations { /** * Update the schedule identified by schedule name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} scheduleName The schedule name. @@ -1228,7 +1246,7 @@ class ScheduleOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - update(automationAccountName, scheduleName, parameters, options, optionalCallback) { + update(resourceGroupName, automationAccountName, scheduleName, parameters, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1237,20 +1255,22 @@ class ScheduleOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._update(automationAccountName, scheduleName, parameters, options, (err, result, request, response) => { + self._update(resourceGroupName, automationAccountName, scheduleName, parameters, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._update(automationAccountName, scheduleName, parameters, options, optionalCallback); + return self._update(resourceGroupName, automationAccountName, scheduleName, parameters, options, optionalCallback); } } /** * Retrieve the schedule identified by schedule name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} scheduleName The schedule name. @@ -1266,11 +1286,11 @@ class ScheduleOperations { * * @reject {Error} - The error object. */ - getWithHttpOperationResponse(automationAccountName, scheduleName, options) { + getWithHttpOperationResponse(resourceGroupName, automationAccountName, scheduleName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._get(automationAccountName, scheduleName, options, (err, result, request, response) => { + self._get(resourceGroupName, automationAccountName, scheduleName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1283,6 +1303,8 @@ class ScheduleOperations { /** * Retrieve the schedule identified by schedule name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} scheduleName The schedule name. @@ -1314,7 +1336,7 @@ class ScheduleOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - get(automationAccountName, scheduleName, options, optionalCallback) { + get(resourceGroupName, automationAccountName, scheduleName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1323,20 +1345,22 @@ class ScheduleOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._get(automationAccountName, scheduleName, options, (err, result, request, response) => { + self._get(resourceGroupName, automationAccountName, scheduleName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._get(automationAccountName, scheduleName, options, optionalCallback); + return self._get(resourceGroupName, automationAccountName, scheduleName, options, optionalCallback); } } /** * Delete the schedule identified by schedule name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} scheduleName The schedule name. @@ -1352,11 +1376,11 @@ class ScheduleOperations { * * @reject {Error} - The error object. */ - deleteMethodWithHttpOperationResponse(automationAccountName, scheduleName, options) { + deleteMethodWithHttpOperationResponse(resourceGroupName, automationAccountName, scheduleName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._deleteMethod(automationAccountName, scheduleName, options, (err, result, request, response) => { + self._deleteMethod(resourceGroupName, automationAccountName, scheduleName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1369,6 +1393,8 @@ class ScheduleOperations { /** * Delete the schedule identified by schedule name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} scheduleName The schedule name. @@ -1399,7 +1425,7 @@ class ScheduleOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(automationAccountName, scheduleName, options, optionalCallback) { + deleteMethod(resourceGroupName, automationAccountName, scheduleName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1408,20 +1434,22 @@ class ScheduleOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._deleteMethod(automationAccountName, scheduleName, options, (err, result, request, response) => { + self._deleteMethod(resourceGroupName, automationAccountName, scheduleName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._deleteMethod(automationAccountName, scheduleName, options, optionalCallback); + return self._deleteMethod(resourceGroupName, automationAccountName, scheduleName, options, optionalCallback); } } /** * Retrieve a list of schedules. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -1435,11 +1463,11 @@ class ScheduleOperations { * * @reject {Error} - The error object. */ - listByAutomationAccountWithHttpOperationResponse(automationAccountName, options) { + listByAutomationAccountWithHttpOperationResponse(resourceGroupName, automationAccountName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._listByAutomationAccount(automationAccountName, options, (err, result, request, response) => { + self._listByAutomationAccount(resourceGroupName, automationAccountName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1452,6 +1480,8 @@ class ScheduleOperations { /** * Retrieve a list of schedules. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -1481,7 +1511,7 @@ class ScheduleOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - listByAutomationAccount(automationAccountName, options, optionalCallback) { + listByAutomationAccount(resourceGroupName, automationAccountName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1490,14 +1520,14 @@ class ScheduleOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._listByAutomationAccount(automationAccountName, options, (err, result, request, response) => { + self._listByAutomationAccount(resourceGroupName, automationAccountName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._listByAutomationAccount(automationAccountName, options, optionalCallback); + return self._listByAutomationAccount(resourceGroupName, automationAccountName, options, optionalCallback); } } diff --git a/lib/services/automationManagement/lib/operations/softwareUpdateConfigurationMachineRuns.js b/lib/services/automationManagement/lib/operations/softwareUpdateConfigurationMachineRuns.js index 0e7ecad27e..e70e258544 100644 --- a/lib/services/automationManagement/lib/operations/softwareUpdateConfigurationMachineRuns.js +++ b/lib/services/automationManagement/lib/operations/softwareUpdateConfigurationMachineRuns.js @@ -17,11 +17,18 @@ const WebResource = msRest.WebResource; /** * Get a single software update configuration machine run by Id. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {uuid} softwareUpdateConfigurationMachineRunId The Id of the software * update configuration machine run. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -39,7 +46,7 @@ const WebResource = msRest.WebResource; * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _getById(softwareUpdateConfigurationMachineRunId, options, callback) { +function _getById(resourceGroupName, automationAccountName, softwareUpdateConfigurationMachineRunId, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -49,29 +56,30 @@ function _getById(softwareUpdateConfigurationMachineRunId, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } + let clientRequestId = (options && options.clientRequestId !== undefined) ? options.clientRequestId : undefined; let apiVersion = '2017-05-15-preview'; // Validate try { if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } - if (this.client.automationAccountName === null || this.client.automationAccountName === undefined || typeof this.client.automationAccountName.valueOf() !== 'string') { - throw new Error('this.client.automationAccountName cannot be null or undefined and it must be of type string.'); + if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { + throw new Error('automationAccountName cannot be null or undefined and it must be of type string.'); } if (softwareUpdateConfigurationMachineRunId === null || softwareUpdateConfigurationMachineRunId === undefined || typeof softwareUpdateConfigurationMachineRunId.valueOf() !== 'string' || !msRest.isValidUuid(softwareUpdateConfigurationMachineRunId)) { throw new Error('softwareUpdateConfigurationMachineRunId cannot be null or undefined and it must be of type string and must be a valid uuid.'); } - if (this.client.clientRequestId !== null && this.client.clientRequestId !== undefined && typeof this.client.clientRequestId.valueOf() !== 'string') { - throw new Error('this.client.clientRequestId must be of type string.'); + if (clientRequestId !== null && clientRequestId !== undefined && typeof clientRequestId.valueOf() !== 'string') { + throw new Error('clientRequestId must be of type string.'); } if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { throw new Error('this.client.acceptLanguage must be of type string.'); @@ -84,8 +92,8 @@ function _getById(softwareUpdateConfigurationMachineRunId, options, callback) { let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/softwareUpdateConfigurationMachineRuns/{softwareUpdateConfigurationMachineRunId}'; requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); - requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(this.client.automationAccountName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{softwareUpdateConfigurationMachineRunId}', encodeURIComponent(softwareUpdateConfigurationMachineRunId.toString())); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); @@ -103,8 +111,8 @@ function _getById(softwareUpdateConfigurationMachineRunId, options, callback) { if (this.client.generateClientRequestId) { httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); } - if (this.client.clientRequestId !== undefined && this.client.clientRequestId !== null) { - httpRequest.headers['clientRequestId'] = this.client.clientRequestId; + if (clientRequestId !== undefined && clientRequestId !== null) { + httpRequest.headers['clientRequestId'] = clientRequestId; } if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { httpRequest.headers['accept-language'] = this.client.acceptLanguage; @@ -176,8 +184,15 @@ function _getById(softwareUpdateConfigurationMachineRunId, options, callback) { /** * Return list of software update configuration machine runs * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {string} [options.filter] The filter to apply on the operation. You * can use the following filters: 'properties/osType', 'properties/status', * 'properties/startTime', and 'properties/softwareUpdateConfiguration/name' @@ -206,7 +221,7 @@ function _getById(softwareUpdateConfigurationMachineRunId, options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _list(options, callback) { +function _list(resourceGroupName, automationAccountName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -216,6 +231,7 @@ function _list(options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } + let clientRequestId = (options && options.clientRequestId !== undefined) ? options.clientRequestId : undefined; let filter = (options && options.filter !== undefined) ? options.filter : undefined; let skip = (options && options.skip !== undefined) ? options.skip : undefined; let top = (options && options.top !== undefined) ? options.top : undefined; @@ -225,20 +241,20 @@ function _list(options, callback) { if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } - if (this.client.automationAccountName === null || this.client.automationAccountName === undefined || typeof this.client.automationAccountName.valueOf() !== 'string') { - throw new Error('this.client.automationAccountName cannot be null or undefined and it must be of type string.'); + if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { + throw new Error('automationAccountName cannot be null or undefined and it must be of type string.'); } - if (this.client.clientRequestId !== null && this.client.clientRequestId !== undefined && typeof this.client.clientRequestId.valueOf() !== 'string') { - throw new Error('this.client.clientRequestId must be of type string.'); + if (clientRequestId !== null && clientRequestId !== undefined && typeof clientRequestId.valueOf() !== 'string') { + throw new Error('clientRequestId must be of type string.'); } if (filter !== null && filter !== undefined && typeof filter.valueOf() !== 'string') { throw new Error('filter must be of type string.'); @@ -260,8 +276,8 @@ function _list(options, callback) { let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/softwareUpdateConfigurationMachineRuns'; requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); - requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(this.client.automationAccountName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); if (filter !== null && filter !== undefined) { @@ -287,8 +303,8 @@ function _list(options, callback) { if (this.client.generateClientRequestId) { httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); } - if (this.client.clientRequestId !== undefined && this.client.clientRequestId !== null) { - httpRequest.headers['clientRequestId'] = this.client.clientRequestId; + if (clientRequestId !== undefined && clientRequestId !== null) { + httpRequest.headers['clientRequestId'] = clientRequestId; } if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { httpRequest.headers['accept-language'] = this.client.acceptLanguage; @@ -372,11 +388,18 @@ class SoftwareUpdateConfigurationMachineRuns { /** * Get a single software update configuration machine run by Id. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {uuid} softwareUpdateConfigurationMachineRunId The Id of the software * update configuration machine run. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -386,11 +409,11 @@ class SoftwareUpdateConfigurationMachineRuns { * * @reject {Error} - The error object. */ - getByIdWithHttpOperationResponse(softwareUpdateConfigurationMachineRunId, options) { + getByIdWithHttpOperationResponse(resourceGroupName, automationAccountName, softwareUpdateConfigurationMachineRunId, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._getById(softwareUpdateConfigurationMachineRunId, options, (err, result, request, response) => { + self._getById(resourceGroupName, automationAccountName, softwareUpdateConfigurationMachineRunId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -403,11 +426,18 @@ class SoftwareUpdateConfigurationMachineRuns { /** * Get a single software update configuration machine run by Id. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {uuid} softwareUpdateConfigurationMachineRunId The Id of the software * update configuration machine run. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -434,7 +464,7 @@ class SoftwareUpdateConfigurationMachineRuns { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getById(softwareUpdateConfigurationMachineRunId, options, optionalCallback) { + getById(resourceGroupName, automationAccountName, softwareUpdateConfigurationMachineRunId, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -443,22 +473,29 @@ class SoftwareUpdateConfigurationMachineRuns { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getById(softwareUpdateConfigurationMachineRunId, options, (err, result, request, response) => { + self._getById(resourceGroupName, automationAccountName, softwareUpdateConfigurationMachineRunId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getById(softwareUpdateConfigurationMachineRunId, options, optionalCallback); + return self._getById(resourceGroupName, automationAccountName, softwareUpdateConfigurationMachineRunId, options, optionalCallback); } } /** * Return list of software update configuration machine runs * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {string} [options.filter] The filter to apply on the operation. You * can use the following filters: 'properties/osType', 'properties/status', * 'properties/startTime', and 'properties/softwareUpdateConfiguration/name' @@ -478,11 +515,11 @@ class SoftwareUpdateConfigurationMachineRuns { * * @reject {Error} - The error object. */ - listWithHttpOperationResponse(options) { + listWithHttpOperationResponse(resourceGroupName, automationAccountName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._list(options, (err, result, request, response) => { + self._list(resourceGroupName, automationAccountName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -495,8 +532,15 @@ class SoftwareUpdateConfigurationMachineRuns { /** * Return list of software update configuration machine runs * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {string} [options.filter] The filter to apply on the operation. You * can use the following filters: 'properties/osType', 'properties/status', * 'properties/startTime', and 'properties/softwareUpdateConfiguration/name' @@ -534,7 +578,7 @@ class SoftwareUpdateConfigurationMachineRuns { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - list(options, optionalCallback) { + list(resourceGroupName, automationAccountName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -543,14 +587,14 @@ class SoftwareUpdateConfigurationMachineRuns { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._list(options, (err, result, request, response) => { + self._list(resourceGroupName, automationAccountName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._list(options, optionalCallback); + return self._list(resourceGroupName, automationAccountName, options, optionalCallback); } } diff --git a/lib/services/automationManagement/lib/operations/softwareUpdateConfigurationRuns.js b/lib/services/automationManagement/lib/operations/softwareUpdateConfigurationRuns.js index ed70966f40..0aaec32ede 100644 --- a/lib/services/automationManagement/lib/operations/softwareUpdateConfigurationRuns.js +++ b/lib/services/automationManagement/lib/operations/softwareUpdateConfigurationRuns.js @@ -17,11 +17,18 @@ const WebResource = msRest.WebResource; /** * Get a single software update configuration Run by Id. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {uuid} softwareUpdateConfigurationRunId The Id of the software update * configuration run. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -39,7 +46,7 @@ const WebResource = msRest.WebResource; * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _getById(softwareUpdateConfigurationRunId, options, callback) { +function _getById(resourceGroupName, automationAccountName, softwareUpdateConfigurationRunId, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -49,29 +56,30 @@ function _getById(softwareUpdateConfigurationRunId, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } + let clientRequestId = (options && options.clientRequestId !== undefined) ? options.clientRequestId : undefined; let apiVersion = '2017-05-15-preview'; // Validate try { if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } - if (this.client.automationAccountName === null || this.client.automationAccountName === undefined || typeof this.client.automationAccountName.valueOf() !== 'string') { - throw new Error('this.client.automationAccountName cannot be null or undefined and it must be of type string.'); + if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { + throw new Error('automationAccountName cannot be null or undefined and it must be of type string.'); } if (softwareUpdateConfigurationRunId === null || softwareUpdateConfigurationRunId === undefined || typeof softwareUpdateConfigurationRunId.valueOf() !== 'string' || !msRest.isValidUuid(softwareUpdateConfigurationRunId)) { throw new Error('softwareUpdateConfigurationRunId cannot be null or undefined and it must be of type string and must be a valid uuid.'); } - if (this.client.clientRequestId !== null && this.client.clientRequestId !== undefined && typeof this.client.clientRequestId.valueOf() !== 'string') { - throw new Error('this.client.clientRequestId must be of type string.'); + if (clientRequestId !== null && clientRequestId !== undefined && typeof clientRequestId.valueOf() !== 'string') { + throw new Error('clientRequestId must be of type string.'); } if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { throw new Error('this.client.acceptLanguage must be of type string.'); @@ -84,8 +92,8 @@ function _getById(softwareUpdateConfigurationRunId, options, callback) { let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/softwareUpdateConfigurationRuns/{softwareUpdateConfigurationRunId}'; requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); - requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(this.client.automationAccountName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{softwareUpdateConfigurationRunId}', encodeURIComponent(softwareUpdateConfigurationRunId.toString())); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); @@ -103,8 +111,8 @@ function _getById(softwareUpdateConfigurationRunId, options, callback) { if (this.client.generateClientRequestId) { httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); } - if (this.client.clientRequestId !== undefined && this.client.clientRequestId !== null) { - httpRequest.headers['clientRequestId'] = this.client.clientRequestId; + if (clientRequestId !== undefined && clientRequestId !== null) { + httpRequest.headers['clientRequestId'] = clientRequestId; } if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { httpRequest.headers['accept-language'] = this.client.acceptLanguage; @@ -176,8 +184,15 @@ function _getById(softwareUpdateConfigurationRunId, options, callback) { /** * Return list of software update configuration runs * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {string} [options.filter] The filter to apply on the operation. You * can use the following filters: 'properties/osType', 'properties/status', * 'properties/startTime', and 'properties/softwareUpdateConfiguration/name' @@ -205,7 +220,7 @@ function _getById(softwareUpdateConfigurationRunId, options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _list(options, callback) { +function _list(resourceGroupName, automationAccountName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -215,6 +230,7 @@ function _list(options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } + let clientRequestId = (options && options.clientRequestId !== undefined) ? options.clientRequestId : undefined; let filter = (options && options.filter !== undefined) ? options.filter : undefined; let skip = (options && options.skip !== undefined) ? options.skip : undefined; let top = (options && options.top !== undefined) ? options.top : undefined; @@ -224,20 +240,20 @@ function _list(options, callback) { if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } - if (this.client.automationAccountName === null || this.client.automationAccountName === undefined || typeof this.client.automationAccountName.valueOf() !== 'string') { - throw new Error('this.client.automationAccountName cannot be null or undefined and it must be of type string.'); + if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { + throw new Error('automationAccountName cannot be null or undefined and it must be of type string.'); } - if (this.client.clientRequestId !== null && this.client.clientRequestId !== undefined && typeof this.client.clientRequestId.valueOf() !== 'string') { - throw new Error('this.client.clientRequestId must be of type string.'); + if (clientRequestId !== null && clientRequestId !== undefined && typeof clientRequestId.valueOf() !== 'string') { + throw new Error('clientRequestId must be of type string.'); } if (filter !== null && filter !== undefined && typeof filter.valueOf() !== 'string') { throw new Error('filter must be of type string.'); @@ -259,8 +275,8 @@ function _list(options, callback) { let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/softwareUpdateConfigurationRuns'; requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); - requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(this.client.automationAccountName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); if (filter !== null && filter !== undefined) { @@ -286,8 +302,8 @@ function _list(options, callback) { if (this.client.generateClientRequestId) { httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); } - if (this.client.clientRequestId !== undefined && this.client.clientRequestId !== null) { - httpRequest.headers['clientRequestId'] = this.client.clientRequestId; + if (clientRequestId !== undefined && clientRequestId !== null) { + httpRequest.headers['clientRequestId'] = clientRequestId; } if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { httpRequest.headers['accept-language'] = this.client.acceptLanguage; @@ -371,11 +387,18 @@ class SoftwareUpdateConfigurationRuns { /** * Get a single software update configuration Run by Id. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {uuid} softwareUpdateConfigurationRunId The Id of the software update * configuration run. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -385,11 +408,11 @@ class SoftwareUpdateConfigurationRuns { * * @reject {Error} - The error object. */ - getByIdWithHttpOperationResponse(softwareUpdateConfigurationRunId, options) { + getByIdWithHttpOperationResponse(resourceGroupName, automationAccountName, softwareUpdateConfigurationRunId, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._getById(softwareUpdateConfigurationRunId, options, (err, result, request, response) => { + self._getById(resourceGroupName, automationAccountName, softwareUpdateConfigurationRunId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -402,11 +425,18 @@ class SoftwareUpdateConfigurationRuns { /** * Get a single software update configuration Run by Id. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {uuid} softwareUpdateConfigurationRunId The Id of the software update * configuration run. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -433,7 +463,7 @@ class SoftwareUpdateConfigurationRuns { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getById(softwareUpdateConfigurationRunId, options, optionalCallback) { + getById(resourceGroupName, automationAccountName, softwareUpdateConfigurationRunId, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -442,22 +472,29 @@ class SoftwareUpdateConfigurationRuns { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getById(softwareUpdateConfigurationRunId, options, (err, result, request, response) => { + self._getById(resourceGroupName, automationAccountName, softwareUpdateConfigurationRunId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getById(softwareUpdateConfigurationRunId, options, optionalCallback); + return self._getById(resourceGroupName, automationAccountName, softwareUpdateConfigurationRunId, options, optionalCallback); } } /** * Return list of software update configuration runs * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {string} [options.filter] The filter to apply on the operation. You * can use the following filters: 'properties/osType', 'properties/status', * 'properties/startTime', and 'properties/softwareUpdateConfiguration/name' @@ -477,11 +514,11 @@ class SoftwareUpdateConfigurationRuns { * * @reject {Error} - The error object. */ - listWithHttpOperationResponse(options) { + listWithHttpOperationResponse(resourceGroupName, automationAccountName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._list(options, (err, result, request, response) => { + self._list(resourceGroupName, automationAccountName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -494,8 +531,15 @@ class SoftwareUpdateConfigurationRuns { /** * Return list of software update configuration runs * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {string} [options.filter] The filter to apply on the operation. You * can use the following filters: 'properties/osType', 'properties/status', * 'properties/startTime', and 'properties/softwareUpdateConfiguration/name' @@ -532,7 +576,7 @@ class SoftwareUpdateConfigurationRuns { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - list(options, optionalCallback) { + list(resourceGroupName, automationAccountName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -541,14 +585,14 @@ class SoftwareUpdateConfigurationRuns { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._list(options, (err, result, request, response) => { + self._list(resourceGroupName, automationAccountName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._list(options, optionalCallback); + return self._list(resourceGroupName, automationAccountName, options, optionalCallback); } } diff --git a/lib/services/automationManagement/lib/operations/softwareUpdateConfigurations.js b/lib/services/automationManagement/lib/operations/softwareUpdateConfigurations.js index 2bac5ec8b4..24f7f61710 100644 --- a/lib/services/automationManagement/lib/operations/softwareUpdateConfigurations.js +++ b/lib/services/automationManagement/lib/operations/softwareUpdateConfigurations.js @@ -17,6 +17,10 @@ const WebResource = msRest.WebResource; /** * Create a new software update configuration with the name given in the URI. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {string} softwareUpdateConfigurationName The name of the software * update configuration to be created. * @@ -126,6 +130,9 @@ const WebResource = msRest.WebResource; * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -143,7 +150,7 @@ const WebResource = msRest.WebResource; * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _create(softwareUpdateConfigurationName, parameters, options, callback) { +function _create(resourceGroupName, automationAccountName, softwareUpdateConfigurationName, parameters, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -153,29 +160,30 @@ function _create(softwareUpdateConfigurationName, parameters, options, callback) if (!callback) { throw new Error('callback cannot be null.'); } + let clientRequestId = (options && options.clientRequestId !== undefined) ? options.clientRequestId : undefined; let apiVersion = '2017-05-15-preview'; // Validate try { if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } - if (this.client.automationAccountName === null || this.client.automationAccountName === undefined || typeof this.client.automationAccountName.valueOf() !== 'string') { - throw new Error('this.client.automationAccountName cannot be null or undefined and it must be of type string.'); + if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { + throw new Error('automationAccountName cannot be null or undefined and it must be of type string.'); } if (softwareUpdateConfigurationName === null || softwareUpdateConfigurationName === undefined || typeof softwareUpdateConfigurationName.valueOf() !== 'string') { throw new Error('softwareUpdateConfigurationName cannot be null or undefined and it must be of type string.'); } - if (this.client.clientRequestId !== null && this.client.clientRequestId !== undefined && typeof this.client.clientRequestId.valueOf() !== 'string') { - throw new Error('this.client.clientRequestId must be of type string.'); + if (clientRequestId !== null && clientRequestId !== undefined && typeof clientRequestId.valueOf() !== 'string') { + throw new Error('clientRequestId must be of type string.'); } if (parameters === null || parameters === undefined) { throw new Error('parameters cannot be null or undefined.'); @@ -191,8 +199,8 @@ function _create(softwareUpdateConfigurationName, parameters, options, callback) let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/softwareUpdateConfigurations/{softwareUpdateConfigurationName}'; requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); - requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(this.client.automationAccountName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{softwareUpdateConfigurationName}', encodeURIComponent(softwareUpdateConfigurationName)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); @@ -210,8 +218,8 @@ function _create(softwareUpdateConfigurationName, parameters, options, callback) if (this.client.generateClientRequestId) { httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); } - if (this.client.clientRequestId !== undefined && this.client.clientRequestId !== null) { - httpRequest.headers['clientRequestId'] = this.client.clientRequestId; + if (clientRequestId !== undefined && clientRequestId !== null) { + httpRequest.headers['clientRequestId'] = clientRequestId; } if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { httpRequest.headers['accept-language'] = this.client.acceptLanguage; @@ -314,11 +322,18 @@ function _create(softwareUpdateConfigurationName, parameters, options, callback) /** * Get a single software update configuration by name. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {string} softwareUpdateConfigurationName The name of the software * update configuration to be created. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -336,7 +351,7 @@ function _create(softwareUpdateConfigurationName, parameters, options, callback) * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _getByName(softwareUpdateConfigurationName, options, callback) { +function _getByName(resourceGroupName, automationAccountName, softwareUpdateConfigurationName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -346,29 +361,30 @@ function _getByName(softwareUpdateConfigurationName, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } + let clientRequestId = (options && options.clientRequestId !== undefined) ? options.clientRequestId : undefined; let apiVersion = '2017-05-15-preview'; // Validate try { if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } - if (this.client.automationAccountName === null || this.client.automationAccountName === undefined || typeof this.client.automationAccountName.valueOf() !== 'string') { - throw new Error('this.client.automationAccountName cannot be null or undefined and it must be of type string.'); + if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { + throw new Error('automationAccountName cannot be null or undefined and it must be of type string.'); } if (softwareUpdateConfigurationName === null || softwareUpdateConfigurationName === undefined || typeof softwareUpdateConfigurationName.valueOf() !== 'string') { throw new Error('softwareUpdateConfigurationName cannot be null or undefined and it must be of type string.'); } - if (this.client.clientRequestId !== null && this.client.clientRequestId !== undefined && typeof this.client.clientRequestId.valueOf() !== 'string') { - throw new Error('this.client.clientRequestId must be of type string.'); + if (clientRequestId !== null && clientRequestId !== undefined && typeof clientRequestId.valueOf() !== 'string') { + throw new Error('clientRequestId must be of type string.'); } if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { throw new Error('this.client.acceptLanguage must be of type string.'); @@ -381,8 +397,8 @@ function _getByName(softwareUpdateConfigurationName, options, callback) { let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/softwareUpdateConfigurations/{softwareUpdateConfigurationName}'; requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); - requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(this.client.automationAccountName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{softwareUpdateConfigurationName}', encodeURIComponent(softwareUpdateConfigurationName)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); @@ -400,8 +416,8 @@ function _getByName(softwareUpdateConfigurationName, options, callback) { if (this.client.generateClientRequestId) { httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); } - if (this.client.clientRequestId !== undefined && this.client.clientRequestId !== null) { - httpRequest.headers['clientRequestId'] = this.client.clientRequestId; + if (clientRequestId !== undefined && clientRequestId !== null) { + httpRequest.headers['clientRequestId'] = clientRequestId; } if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { httpRequest.headers['accept-language'] = this.client.acceptLanguage; @@ -473,11 +489,18 @@ function _getByName(softwareUpdateConfigurationName, options, callback) { /** * delete a specific software update configuration. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {string} softwareUpdateConfigurationName The name of the software * update configuration to be created. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -493,7 +516,7 @@ function _getByName(softwareUpdateConfigurationName, options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _deleteMethod(softwareUpdateConfigurationName, options, callback) { +function _deleteMethod(resourceGroupName, automationAccountName, softwareUpdateConfigurationName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -503,29 +526,30 @@ function _deleteMethod(softwareUpdateConfigurationName, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } + let clientRequestId = (options && options.clientRequestId !== undefined) ? options.clientRequestId : undefined; let apiVersion = '2017-05-15-preview'; // Validate try { if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } - if (this.client.automationAccountName === null || this.client.automationAccountName === undefined || typeof this.client.automationAccountName.valueOf() !== 'string') { - throw new Error('this.client.automationAccountName cannot be null or undefined and it must be of type string.'); + if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { + throw new Error('automationAccountName cannot be null or undefined and it must be of type string.'); } if (softwareUpdateConfigurationName === null || softwareUpdateConfigurationName === undefined || typeof softwareUpdateConfigurationName.valueOf() !== 'string') { throw new Error('softwareUpdateConfigurationName cannot be null or undefined and it must be of type string.'); } - if (this.client.clientRequestId !== null && this.client.clientRequestId !== undefined && typeof this.client.clientRequestId.valueOf() !== 'string') { - throw new Error('this.client.clientRequestId must be of type string.'); + if (clientRequestId !== null && clientRequestId !== undefined && typeof clientRequestId.valueOf() !== 'string') { + throw new Error('clientRequestId must be of type string.'); } if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { throw new Error('this.client.acceptLanguage must be of type string.'); @@ -538,8 +562,8 @@ function _deleteMethod(softwareUpdateConfigurationName, options, callback) { let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/softwareUpdateConfigurations/{softwareUpdateConfigurationName}'; requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); - requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(this.client.automationAccountName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{softwareUpdateConfigurationName}', encodeURIComponent(softwareUpdateConfigurationName)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); @@ -557,8 +581,8 @@ function _deleteMethod(softwareUpdateConfigurationName, options, callback) { if (this.client.generateClientRequestId) { httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); } - if (this.client.clientRequestId !== undefined && this.client.clientRequestId !== null) { - httpRequest.headers['clientRequestId'] = this.client.clientRequestId; + if (clientRequestId !== undefined && clientRequestId !== null) { + httpRequest.headers['clientRequestId'] = clientRequestId; } if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { httpRequest.headers['accept-language'] = this.client.acceptLanguage; @@ -613,8 +637,15 @@ function _deleteMethod(softwareUpdateConfigurationName, options, callback) { /** * Get all software update configurations for the account. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {string} [options.filter] The filter to apply on the operation. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -634,7 +665,7 @@ function _deleteMethod(softwareUpdateConfigurationName, options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _list(options, callback) { +function _list(resourceGroupName, automationAccountName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -644,6 +675,7 @@ function _list(options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } + let clientRequestId = (options && options.clientRequestId !== undefined) ? options.clientRequestId : undefined; let filter = (options && options.filter !== undefined) ? options.filter : undefined; let apiVersion = '2017-05-15-preview'; // Validate @@ -651,20 +683,20 @@ function _list(options, callback) { if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } - if (this.client.automationAccountName === null || this.client.automationAccountName === undefined || typeof this.client.automationAccountName.valueOf() !== 'string') { - throw new Error('this.client.automationAccountName cannot be null or undefined and it must be of type string.'); + if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { + throw new Error('automationAccountName cannot be null or undefined and it must be of type string.'); } - if (this.client.clientRequestId !== null && this.client.clientRequestId !== undefined && typeof this.client.clientRequestId.valueOf() !== 'string') { - throw new Error('this.client.clientRequestId must be of type string.'); + if (clientRequestId !== null && clientRequestId !== undefined && typeof clientRequestId.valueOf() !== 'string') { + throw new Error('clientRequestId must be of type string.'); } if (filter !== null && filter !== undefined && typeof filter.valueOf() !== 'string') { throw new Error('filter must be of type string.'); @@ -680,8 +712,8 @@ function _list(options, callback) { let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/softwareUpdateConfigurations'; requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); - requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(this.client.automationAccountName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); if (filter !== null && filter !== undefined) { @@ -701,8 +733,8 @@ function _list(options, callback) { if (this.client.generateClientRequestId) { httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); } - if (this.client.clientRequestId !== undefined && this.client.clientRequestId !== null) { - httpRequest.headers['clientRequestId'] = this.client.clientRequestId; + if (clientRequestId !== undefined && clientRequestId !== null) { + httpRequest.headers['clientRequestId'] = clientRequestId; } if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { httpRequest.headers['accept-language'] = this.client.acceptLanguage; @@ -788,6 +820,10 @@ class SoftwareUpdateConfigurations { /** * Create a new software update configuration with the name given in the URI. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {string} softwareUpdateConfigurationName The name of the software * update configuration to be created. * @@ -897,6 +933,9 @@ class SoftwareUpdateConfigurations { * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -906,11 +945,11 @@ class SoftwareUpdateConfigurations { * * @reject {Error} - The error object. */ - createWithHttpOperationResponse(softwareUpdateConfigurationName, parameters, options) { + createWithHttpOperationResponse(resourceGroupName, automationAccountName, softwareUpdateConfigurationName, parameters, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._create(softwareUpdateConfigurationName, parameters, options, (err, result, request, response) => { + self._create(resourceGroupName, automationAccountName, softwareUpdateConfigurationName, parameters, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -923,6 +962,10 @@ class SoftwareUpdateConfigurations { /** * Create a new software update configuration with the name given in the URI. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {string} softwareUpdateConfigurationName The name of the software * update configuration to be created. * @@ -1032,6 +1075,9 @@ class SoftwareUpdateConfigurations { * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -1058,7 +1104,7 @@ class SoftwareUpdateConfigurations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - create(softwareUpdateConfigurationName, parameters, options, optionalCallback) { + create(resourceGroupName, automationAccountName, softwareUpdateConfigurationName, parameters, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1067,25 +1113,32 @@ class SoftwareUpdateConfigurations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._create(softwareUpdateConfigurationName, parameters, options, (err, result, request, response) => { + self._create(resourceGroupName, automationAccountName, softwareUpdateConfigurationName, parameters, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._create(softwareUpdateConfigurationName, parameters, options, optionalCallback); + return self._create(resourceGroupName, automationAccountName, softwareUpdateConfigurationName, parameters, options, optionalCallback); } } /** * Get a single software update configuration by name. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {string} softwareUpdateConfigurationName The name of the software * update configuration to be created. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -1095,11 +1148,11 @@ class SoftwareUpdateConfigurations { * * @reject {Error} - The error object. */ - getByNameWithHttpOperationResponse(softwareUpdateConfigurationName, options) { + getByNameWithHttpOperationResponse(resourceGroupName, automationAccountName, softwareUpdateConfigurationName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._getByName(softwareUpdateConfigurationName, options, (err, result, request, response) => { + self._getByName(resourceGroupName, automationAccountName, softwareUpdateConfigurationName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1112,11 +1165,18 @@ class SoftwareUpdateConfigurations { /** * Get a single software update configuration by name. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {string} softwareUpdateConfigurationName The name of the software * update configuration to be created. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -1143,7 +1203,7 @@ class SoftwareUpdateConfigurations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getByName(softwareUpdateConfigurationName, options, optionalCallback) { + getByName(resourceGroupName, automationAccountName, softwareUpdateConfigurationName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1152,25 +1212,32 @@ class SoftwareUpdateConfigurations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getByName(softwareUpdateConfigurationName, options, (err, result, request, response) => { + self._getByName(resourceGroupName, automationAccountName, softwareUpdateConfigurationName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getByName(softwareUpdateConfigurationName, options, optionalCallback); + return self._getByName(resourceGroupName, automationAccountName, softwareUpdateConfigurationName, options, optionalCallback); } } /** * delete a specific software update configuration. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {string} softwareUpdateConfigurationName The name of the software * update configuration to be created. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -1180,11 +1247,11 @@ class SoftwareUpdateConfigurations { * * @reject {Error} - The error object. */ - deleteMethodWithHttpOperationResponse(softwareUpdateConfigurationName, options) { + deleteMethodWithHttpOperationResponse(resourceGroupName, automationAccountName, softwareUpdateConfigurationName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._deleteMethod(softwareUpdateConfigurationName, options, (err, result, request, response) => { + self._deleteMethod(resourceGroupName, automationAccountName, softwareUpdateConfigurationName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1197,11 +1264,18 @@ class SoftwareUpdateConfigurations { /** * delete a specific software update configuration. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {string} softwareUpdateConfigurationName The name of the software * update configuration to be created. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -1226,7 +1300,7 @@ class SoftwareUpdateConfigurations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(softwareUpdateConfigurationName, options, optionalCallback) { + deleteMethod(resourceGroupName, automationAccountName, softwareUpdateConfigurationName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1235,22 +1309,29 @@ class SoftwareUpdateConfigurations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._deleteMethod(softwareUpdateConfigurationName, options, (err, result, request, response) => { + self._deleteMethod(resourceGroupName, automationAccountName, softwareUpdateConfigurationName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._deleteMethod(softwareUpdateConfigurationName, options, optionalCallback); + return self._deleteMethod(resourceGroupName, automationAccountName, softwareUpdateConfigurationName, options, optionalCallback); } } /** * Get all software update configurations for the account. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {string} [options.filter] The filter to apply on the operation. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -1262,11 +1343,11 @@ class SoftwareUpdateConfigurations { * * @reject {Error} - The error object. */ - listWithHttpOperationResponse(options) { + listWithHttpOperationResponse(resourceGroupName, automationAccountName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._list(options, (err, result, request, response) => { + self._list(resourceGroupName, automationAccountName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1279,8 +1360,15 @@ class SoftwareUpdateConfigurations { /** * Get all software update configurations for the account. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {string} [options.filter] The filter to apply on the operation. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -1309,7 +1397,7 @@ class SoftwareUpdateConfigurations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - list(options, optionalCallback) { + list(resourceGroupName, automationAccountName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1318,14 +1406,14 @@ class SoftwareUpdateConfigurations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._list(options, (err, result, request, response) => { + self._list(resourceGroupName, automationAccountName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._list(options, optionalCallback); + return self._list(resourceGroupName, automationAccountName, options, optionalCallback); } } diff --git a/lib/services/automationManagement/lib/operations/sourceControlOperations.js b/lib/services/automationManagement/lib/operations/sourceControlOperations.js index cc165f3f21..45f6f96beb 100644 --- a/lib/services/automationManagement/lib/operations/sourceControlOperations.js +++ b/lib/services/automationManagement/lib/operations/sourceControlOperations.js @@ -17,6 +17,8 @@ const WebResource = msRest.WebResource; /** * Create a source control. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} sourceControlName The source control name. @@ -67,7 +69,7 @@ const WebResource = msRest.WebResource; * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _createOrUpdate(automationAccountName, sourceControlName, parameters, options, callback) { +function _createOrUpdate(resourceGroupName, automationAccountName, sourceControlName, parameters, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -80,13 +82,13 @@ function _createOrUpdate(automationAccountName, sourceControlName, parameters, o let apiVersion = '2017-05-15-preview'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -111,7 +113,7 @@ function _createOrUpdate(automationAccountName, sourceControlName, parameters, o // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/sourceControls/{sourceControlName}'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{sourceControlName}', encodeURIComponent(sourceControlName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -233,6 +235,8 @@ function _createOrUpdate(automationAccountName, sourceControlName, parameters, o /** * Update a source control. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} sourceControlName The source control name. @@ -276,7 +280,7 @@ function _createOrUpdate(automationAccountName, sourceControlName, parameters, o * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _update(automationAccountName, sourceControlName, parameters, options, callback) { +function _update(resourceGroupName, automationAccountName, sourceControlName, parameters, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -289,13 +293,13 @@ function _update(automationAccountName, sourceControlName, parameters, options, let apiVersion = '2017-05-15-preview'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -320,7 +324,7 @@ function _update(automationAccountName, sourceControlName, parameters, options, // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/sourceControls/{sourceControlName}'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{sourceControlName}', encodeURIComponent(sourceControlName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -425,6 +429,8 @@ function _update(automationAccountName, sourceControlName, parameters, options, /** * Delete the source control. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} sourceControlName The name of source control. @@ -446,7 +452,7 @@ function _update(automationAccountName, sourceControlName, parameters, options, * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _deleteMethod(automationAccountName, sourceControlName, options, callback) { +function _deleteMethod(resourceGroupName, automationAccountName, sourceControlName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -459,13 +465,13 @@ function _deleteMethod(automationAccountName, sourceControlName, options, callba let apiVersion = '2017-05-15-preview'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -487,7 +493,7 @@ function _deleteMethod(automationAccountName, sourceControlName, options, callba // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/sourceControls/{sourceControlName}'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{sourceControlName}', encodeURIComponent(sourceControlName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -561,6 +567,8 @@ function _deleteMethod(automationAccountName, sourceControlName, options, callba /** * Retrieve the source control identified by source control name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} sourceControlName The name of source control. @@ -583,7 +591,7 @@ function _deleteMethod(automationAccountName, sourceControlName, options, callba * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _get(automationAccountName, sourceControlName, options, callback) { +function _get(resourceGroupName, automationAccountName, sourceControlName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -596,13 +604,13 @@ function _get(automationAccountName, sourceControlName, options, callback) { let apiVersion = '2017-05-15-preview'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -624,7 +632,7 @@ function _get(automationAccountName, sourceControlName, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/sourceControls/{sourceControlName}'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{sourceControlName}', encodeURIComponent(sourceControlName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -715,6 +723,8 @@ function _get(automationAccountName, sourceControlName, options, callback) { /** * Retrieve a list of source controls. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -738,7 +748,7 @@ function _get(automationAccountName, sourceControlName, options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _listByAutomationAccount(automationAccountName, options, callback) { +function _listByAutomationAccount(resourceGroupName, automationAccountName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -752,13 +762,13 @@ function _listByAutomationAccount(automationAccountName, options, callback) { let apiVersion = '2017-05-15-preview'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -780,7 +790,7 @@ function _listByAutomationAccount(automationAccountName, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/sourceControls'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; @@ -1018,6 +1028,8 @@ class SourceControlOperations { /** * Create a source control. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} sourceControlName The source control name. @@ -1061,11 +1073,11 @@ class SourceControlOperations { * * @reject {Error} - The error object. */ - createOrUpdateWithHttpOperationResponse(automationAccountName, sourceControlName, parameters, options) { + createOrUpdateWithHttpOperationResponse(resourceGroupName, automationAccountName, sourceControlName, parameters, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._createOrUpdate(automationAccountName, sourceControlName, parameters, options, (err, result, request, response) => { + self._createOrUpdate(resourceGroupName, automationAccountName, sourceControlName, parameters, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1078,6 +1090,8 @@ class SourceControlOperations { /** * Create a source control. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} sourceControlName The source control name. @@ -1137,7 +1151,7 @@ class SourceControlOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - createOrUpdate(automationAccountName, sourceControlName, parameters, options, optionalCallback) { + createOrUpdate(resourceGroupName, automationAccountName, sourceControlName, parameters, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1146,20 +1160,22 @@ class SourceControlOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._createOrUpdate(automationAccountName, sourceControlName, parameters, options, (err, result, request, response) => { + self._createOrUpdate(resourceGroupName, automationAccountName, sourceControlName, parameters, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._createOrUpdate(automationAccountName, sourceControlName, parameters, options, optionalCallback); + return self._createOrUpdate(resourceGroupName, automationAccountName, sourceControlName, parameters, options, optionalCallback); } } /** * Update a source control. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} sourceControlName The source control name. @@ -1196,11 +1212,11 @@ class SourceControlOperations { * * @reject {Error} - The error object. */ - updateWithHttpOperationResponse(automationAccountName, sourceControlName, parameters, options) { + updateWithHttpOperationResponse(resourceGroupName, automationAccountName, sourceControlName, parameters, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._update(automationAccountName, sourceControlName, parameters, options, (err, result, request, response) => { + self._update(resourceGroupName, automationAccountName, sourceControlName, parameters, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1213,6 +1229,8 @@ class SourceControlOperations { /** * Update a source control. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} sourceControlName The source control name. @@ -1265,7 +1283,7 @@ class SourceControlOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - update(automationAccountName, sourceControlName, parameters, options, optionalCallback) { + update(resourceGroupName, automationAccountName, sourceControlName, parameters, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1274,20 +1292,22 @@ class SourceControlOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._update(automationAccountName, sourceControlName, parameters, options, (err, result, request, response) => { + self._update(resourceGroupName, automationAccountName, sourceControlName, parameters, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._update(automationAccountName, sourceControlName, parameters, options, optionalCallback); + return self._update(resourceGroupName, automationAccountName, sourceControlName, parameters, options, optionalCallback); } } /** * Delete the source control. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} sourceControlName The name of source control. @@ -1303,11 +1323,11 @@ class SourceControlOperations { * * @reject {Error} - The error object. */ - deleteMethodWithHttpOperationResponse(automationAccountName, sourceControlName, options) { + deleteMethodWithHttpOperationResponse(resourceGroupName, automationAccountName, sourceControlName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._deleteMethod(automationAccountName, sourceControlName, options, (err, result, request, response) => { + self._deleteMethod(resourceGroupName, automationAccountName, sourceControlName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1320,6 +1340,8 @@ class SourceControlOperations { /** * Delete the source control. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} sourceControlName The name of source control. @@ -1350,7 +1372,7 @@ class SourceControlOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(automationAccountName, sourceControlName, options, optionalCallback) { + deleteMethod(resourceGroupName, automationAccountName, sourceControlName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1359,20 +1381,22 @@ class SourceControlOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._deleteMethod(automationAccountName, sourceControlName, options, (err, result, request, response) => { + self._deleteMethod(resourceGroupName, automationAccountName, sourceControlName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._deleteMethod(automationAccountName, sourceControlName, options, optionalCallback); + return self._deleteMethod(resourceGroupName, automationAccountName, sourceControlName, options, optionalCallback); } } /** * Retrieve the source control identified by source control name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} sourceControlName The name of source control. @@ -1388,11 +1412,11 @@ class SourceControlOperations { * * @reject {Error} - The error object. */ - getWithHttpOperationResponse(automationAccountName, sourceControlName, options) { + getWithHttpOperationResponse(resourceGroupName, automationAccountName, sourceControlName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._get(automationAccountName, sourceControlName, options, (err, result, request, response) => { + self._get(resourceGroupName, automationAccountName, sourceControlName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1405,6 +1429,8 @@ class SourceControlOperations { /** * Retrieve the source control identified by source control name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} sourceControlName The name of source control. @@ -1436,7 +1462,7 @@ class SourceControlOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - get(automationAccountName, sourceControlName, options, optionalCallback) { + get(resourceGroupName, automationAccountName, sourceControlName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1445,20 +1471,22 @@ class SourceControlOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._get(automationAccountName, sourceControlName, options, (err, result, request, response) => { + self._get(resourceGroupName, automationAccountName, sourceControlName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._get(automationAccountName, sourceControlName, options, optionalCallback); + return self._get(resourceGroupName, automationAccountName, sourceControlName, options, optionalCallback); } } /** * Retrieve a list of source controls. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -1474,11 +1502,11 @@ class SourceControlOperations { * * @reject {Error} - The error object. */ - listByAutomationAccountWithHttpOperationResponse(automationAccountName, options) { + listByAutomationAccountWithHttpOperationResponse(resourceGroupName, automationAccountName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._listByAutomationAccount(automationAccountName, options, (err, result, request, response) => { + self._listByAutomationAccount(resourceGroupName, automationAccountName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1491,6 +1519,8 @@ class SourceControlOperations { /** * Retrieve a list of source controls. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -1523,7 +1553,7 @@ class SourceControlOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - listByAutomationAccount(automationAccountName, options, optionalCallback) { + listByAutomationAccount(resourceGroupName, automationAccountName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1532,14 +1562,14 @@ class SourceControlOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._listByAutomationAccount(automationAccountName, options, (err, result, request, response) => { + self._listByAutomationAccount(resourceGroupName, automationAccountName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._listByAutomationAccount(automationAccountName, options, optionalCallback); + return self._listByAutomationAccount(resourceGroupName, automationAccountName, options, optionalCallback); } } diff --git a/lib/services/automationManagement/lib/operations/sourceControlSyncJobOperations.js b/lib/services/automationManagement/lib/operations/sourceControlSyncJobOperations.js index 9c083f2028..d0159af758 100644 --- a/lib/services/automationManagement/lib/operations/sourceControlSyncJobOperations.js +++ b/lib/services/automationManagement/lib/operations/sourceControlSyncJobOperations.js @@ -17,6 +17,8 @@ const WebResource = msRest.WebResource; /** * Creates the sync job for a source control. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} sourceControlName The source control name. @@ -41,7 +43,7 @@ const WebResource = msRest.WebResource; * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _create(automationAccountName, sourceControlName, sourceControlSyncJobId, options, callback) { +function _create(resourceGroupName, automationAccountName, sourceControlName, sourceControlSyncJobId, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -54,13 +56,13 @@ function _create(automationAccountName, sourceControlName, sourceControlSyncJobI let apiVersion = '2017-05-15-preview'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -85,7 +87,7 @@ function _create(automationAccountName, sourceControlName, sourceControlSyncJobI // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/sourceControls/{sourceControlName}/sourceControlSyncJobs/{sourceControlSyncJobId}'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{sourceControlName}', encodeURIComponent(sourceControlName)); requestUrl = requestUrl.replace('{sourceControlSyncJobId}', encodeURIComponent(sourceControlSyncJobId.toString())); @@ -177,6 +179,8 @@ function _create(automationAccountName, sourceControlName, sourceControlSyncJobI /** * Retrieve the source control sync job identified by job id. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} sourceControlName The source control name. @@ -202,7 +206,7 @@ function _create(automationAccountName, sourceControlName, sourceControlSyncJobI * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _get(automationAccountName, sourceControlName, sourceControlSyncJobId, options, callback) { +function _get(resourceGroupName, automationAccountName, sourceControlName, sourceControlSyncJobId, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -215,13 +219,13 @@ function _get(automationAccountName, sourceControlName, sourceControlSyncJobId, let apiVersion = '2017-05-15-preview'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -246,7 +250,7 @@ function _get(automationAccountName, sourceControlName, sourceControlSyncJobId, // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/sourceControls/{sourceControlName}/sourceControlSyncJobs/{sourceControlSyncJobId}'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{sourceControlName}', encodeURIComponent(sourceControlName)); requestUrl = requestUrl.replace('{sourceControlSyncJobId}', encodeURIComponent(sourceControlSyncJobId.toString())); @@ -338,6 +342,8 @@ function _get(automationAccountName, sourceControlName, sourceControlSyncJobId, /** * Retrieve a list of source control sync jobs. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} sourceControlName The source control name. @@ -363,7 +369,7 @@ function _get(automationAccountName, sourceControlName, sourceControlSyncJobId, * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _listByAutomationAccount(automationAccountName, sourceControlName, options, callback) { +function _listByAutomationAccount(resourceGroupName, automationAccountName, sourceControlName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -377,13 +383,13 @@ function _listByAutomationAccount(automationAccountName, sourceControlName, opti let apiVersion = '2017-05-15-preview'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -408,7 +414,7 @@ function _listByAutomationAccount(automationAccountName, sourceControlName, opti // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/sourceControls/{sourceControlName}/sourceControlSyncJobs'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{sourceControlName}', encodeURIComponent(sourceControlName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -645,6 +651,8 @@ class SourceControlSyncJobOperations { /** * Creates the sync job for a source control. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} sourceControlName The source control name. @@ -662,11 +670,11 @@ class SourceControlSyncJobOperations { * * @reject {Error} - The error object. */ - createWithHttpOperationResponse(automationAccountName, sourceControlName, sourceControlSyncJobId, options) { + createWithHttpOperationResponse(resourceGroupName, automationAccountName, sourceControlName, sourceControlSyncJobId, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._create(automationAccountName, sourceControlName, sourceControlSyncJobId, options, (err, result, request, response) => { + self._create(resourceGroupName, automationAccountName, sourceControlName, sourceControlSyncJobId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -679,6 +687,8 @@ class SourceControlSyncJobOperations { /** * Creates the sync job for a source control. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} sourceControlName The source control name. @@ -712,7 +722,7 @@ class SourceControlSyncJobOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - create(automationAccountName, sourceControlName, sourceControlSyncJobId, options, optionalCallback) { + create(resourceGroupName, automationAccountName, sourceControlName, sourceControlSyncJobId, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -721,20 +731,22 @@ class SourceControlSyncJobOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._create(automationAccountName, sourceControlName, sourceControlSyncJobId, options, (err, result, request, response) => { + self._create(resourceGroupName, automationAccountName, sourceControlName, sourceControlSyncJobId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._create(automationAccountName, sourceControlName, sourceControlSyncJobId, options, optionalCallback); + return self._create(resourceGroupName, automationAccountName, sourceControlName, sourceControlSyncJobId, options, optionalCallback); } } /** * Retrieve the source control sync job identified by job id. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} sourceControlName The source control name. @@ -752,11 +764,11 @@ class SourceControlSyncJobOperations { * * @reject {Error} - The error object. */ - getWithHttpOperationResponse(automationAccountName, sourceControlName, sourceControlSyncJobId, options) { + getWithHttpOperationResponse(resourceGroupName, automationAccountName, sourceControlName, sourceControlSyncJobId, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._get(automationAccountName, sourceControlName, sourceControlSyncJobId, options, (err, result, request, response) => { + self._get(resourceGroupName, automationAccountName, sourceControlName, sourceControlSyncJobId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -769,6 +781,8 @@ class SourceControlSyncJobOperations { /** * Retrieve the source control sync job identified by job id. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} sourceControlName The source control name. @@ -803,7 +817,7 @@ class SourceControlSyncJobOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - get(automationAccountName, sourceControlName, sourceControlSyncJobId, options, optionalCallback) { + get(resourceGroupName, automationAccountName, sourceControlName, sourceControlSyncJobId, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -812,20 +826,22 @@ class SourceControlSyncJobOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._get(automationAccountName, sourceControlName, sourceControlSyncJobId, options, (err, result, request, response) => { + self._get(resourceGroupName, automationAccountName, sourceControlName, sourceControlSyncJobId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._get(automationAccountName, sourceControlName, sourceControlSyncJobId, options, optionalCallback); + return self._get(resourceGroupName, automationAccountName, sourceControlName, sourceControlSyncJobId, options, optionalCallback); } } /** * Retrieve a list of source control sync jobs. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} sourceControlName The source control name. @@ -843,11 +859,11 @@ class SourceControlSyncJobOperations { * * @reject {Error} - The error object. */ - listByAutomationAccountWithHttpOperationResponse(automationAccountName, sourceControlName, options) { + listByAutomationAccountWithHttpOperationResponse(resourceGroupName, automationAccountName, sourceControlName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._listByAutomationAccount(automationAccountName, sourceControlName, options, (err, result, request, response) => { + self._listByAutomationAccount(resourceGroupName, automationAccountName, sourceControlName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -860,6 +876,8 @@ class SourceControlSyncJobOperations { /** * Retrieve a list of source control sync jobs. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} sourceControlName The source control name. @@ -894,7 +912,7 @@ class SourceControlSyncJobOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - listByAutomationAccount(automationAccountName, sourceControlName, options, optionalCallback) { + listByAutomationAccount(resourceGroupName, automationAccountName, sourceControlName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -903,14 +921,14 @@ class SourceControlSyncJobOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._listByAutomationAccount(automationAccountName, sourceControlName, options, (err, result, request, response) => { + self._listByAutomationAccount(resourceGroupName, automationAccountName, sourceControlName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._listByAutomationAccount(automationAccountName, sourceControlName, options, optionalCallback); + return self._listByAutomationAccount(resourceGroupName, automationAccountName, sourceControlName, options, optionalCallback); } } diff --git a/lib/services/automationManagement/lib/operations/testJobOperations.js b/lib/services/automationManagement/lib/operations/testJobOperations.js index fe584dc175..d6bdd29dcc 100644 --- a/lib/services/automationManagement/lib/operations/testJobOperations.js +++ b/lib/services/automationManagement/lib/operations/testJobOperations.js @@ -17,6 +17,8 @@ const WebResource = msRest.WebResource; /** * Create a test job of the runbook. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The parameters supplied to the create test job @@ -49,7 +51,7 @@ const WebResource = msRest.WebResource; * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _create(automationAccountName, runbookName, parameters, options, callback) { +function _create(resourceGroupName, automationAccountName, runbookName, parameters, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -65,13 +67,13 @@ function _create(automationAccountName, runbookName, parameters, options, callba if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -94,7 +96,7 @@ function _create(automationAccountName, runbookName, parameters, options, callba let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/runbooks/{runbookName}/draft/testJob'; requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{runbookName}', encodeURIComponent(runbookName)); let queryParameters = []; @@ -198,6 +200,8 @@ function _create(automationAccountName, runbookName, parameters, options, callba /** * Retrieve the test job for the specified runbook. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -220,7 +224,7 @@ function _create(automationAccountName, runbookName, parameters, options, callba * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _get(automationAccountName, runbookName, options, callback) { +function _get(resourceGroupName, automationAccountName, runbookName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -236,13 +240,13 @@ function _get(automationAccountName, runbookName, options, callback) { if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -262,7 +266,7 @@ function _get(automationAccountName, runbookName, options, callback) { let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/runbooks/{runbookName}/draft/testJob'; requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{runbookName}', encodeURIComponent(runbookName)); let queryParameters = []; @@ -352,6 +356,8 @@ function _get(automationAccountName, runbookName, options, callback) { /** * Resume the test job. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -373,7 +379,7 @@ function _get(automationAccountName, runbookName, options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _resume(automationAccountName, runbookName, options, callback) { +function _resume(resourceGroupName, automationAccountName, runbookName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -389,13 +395,13 @@ function _resume(automationAccountName, runbookName, options, callback) { if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -415,7 +421,7 @@ function _resume(automationAccountName, runbookName, options, callback) { let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/runbooks/{runbookName}/draft/testJob/resume'; requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{runbookName}', encodeURIComponent(runbookName)); let queryParameters = []; @@ -488,6 +494,8 @@ function _resume(automationAccountName, runbookName, options, callback) { /** * Stop the test job. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -509,7 +517,7 @@ function _resume(automationAccountName, runbookName, options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _stop(automationAccountName, runbookName, options, callback) { +function _stop(resourceGroupName, automationAccountName, runbookName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -525,13 +533,13 @@ function _stop(automationAccountName, runbookName, options, callback) { if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -551,7 +559,7 @@ function _stop(automationAccountName, runbookName, options, callback) { let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/runbooks/{runbookName}/draft/testJob/stop'; requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{runbookName}', encodeURIComponent(runbookName)); let queryParameters = []; @@ -624,6 +632,8 @@ function _stop(automationAccountName, runbookName, options, callback) { /** * Suspend the test job. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -645,7 +655,7 @@ function _stop(automationAccountName, runbookName, options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _suspend(automationAccountName, runbookName, options, callback) { +function _suspend(resourceGroupName, automationAccountName, runbookName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -661,13 +671,13 @@ function _suspend(automationAccountName, runbookName, options, callback) { if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -687,7 +697,7 @@ function _suspend(automationAccountName, runbookName, options, callback) { let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/runbooks/{runbookName}/draft/testJob/suspend'; requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{runbookName}', encodeURIComponent(runbookName)); let queryParameters = []; @@ -775,6 +785,8 @@ class TestJobOperations { /** * Create a test job of the runbook. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The parameters supplied to the create test job @@ -800,11 +812,11 @@ class TestJobOperations { * * @reject {Error} - The error object. */ - createWithHttpOperationResponse(automationAccountName, runbookName, parameters, options) { + createWithHttpOperationResponse(resourceGroupName, automationAccountName, runbookName, parameters, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._create(automationAccountName, runbookName, parameters, options, (err, result, request, response) => { + self._create(resourceGroupName, automationAccountName, runbookName, parameters, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -817,6 +829,8 @@ class TestJobOperations { /** * Create a test job of the runbook. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The parameters supplied to the create test job @@ -858,7 +872,7 @@ class TestJobOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - create(automationAccountName, runbookName, parameters, options, optionalCallback) { + create(resourceGroupName, automationAccountName, runbookName, parameters, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -867,20 +881,22 @@ class TestJobOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._create(automationAccountName, runbookName, parameters, options, (err, result, request, response) => { + self._create(resourceGroupName, automationAccountName, runbookName, parameters, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._create(automationAccountName, runbookName, parameters, options, optionalCallback); + return self._create(resourceGroupName, automationAccountName, runbookName, parameters, options, optionalCallback); } } /** * Retrieve the test job for the specified runbook. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -896,11 +912,11 @@ class TestJobOperations { * * @reject {Error} - The error object. */ - getWithHttpOperationResponse(automationAccountName, runbookName, options) { + getWithHttpOperationResponse(resourceGroupName, automationAccountName, runbookName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._get(automationAccountName, runbookName, options, (err, result, request, response) => { + self._get(resourceGroupName, automationAccountName, runbookName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -913,6 +929,8 @@ class TestJobOperations { /** * Retrieve the test job for the specified runbook. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -944,7 +962,7 @@ class TestJobOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - get(automationAccountName, runbookName, options, optionalCallback) { + get(resourceGroupName, automationAccountName, runbookName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -953,20 +971,22 @@ class TestJobOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._get(automationAccountName, runbookName, options, (err, result, request, response) => { + self._get(resourceGroupName, automationAccountName, runbookName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._get(automationAccountName, runbookName, options, optionalCallback); + return self._get(resourceGroupName, automationAccountName, runbookName, options, optionalCallback); } } /** * Resume the test job. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -982,11 +1002,11 @@ class TestJobOperations { * * @reject {Error} - The error object. */ - resumeWithHttpOperationResponse(automationAccountName, runbookName, options) { + resumeWithHttpOperationResponse(resourceGroupName, automationAccountName, runbookName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._resume(automationAccountName, runbookName, options, (err, result, request, response) => { + self._resume(resourceGroupName, automationAccountName, runbookName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -999,6 +1019,8 @@ class TestJobOperations { /** * Resume the test job. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -1029,7 +1051,7 @@ class TestJobOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - resume(automationAccountName, runbookName, options, optionalCallback) { + resume(resourceGroupName, automationAccountName, runbookName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1038,20 +1060,22 @@ class TestJobOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._resume(automationAccountName, runbookName, options, (err, result, request, response) => { + self._resume(resourceGroupName, automationAccountName, runbookName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._resume(automationAccountName, runbookName, options, optionalCallback); + return self._resume(resourceGroupName, automationAccountName, runbookName, options, optionalCallback); } } /** * Stop the test job. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -1067,11 +1091,11 @@ class TestJobOperations { * * @reject {Error} - The error object. */ - stopWithHttpOperationResponse(automationAccountName, runbookName, options) { + stopWithHttpOperationResponse(resourceGroupName, automationAccountName, runbookName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._stop(automationAccountName, runbookName, options, (err, result, request, response) => { + self._stop(resourceGroupName, automationAccountName, runbookName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1084,6 +1108,8 @@ class TestJobOperations { /** * Stop the test job. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -1114,7 +1140,7 @@ class TestJobOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - stop(automationAccountName, runbookName, options, optionalCallback) { + stop(resourceGroupName, automationAccountName, runbookName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1123,20 +1149,22 @@ class TestJobOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._stop(automationAccountName, runbookName, options, (err, result, request, response) => { + self._stop(resourceGroupName, automationAccountName, runbookName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._stop(automationAccountName, runbookName, options, optionalCallback); + return self._stop(resourceGroupName, automationAccountName, runbookName, options, optionalCallback); } } /** * Suspend the test job. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -1152,11 +1180,11 @@ class TestJobOperations { * * @reject {Error} - The error object. */ - suspendWithHttpOperationResponse(automationAccountName, runbookName, options) { + suspendWithHttpOperationResponse(resourceGroupName, automationAccountName, runbookName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._suspend(automationAccountName, runbookName, options, (err, result, request, response) => { + self._suspend(resourceGroupName, automationAccountName, runbookName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1169,6 +1197,8 @@ class TestJobOperations { /** * Suspend the test job. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -1199,7 +1229,7 @@ class TestJobOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - suspend(automationAccountName, runbookName, options, optionalCallback) { + suspend(resourceGroupName, automationAccountName, runbookName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1208,14 +1238,14 @@ class TestJobOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._suspend(automationAccountName, runbookName, options, (err, result, request, response) => { + self._suspend(resourceGroupName, automationAccountName, runbookName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._suspend(automationAccountName, runbookName, options, optionalCallback); + return self._suspend(resourceGroupName, automationAccountName, runbookName, options, optionalCallback); } } diff --git a/lib/services/automationManagement/lib/operations/testJobStreams.js b/lib/services/automationManagement/lib/operations/testJobStreams.js index 028a130fda..7ca01bb89b 100644 --- a/lib/services/automationManagement/lib/operations/testJobStreams.js +++ b/lib/services/automationManagement/lib/operations/testJobStreams.js @@ -18,6 +18,8 @@ const WebResource = msRest.WebResource; * Retrieve a test job stream of the test job identified by runbook name and * stream id. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -42,7 +44,7 @@ const WebResource = msRest.WebResource; * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _get(automationAccountName, runbookName, jobStreamId, options, callback) { +function _get(resourceGroupName, automationAccountName, runbookName, jobStreamId, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -58,13 +60,13 @@ function _get(automationAccountName, runbookName, jobStreamId, options, callback if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -87,7 +89,7 @@ function _get(automationAccountName, runbookName, jobStreamId, options, callback let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/runbooks/{runbookName}/draft/testJob/streams/{jobStreamId}'; requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{runbookName}', encodeURIComponent(runbookName)); requestUrl = requestUrl.replace('{jobStreamId}', encodeURIComponent(jobStreamId)); @@ -178,6 +180,8 @@ function _get(automationAccountName, runbookName, jobStreamId, options, callback /** * Retrieve a list of test job streams identified by runbook name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -202,7 +206,7 @@ function _get(automationAccountName, runbookName, jobStreamId, options, callback * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _listByTestJob(automationAccountName, runbookName, options, callback) { +function _listByTestJob(resourceGroupName, automationAccountName, runbookName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -219,13 +223,13 @@ function _listByTestJob(automationAccountName, runbookName, options, callback) { if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -248,7 +252,7 @@ function _listByTestJob(automationAccountName, runbookName, options, callback) { let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/runbooks/{runbookName}/draft/testJob/streams'; requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{runbookName}', encodeURIComponent(runbookName)); let queryParameters = []; @@ -483,6 +487,8 @@ class TestJobStreams { * Retrieve a test job stream of the test job identified by runbook name and * stream id. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -500,11 +506,11 @@ class TestJobStreams { * * @reject {Error} - The error object. */ - getWithHttpOperationResponse(automationAccountName, runbookName, jobStreamId, options) { + getWithHttpOperationResponse(resourceGroupName, automationAccountName, runbookName, jobStreamId, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._get(automationAccountName, runbookName, jobStreamId, options, (err, result, request, response) => { + self._get(resourceGroupName, automationAccountName, runbookName, jobStreamId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -518,6 +524,8 @@ class TestJobStreams { * Retrieve a test job stream of the test job identified by runbook name and * stream id. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -551,7 +559,7 @@ class TestJobStreams { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - get(automationAccountName, runbookName, jobStreamId, options, optionalCallback) { + get(resourceGroupName, automationAccountName, runbookName, jobStreamId, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -560,20 +568,22 @@ class TestJobStreams { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._get(automationAccountName, runbookName, jobStreamId, options, (err, result, request, response) => { + self._get(resourceGroupName, automationAccountName, runbookName, jobStreamId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._get(automationAccountName, runbookName, jobStreamId, options, optionalCallback); + return self._get(resourceGroupName, automationAccountName, runbookName, jobStreamId, options, optionalCallback); } } /** * Retrieve a list of test job streams identified by runbook name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -591,11 +601,11 @@ class TestJobStreams { * * @reject {Error} - The error object. */ - listByTestJobWithHttpOperationResponse(automationAccountName, runbookName, options) { + listByTestJobWithHttpOperationResponse(resourceGroupName, automationAccountName, runbookName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._listByTestJob(automationAccountName, runbookName, options, (err, result, request, response) => { + self._listByTestJob(resourceGroupName, automationAccountName, runbookName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -608,6 +618,8 @@ class TestJobStreams { /** * Retrieve a list of test job streams identified by runbook name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -641,7 +653,7 @@ class TestJobStreams { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - listByTestJob(automationAccountName, runbookName, options, optionalCallback) { + listByTestJob(resourceGroupName, automationAccountName, runbookName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -650,14 +662,14 @@ class TestJobStreams { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._listByTestJob(automationAccountName, runbookName, options, (err, result, request, response) => { + self._listByTestJob(resourceGroupName, automationAccountName, runbookName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._listByTestJob(automationAccountName, runbookName, options, optionalCallback); + return self._listByTestJob(resourceGroupName, automationAccountName, runbookName, options, optionalCallback); } } diff --git a/lib/services/automationManagement/lib/operations/variableOperations.js b/lib/services/automationManagement/lib/operations/variableOperations.js index 704a306729..8717c55b1e 100644 --- a/lib/services/automationManagement/lib/operations/variableOperations.js +++ b/lib/services/automationManagement/lib/operations/variableOperations.js @@ -17,6 +17,8 @@ const WebResource = msRest.WebResource; /** * Create a variable. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} variableName The variable name. @@ -52,7 +54,7 @@ const WebResource = msRest.WebResource; * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _createOrUpdate(automationAccountName, variableName, parameters, options, callback) { +function _createOrUpdate(resourceGroupName, automationAccountName, variableName, parameters, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -65,13 +67,13 @@ function _createOrUpdate(automationAccountName, variableName, parameters, option let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -96,7 +98,7 @@ function _createOrUpdate(automationAccountName, variableName, parameters, option // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/variables/{variableName}'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{variableName}', encodeURIComponent(variableName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -218,6 +220,8 @@ function _createOrUpdate(automationAccountName, variableName, parameters, option /** * Update a variable. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} variableName The variable name. @@ -250,7 +254,7 @@ function _createOrUpdate(automationAccountName, variableName, parameters, option * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _update(automationAccountName, variableName, parameters, options, callback) { +function _update(resourceGroupName, automationAccountName, variableName, parameters, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -263,13 +267,13 @@ function _update(automationAccountName, variableName, parameters, options, callb let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -294,7 +298,7 @@ function _update(automationAccountName, variableName, parameters, options, callb // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/variables/{variableName}'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{variableName}', encodeURIComponent(variableName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -399,6 +403,8 @@ function _update(automationAccountName, variableName, parameters, options, callb /** * Delete the variable. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} variableName The name of variable. @@ -420,7 +426,7 @@ function _update(automationAccountName, variableName, parameters, options, callb * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _deleteMethod(automationAccountName, variableName, options, callback) { +function _deleteMethod(resourceGroupName, automationAccountName, variableName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -433,13 +439,13 @@ function _deleteMethod(automationAccountName, variableName, options, callback) { let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -461,7 +467,7 @@ function _deleteMethod(automationAccountName, variableName, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/variables/{variableName}'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{variableName}', encodeURIComponent(variableName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -535,6 +541,8 @@ function _deleteMethod(automationAccountName, variableName, options, callback) { /** * Retrieve the variable identified by variable name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} variableName The name of variable. @@ -557,7 +565,7 @@ function _deleteMethod(automationAccountName, variableName, options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _get(automationAccountName, variableName, options, callback) { +function _get(resourceGroupName, automationAccountName, variableName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -570,13 +578,13 @@ function _get(automationAccountName, variableName, options, callback) { let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -598,7 +606,7 @@ function _get(automationAccountName, variableName, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/variables/{variableName}'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{variableName}', encodeURIComponent(variableName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -689,6 +697,8 @@ function _get(automationAccountName, variableName, options, callback) { /** * Retrieve a list of variables. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -709,7 +719,7 @@ function _get(automationAccountName, variableName, options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _listByAutomationAccount(automationAccountName, options, callback) { +function _listByAutomationAccount(resourceGroupName, automationAccountName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -722,13 +732,13 @@ function _listByAutomationAccount(automationAccountName, options, callback) { let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -747,7 +757,7 @@ function _listByAutomationAccount(automationAccountName, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/variables'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; @@ -981,6 +991,8 @@ class VariableOperations { /** * Create a variable. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} variableName The variable name. @@ -1009,11 +1021,11 @@ class VariableOperations { * * @reject {Error} - The error object. */ - createOrUpdateWithHttpOperationResponse(automationAccountName, variableName, parameters, options) { + createOrUpdateWithHttpOperationResponse(resourceGroupName, automationAccountName, variableName, parameters, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._createOrUpdate(automationAccountName, variableName, parameters, options, (err, result, request, response) => { + self._createOrUpdate(resourceGroupName, automationAccountName, variableName, parameters, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1026,6 +1038,8 @@ class VariableOperations { /** * Create a variable. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} variableName The variable name. @@ -1070,7 +1084,7 @@ class VariableOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - createOrUpdate(automationAccountName, variableName, parameters, options, optionalCallback) { + createOrUpdate(resourceGroupName, automationAccountName, variableName, parameters, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1079,20 +1093,22 @@ class VariableOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._createOrUpdate(automationAccountName, variableName, parameters, options, (err, result, request, response) => { + self._createOrUpdate(resourceGroupName, automationAccountName, variableName, parameters, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._createOrUpdate(automationAccountName, variableName, parameters, options, optionalCallback); + return self._createOrUpdate(resourceGroupName, automationAccountName, variableName, parameters, options, optionalCallback); } } /** * Update a variable. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} variableName The variable name. @@ -1118,11 +1134,11 @@ class VariableOperations { * * @reject {Error} - The error object. */ - updateWithHttpOperationResponse(automationAccountName, variableName, parameters, options) { + updateWithHttpOperationResponse(resourceGroupName, automationAccountName, variableName, parameters, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._update(automationAccountName, variableName, parameters, options, (err, result, request, response) => { + self._update(resourceGroupName, automationAccountName, variableName, parameters, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1135,6 +1151,8 @@ class VariableOperations { /** * Update a variable. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} variableName The variable name. @@ -1176,7 +1194,7 @@ class VariableOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - update(automationAccountName, variableName, parameters, options, optionalCallback) { + update(resourceGroupName, automationAccountName, variableName, parameters, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1185,20 +1203,22 @@ class VariableOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._update(automationAccountName, variableName, parameters, options, (err, result, request, response) => { + self._update(resourceGroupName, automationAccountName, variableName, parameters, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._update(automationAccountName, variableName, parameters, options, optionalCallback); + return self._update(resourceGroupName, automationAccountName, variableName, parameters, options, optionalCallback); } } /** * Delete the variable. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} variableName The name of variable. @@ -1214,11 +1234,11 @@ class VariableOperations { * * @reject {Error} - The error object. */ - deleteMethodWithHttpOperationResponse(automationAccountName, variableName, options) { + deleteMethodWithHttpOperationResponse(resourceGroupName, automationAccountName, variableName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._deleteMethod(automationAccountName, variableName, options, (err, result, request, response) => { + self._deleteMethod(resourceGroupName, automationAccountName, variableName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1231,6 +1251,8 @@ class VariableOperations { /** * Delete the variable. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} variableName The name of variable. @@ -1261,7 +1283,7 @@ class VariableOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(automationAccountName, variableName, options, optionalCallback) { + deleteMethod(resourceGroupName, automationAccountName, variableName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1270,20 +1292,22 @@ class VariableOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._deleteMethod(automationAccountName, variableName, options, (err, result, request, response) => { + self._deleteMethod(resourceGroupName, automationAccountName, variableName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._deleteMethod(automationAccountName, variableName, options, optionalCallback); + return self._deleteMethod(resourceGroupName, automationAccountName, variableName, options, optionalCallback); } } /** * Retrieve the variable identified by variable name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} variableName The name of variable. @@ -1299,11 +1323,11 @@ class VariableOperations { * * @reject {Error} - The error object. */ - getWithHttpOperationResponse(automationAccountName, variableName, options) { + getWithHttpOperationResponse(resourceGroupName, automationAccountName, variableName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._get(automationAccountName, variableName, options, (err, result, request, response) => { + self._get(resourceGroupName, automationAccountName, variableName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1316,6 +1340,8 @@ class VariableOperations { /** * Retrieve the variable identified by variable name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} variableName The name of variable. @@ -1347,7 +1373,7 @@ class VariableOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - get(automationAccountName, variableName, options, optionalCallback) { + get(resourceGroupName, automationAccountName, variableName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1356,20 +1382,22 @@ class VariableOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._get(automationAccountName, variableName, options, (err, result, request, response) => { + self._get(resourceGroupName, automationAccountName, variableName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._get(automationAccountName, variableName, options, optionalCallback); + return self._get(resourceGroupName, automationAccountName, variableName, options, optionalCallback); } } /** * Retrieve a list of variables. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -1383,11 +1411,11 @@ class VariableOperations { * * @reject {Error} - The error object. */ - listByAutomationAccountWithHttpOperationResponse(automationAccountName, options) { + listByAutomationAccountWithHttpOperationResponse(resourceGroupName, automationAccountName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._listByAutomationAccount(automationAccountName, options, (err, result, request, response) => { + self._listByAutomationAccount(resourceGroupName, automationAccountName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1400,6 +1428,8 @@ class VariableOperations { /** * Retrieve a list of variables. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -1429,7 +1459,7 @@ class VariableOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - listByAutomationAccount(automationAccountName, options, optionalCallback) { + listByAutomationAccount(resourceGroupName, automationAccountName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1438,14 +1468,14 @@ class VariableOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._listByAutomationAccount(automationAccountName, options, (err, result, request, response) => { + self._listByAutomationAccount(resourceGroupName, automationAccountName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._listByAutomationAccount(automationAccountName, options, optionalCallback); + return self._listByAutomationAccount(resourceGroupName, automationAccountName, options, optionalCallback); } } diff --git a/lib/services/automationManagement/lib/operations/webhookOperations.js b/lib/services/automationManagement/lib/operations/webhookOperations.js index b10646ad9d..ce2de10941 100644 --- a/lib/services/automationManagement/lib/operations/webhookOperations.js +++ b/lib/services/automationManagement/lib/operations/webhookOperations.js @@ -17,6 +17,8 @@ const WebResource = msRest.WebResource; /** * Generates a Uri for use in creating a webhook. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -36,7 +38,7 @@ const WebResource = msRest.WebResource; * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _generateUri(automationAccountName, options, callback) { +function _generateUri(resourceGroupName, automationAccountName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -49,13 +51,13 @@ function _generateUri(automationAccountName, options, callback) { let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -74,7 +76,7 @@ function _generateUri(automationAccountName, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/webhooks/generateUri'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; @@ -170,6 +172,8 @@ function _generateUri(automationAccountName, options, callback) { /** * Delete the webhook by name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} webhookName The webhook name. @@ -191,7 +195,7 @@ function _generateUri(automationAccountName, options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _deleteMethod(automationAccountName, webhookName, options, callback) { +function _deleteMethod(resourceGroupName, automationAccountName, webhookName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -204,13 +208,13 @@ function _deleteMethod(automationAccountName, webhookName, options, callback) { let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -232,7 +236,7 @@ function _deleteMethod(automationAccountName, webhookName, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/webhooks/{webhookName}'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{webhookName}', encodeURIComponent(webhookName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -306,6 +310,8 @@ function _deleteMethod(automationAccountName, webhookName, options, callback) { /** * Retrieve the webhook identified by webhook name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} webhookName The webhook name. @@ -328,7 +334,7 @@ function _deleteMethod(automationAccountName, webhookName, options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _get(automationAccountName, webhookName, options, callback) { +function _get(resourceGroupName, automationAccountName, webhookName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -341,13 +347,13 @@ function _get(automationAccountName, webhookName, options, callback) { let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -369,7 +375,7 @@ function _get(automationAccountName, webhookName, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/webhooks/{webhookName}'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{webhookName}', encodeURIComponent(webhookName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -460,6 +466,8 @@ function _get(automationAccountName, webhookName, options, callback) { /** * Create the webhook identified by webhook name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} webhookName The webhook name. @@ -504,7 +512,7 @@ function _get(automationAccountName, webhookName, options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _createOrUpdate(automationAccountName, webhookName, parameters, options, callback) { +function _createOrUpdate(resourceGroupName, automationAccountName, webhookName, parameters, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -517,13 +525,13 @@ function _createOrUpdate(automationAccountName, webhookName, parameters, options let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -548,7 +556,7 @@ function _createOrUpdate(automationAccountName, webhookName, parameters, options // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/webhooks/{webhookName}'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{webhookName}', encodeURIComponent(webhookName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -670,6 +678,8 @@ function _createOrUpdate(automationAccountName, webhookName, parameters, options /** * Update the webhook identified by webhook name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} webhookName The webhook name. @@ -708,7 +718,7 @@ function _createOrUpdate(automationAccountName, webhookName, parameters, options * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _update(automationAccountName, webhookName, parameters, options, callback) { +function _update(resourceGroupName, automationAccountName, webhookName, parameters, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -721,13 +731,13 @@ function _update(automationAccountName, webhookName, parameters, options, callba let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -752,7 +762,7 @@ function _update(automationAccountName, webhookName, parameters, options, callba // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/webhooks/{webhookName}'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{webhookName}', encodeURIComponent(webhookName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -857,6 +867,8 @@ function _update(automationAccountName, webhookName, parameters, options, callba /** * Retrieve a list of webhooks. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -879,7 +891,7 @@ function _update(automationAccountName, webhookName, parameters, options, callba * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _listByAutomationAccount(automationAccountName, options, callback) { +function _listByAutomationAccount(resourceGroupName, automationAccountName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -893,13 +905,13 @@ function _listByAutomationAccount(automationAccountName, options, callback) { let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -921,7 +933,7 @@ function _listByAutomationAccount(automationAccountName, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/webhooks'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; @@ -1159,6 +1171,8 @@ class WebhookOperations { /** * Generates a Uri for use in creating a webhook. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -1172,11 +1186,11 @@ class WebhookOperations { * * @reject {Error} - The error object. */ - generateUriWithHttpOperationResponse(automationAccountName, options) { + generateUriWithHttpOperationResponse(resourceGroupName, automationAccountName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._generateUri(automationAccountName, options, (err, result, request, response) => { + self._generateUri(resourceGroupName, automationAccountName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1189,6 +1203,8 @@ class WebhookOperations { /** * Generates a Uri for use in creating a webhook. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -1217,7 +1233,7 @@ class WebhookOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - generateUri(automationAccountName, options, optionalCallback) { + generateUri(resourceGroupName, automationAccountName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1226,20 +1242,22 @@ class WebhookOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._generateUri(automationAccountName, options, (err, result, request, response) => { + self._generateUri(resourceGroupName, automationAccountName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._generateUri(automationAccountName, options, optionalCallback); + return self._generateUri(resourceGroupName, automationAccountName, options, optionalCallback); } } /** * Delete the webhook by name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} webhookName The webhook name. @@ -1255,11 +1273,11 @@ class WebhookOperations { * * @reject {Error} - The error object. */ - deleteMethodWithHttpOperationResponse(automationAccountName, webhookName, options) { + deleteMethodWithHttpOperationResponse(resourceGroupName, automationAccountName, webhookName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._deleteMethod(automationAccountName, webhookName, options, (err, result, request, response) => { + self._deleteMethod(resourceGroupName, automationAccountName, webhookName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1272,6 +1290,8 @@ class WebhookOperations { /** * Delete the webhook by name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} webhookName The webhook name. @@ -1302,7 +1322,7 @@ class WebhookOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(automationAccountName, webhookName, options, optionalCallback) { + deleteMethod(resourceGroupName, automationAccountName, webhookName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1311,20 +1331,22 @@ class WebhookOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._deleteMethod(automationAccountName, webhookName, options, (err, result, request, response) => { + self._deleteMethod(resourceGroupName, automationAccountName, webhookName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._deleteMethod(automationAccountName, webhookName, options, optionalCallback); + return self._deleteMethod(resourceGroupName, automationAccountName, webhookName, options, optionalCallback); } } /** * Retrieve the webhook identified by webhook name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} webhookName The webhook name. @@ -1340,11 +1362,11 @@ class WebhookOperations { * * @reject {Error} - The error object. */ - getWithHttpOperationResponse(automationAccountName, webhookName, options) { + getWithHttpOperationResponse(resourceGroupName, automationAccountName, webhookName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._get(automationAccountName, webhookName, options, (err, result, request, response) => { + self._get(resourceGroupName, automationAccountName, webhookName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1357,6 +1379,8 @@ class WebhookOperations { /** * Retrieve the webhook identified by webhook name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} webhookName The webhook name. @@ -1388,7 +1412,7 @@ class WebhookOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - get(automationAccountName, webhookName, options, optionalCallback) { + get(resourceGroupName, automationAccountName, webhookName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1397,20 +1421,22 @@ class WebhookOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._get(automationAccountName, webhookName, options, (err, result, request, response) => { + self._get(resourceGroupName, automationAccountName, webhookName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._get(automationAccountName, webhookName, options, optionalCallback); + return self._get(resourceGroupName, automationAccountName, webhookName, options, optionalCallback); } } /** * Create the webhook identified by webhook name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} webhookName The webhook name. @@ -1448,11 +1474,11 @@ class WebhookOperations { * * @reject {Error} - The error object. */ - createOrUpdateWithHttpOperationResponse(automationAccountName, webhookName, parameters, options) { + createOrUpdateWithHttpOperationResponse(resourceGroupName, automationAccountName, webhookName, parameters, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._createOrUpdate(automationAccountName, webhookName, parameters, options, (err, result, request, response) => { + self._createOrUpdate(resourceGroupName, automationAccountName, webhookName, parameters, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1465,6 +1491,8 @@ class WebhookOperations { /** * Create the webhook identified by webhook name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} webhookName The webhook name. @@ -1518,7 +1546,7 @@ class WebhookOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - createOrUpdate(automationAccountName, webhookName, parameters, options, optionalCallback) { + createOrUpdate(resourceGroupName, automationAccountName, webhookName, parameters, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1527,20 +1555,22 @@ class WebhookOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._createOrUpdate(automationAccountName, webhookName, parameters, options, (err, result, request, response) => { + self._createOrUpdate(resourceGroupName, automationAccountName, webhookName, parameters, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._createOrUpdate(automationAccountName, webhookName, parameters, options, optionalCallback); + return self._createOrUpdate(resourceGroupName, automationAccountName, webhookName, parameters, options, optionalCallback); } } /** * Update the webhook identified by webhook name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} webhookName The webhook name. @@ -1572,11 +1602,11 @@ class WebhookOperations { * * @reject {Error} - The error object. */ - updateWithHttpOperationResponse(automationAccountName, webhookName, parameters, options) { + updateWithHttpOperationResponse(resourceGroupName, automationAccountName, webhookName, parameters, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._update(automationAccountName, webhookName, parameters, options, (err, result, request, response) => { + self._update(resourceGroupName, automationAccountName, webhookName, parameters, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1589,6 +1619,8 @@ class WebhookOperations { /** * Update the webhook identified by webhook name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} webhookName The webhook name. @@ -1636,7 +1668,7 @@ class WebhookOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - update(automationAccountName, webhookName, parameters, options, optionalCallback) { + update(resourceGroupName, automationAccountName, webhookName, parameters, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1645,20 +1677,22 @@ class WebhookOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._update(automationAccountName, webhookName, parameters, options, (err, result, request, response) => { + self._update(resourceGroupName, automationAccountName, webhookName, parameters, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._update(automationAccountName, webhookName, parameters, options, optionalCallback); + return self._update(resourceGroupName, automationAccountName, webhookName, parameters, options, optionalCallback); } } /** * Retrieve a list of webhooks. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -1674,11 +1708,11 @@ class WebhookOperations { * * @reject {Error} - The error object. */ - listByAutomationAccountWithHttpOperationResponse(automationAccountName, options) { + listByAutomationAccountWithHttpOperationResponse(resourceGroupName, automationAccountName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._listByAutomationAccount(automationAccountName, options, (err, result, request, response) => { + self._listByAutomationAccount(resourceGroupName, automationAccountName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1691,6 +1725,8 @@ class WebhookOperations { /** * Retrieve a list of webhooks. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -1722,7 +1758,7 @@ class WebhookOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - listByAutomationAccount(automationAccountName, options, optionalCallback) { + listByAutomationAccount(resourceGroupName, automationAccountName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1731,14 +1767,14 @@ class WebhookOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._listByAutomationAccount(automationAccountName, options, (err, result, request, response) => { + self._listByAutomationAccount(resourceGroupName, automationAccountName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._listByAutomationAccount(automationAccountName, options, optionalCallback); + return self._listByAutomationAccount(resourceGroupName, automationAccountName, options, optionalCallback); } }