diff --git a/lib/services/automationManagement/lib/automationClient.d.ts b/lib/services/automationManagement/lib/automationClient.d.ts index beb15e0986..fc9ad09913 100644 --- a/lib/services/automationManagement/lib/automationClient.d.ts +++ b/lib/services/automationManagement/lib/automationClient.d.ts @@ -13,6 +13,28 @@ 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. @@ -23,6 +45,10 @@ 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 @@ -34,6 +60,8 @@ 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. @@ -41,12 +69,18 @@ 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, baseUri?: string, options?: AzureServiceClientOptions); + constructor(credentials: ServiceClientCredentials, subscriptionId: string, resourceGroupName: string, automationAccountName: string, baseUri?: string, options?: AutomationClientOptions); 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 539adbc19f..59eda98fcc 100644 --- a/lib/services/automationManagement/lib/automationClient.js +++ b/lib/services/automationManagement/lib/automationClient.js @@ -28,23 +28,32 @@ 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, baseUri, options) { + constructor(credentials, subscriptionId, resourceGroupName, automationAccountName, 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 = {}; @@ -59,9 +68,14 @@ 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/models/index.d.ts b/lib/services/automationManagement/lib/models/index.d.ts index 7342540045..040e144b4d 100644 --- a/lib/services/automationManagement/lib/models/index.d.ts +++ b/lib/services/automationManagement/lib/models/index.d.ts @@ -1170,41 +1170,6 @@ export interface DscConfigurationCreateOrUpdateParameters { tags?: { [propertyName: string]: string }; } -/** - * @class - * Initializes a new instance of the DscConfigurationUpdateParameters class. - * @constructor - * The parameters supplied to the create or update configuration operation. - * - * @member {boolean} [logVerbose] Gets or sets verbose log option. - * @member {boolean} [logProgress] Gets or sets progress log option. - * @member {object} source Gets or sets the source. - * @member {object} [source.hash] Gets or sets the hash. - * @member {string} [source.hash.algorithm] Gets or sets the content hash - * algorithm used to hash the content. - * @member {string} [source.hash.value] Gets or sets expected hash value of the - * content. - * @member {string} [source.type] Gets or sets the content source type. - * Possible values include: 'embeddedContent', 'uri' - * @member {string} [source.value] Gets or sets the value of the content. This - * is based on the content source type. - * @member {string} [source.version] Gets or sets the version of the content. - * @member {object} [parameters] Gets or sets the configuration parameters. - * @member {string} [description] Gets or sets the description of the - * configuration. - * @member {string} [name] Gets or sets name of the resource. - * @member {object} [tags] Gets or sets the tags attached to the resource. - */ -export interface DscConfigurationUpdateParameters { - logVerbose?: boolean; - logProgress?: boolean; - source: ContentSource; - parameters?: { [propertyName: string]: DscConfigurationParameter }; - description?: string; - name?: string; - tags?: { [propertyName: string]: string }; -} - /** * @class * Initializes a new instance of the DscMetaConfiguration class. diff --git a/lib/services/automationManagement/lib/models/index.js b/lib/services/automationManagement/lib/models/index.js index 81ef88af18..9f35001d96 100644 --- a/lib/services/automationManagement/lib/models/index.js +++ b/lib/services/automationManagement/lib/models/index.js @@ -67,7 +67,6 @@ exports.JobProvisioningStateProperty = require('./jobProvisioningStateProperty') exports.ProxyResource = require('./proxyResource'); exports.DscCompilationJob = require('./dscCompilationJob'); exports.DscConfigurationCreateOrUpdateParameters = require('./dscConfigurationCreateOrUpdateParameters'); -exports.DscConfigurationUpdateParameters = require('./dscConfigurationUpdateParameters'); exports.DscMetaConfiguration = require('./dscMetaConfiguration'); exports.DscNodeConfigurationCreateOrUpdateParameters = require('./dscNodeConfigurationCreateOrUpdateParameters'); exports.DscNodeConfigurationAssociationProperty = require('./dscNodeConfigurationAssociationProperty'); diff --git a/lib/services/automationManagement/lib/operations/activityOperations.js b/lib/services/automationManagement/lib/operations/activityOperations.js index 7a133d3778..4a5bc93aa6 100644 --- a/lib/services/automationManagement/lib/operations/activityOperations.js +++ b/lib/services/automationManagement/lib/operations/activityOperations.js @@ -18,8 +18,6 @@ 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. @@ -44,7 +42,7 @@ const WebResource = msRest.WebResource; * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _get(resourceGroupName, automationAccountName, moduleName, activityName, options, callback) { +function _get(automationAccountName, moduleName, activityName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -57,13 +55,13 @@ function _get(resourceGroupName, automationAccountName, moduleName, activityName let apiVersion = '2015-10-31'; // Validate try { - 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 || 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) { - if (resourceGroupName.match(/^[-\w\._]+$/) === null) + if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { + if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -88,7 +86,7 @@ function _get(resourceGroupName, automationAccountName, moduleName, activityName // 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(resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{moduleName}', encodeURIComponent(moduleName)); requestUrl = requestUrl.replace('{activityName}', encodeURIComponent(activityName)); @@ -180,8 +178,6 @@ function _get(resourceGroupName, automationAccountName, moduleName, activityName /** * 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. @@ -204,7 +200,7 @@ function _get(resourceGroupName, automationAccountName, moduleName, activityName * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _listByModule(resourceGroupName, automationAccountName, moduleName, options, callback) { +function _listByModule(automationAccountName, moduleName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -217,13 +213,13 @@ function _listByModule(resourceGroupName, automationAccountName, moduleName, opt let apiVersion = '2015-10-31'; // Validate try { - 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 || 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) { - if (resourceGroupName.match(/^[-\w\._]+$/) === null) + if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { + if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -245,7 +241,7 @@ function _listByModule(resourceGroupName, automationAccountName, moduleName, opt // 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(resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{moduleName}', encodeURIComponent(moduleName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -478,8 +474,6 @@ 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. @@ -497,11 +491,11 @@ class ActivityOperations { * * @reject {Error} - The error object. */ - getWithHttpOperationResponse(resourceGroupName, automationAccountName, moduleName, activityName, options) { + getWithHttpOperationResponse(automationAccountName, moduleName, activityName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._get(resourceGroupName, automationAccountName, moduleName, activityName, options, (err, result, request, response) => { + self._get(automationAccountName, moduleName, activityName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -515,8 +509,6 @@ 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. @@ -550,7 +542,7 @@ class ActivityOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - get(resourceGroupName, automationAccountName, moduleName, activityName, options, optionalCallback) { + get(automationAccountName, moduleName, activityName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -559,22 +551,20 @@ class ActivityOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._get(resourceGroupName, automationAccountName, moduleName, activityName, options, (err, result, request, response) => { + self._get(automationAccountName, moduleName, activityName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._get(resourceGroupName, automationAccountName, moduleName, activityName, options, optionalCallback); + return self._get(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. @@ -590,11 +580,11 @@ class ActivityOperations { * * @reject {Error} - The error object. */ - listByModuleWithHttpOperationResponse(resourceGroupName, automationAccountName, moduleName, options) { + listByModuleWithHttpOperationResponse(automationAccountName, moduleName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._listByModule(resourceGroupName, automationAccountName, moduleName, options, (err, result, request, response) => { + self._listByModule(automationAccountName, moduleName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -607,8 +597,6 @@ 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. @@ -640,7 +628,7 @@ class ActivityOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - listByModule(resourceGroupName, automationAccountName, moduleName, options, optionalCallback) { + listByModule(automationAccountName, moduleName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -649,14 +637,14 @@ class ActivityOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._listByModule(resourceGroupName, automationAccountName, moduleName, options, (err, result, request, response) => { + self._listByModule(automationAccountName, moduleName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._listByModule(resourceGroupName, automationAccountName, moduleName, options, optionalCallback); + return self._listByModule(automationAccountName, moduleName, options, optionalCallback); } } diff --git a/lib/services/automationManagement/lib/operations/agentRegistrationInformation.js b/lib/services/automationManagement/lib/operations/agentRegistrationInformation.js index f5addd99d9..c16cca7b04 100644 --- a/lib/services/automationManagement/lib/operations/agentRegistrationInformation.js +++ b/lib/services/automationManagement/lib/operations/agentRegistrationInformation.js @@ -17,8 +17,6 @@ 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. @@ -39,7 +37,7 @@ const WebResource = msRest.WebResource; * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _get(resourceGroupName, automationAccountName, options, callback) { +function _get(automationAccountName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -52,13 +50,13 @@ function _get(resourceGroupName, automationAccountName, options, callback) { let apiVersion = '2015-10-31'; // Validate try { - 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 || 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) { - if (resourceGroupName.match(/^[-\w\._]+$/) === null) + if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { + if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -77,7 +75,7 @@ function _get(resourceGroupName, 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(resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; @@ -167,8 +165,6 @@ function _get(resourceGroupName, 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 @@ -203,7 +199,7 @@ function _get(resourceGroupName, automationAccountName, options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _regenerateKey(resourceGroupName, automationAccountName, parameters, options, callback) { +function _regenerateKey(automationAccountName, parameters, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -216,13 +212,13 @@ function _regenerateKey(resourceGroupName, automationAccountName, parameters, op let apiVersion = '2015-10-31'; // Validate try { - 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 || 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) { - if (resourceGroupName.match(/^[-\w\._]+$/) === null) + if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { + if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -244,7 +240,7 @@ function _regenerateKey(resourceGroupName, automationAccountName, parameters, op // 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(resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; @@ -360,8 +356,6 @@ 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. @@ -375,11 +369,11 @@ class AgentRegistrationInformation { * * @reject {Error} - The error object. */ - getWithHttpOperationResponse(resourceGroupName, automationAccountName, options) { + getWithHttpOperationResponse(automationAccountName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._get(resourceGroupName, automationAccountName, options, (err, result, request, response) => { + self._get(automationAccountName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -392,8 +386,6 @@ 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. @@ -423,7 +415,7 @@ class AgentRegistrationInformation { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - get(resourceGroupName, automationAccountName, options, optionalCallback) { + get(automationAccountName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -432,22 +424,20 @@ class AgentRegistrationInformation { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._get(resourceGroupName, automationAccountName, options, (err, result, request, response) => { + self._get(automationAccountName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._get(resourceGroupName, automationAccountName, options, optionalCallback); + return self._get(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 @@ -475,11 +465,11 @@ class AgentRegistrationInformation { * * @reject {Error} - The error object. */ - regenerateKeyWithHttpOperationResponse(resourceGroupName, automationAccountName, parameters, options) { + regenerateKeyWithHttpOperationResponse(automationAccountName, parameters, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._regenerateKey(resourceGroupName, automationAccountName, parameters, options, (err, result, request, response) => { + self._regenerateKey(automationAccountName, parameters, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -492,8 +482,6 @@ 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 @@ -537,7 +525,7 @@ class AgentRegistrationInformation { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - regenerateKey(resourceGroupName, automationAccountName, parameters, options, optionalCallback) { + regenerateKey(automationAccountName, parameters, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -546,14 +534,14 @@ class AgentRegistrationInformation { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._regenerateKey(resourceGroupName, automationAccountName, parameters, options, (err, result, request, response) => { + self._regenerateKey(automationAccountName, parameters, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._regenerateKey(resourceGroupName, automationAccountName, parameters, options, optionalCallback); + return self._regenerateKey(automationAccountName, parameters, options, optionalCallback); } } diff --git a/lib/services/automationManagement/lib/operations/certificateOperations.js b/lib/services/automationManagement/lib/operations/certificateOperations.js index 9663038a97..85dd4c0f19 100644 --- a/lib/services/automationManagement/lib/operations/certificateOperations.js +++ b/lib/services/automationManagement/lib/operations/certificateOperations.js @@ -17,8 +17,6 @@ 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. @@ -40,7 +38,7 @@ const WebResource = msRest.WebResource; * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _deleteMethod(resourceGroupName, automationAccountName, certificateName, options, callback) { +function _deleteMethod(automationAccountName, certificateName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -53,13 +51,13 @@ function _deleteMethod(resourceGroupName, automationAccountName, certificateName let apiVersion = '2015-10-31'; // Validate try { - 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 || 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) { - if (resourceGroupName.match(/^[-\w\._]+$/) === null) + if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { + if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -81,7 +79,7 @@ function _deleteMethod(resourceGroupName, automationAccountName, certificateName // 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(resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{certificateName}', encodeURIComponent(certificateName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -155,8 +153,6 @@ function _deleteMethod(resourceGroupName, automationAccountName, certificateName /** * 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. @@ -179,7 +175,7 @@ function _deleteMethod(resourceGroupName, automationAccountName, certificateName * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _get(resourceGroupName, automationAccountName, certificateName, options, callback) { +function _get(automationAccountName, certificateName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -192,13 +188,13 @@ function _get(resourceGroupName, automationAccountName, certificateName, options let apiVersion = '2015-10-31'; // Validate try { - 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 || 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) { - if (resourceGroupName.match(/^[-\w\._]+$/) === null) + if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { + if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -220,7 +216,7 @@ function _get(resourceGroupName, automationAccountName, certificateName, options // 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(resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{certificateName}', encodeURIComponent(certificateName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -311,8 +307,6 @@ function _get(resourceGroupName, automationAccountName, certificateName, options /** * 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 @@ -353,7 +347,7 @@ function _get(resourceGroupName, automationAccountName, certificateName, options * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _createOrUpdate(resourceGroupName, automationAccountName, certificateName, parameters, options, callback) { +function _createOrUpdate(automationAccountName, certificateName, parameters, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -366,13 +360,13 @@ function _createOrUpdate(resourceGroupName, automationAccountName, certificateNa let apiVersion = '2015-10-31'; // Validate try { - 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 || 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) { - if (resourceGroupName.match(/^[-\w\._]+$/) === null) + if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { + if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -397,7 +391,7 @@ function _createOrUpdate(resourceGroupName, automationAccountName, certificateNa // 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(resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{certificateName}', encodeURIComponent(certificateName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -519,8 +513,6 @@ function _createOrUpdate(resourceGroupName, automationAccountName, certificateNa /** * 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 @@ -552,7 +544,7 @@ function _createOrUpdate(resourceGroupName, automationAccountName, certificateNa * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _update(resourceGroupName, automationAccountName, certificateName, parameters, options, callback) { +function _update(automationAccountName, certificateName, parameters, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -565,13 +557,13 @@ function _update(resourceGroupName, automationAccountName, certificateName, para let apiVersion = '2015-10-31'; // Validate try { - 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 || 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) { - if (resourceGroupName.match(/^[-\w\._]+$/) === null) + if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { + if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -596,7 +588,7 @@ function _update(resourceGroupName, automationAccountName, certificateName, para // 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(resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{certificateName}', encodeURIComponent(certificateName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -701,8 +693,6 @@ function _update(resourceGroupName, automationAccountName, certificateName, para /** * Retrieve a list of certificates. * - * @param {string} resourceGroupName The resource group name. - * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -723,7 +713,7 @@ function _update(resourceGroupName, automationAccountName, certificateName, para * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _listByAutomationAccount(resourceGroupName, automationAccountName, options, callback) { +function _listByAutomationAccount(automationAccountName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -736,13 +726,13 @@ function _listByAutomationAccount(resourceGroupName, automationAccountName, opti let apiVersion = '2015-10-31'; // Validate try { - 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 || 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) { - if (resourceGroupName.match(/^[-\w\._]+$/) === null) + if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { + if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -761,7 +751,7 @@ function _listByAutomationAccount(resourceGroupName, automationAccountName, opti // 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(resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; @@ -995,8 +985,6 @@ 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. @@ -1012,11 +1000,11 @@ class CertificateOperations { * * @reject {Error} - The error object. */ - deleteMethodWithHttpOperationResponse(resourceGroupName, automationAccountName, certificateName, options) { + deleteMethodWithHttpOperationResponse(automationAccountName, certificateName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._deleteMethod(resourceGroupName, automationAccountName, certificateName, options, (err, result, request, response) => { + self._deleteMethod(automationAccountName, certificateName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1029,8 +1017,6 @@ 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. @@ -1061,7 +1047,7 @@ class CertificateOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(resourceGroupName, automationAccountName, certificateName, options, optionalCallback) { + deleteMethod(automationAccountName, certificateName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1070,22 +1056,20 @@ class CertificateOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._deleteMethod(resourceGroupName, automationAccountName, certificateName, options, (err, result, request, response) => { + self._deleteMethod(automationAccountName, certificateName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._deleteMethod(resourceGroupName, automationAccountName, certificateName, options, optionalCallback); + return self._deleteMethod(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. @@ -1101,11 +1085,11 @@ class CertificateOperations { * * @reject {Error} - The error object. */ - getWithHttpOperationResponse(resourceGroupName, automationAccountName, certificateName, options) { + getWithHttpOperationResponse(automationAccountName, certificateName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._get(resourceGroupName, automationAccountName, certificateName, options, (err, result, request, response) => { + self._get(automationAccountName, certificateName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1118,8 +1102,6 @@ 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. @@ -1151,7 +1133,7 @@ class CertificateOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - get(resourceGroupName, automationAccountName, certificateName, options, optionalCallback) { + get(automationAccountName, certificateName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1160,22 +1142,20 @@ class CertificateOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._get(resourceGroupName, automationAccountName, certificateName, options, (err, result, request, response) => { + self._get(automationAccountName, certificateName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._get(resourceGroupName, automationAccountName, certificateName, options, optionalCallback); + return self._get(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 @@ -1209,11 +1189,11 @@ class CertificateOperations { * * @reject {Error} - The error object. */ - createOrUpdateWithHttpOperationResponse(resourceGroupName, automationAccountName, certificateName, parameters, options) { + createOrUpdateWithHttpOperationResponse(automationAccountName, certificateName, parameters, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._createOrUpdate(resourceGroupName, automationAccountName, certificateName, parameters, options, (err, result, request, response) => { + self._createOrUpdate(automationAccountName, certificateName, parameters, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1226,8 +1206,6 @@ 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 @@ -1277,7 +1255,7 @@ class CertificateOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - createOrUpdate(resourceGroupName, automationAccountName, certificateName, parameters, options, optionalCallback) { + createOrUpdate(automationAccountName, certificateName, parameters, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1286,22 +1264,20 @@ class CertificateOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._createOrUpdate(resourceGroupName, automationAccountName, certificateName, parameters, options, (err, result, request, response) => { + self._createOrUpdate(automationAccountName, certificateName, parameters, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._createOrUpdate(resourceGroupName, automationAccountName, certificateName, parameters, options, optionalCallback); + return self._createOrUpdate(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 @@ -1326,11 +1302,11 @@ class CertificateOperations { * * @reject {Error} - The error object. */ - updateWithHttpOperationResponse(resourceGroupName, automationAccountName, certificateName, parameters, options) { + updateWithHttpOperationResponse(automationAccountName, certificateName, parameters, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._update(resourceGroupName, automationAccountName, certificateName, parameters, options, (err, result, request, response) => { + self._update(automationAccountName, certificateName, parameters, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1343,8 +1319,6 @@ 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 @@ -1385,7 +1359,7 @@ class CertificateOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - update(resourceGroupName, automationAccountName, certificateName, parameters, options, optionalCallback) { + update(automationAccountName, certificateName, parameters, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1394,22 +1368,20 @@ class CertificateOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._update(resourceGroupName, automationAccountName, certificateName, parameters, options, (err, result, request, response) => { + self._update(automationAccountName, certificateName, parameters, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._update(resourceGroupName, automationAccountName, certificateName, parameters, options, optionalCallback); + return self._update(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. @@ -1423,11 +1395,11 @@ class CertificateOperations { * * @reject {Error} - The error object. */ - listByAutomationAccountWithHttpOperationResponse(resourceGroupName, automationAccountName, options) { + listByAutomationAccountWithHttpOperationResponse(automationAccountName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._listByAutomationAccount(resourceGroupName, automationAccountName, options, (err, result, request, response) => { + self._listByAutomationAccount(automationAccountName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1440,8 +1412,6 @@ 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. @@ -1471,7 +1441,7 @@ class CertificateOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - listByAutomationAccount(resourceGroupName, automationAccountName, options, optionalCallback) { + listByAutomationAccount(automationAccountName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1480,14 +1450,14 @@ class CertificateOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._listByAutomationAccount(resourceGroupName, automationAccountName, options, (err, result, request, response) => { + self._listByAutomationAccount(automationAccountName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._listByAutomationAccount(resourceGroupName, automationAccountName, options, optionalCallback); + return self._listByAutomationAccount(automationAccountName, options, optionalCallback); } } diff --git a/lib/services/automationManagement/lib/operations/connectionOperations.js b/lib/services/automationManagement/lib/operations/connectionOperations.js index 42da11809a..01927ca169 100644 --- a/lib/services/automationManagement/lib/operations/connectionOperations.js +++ b/lib/services/automationManagement/lib/operations/connectionOperations.js @@ -17,8 +17,6 @@ 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. @@ -41,7 +39,7 @@ const WebResource = msRest.WebResource; * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _deleteMethod(resourceGroupName, automationAccountName, connectionName, options, callback) { +function _deleteMethod(automationAccountName, connectionName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -54,13 +52,13 @@ function _deleteMethod(resourceGroupName, automationAccountName, connectionName, let apiVersion = '2015-10-31'; // Validate try { - 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 || 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) { - if (resourceGroupName.match(/^[-\w\._]+$/) === null) + if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { + if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -82,7 +80,7 @@ function _deleteMethod(resourceGroupName, automationAccountName, connectionName, // 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(resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{connectionName}', encodeURIComponent(connectionName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -173,8 +171,6 @@ function _deleteMethod(resourceGroupName, automationAccountName, connectionName, /** * 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. @@ -197,7 +193,7 @@ function _deleteMethod(resourceGroupName, automationAccountName, connectionName, * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _get(resourceGroupName, automationAccountName, connectionName, options, callback) { +function _get(automationAccountName, connectionName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -210,13 +206,13 @@ function _get(resourceGroupName, automationAccountName, connectionName, options, let apiVersion = '2015-10-31'; // Validate try { - 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 || 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) { - if (resourceGroupName.match(/^[-\w\._]+$/) === null) + if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { + if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -238,7 +234,7 @@ function _get(resourceGroupName, automationAccountName, connectionName, options, // 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(resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{connectionName}', encodeURIComponent(connectionName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -329,8 +325,6 @@ function _get(resourceGroupName, automationAccountName, connectionName, options, /** * 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 @@ -371,7 +365,7 @@ function _get(resourceGroupName, automationAccountName, connectionName, options, * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _createOrUpdate(resourceGroupName, automationAccountName, connectionName, parameters, options, callback) { +function _createOrUpdate(automationAccountName, connectionName, parameters, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -384,13 +378,13 @@ function _createOrUpdate(resourceGroupName, automationAccountName, connectionNam let apiVersion = '2015-10-31'; // Validate try { - 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 || 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) { - if (resourceGroupName.match(/^[-\w\._]+$/) === null) + if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { + if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -415,7 +409,7 @@ function _createOrUpdate(resourceGroupName, automationAccountName, connectionNam // 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(resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{connectionName}', encodeURIComponent(connectionName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -537,8 +531,6 @@ function _createOrUpdate(resourceGroupName, automationAccountName, connectionNam /** * 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 @@ -573,7 +565,7 @@ function _createOrUpdate(resourceGroupName, automationAccountName, connectionNam * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _update(resourceGroupName, automationAccountName, connectionName, parameters, options, callback) { +function _update(automationAccountName, connectionName, parameters, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -586,13 +578,13 @@ function _update(resourceGroupName, automationAccountName, connectionName, param let apiVersion = '2015-10-31'; // Validate try { - 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 || 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) { - if (resourceGroupName.match(/^[-\w\._]+$/) === null) + if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { + if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -617,7 +609,7 @@ function _update(resourceGroupName, automationAccountName, connectionName, param // 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(resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{connectionName}', encodeURIComponent(connectionName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -722,8 +714,6 @@ function _update(resourceGroupName, automationAccountName, connectionName, param /** * Retrieve a list of connections. * - * @param {string} resourceGroupName The resource group name. - * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -744,7 +734,7 @@ function _update(resourceGroupName, automationAccountName, connectionName, param * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _listByAutomationAccount(resourceGroupName, automationAccountName, options, callback) { +function _listByAutomationAccount(automationAccountName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -757,13 +747,13 @@ function _listByAutomationAccount(resourceGroupName, automationAccountName, opti let apiVersion = '2015-10-31'; // Validate try { - 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 || 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) { - if (resourceGroupName.match(/^[-\w\._]+$/) === null) + if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { + if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -782,7 +772,7 @@ function _listByAutomationAccount(resourceGroupName, automationAccountName, opti // 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(resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; @@ -1016,8 +1006,6 @@ 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. @@ -1033,11 +1021,11 @@ class ConnectionOperations { * * @reject {Error} - The error object. */ - deleteMethodWithHttpOperationResponse(resourceGroupName, automationAccountName, connectionName, options) { + deleteMethodWithHttpOperationResponse(automationAccountName, connectionName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._deleteMethod(resourceGroupName, automationAccountName, connectionName, options, (err, result, request, response) => { + self._deleteMethod(automationAccountName, connectionName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1050,8 +1038,6 @@ 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. @@ -1083,7 +1069,7 @@ class ConnectionOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(resourceGroupName, automationAccountName, connectionName, options, optionalCallback) { + deleteMethod(automationAccountName, connectionName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1092,22 +1078,20 @@ class ConnectionOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._deleteMethod(resourceGroupName, automationAccountName, connectionName, options, (err, result, request, response) => { + self._deleteMethod(automationAccountName, connectionName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._deleteMethod(resourceGroupName, automationAccountName, connectionName, options, optionalCallback); + return self._deleteMethod(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. @@ -1123,11 +1107,11 @@ class ConnectionOperations { * * @reject {Error} - The error object. */ - getWithHttpOperationResponse(resourceGroupName, automationAccountName, connectionName, options) { + getWithHttpOperationResponse(automationAccountName, connectionName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._get(resourceGroupName, automationAccountName, connectionName, options, (err, result, request, response) => { + self._get(automationAccountName, connectionName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1140,8 +1124,6 @@ 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. @@ -1173,7 +1155,7 @@ class ConnectionOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - get(resourceGroupName, automationAccountName, connectionName, options, optionalCallback) { + get(automationAccountName, connectionName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1182,22 +1164,20 @@ class ConnectionOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._get(resourceGroupName, automationAccountName, connectionName, options, (err, result, request, response) => { + self._get(automationAccountName, connectionName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._get(resourceGroupName, automationAccountName, connectionName, options, optionalCallback); + return self._get(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 @@ -1231,11 +1211,11 @@ class ConnectionOperations { * * @reject {Error} - The error object. */ - createOrUpdateWithHttpOperationResponse(resourceGroupName, automationAccountName, connectionName, parameters, options) { + createOrUpdateWithHttpOperationResponse(automationAccountName, connectionName, parameters, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._createOrUpdate(resourceGroupName, automationAccountName, connectionName, parameters, options, (err, result, request, response) => { + self._createOrUpdate(automationAccountName, connectionName, parameters, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1248,8 +1228,6 @@ 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 @@ -1299,7 +1277,7 @@ class ConnectionOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - createOrUpdate(resourceGroupName, automationAccountName, connectionName, parameters, options, optionalCallback) { + createOrUpdate(automationAccountName, connectionName, parameters, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1308,22 +1286,20 @@ class ConnectionOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._createOrUpdate(resourceGroupName, automationAccountName, connectionName, parameters, options, (err, result, request, response) => { + self._createOrUpdate(automationAccountName, connectionName, parameters, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._createOrUpdate(resourceGroupName, automationAccountName, connectionName, parameters, options, optionalCallback); + return self._createOrUpdate(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 @@ -1351,11 +1327,11 @@ class ConnectionOperations { * * @reject {Error} - The error object. */ - updateWithHttpOperationResponse(resourceGroupName, automationAccountName, connectionName, parameters, options) { + updateWithHttpOperationResponse(automationAccountName, connectionName, parameters, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._update(resourceGroupName, automationAccountName, connectionName, parameters, options, (err, result, request, response) => { + self._update(automationAccountName, connectionName, parameters, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1368,8 +1344,6 @@ 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 @@ -1413,7 +1387,7 @@ class ConnectionOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - update(resourceGroupName, automationAccountName, connectionName, parameters, options, optionalCallback) { + update(automationAccountName, connectionName, parameters, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1422,22 +1396,20 @@ class ConnectionOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._update(resourceGroupName, automationAccountName, connectionName, parameters, options, (err, result, request, response) => { + self._update(automationAccountName, connectionName, parameters, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._update(resourceGroupName, automationAccountName, connectionName, parameters, options, optionalCallback); + return self._update(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. @@ -1451,11 +1423,11 @@ class ConnectionOperations { * * @reject {Error} - The error object. */ - listByAutomationAccountWithHttpOperationResponse(resourceGroupName, automationAccountName, options) { + listByAutomationAccountWithHttpOperationResponse(automationAccountName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._listByAutomationAccount(resourceGroupName, automationAccountName, options, (err, result, request, response) => { + self._listByAutomationAccount(automationAccountName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1468,8 +1440,6 @@ 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. @@ -1499,7 +1469,7 @@ class ConnectionOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - listByAutomationAccount(resourceGroupName, automationAccountName, options, optionalCallback) { + listByAutomationAccount(automationAccountName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1508,14 +1478,14 @@ class ConnectionOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._listByAutomationAccount(resourceGroupName, automationAccountName, options, (err, result, request, response) => { + self._listByAutomationAccount(automationAccountName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._listByAutomationAccount(resourceGroupName, automationAccountName, options, optionalCallback); + return self._listByAutomationAccount(automationAccountName, options, optionalCallback); } } diff --git a/lib/services/automationManagement/lib/operations/connectionTypeOperations.js b/lib/services/automationManagement/lib/operations/connectionTypeOperations.js index 5f99b02be3..fc53b8f316 100644 --- a/lib/services/automationManagement/lib/operations/connectionTypeOperations.js +++ b/lib/services/automationManagement/lib/operations/connectionTypeOperations.js @@ -17,8 +17,6 @@ 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. @@ -40,7 +38,7 @@ const WebResource = msRest.WebResource; * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _deleteMethod(resourceGroupName, automationAccountName, connectionTypeName, options, callback) { +function _deleteMethod(automationAccountName, connectionTypeName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -53,13 +51,13 @@ function _deleteMethod(resourceGroupName, automationAccountName, connectionTypeN let apiVersion = '2015-10-31'; // Validate try { - 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 || 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) { - if (resourceGroupName.match(/^[-\w\._]+$/) === null) + if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { + if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -81,7 +79,7 @@ function _deleteMethod(resourceGroupName, automationAccountName, connectionTypeN // 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(resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{connectionTypeName}', encodeURIComponent(connectionTypeName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -155,8 +153,6 @@ function _deleteMethod(resourceGroupName, automationAccountName, connectionTypeN /** * 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. @@ -179,7 +175,7 @@ function _deleteMethod(resourceGroupName, automationAccountName, connectionTypeN * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _get(resourceGroupName, automationAccountName, connectionTypeName, options, callback) { +function _get(automationAccountName, connectionTypeName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -192,13 +188,13 @@ function _get(resourceGroupName, automationAccountName, connectionTypeName, opti let apiVersion = '2015-10-31'; // Validate try { - 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 || 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) { - if (resourceGroupName.match(/^[-\w\._]+$/) === null) + if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { + if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -220,7 +216,7 @@ function _get(resourceGroupName, automationAccountName, connectionTypeName, opti // 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(resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{connectionTypeName}', encodeURIComponent(connectionTypeName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -311,8 +307,6 @@ function _get(resourceGroupName, automationAccountName, connectionTypeName, opti /** * 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 @@ -348,7 +342,7 @@ function _get(resourceGroupName, automationAccountName, connectionTypeName, opti * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _createOrUpdate(resourceGroupName, automationAccountName, connectionTypeName, parameters, options, callback) { +function _createOrUpdate(automationAccountName, connectionTypeName, parameters, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -361,13 +355,13 @@ function _createOrUpdate(resourceGroupName, automationAccountName, connectionTyp let apiVersion = '2015-10-31'; // Validate try { - 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 || 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) { - if (resourceGroupName.match(/^[-\w\._]+$/) === null) + if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { + if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -392,7 +386,7 @@ function _createOrUpdate(resourceGroupName, automationAccountName, connectionTyp // 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(resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{connectionTypeName}', encodeURIComponent(connectionTypeName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -514,8 +508,6 @@ function _createOrUpdate(resourceGroupName, automationAccountName, connectionTyp /** * Retrieve a list of connectiontypes. * - * @param {string} resourceGroupName The resource group name. - * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -537,7 +529,7 @@ function _createOrUpdate(resourceGroupName, automationAccountName, connectionTyp * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _listByAutomationAccount(resourceGroupName, automationAccountName, options, callback) { +function _listByAutomationAccount(automationAccountName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -550,13 +542,13 @@ function _listByAutomationAccount(resourceGroupName, automationAccountName, opti let apiVersion = '2015-10-31'; // Validate try { - 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 || 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) { - if (resourceGroupName.match(/^[-\w\._]+$/) === null) + if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { + if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -575,7 +567,7 @@ function _listByAutomationAccount(resourceGroupName, automationAccountName, opti // 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(resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; @@ -809,8 +801,6 @@ 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. @@ -826,11 +816,11 @@ class ConnectionTypeOperations { * * @reject {Error} - The error object. */ - deleteMethodWithHttpOperationResponse(resourceGroupName, automationAccountName, connectionTypeName, options) { + deleteMethodWithHttpOperationResponse(automationAccountName, connectionTypeName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._deleteMethod(resourceGroupName, automationAccountName, connectionTypeName, options, (err, result, request, response) => { + self._deleteMethod(automationAccountName, connectionTypeName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -843,8 +833,6 @@ 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. @@ -875,7 +863,7 @@ class ConnectionTypeOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(resourceGroupName, automationAccountName, connectionTypeName, options, optionalCallback) { + deleteMethod(automationAccountName, connectionTypeName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -884,22 +872,20 @@ class ConnectionTypeOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._deleteMethod(resourceGroupName, automationAccountName, connectionTypeName, options, (err, result, request, response) => { + self._deleteMethod(automationAccountName, connectionTypeName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._deleteMethod(resourceGroupName, automationAccountName, connectionTypeName, options, optionalCallback); + return self._deleteMethod(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. @@ -915,11 +901,11 @@ class ConnectionTypeOperations { * * @reject {Error} - The error object. */ - getWithHttpOperationResponse(resourceGroupName, automationAccountName, connectionTypeName, options) { + getWithHttpOperationResponse(automationAccountName, connectionTypeName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._get(resourceGroupName, automationAccountName, connectionTypeName, options, (err, result, request, response) => { + self._get(automationAccountName, connectionTypeName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -932,8 +918,6 @@ 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. @@ -965,7 +949,7 @@ class ConnectionTypeOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - get(resourceGroupName, automationAccountName, connectionTypeName, options, optionalCallback) { + get(automationAccountName, connectionTypeName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -974,22 +958,20 @@ class ConnectionTypeOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._get(resourceGroupName, automationAccountName, connectionTypeName, options, (err, result, request, response) => { + self._get(automationAccountName, connectionTypeName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._get(resourceGroupName, automationAccountName, connectionTypeName, options, optionalCallback); + return self._get(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 @@ -1018,11 +1000,11 @@ class ConnectionTypeOperations { * * @reject {Error} - The error object. */ - createOrUpdateWithHttpOperationResponse(resourceGroupName, automationAccountName, connectionTypeName, parameters, options) { + createOrUpdateWithHttpOperationResponse(automationAccountName, connectionTypeName, parameters, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._createOrUpdate(resourceGroupName, automationAccountName, connectionTypeName, parameters, options, (err, result, request, response) => { + self._createOrUpdate(automationAccountName, connectionTypeName, parameters, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1035,8 +1017,6 @@ 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 @@ -1081,7 +1061,7 @@ class ConnectionTypeOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - createOrUpdate(resourceGroupName, automationAccountName, connectionTypeName, parameters, options, optionalCallback) { + createOrUpdate(automationAccountName, connectionTypeName, parameters, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1090,22 +1070,20 @@ class ConnectionTypeOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._createOrUpdate(resourceGroupName, automationAccountName, connectionTypeName, parameters, options, (err, result, request, response) => { + self._createOrUpdate(automationAccountName, connectionTypeName, parameters, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._createOrUpdate(resourceGroupName, automationAccountName, connectionTypeName, parameters, options, optionalCallback); + return self._createOrUpdate(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. @@ -1119,11 +1097,11 @@ class ConnectionTypeOperations { * * @reject {Error} - The error object. */ - listByAutomationAccountWithHttpOperationResponse(resourceGroupName, automationAccountName, options) { + listByAutomationAccountWithHttpOperationResponse(automationAccountName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._listByAutomationAccount(resourceGroupName, automationAccountName, options, (err, result, request, response) => { + self._listByAutomationAccount(automationAccountName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1136,8 +1114,6 @@ 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. @@ -1168,7 +1144,7 @@ class ConnectionTypeOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - listByAutomationAccount(resourceGroupName, automationAccountName, options, optionalCallback) { + listByAutomationAccount(automationAccountName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1177,14 +1153,14 @@ class ConnectionTypeOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._listByAutomationAccount(resourceGroupName, automationAccountName, options, (err, result, request, response) => { + self._listByAutomationAccount(automationAccountName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._listByAutomationAccount(resourceGroupName, automationAccountName, options, optionalCallback); + return self._listByAutomationAccount(automationAccountName, options, optionalCallback); } } diff --git a/lib/services/automationManagement/lib/operations/credentialOperations.js b/lib/services/automationManagement/lib/operations/credentialOperations.js index 68c96bf0b3..2f7b0283a0 100644 --- a/lib/services/automationManagement/lib/operations/credentialOperations.js +++ b/lib/services/automationManagement/lib/operations/credentialOperations.js @@ -17,8 +17,6 @@ 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. @@ -40,7 +38,7 @@ const WebResource = msRest.WebResource; * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _deleteMethod(resourceGroupName, automationAccountName, credentialName, options, callback) { +function _deleteMethod(automationAccountName, credentialName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -53,13 +51,13 @@ function _deleteMethod(resourceGroupName, automationAccountName, credentialName, let apiVersion = '2015-10-31'; // Validate try { - 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 || 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) { - if (resourceGroupName.match(/^[-\w\._]+$/) === null) + if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { + if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -81,7 +79,7 @@ function _deleteMethod(resourceGroupName, automationAccountName, credentialName, // 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(resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{credentialName}', encodeURIComponent(credentialName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -155,8 +153,6 @@ function _deleteMethod(resourceGroupName, automationAccountName, credentialName, /** * 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. @@ -179,7 +175,7 @@ function _deleteMethod(resourceGroupName, automationAccountName, credentialName, * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _get(resourceGroupName, automationAccountName, credentialName, options, callback) { +function _get(automationAccountName, credentialName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -192,13 +188,13 @@ function _get(resourceGroupName, automationAccountName, credentialName, options, let apiVersion = '2015-10-31'; // Validate try { - 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 || 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) { - if (resourceGroupName.match(/^[-\w\._]+$/) === null) + if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { + if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -220,7 +216,7 @@ function _get(resourceGroupName, automationAccountName, credentialName, options, // 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(resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{credentialName}', encodeURIComponent(credentialName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -311,8 +307,6 @@ function _get(resourceGroupName, automationAccountName, credentialName, options, /** * 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 @@ -350,7 +344,7 @@ function _get(resourceGroupName, automationAccountName, credentialName, options, * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _createOrUpdate(resourceGroupName, automationAccountName, credentialName, parameters, options, callback) { +function _createOrUpdate(automationAccountName, credentialName, parameters, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -363,13 +357,13 @@ function _createOrUpdate(resourceGroupName, automationAccountName, credentialNam let apiVersion = '2015-10-31'; // Validate try { - 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 || 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) { - if (resourceGroupName.match(/^[-\w\._]+$/) === null) + if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { + if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -394,7 +388,7 @@ function _createOrUpdate(resourceGroupName, automationAccountName, credentialNam // 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(resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{credentialName}', encodeURIComponent(credentialName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -516,8 +510,6 @@ function _createOrUpdate(resourceGroupName, automationAccountName, credentialNam /** * 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 @@ -555,7 +547,7 @@ function _createOrUpdate(resourceGroupName, automationAccountName, credentialNam * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _update(resourceGroupName, automationAccountName, credentialName, parameters, options, callback) { +function _update(automationAccountName, credentialName, parameters, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -568,13 +560,13 @@ function _update(resourceGroupName, automationAccountName, credentialName, param let apiVersion = '2015-10-31'; // Validate try { - 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 || 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) { - if (resourceGroupName.match(/^[-\w\._]+$/) === null) + if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { + if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -599,7 +591,7 @@ function _update(resourceGroupName, automationAccountName, credentialName, param // 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(resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{credentialName}', encodeURIComponent(credentialName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -704,8 +696,6 @@ function _update(resourceGroupName, automationAccountName, credentialName, param /** * Retrieve a list of credentials. * - * @param {string} resourceGroupName The resource group name. - * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -726,7 +716,7 @@ function _update(resourceGroupName, automationAccountName, credentialName, param * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _listByAutomationAccount(resourceGroupName, automationAccountName, options, callback) { +function _listByAutomationAccount(automationAccountName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -739,13 +729,13 @@ function _listByAutomationAccount(resourceGroupName, automationAccountName, opti let apiVersion = '2015-10-31'; // Validate try { - 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 || 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) { - if (resourceGroupName.match(/^[-\w\._]+$/) === null) + if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { + if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -764,7 +754,7 @@ function _listByAutomationAccount(resourceGroupName, automationAccountName, opti // 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(resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; @@ -996,8 +986,6 @@ 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. @@ -1013,11 +1001,11 @@ class CredentialOperations { * * @reject {Error} - The error object. */ - deleteMethodWithHttpOperationResponse(resourceGroupName, automationAccountName, credentialName, options) { + deleteMethodWithHttpOperationResponse(automationAccountName, credentialName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._deleteMethod(resourceGroupName, automationAccountName, credentialName, options, (err, result, request, response) => { + self._deleteMethod(automationAccountName, credentialName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1030,8 +1018,6 @@ 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. @@ -1062,7 +1048,7 @@ class CredentialOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(resourceGroupName, automationAccountName, credentialName, options, optionalCallback) { + deleteMethod(automationAccountName, credentialName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1071,22 +1057,20 @@ class CredentialOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._deleteMethod(resourceGroupName, automationAccountName, credentialName, options, (err, result, request, response) => { + self._deleteMethod(automationAccountName, credentialName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._deleteMethod(resourceGroupName, automationAccountName, credentialName, options, optionalCallback); + return self._deleteMethod(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. @@ -1102,11 +1086,11 @@ class CredentialOperations { * * @reject {Error} - The error object. */ - getWithHttpOperationResponse(resourceGroupName, automationAccountName, credentialName, options) { + getWithHttpOperationResponse(automationAccountName, credentialName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._get(resourceGroupName, automationAccountName, credentialName, options, (err, result, request, response) => { + self._get(automationAccountName, credentialName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1119,8 +1103,6 @@ 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. @@ -1152,7 +1134,7 @@ class CredentialOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - get(resourceGroupName, automationAccountName, credentialName, options, optionalCallback) { + get(automationAccountName, credentialName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1161,22 +1143,20 @@ class CredentialOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._get(resourceGroupName, automationAccountName, credentialName, options, (err, result, request, response) => { + self._get(automationAccountName, credentialName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._get(resourceGroupName, automationAccountName, credentialName, options, optionalCallback); + return self._get(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 @@ -1207,11 +1187,11 @@ class CredentialOperations { * * @reject {Error} - The error object. */ - createOrUpdateWithHttpOperationResponse(resourceGroupName, automationAccountName, credentialName, parameters, options) { + createOrUpdateWithHttpOperationResponse(automationAccountName, credentialName, parameters, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._createOrUpdate(resourceGroupName, automationAccountName, credentialName, parameters, options, (err, result, request, response) => { + self._createOrUpdate(automationAccountName, credentialName, parameters, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1224,8 +1204,6 @@ 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 @@ -1272,7 +1250,7 @@ class CredentialOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - createOrUpdate(resourceGroupName, automationAccountName, credentialName, parameters, options, optionalCallback) { + createOrUpdate(automationAccountName, credentialName, parameters, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1281,22 +1259,20 @@ class CredentialOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._createOrUpdate(resourceGroupName, automationAccountName, credentialName, parameters, options, (err, result, request, response) => { + self._createOrUpdate(automationAccountName, credentialName, parameters, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._createOrUpdate(resourceGroupName, automationAccountName, credentialName, parameters, options, optionalCallback); + return self._createOrUpdate(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 @@ -1327,11 +1303,11 @@ class CredentialOperations { * * @reject {Error} - The error object. */ - updateWithHttpOperationResponse(resourceGroupName, automationAccountName, credentialName, parameters, options) { + updateWithHttpOperationResponse(automationAccountName, credentialName, parameters, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._update(resourceGroupName, automationAccountName, credentialName, parameters, options, (err, result, request, response) => { + self._update(automationAccountName, credentialName, parameters, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1344,8 +1320,6 @@ 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 @@ -1392,7 +1366,7 @@ class CredentialOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - update(resourceGroupName, automationAccountName, credentialName, parameters, options, optionalCallback) { + update(automationAccountName, credentialName, parameters, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1401,22 +1375,20 @@ class CredentialOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._update(resourceGroupName, automationAccountName, credentialName, parameters, options, (err, result, request, response) => { + self._update(automationAccountName, credentialName, parameters, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._update(resourceGroupName, automationAccountName, credentialName, parameters, options, optionalCallback); + return self._update(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. @@ -1430,11 +1402,11 @@ class CredentialOperations { * * @reject {Error} - The error object. */ - listByAutomationAccountWithHttpOperationResponse(resourceGroupName, automationAccountName, options) { + listByAutomationAccountWithHttpOperationResponse(automationAccountName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._listByAutomationAccount(resourceGroupName, automationAccountName, options, (err, result, request, response) => { + self._listByAutomationAccount(automationAccountName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1447,8 +1419,6 @@ 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. @@ -1478,7 +1448,7 @@ class CredentialOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - listByAutomationAccount(resourceGroupName, automationAccountName, options, optionalCallback) { + listByAutomationAccount(automationAccountName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1487,14 +1457,14 @@ class CredentialOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._listByAutomationAccount(resourceGroupName, automationAccountName, options, (err, result, request, response) => { + self._listByAutomationAccount(automationAccountName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._listByAutomationAccount(resourceGroupName, automationAccountName, options, optionalCallback); + return self._listByAutomationAccount(automationAccountName, options, optionalCallback); } } diff --git a/lib/services/automationManagement/lib/operations/dscCompilationJobOperations.js b/lib/services/automationManagement/lib/operations/dscCompilationJobOperations.js index 641962720d..413df5947c 100644 --- a/lib/services/automationManagement/lib/operations/dscCompilationJobOperations.js +++ b/lib/services/automationManagement/lib/operations/dscCompilationJobOperations.js @@ -17,8 +17,6 @@ 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. @@ -63,7 +61,7 @@ const WebResource = msRest.WebResource; * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _create(resourceGroupName, automationAccountName, compilationJobId, parameters, options, callback) { +function _create(automationAccountName, compilationJobId, parameters, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -76,13 +74,13 @@ function _create(resourceGroupName, automationAccountName, compilationJobId, par let apiVersion = '2015-10-31'; // Validate try { - 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 || 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) { - if (resourceGroupName.match(/^[-\w\._]+$/) === null) + if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { + if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -107,7 +105,7 @@ function _create(resourceGroupName, automationAccountName, compilationJobId, par // 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(resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{compilationJobId}', encodeURIComponent(compilationJobId.toString())); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -212,8 +210,6 @@ function _create(resourceGroupName, automationAccountName, compilationJobId, par /** * 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. @@ -236,7 +232,7 @@ function _create(resourceGroupName, automationAccountName, compilationJobId, par * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _get(resourceGroupName, automationAccountName, compilationJobId, options, callback) { +function _get(automationAccountName, compilationJobId, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -249,13 +245,13 @@ function _get(resourceGroupName, automationAccountName, compilationJobId, option let apiVersion = '2015-10-31'; // Validate try { - 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 || 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) { - if (resourceGroupName.match(/^[-\w\._]+$/) === null) + if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { + if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -277,7 +273,7 @@ function _get(resourceGroupName, automationAccountName, compilationJobId, option // 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(resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{compilationJobId}', encodeURIComponent(compilationJobId.toString())); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -368,8 +364,6 @@ function _get(resourceGroupName, automationAccountName, compilationJobId, option /** * 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. @@ -393,7 +387,7 @@ function _get(resourceGroupName, automationAccountName, compilationJobId, option * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _listByAutomationAccount(resourceGroupName, automationAccountName, options, callback) { +function _listByAutomationAccount(automationAccountName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -407,13 +401,13 @@ function _listByAutomationAccount(resourceGroupName, automationAccountName, opti let apiVersion = '2015-10-31'; // Validate try { - 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 || 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) { - if (resourceGroupName.match(/^[-\w\._]+$/) === null) + if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { + if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -435,7 +429,7 @@ function _listByAutomationAccount(resourceGroupName, automationAccountName, opti // 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(resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; @@ -528,8 +522,6 @@ function _listByAutomationAccount(resourceGroupName, automationAccountName, opti /** * 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. @@ -554,7 +546,7 @@ function _listByAutomationAccount(resourceGroupName, automationAccountName, opti * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _getStream(resourceGroupName, automationAccountName, jobId, jobStreamId, options, callback) { +function _getStream(automationAccountName, jobId, jobStreamId, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -567,13 +559,13 @@ function _getStream(resourceGroupName, automationAccountName, jobId, jobStreamId let apiVersion = '2015-10-31'; // Validate try { - 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 || 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) { - if (resourceGroupName.match(/^[-\w\._]+$/) === null) + if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { + if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -598,7 +590,7 @@ function _getStream(resourceGroupName, automationAccountName, jobId, jobStreamId // 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(resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{jobId}', encodeURIComponent(jobId.toString())); requestUrl = requestUrl.replace('{jobStreamId}', encodeURIComponent(jobStreamId)); @@ -834,8 +826,6 @@ 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. @@ -873,11 +863,11 @@ class DscCompilationJobOperations { * * @reject {Error} - The error object. */ - createWithHttpOperationResponse(resourceGroupName, automationAccountName, compilationJobId, parameters, options) { + createWithHttpOperationResponse(automationAccountName, compilationJobId, parameters, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._create(resourceGroupName, automationAccountName, compilationJobId, parameters, options, (err, result, request, response) => { + self._create(automationAccountName, compilationJobId, parameters, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -890,8 +880,6 @@ 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. @@ -945,7 +933,7 @@ class DscCompilationJobOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - create(resourceGroupName, automationAccountName, compilationJobId, parameters, options, optionalCallback) { + create(automationAccountName, compilationJobId, parameters, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -954,22 +942,20 @@ class DscCompilationJobOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._create(resourceGroupName, automationAccountName, compilationJobId, parameters, options, (err, result, request, response) => { + self._create(automationAccountName, compilationJobId, parameters, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._create(resourceGroupName, automationAccountName, compilationJobId, parameters, options, optionalCallback); + return self._create(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. @@ -985,11 +971,11 @@ class DscCompilationJobOperations { * * @reject {Error} - The error object. */ - getWithHttpOperationResponse(resourceGroupName, automationAccountName, compilationJobId, options) { + getWithHttpOperationResponse(automationAccountName, compilationJobId, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._get(resourceGroupName, automationAccountName, compilationJobId, options, (err, result, request, response) => { + self._get(automationAccountName, compilationJobId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1002,8 +988,6 @@ 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. @@ -1035,7 +1019,7 @@ class DscCompilationJobOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - get(resourceGroupName, automationAccountName, compilationJobId, options, optionalCallback) { + get(automationAccountName, compilationJobId, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1044,22 +1028,20 @@ class DscCompilationJobOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._get(resourceGroupName, automationAccountName, compilationJobId, options, (err, result, request, response) => { + self._get(automationAccountName, compilationJobId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._get(resourceGroupName, automationAccountName, compilationJobId, options, optionalCallback); + return self._get(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. @@ -1075,11 +1057,11 @@ class DscCompilationJobOperations { * * @reject {Error} - The error object. */ - listByAutomationAccountWithHttpOperationResponse(resourceGroupName, automationAccountName, options) { + listByAutomationAccountWithHttpOperationResponse(automationAccountName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._listByAutomationAccount(resourceGroupName, automationAccountName, options, (err, result, request, response) => { + self._listByAutomationAccount(automationAccountName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1092,8 +1074,6 @@ 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. @@ -1126,7 +1106,7 @@ class DscCompilationJobOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - listByAutomationAccount(resourceGroupName, automationAccountName, options, optionalCallback) { + listByAutomationAccount(automationAccountName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1135,22 +1115,20 @@ class DscCompilationJobOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._listByAutomationAccount(resourceGroupName, automationAccountName, options, (err, result, request, response) => { + self._listByAutomationAccount(automationAccountName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._listByAutomationAccount(resourceGroupName, automationAccountName, options, optionalCallback); + return self._listByAutomationAccount(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. @@ -1168,11 +1146,11 @@ class DscCompilationJobOperations { * * @reject {Error} - The error object. */ - getStreamWithHttpOperationResponse(resourceGroupName, automationAccountName, jobId, jobStreamId, options) { + getStreamWithHttpOperationResponse(automationAccountName, jobId, jobStreamId, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._getStream(resourceGroupName, automationAccountName, jobId, jobStreamId, options, (err, result, request, response) => { + self._getStream(automationAccountName, jobId, jobStreamId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1185,8 +1163,6 @@ 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. @@ -1220,7 +1196,7 @@ class DscCompilationJobOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getStream(resourceGroupName, automationAccountName, jobId, jobStreamId, options, optionalCallback) { + getStream(automationAccountName, jobId, jobStreamId, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1229,14 +1205,14 @@ class DscCompilationJobOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getStream(resourceGroupName, automationAccountName, jobId, jobStreamId, options, (err, result, request, response) => { + self._getStream(automationAccountName, jobId, jobStreamId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getStream(resourceGroupName, automationAccountName, jobId, jobStreamId, options, optionalCallback); + return self._getStream(automationAccountName, jobId, jobStreamId, options, optionalCallback); } } diff --git a/lib/services/automationManagement/lib/operations/dscCompilationJobStream.js b/lib/services/automationManagement/lib/operations/dscCompilationJobStream.js index 31a252d987..4afe189714 100644 --- a/lib/services/automationManagement/lib/operations/dscCompilationJobStream.js +++ b/lib/services/automationManagement/lib/operations/dscCompilationJobStream.js @@ -17,8 +17,6 @@ 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. @@ -41,7 +39,7 @@ const WebResource = msRest.WebResource; * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _listByJob(resourceGroupName, automationAccountName, jobId, options, callback) { +function _listByJob(automationAccountName, jobId, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -54,13 +52,13 @@ function _listByJob(resourceGroupName, automationAccountName, jobId, options, ca let apiVersion = '2015-10-31'; // Validate try { - 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 || 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) { - if (resourceGroupName.match(/^[-\w\._]+$/) === null) + if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { + if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -82,7 +80,7 @@ function _listByJob(resourceGroupName, automationAccountName, jobId, options, ca // 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(resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{jobId}', encodeURIComponent(jobId.toString())); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -184,8 +182,6 @@ 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. @@ -201,11 +197,11 @@ class DscCompilationJobStream { * * @reject {Error} - The error object. */ - listByJobWithHttpOperationResponse(resourceGroupName, automationAccountName, jobId, options) { + listByJobWithHttpOperationResponse(automationAccountName, jobId, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._listByJob(resourceGroupName, automationAccountName, jobId, options, (err, result, request, response) => { + self._listByJob(automationAccountName, jobId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -218,8 +214,6 @@ 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. @@ -251,7 +245,7 @@ class DscCompilationJobStream { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - listByJob(resourceGroupName, automationAccountName, jobId, options, optionalCallback) { + listByJob(automationAccountName, jobId, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -260,14 +254,14 @@ class DscCompilationJobStream { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._listByJob(resourceGroupName, automationAccountName, jobId, options, (err, result, request, response) => { + self._listByJob(automationAccountName, jobId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._listByJob(resourceGroupName, automationAccountName, jobId, options, optionalCallback); + return self._listByJob(automationAccountName, jobId, options, optionalCallback); } } diff --git a/lib/services/automationManagement/lib/operations/dscConfigurationOperations.js b/lib/services/automationManagement/lib/operations/dscConfigurationOperations.js index 77142250d7..c80ee3ac53 100644 --- a/lib/services/automationManagement/lib/operations/dscConfigurationOperations.js +++ b/lib/services/automationManagement/lib/operations/dscConfigurationOperations.js @@ -17,8 +17,6 @@ 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. @@ -40,7 +38,7 @@ const WebResource = msRest.WebResource; * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _deleteMethod(resourceGroupName, automationAccountName, configurationName, options, callback) { +function _deleteMethod(automationAccountName, configurationName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -53,13 +51,13 @@ function _deleteMethod(resourceGroupName, automationAccountName, configurationNa let apiVersion = '2015-10-31'; // Validate try { - 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 || 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) { - if (resourceGroupName.match(/^[-\w\._]+$/) === null) + if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { + if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -81,7 +79,7 @@ function _deleteMethod(resourceGroupName, automationAccountName, configurationNa // 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(resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{configurationName}', encodeURIComponent(configurationName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -155,8 +153,6 @@ function _deleteMethod(resourceGroupName, automationAccountName, configurationNa /** * 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. @@ -179,7 +175,7 @@ function _deleteMethod(resourceGroupName, automationAccountName, configurationNa * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _get(resourceGroupName, automationAccountName, configurationName, options, callback) { +function _get(automationAccountName, configurationName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -192,13 +188,13 @@ function _get(resourceGroupName, automationAccountName, configurationName, optio let apiVersion = '2015-10-31'; // Validate try { - 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 || 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) { - if (resourceGroupName.match(/^[-\w\._]+$/) === null) + if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { + if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -220,7 +216,7 @@ function _get(resourceGroupName, automationAccountName, configurationName, optio // 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(resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{configurationName}', encodeURIComponent(configurationName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -311,8 +307,6 @@ function _get(resourceGroupName, automationAccountName, configurationName, optio /** * 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 @@ -376,7 +370,7 @@ function _get(resourceGroupName, automationAccountName, configurationName, optio * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _createOrUpdate(resourceGroupName, automationAccountName, configurationName, parameters, options, callback) { +function _createOrUpdate(automationAccountName, configurationName, parameters, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -389,13 +383,13 @@ function _createOrUpdate(resourceGroupName, automationAccountName, configuration let apiVersion = '2015-10-31'; // Validate try { - 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 || 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) { - if (resourceGroupName.match(/^[-\w\._]+$/) === null) + if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { + if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -420,7 +414,7 @@ function _createOrUpdate(resourceGroupName, automationAccountName, configuration // 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(resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{configurationName}', encodeURIComponent(configurationName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -540,54 +534,14 @@ function _createOrUpdate(resourceGroupName, automationAccountName, configuration } /** - * Create the configuration identified by configuration name. + * Retrieve the configuration script identified by configuration name. * * @param {string} automationAccountName The automation account name. * - * @param {string} configurationName The create or update parameters for - * configuration. + * @param {string} configurationName The configuration name. * * @param {object} [options] Optional Parameters. * - * @param {object} [options.parameters] The create or update parameters for - * configuration. - * - * @param {boolean} [options.parameters.logVerbose] Gets or sets verbose log - * option. - * - * @param {boolean} [options.parameters.logProgress] Gets or sets progress log - * option. - * - * @param {object} options.parameters.source Gets or sets the source. - * - * @param {object} [options.parameters.source.hash] Gets or sets the hash. - * - * @param {string} options.parameters.source.hash.algorithm Gets or sets the - * content hash algorithm used to hash the content. - * - * @param {string} options.parameters.source.hash.value Gets or sets expected - * hash value of the content. - * - * @param {string} [options.parameters.source.type] Gets or sets the content - * source type. Possible values include: 'embeddedContent', 'uri' - * - * @param {string} [options.parameters.source.value] Gets or sets the value of - * the content. This is based on the content source type. - * - * @param {string} [options.parameters.source.version] Gets or sets the version - * of the content. - * - * @param {object} [options.parameters.parameters] Gets or sets the - * configuration parameters. - * - * @param {string} [options.parameters.description] Gets or sets the - * description of the configuration. - * - * @param {string} [options.parameters.name] Gets or sets name of the resource. - * - * @param {object} [options.parameters.tags] Gets or sets the tags attached to - * the resource. - * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -597,14 +551,13 @@ function _createOrUpdate(resourceGroupName, automationAccountName, configuration * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link DscConfiguration} for more information. + * {string} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _update(automationAccountName, configurationName, options, callback) { +function _getContent(automationAccountName, configurationName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -614,7 +567,6 @@ function _update(automationAccountName, configurationName, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } - let parameters = (options && options.parameters !== undefined) ? options.parameters : undefined; let apiVersion = '2015-10-31'; // Validate try { @@ -643,179 +595,10 @@ function _update(automationAccountName, configurationName, options, callback) { return callback(error); } - // 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('{automationAccountName}', encodeURIComponent(automationAccountName)); - requestUrl = requestUrl.replace('{configurationName}', encodeURIComponent(configurationName)); - requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); - let queryParameters = []; - queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); - if (queryParameters.length > 0) { - requestUrl += '?' + queryParameters.join('&'); - } - - // Create HTTP transport objects - let httpRequest = new WebResource(); - httpRequest.method = 'PATCH'; - httpRequest.url = requestUrl; - httpRequest.headers = {}; - // Set Headers - httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; - if (this.client.generateClientRequestId) { - httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); - } - if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { - httpRequest.headers['accept-language'] = this.client.acceptLanguage; - } - if(options) { - for(let headerName in options['customHeaders']) { - if (options['customHeaders'].hasOwnProperty(headerName)) { - httpRequest.headers[headerName] = options['customHeaders'][headerName]; - } - } - } - // Serialize Request - let requestContent = null; - let requestModel = null; - try { - if (parameters !== null && parameters !== undefined) { - let requestModelMapper = new client.models['DscConfigurationUpdateParameters']().mapper(); - requestModel = client.serialize(requestModelMapper, parameters, 'parameters'); - requestContent = JSON.stringify(requestModel); - } - } catch (error) { - let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + - `payload - ${JSON.stringify(parameters, null, 2)}.`); - return callback(serializationError); - } - httpRequest.body = requestContent; - // Send Request - return client.pipeline(httpRequest, (err, response, responseBody) => { - if (err) { - return callback(err); - } - let statusCode = response.statusCode; - if (statusCode !== 200) { - let error = new Error(responseBody); - error.statusCode = response.statusCode; - error.request = msRest.stripRequest(httpRequest); - error.response = msRest.stripResponse(response); - if (responseBody === '') responseBody = null; - let parsedErrorResponse; - try { - parsedErrorResponse = JSON.parse(responseBody); - if (parsedErrorResponse) { - let internalError = null; - if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; - error.code = internalError ? internalError.code : parsedErrorResponse.code; - error.message = internalError ? internalError.message : parsedErrorResponse.message; - } - if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { - let resultMapper = new client.models['ErrorResponse']().mapper(); - error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); - } - } catch (defaultError) { - error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + - `- "${responseBody}" for the default response.`; - return callback(error); - } - return callback(error); - } - // Create Result - let result = null; - if (responseBody === '') responseBody = null; - // Deserialize Response - if (statusCode === 200) { - let parsedResponse = null; - try { - parsedResponse = JSON.parse(responseBody); - result = JSON.parse(responseBody); - if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['DscConfiguration']().mapper(); - result = client.deserialize(resultMapper, parsedResponse, 'result'); - } - } catch (error) { - let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); - deserializationError.request = msRest.stripRequest(httpRequest); - deserializationError.response = msRest.stripResponse(response); - return callback(deserializationError); - } - } - - return callback(null, result, httpRequest, response); - }); -} - -/** - * 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. - * - * @param {object} [options] Optional Parameters. - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @param {function} callback - The callback. - * - * @returns {function} callback(err, result, request, response) - * - * {Error} err - The Error object if an error occurred, null otherwise. - * - * {string} [result] - The deserialized result object if an error did not occur. - * - * {object} [request] - The HTTP Request object if an error did not occur. - * - * {stream} [response] - The HTTP Response stream if an error did not occur. - */ -function _getContent(resourceGroupName, automationAccountName, configurationName, options, callback) { - /* jshint validthis: true */ - let client = this.client; - if(!callback && typeof options === 'function') { - callback = options; - options = null; - } - if (!callback) { - throw new Error('callback cannot be null.'); - } - let apiVersion = '2015-10-31'; - // Validate - try { - 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 (resourceGroupName !== null && resourceGroupName !== undefined) { - if (resourceGroupName.match(/^[-\w\._]+$/) === null) - { - throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); - } - } - 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 (configurationName === null || configurationName === undefined || typeof configurationName.valueOf() !== 'string') { - throw new Error('configurationName cannot be null or undefined and it must be of type string.'); - } - 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.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { - throw new Error('this.client.acceptLanguage must be of type string.'); - } - } catch (error) { - return callback(error); - } - // 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(resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{configurationName}', encodeURIComponent(configurationName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -912,8 +695,6 @@ function _getContent(resourceGroupName, automationAccountName, configurationName /** * Retrieve a list of configurations. * - * @param {string} resourceGroupName The resource group name. - * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -935,7 +716,7 @@ function _getContent(resourceGroupName, automationAccountName, configurationName * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _listByAutomationAccount(resourceGroupName, automationAccountName, options, callback) { +function _listByAutomationAccount(automationAccountName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -948,13 +729,13 @@ function _listByAutomationAccount(resourceGroupName, automationAccountName, opti let apiVersion = '2015-10-31'; // Validate try { - 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 || 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) { - if (resourceGroupName.match(/^[-\w\._]+$/) === null) + if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { + if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -973,7 +754,7 @@ function _listByAutomationAccount(resourceGroupName, automationAccountName, opti // 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(resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; @@ -1200,7 +981,6 @@ class DscConfigurationOperations { this._deleteMethod = _deleteMethod; this._get = _get; this._createOrUpdate = _createOrUpdate; - this._update = _update; this._getContent = _getContent; this._listByAutomationAccount = _listByAutomationAccount; this._listByAutomationAccountNext = _listByAutomationAccountNext; @@ -1209,8 +989,6 @@ 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. @@ -1226,11 +1004,11 @@ class DscConfigurationOperations { * * @reject {Error} - The error object. */ - deleteMethodWithHttpOperationResponse(resourceGroupName, automationAccountName, configurationName, options) { + deleteMethodWithHttpOperationResponse(automationAccountName, configurationName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._deleteMethod(resourceGroupName, automationAccountName, configurationName, options, (err, result, request, response) => { + self._deleteMethod(automationAccountName, configurationName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1243,8 +1021,6 @@ 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. @@ -1275,7 +1051,7 @@ class DscConfigurationOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(resourceGroupName, automationAccountName, configurationName, options, optionalCallback) { + deleteMethod(automationAccountName, configurationName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1284,22 +1060,20 @@ class DscConfigurationOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._deleteMethod(resourceGroupName, automationAccountName, configurationName, options, (err, result, request, response) => { + self._deleteMethod(automationAccountName, configurationName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._deleteMethod(resourceGroupName, automationAccountName, configurationName, options, optionalCallback); + return self._deleteMethod(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. @@ -1315,11 +1089,11 @@ class DscConfigurationOperations { * * @reject {Error} - The error object. */ - getWithHttpOperationResponse(resourceGroupName, automationAccountName, configurationName, options) { + getWithHttpOperationResponse(automationAccountName, configurationName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._get(resourceGroupName, automationAccountName, configurationName, options, (err, result, request, response) => { + self._get(automationAccountName, configurationName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1332,8 +1106,6 @@ 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. @@ -1365,7 +1137,7 @@ class DscConfigurationOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - get(resourceGroupName, automationAccountName, configurationName, options, optionalCallback) { + get(automationAccountName, configurationName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1374,22 +1146,20 @@ class DscConfigurationOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._get(resourceGroupName, automationAccountName, configurationName, options, (err, result, request, response) => { + self._get(automationAccountName, configurationName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._get(resourceGroupName, automationAccountName, configurationName, options, optionalCallback); + return self._get(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 @@ -1446,11 +1216,11 @@ class DscConfigurationOperations { * * @reject {Error} - The error object. */ - createOrUpdateWithHttpOperationResponse(resourceGroupName, automationAccountName, configurationName, parameters, options) { + createOrUpdateWithHttpOperationResponse(automationAccountName, configurationName, parameters, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._createOrUpdate(resourceGroupName, automationAccountName, configurationName, parameters, options, (err, result, request, response) => { + self._createOrUpdate(automationAccountName, configurationName, parameters, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1463,8 +1233,6 @@ 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 @@ -1537,7 +1305,7 @@ class DscConfigurationOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - createOrUpdate(resourceGroupName, automationAccountName, configurationName, parameters, options, optionalCallback) { + createOrUpdate(automationAccountName, configurationName, parameters, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1546,188 +1314,20 @@ class DscConfigurationOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._createOrUpdate(resourceGroupName, automationAccountName, configurationName, parameters, options, (err, result, request, response) => { + self._createOrUpdate(automationAccountName, configurationName, parameters, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._createOrUpdate(resourceGroupName, automationAccountName, configurationName, parameters, options, optionalCallback); - } - } - - /** - * Create the configuration identified by configuration name. - * - * @param {string} automationAccountName The automation account name. - * - * @param {string} configurationName The create or update parameters for - * configuration. - * - * @param {object} [options] Optional Parameters. - * - * @param {object} [options.parameters] The create or update parameters for - * configuration. - * - * @param {boolean} [options.parameters.logVerbose] Gets or sets verbose log - * option. - * - * @param {boolean} [options.parameters.logProgress] Gets or sets progress log - * option. - * - * @param {object} options.parameters.source Gets or sets the source. - * - * @param {object} [options.parameters.source.hash] Gets or sets the hash. - * - * @param {string} options.parameters.source.hash.algorithm Gets or sets the - * content hash algorithm used to hash the content. - * - * @param {string} options.parameters.source.hash.value Gets or sets expected - * hash value of the content. - * - * @param {string} [options.parameters.source.type] Gets or sets the content - * source type. Possible values include: 'embeddedContent', 'uri' - * - * @param {string} [options.parameters.source.value] Gets or sets the value of - * the content. This is based on the content source type. - * - * @param {string} [options.parameters.source.version] Gets or sets the version - * of the content. - * - * @param {object} [options.parameters.parameters] Gets or sets the - * configuration parameters. - * - * @param {string} [options.parameters.description] Gets or sets the - * description of the configuration. - * - * @param {string} [options.parameters.name] Gets or sets name of the resource. - * - * @param {object} [options.parameters.tags] Gets or sets the tags attached to - * the resource. - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @returns {Promise} A promise is returned - * - * @resolve {HttpOperationResponse} - The deserialized result object. - * - * @reject {Error} - The error object. - */ - updateWithHttpOperationResponse(automationAccountName, configurationName, options) { - let client = this.client; - let self = this; - return new Promise((resolve, reject) => { - self._update(automationAccountName, configurationName, options, (err, result, request, response) => { - let httpOperationResponse = new msRest.HttpOperationResponse(request, response); - httpOperationResponse.body = result; - if (err) { reject(err); } - else { resolve(httpOperationResponse); } - return; - }); - }); - } - - /** - * Create the configuration identified by configuration name. - * - * @param {string} automationAccountName The automation account name. - * - * @param {string} configurationName The create or update parameters for - * configuration. - * - * @param {object} [options] Optional Parameters. - * - * @param {object} [options.parameters] The create or update parameters for - * configuration. - * - * @param {boolean} [options.parameters.logVerbose] Gets or sets verbose log - * option. - * - * @param {boolean} [options.parameters.logProgress] Gets or sets progress log - * option. - * - * @param {object} options.parameters.source Gets or sets the source. - * - * @param {object} [options.parameters.source.hash] Gets or sets the hash. - * - * @param {string} options.parameters.source.hash.algorithm Gets or sets the - * content hash algorithm used to hash the content. - * - * @param {string} options.parameters.source.hash.value Gets or sets expected - * hash value of the content. - * - * @param {string} [options.parameters.source.type] Gets or sets the content - * source type. Possible values include: 'embeddedContent', 'uri' - * - * @param {string} [options.parameters.source.value] Gets or sets the value of - * the content. This is based on the content source type. - * - * @param {string} [options.parameters.source.version] Gets or sets the version - * of the content. - * - * @param {object} [options.parameters.parameters] Gets or sets the - * configuration parameters. - * - * @param {string} [options.parameters.description] Gets or sets the - * description of the configuration. - * - * @param {string} [options.parameters.name] Gets or sets name of the resource. - * - * @param {object} [options.parameters.tags] Gets or sets the tags attached to - * the resource. - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @param {function} [optionalCallback] - The optional callback. - * - * @returns {function|Promise} If a callback was passed as the last parameter - * then it returns the callback else returns a Promise. - * - * {Promise} A promise is returned - * - * @resolve {DscConfiguration} - The deserialized result object. - * - * @reject {Error} - The error object. - * - * {function} optionalCallback(err, result, request, response) - * - * {Error} err - The Error object if an error occurred, null otherwise. - * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link DscConfiguration} for more information. - * - * {object} [request] - The HTTP Request object if an error did not occur. - * - * {stream} [response] - The HTTP Response stream if an error did not occur. - */ - update(automationAccountName, configurationName, options, optionalCallback) { - let client = this.client; - let self = this; - if (!optionalCallback && typeof options === 'function') { - optionalCallback = options; - options = null; - } - if (!optionalCallback) { - return new Promise((resolve, reject) => { - self._update(automationAccountName, configurationName, options, (err, result, request, response) => { - if (err) { reject(err); } - else { resolve(result); } - return; - }); - }); - } else { - return self._update(automationAccountName, configurationName, options, optionalCallback); + return self._createOrUpdate(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. @@ -1743,11 +1343,11 @@ class DscConfigurationOperations { * * @reject {Error} - The error object. */ - getContentWithHttpOperationResponse(resourceGroupName, automationAccountName, configurationName, options) { + getContentWithHttpOperationResponse(automationAccountName, configurationName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._getContent(resourceGroupName, automationAccountName, configurationName, options, (err, result, request, response) => { + self._getContent(automationAccountName, configurationName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1760,8 +1360,6 @@ 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. @@ -1792,7 +1390,7 @@ class DscConfigurationOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getContent(resourceGroupName, automationAccountName, configurationName, options, optionalCallback) { + getContent(automationAccountName, configurationName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1801,22 +1399,20 @@ class DscConfigurationOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getContent(resourceGroupName, automationAccountName, configurationName, options, (err, result, request, response) => { + self._getContent(automationAccountName, configurationName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getContent(resourceGroupName, automationAccountName, configurationName, options, optionalCallback); + return self._getContent(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. @@ -1830,11 +1426,11 @@ class DscConfigurationOperations { * * @reject {Error} - The error object. */ - listByAutomationAccountWithHttpOperationResponse(resourceGroupName, automationAccountName, options) { + listByAutomationAccountWithHttpOperationResponse(automationAccountName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._listByAutomationAccount(resourceGroupName, automationAccountName, options, (err, result, request, response) => { + self._listByAutomationAccount(automationAccountName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1847,8 +1443,6 @@ 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. @@ -1879,7 +1473,7 @@ class DscConfigurationOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - listByAutomationAccount(resourceGroupName, automationAccountName, options, optionalCallback) { + listByAutomationAccount(automationAccountName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1888,14 +1482,14 @@ class DscConfigurationOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._listByAutomationAccount(resourceGroupName, automationAccountName, options, (err, result, request, response) => { + self._listByAutomationAccount(automationAccountName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._listByAutomationAccount(resourceGroupName, automationAccountName, options, optionalCallback); + return self._listByAutomationAccount(automationAccountName, options, optionalCallback); } } diff --git a/lib/services/automationManagement/lib/operations/dscNodeConfigurationOperations.js b/lib/services/automationManagement/lib/operations/dscNodeConfigurationOperations.js index 54dc7f4b1f..324a545465 100644 --- a/lib/services/automationManagement/lib/operations/dscNodeConfigurationOperations.js +++ b/lib/services/automationManagement/lib/operations/dscNodeConfigurationOperations.js @@ -17,8 +17,6 @@ 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. @@ -40,7 +38,7 @@ const WebResource = msRest.WebResource; * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _deleteMethod(resourceGroupName, automationAccountName, nodeConfigurationName, options, callback) { +function _deleteMethod(automationAccountName, nodeConfigurationName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -53,13 +51,13 @@ function _deleteMethod(resourceGroupName, automationAccountName, nodeConfigurati let apiVersion = '2015-10-31'; // Validate try { - 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 || 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) { - if (resourceGroupName.match(/^[-\w\._]+$/) === null) + if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { + if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -81,7 +79,7 @@ function _deleteMethod(resourceGroupName, automationAccountName, nodeConfigurati // 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(resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{nodeConfigurationName}', encodeURIComponent(nodeConfigurationName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -155,8 +153,6 @@ function _deleteMethod(resourceGroupName, automationAccountName, nodeConfigurati /** * 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. @@ -179,7 +175,7 @@ function _deleteMethod(resourceGroupName, automationAccountName, nodeConfigurati * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _get(resourceGroupName, automationAccountName, nodeConfigurationName, options, callback) { +function _get(automationAccountName, nodeConfigurationName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -192,13 +188,13 @@ function _get(resourceGroupName, automationAccountName, nodeConfigurationName, o let apiVersion = '2015-10-31'; // Validate try { - 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 || 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) { - if (resourceGroupName.match(/^[-\w\._]+$/) === null) + if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { + if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -220,7 +216,7 @@ function _get(resourceGroupName, automationAccountName, nodeConfigurationName, o // 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(resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{nodeConfigurationName}', encodeURIComponent(nodeConfigurationName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -311,8 +307,6 @@ function _get(resourceGroupName, automationAccountName, nodeConfigurationName, o /** * 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 @@ -369,7 +363,7 @@ function _get(resourceGroupName, automationAccountName, nodeConfigurationName, o * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _createOrUpdate(resourceGroupName, automationAccountName, nodeConfigurationName, parameters, options, callback) { +function _createOrUpdate(automationAccountName, nodeConfigurationName, parameters, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -382,13 +376,13 @@ function _createOrUpdate(resourceGroupName, automationAccountName, nodeConfigura let apiVersion = '2015-10-31'; // Validate try { - 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 || 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) { - if (resourceGroupName.match(/^[-\w\._]+$/) === null) + if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { + if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -413,7 +407,7 @@ function _createOrUpdate(resourceGroupName, automationAccountName, nodeConfigura // 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(resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{nodeConfigurationName}', encodeURIComponent(nodeConfigurationName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -518,8 +512,6 @@ function _createOrUpdate(resourceGroupName, automationAccountName, nodeConfigura /** * 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. @@ -543,7 +535,7 @@ function _createOrUpdate(resourceGroupName, automationAccountName, nodeConfigura * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _listByAutomationAccount(resourceGroupName, automationAccountName, options, callback) { +function _listByAutomationAccount(automationAccountName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -557,13 +549,13 @@ function _listByAutomationAccount(resourceGroupName, automationAccountName, opti let apiVersion = '2015-10-31'; // Validate try { - 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 || 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) { - if (resourceGroupName.match(/^[-\w\._]+$/) === null) + if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { + if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -585,7 +577,7 @@ function _listByAutomationAccount(resourceGroupName, automationAccountName, opti // 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(resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; @@ -822,8 +814,6 @@ 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. @@ -839,11 +829,11 @@ class DscNodeConfigurationOperations { * * @reject {Error} - The error object. */ - deleteMethodWithHttpOperationResponse(resourceGroupName, automationAccountName, nodeConfigurationName, options) { + deleteMethodWithHttpOperationResponse(automationAccountName, nodeConfigurationName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._deleteMethod(resourceGroupName, automationAccountName, nodeConfigurationName, options, (err, result, request, response) => { + self._deleteMethod(automationAccountName, nodeConfigurationName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -856,8 +846,6 @@ 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. @@ -888,7 +876,7 @@ class DscNodeConfigurationOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(resourceGroupName, automationAccountName, nodeConfigurationName, options, optionalCallback) { + deleteMethod(automationAccountName, nodeConfigurationName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -897,22 +885,20 @@ class DscNodeConfigurationOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._deleteMethod(resourceGroupName, automationAccountName, nodeConfigurationName, options, (err, result, request, response) => { + self._deleteMethod(automationAccountName, nodeConfigurationName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._deleteMethod(resourceGroupName, automationAccountName, nodeConfigurationName, options, optionalCallback); + return self._deleteMethod(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. @@ -928,11 +914,11 @@ class DscNodeConfigurationOperations { * * @reject {Error} - The error object. */ - getWithHttpOperationResponse(resourceGroupName, automationAccountName, nodeConfigurationName, options) { + getWithHttpOperationResponse(automationAccountName, nodeConfigurationName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._get(resourceGroupName, automationAccountName, nodeConfigurationName, options, (err, result, request, response) => { + self._get(automationAccountName, nodeConfigurationName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -945,8 +931,6 @@ 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. @@ -978,7 +962,7 @@ class DscNodeConfigurationOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - get(resourceGroupName, automationAccountName, nodeConfigurationName, options, optionalCallback) { + get(automationAccountName, nodeConfigurationName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -987,22 +971,20 @@ class DscNodeConfigurationOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._get(resourceGroupName, automationAccountName, nodeConfigurationName, options, (err, result, request, response) => { + self._get(automationAccountName, nodeConfigurationName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._get(resourceGroupName, automationAccountName, nodeConfigurationName, options, optionalCallback); + return self._get(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 @@ -1052,11 +1034,11 @@ class DscNodeConfigurationOperations { * * @reject {Error} - The error object. */ - createOrUpdateWithHttpOperationResponse(resourceGroupName, automationAccountName, nodeConfigurationName, parameters, options) { + createOrUpdateWithHttpOperationResponse(automationAccountName, nodeConfigurationName, parameters, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._createOrUpdate(resourceGroupName, automationAccountName, nodeConfigurationName, parameters, options, (err, result, request, response) => { + self._createOrUpdate(automationAccountName, nodeConfigurationName, parameters, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1069,8 +1051,6 @@ 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 @@ -1136,7 +1116,7 @@ class DscNodeConfigurationOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - createOrUpdate(resourceGroupName, automationAccountName, nodeConfigurationName, parameters, options, optionalCallback) { + createOrUpdate(automationAccountName, nodeConfigurationName, parameters, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1145,22 +1125,20 @@ class DscNodeConfigurationOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._createOrUpdate(resourceGroupName, automationAccountName, nodeConfigurationName, parameters, options, (err, result, request, response) => { + self._createOrUpdate(automationAccountName, nodeConfigurationName, parameters, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._createOrUpdate(resourceGroupName, automationAccountName, nodeConfigurationName, parameters, options, optionalCallback); + return self._createOrUpdate(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. @@ -1176,11 +1154,11 @@ class DscNodeConfigurationOperations { * * @reject {Error} - The error object. */ - listByAutomationAccountWithHttpOperationResponse(resourceGroupName, automationAccountName, options) { + listByAutomationAccountWithHttpOperationResponse(automationAccountName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._listByAutomationAccount(resourceGroupName, automationAccountName, options, (err, result, request, response) => { + self._listByAutomationAccount(automationAccountName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1193,8 +1171,6 @@ 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. @@ -1227,7 +1203,7 @@ class DscNodeConfigurationOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - listByAutomationAccount(resourceGroupName, automationAccountName, options, optionalCallback) { + listByAutomationAccount(automationAccountName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1236,14 +1212,14 @@ class DscNodeConfigurationOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._listByAutomationAccount(resourceGroupName, automationAccountName, options, (err, result, request, response) => { + self._listByAutomationAccount(automationAccountName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._listByAutomationAccount(resourceGroupName, automationAccountName, options, optionalCallback); + return self._listByAutomationAccount(automationAccountName, options, optionalCallback); } } diff --git a/lib/services/automationManagement/lib/operations/dscNodeOperations.js b/lib/services/automationManagement/lib/operations/dscNodeOperations.js index de8644ff57..ad3a2e48e8 100644 --- a/lib/services/automationManagement/lib/operations/dscNodeOperations.js +++ b/lib/services/automationManagement/lib/operations/dscNodeOperations.js @@ -17,8 +17,6 @@ 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. @@ -41,7 +39,7 @@ const WebResource = msRest.WebResource; * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _deleteMethod(resourceGroupName, automationAccountName, nodeId, options, callback) { +function _deleteMethod(automationAccountName, nodeId, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -54,13 +52,13 @@ function _deleteMethod(resourceGroupName, automationAccountName, nodeId, options let apiVersion = '2015-10-31'; // Validate try { - 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 || 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) { - if (resourceGroupName.match(/^[-\w\._]+$/) === null) + if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { + if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -82,7 +80,7 @@ function _deleteMethod(resourceGroupName, automationAccountName, nodeId, options // 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(resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{nodeId}', encodeURIComponent(nodeId)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -173,8 +171,6 @@ function _deleteMethod(resourceGroupName, automationAccountName, nodeId, options /** * 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. @@ -197,7 +193,7 @@ function _deleteMethod(resourceGroupName, automationAccountName, nodeId, options * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _get(resourceGroupName, automationAccountName, nodeId, options, callback) { +function _get(automationAccountName, nodeId, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -210,13 +206,13 @@ function _get(resourceGroupName, automationAccountName, nodeId, options, callbac let apiVersion = '2015-10-31'; // Validate try { - 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 || 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) { - if (resourceGroupName.match(/^[-\w\._]+$/) === null) + if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { + if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -238,7 +234,7 @@ function _get(resourceGroupName, automationAccountName, nodeId, options, callbac // 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(resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{nodeId}', encodeURIComponent(nodeId)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -329,8 +325,6 @@ function _get(resourceGroupName, automationAccountName, nodeId, options, callbac /** * 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. @@ -363,7 +357,7 @@ function _get(resourceGroupName, automationAccountName, nodeId, options, callbac * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _update(resourceGroupName, automationAccountName, nodeId, parameters, options, callback) { +function _update(automationAccountName, nodeId, parameters, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -376,13 +370,13 @@ function _update(resourceGroupName, automationAccountName, nodeId, parameters, o let apiVersion = '2015-10-31'; // Validate try { - 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 || 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) { - if (resourceGroupName.match(/^[-\w\._]+$/) === null) + if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { + if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -407,7 +401,7 @@ function _update(resourceGroupName, automationAccountName, nodeId, parameters, o // 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(resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{nodeId}', encodeURIComponent(nodeId)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -512,8 +506,6 @@ function _update(resourceGroupName, automationAccountName, nodeId, parameters, o /** * 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. @@ -536,7 +528,7 @@ function _update(resourceGroupName, automationAccountName, nodeId, parameters, o * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _listByAutomationAccount(resourceGroupName, automationAccountName, options, callback) { +function _listByAutomationAccount(automationAccountName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -550,13 +542,13 @@ function _listByAutomationAccount(resourceGroupName, automationAccountName, opti let apiVersion = '2015-10-31'; // Validate try { - 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 || 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) { - if (resourceGroupName.match(/^[-\w\._]+$/) === null) + if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { + if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -578,7 +570,7 @@ function _listByAutomationAccount(resourceGroupName, automationAccountName, opti // 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(resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; @@ -814,8 +806,6 @@ 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. @@ -831,11 +821,11 @@ class DscNodeOperations { * * @reject {Error} - The error object. */ - deleteMethodWithHttpOperationResponse(resourceGroupName, automationAccountName, nodeId, options) { + deleteMethodWithHttpOperationResponse(automationAccountName, nodeId, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._deleteMethod(resourceGroupName, automationAccountName, nodeId, options, (err, result, request, response) => { + self._deleteMethod(automationAccountName, nodeId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -848,8 +838,6 @@ 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. @@ -881,7 +869,7 @@ class DscNodeOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(resourceGroupName, automationAccountName, nodeId, options, optionalCallback) { + deleteMethod(automationAccountName, nodeId, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -890,22 +878,20 @@ class DscNodeOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._deleteMethod(resourceGroupName, automationAccountName, nodeId, options, (err, result, request, response) => { + self._deleteMethod(automationAccountName, nodeId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._deleteMethod(resourceGroupName, automationAccountName, nodeId, options, optionalCallback); + return self._deleteMethod(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. @@ -921,11 +907,11 @@ class DscNodeOperations { * * @reject {Error} - The error object. */ - getWithHttpOperationResponse(resourceGroupName, automationAccountName, nodeId, options) { + getWithHttpOperationResponse(automationAccountName, nodeId, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._get(resourceGroupName, automationAccountName, nodeId, options, (err, result, request, response) => { + self._get(automationAccountName, nodeId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -938,8 +924,6 @@ 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. @@ -971,7 +955,7 @@ class DscNodeOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - get(resourceGroupName, automationAccountName, nodeId, options, optionalCallback) { + get(automationAccountName, nodeId, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -980,22 +964,20 @@ class DscNodeOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._get(resourceGroupName, automationAccountName, nodeId, options, (err, result, request, response) => { + self._get(automationAccountName, nodeId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._get(resourceGroupName, automationAccountName, nodeId, options, optionalCallback); + return self._get(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. @@ -1021,11 +1003,11 @@ class DscNodeOperations { * * @reject {Error} - The error object. */ - updateWithHttpOperationResponse(resourceGroupName, automationAccountName, nodeId, parameters, options) { + updateWithHttpOperationResponse(automationAccountName, nodeId, parameters, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._update(resourceGroupName, automationAccountName, nodeId, parameters, options, (err, result, request, response) => { + self._update(automationAccountName, nodeId, parameters, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1038,8 +1020,6 @@ 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. @@ -1081,7 +1061,7 @@ class DscNodeOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - update(resourceGroupName, automationAccountName, nodeId, parameters, options, optionalCallback) { + update(automationAccountName, nodeId, parameters, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1090,22 +1070,20 @@ class DscNodeOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._update(resourceGroupName, automationAccountName, nodeId, parameters, options, (err, result, request, response) => { + self._update(automationAccountName, nodeId, parameters, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._update(resourceGroupName, automationAccountName, nodeId, parameters, options, optionalCallback); + return self._update(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. @@ -1121,11 +1099,11 @@ class DscNodeOperations { * * @reject {Error} - The error object. */ - listByAutomationAccountWithHttpOperationResponse(resourceGroupName, automationAccountName, options) { + listByAutomationAccountWithHttpOperationResponse(automationAccountName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._listByAutomationAccount(resourceGroupName, automationAccountName, options, (err, result, request, response) => { + self._listByAutomationAccount(automationAccountName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1138,8 +1116,6 @@ 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. @@ -1171,7 +1147,7 @@ class DscNodeOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - listByAutomationAccount(resourceGroupName, automationAccountName, options, optionalCallback) { + listByAutomationAccount(automationAccountName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1180,14 +1156,14 @@ class DscNodeOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._listByAutomationAccount(resourceGroupName, automationAccountName, options, (err, result, request, response) => { + self._listByAutomationAccount(automationAccountName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._listByAutomationAccount(resourceGroupName, automationAccountName, options, optionalCallback); + return self._listByAutomationAccount(automationAccountName, options, optionalCallback); } } diff --git a/lib/services/automationManagement/lib/operations/fields.js b/lib/services/automationManagement/lib/operations/fields.js index bad55aa687..dcfadd3d8f 100644 --- a/lib/services/automationManagement/lib/operations/fields.js +++ b/lib/services/automationManagement/lib/operations/fields.js @@ -17,8 +17,6 @@ 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. @@ -43,7 +41,7 @@ const WebResource = msRest.WebResource; * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _listByType(resourceGroupName, automationAccountName, moduleName, typeName, options, callback) { +function _listByType(automationAccountName, moduleName, typeName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -56,13 +54,13 @@ function _listByType(resourceGroupName, automationAccountName, moduleName, typeN let apiVersion = '2015-10-31'; // Validate try { - 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 || 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) { - if (resourceGroupName.match(/^[-\w\._]+$/) === null) + if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { + if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -87,7 +85,7 @@ function _listByType(resourceGroupName, automationAccountName, moduleName, typeN // 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(resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{moduleName}', encodeURIComponent(moduleName)); requestUrl = requestUrl.replace('{typeName}', encodeURIComponent(typeName)); @@ -190,8 +188,6 @@ 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. @@ -209,11 +205,11 @@ class Fields { * * @reject {Error} - The error object. */ - listByTypeWithHttpOperationResponse(resourceGroupName, automationAccountName, moduleName, typeName, options) { + listByTypeWithHttpOperationResponse(automationAccountName, moduleName, typeName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._listByType(resourceGroupName, automationAccountName, moduleName, typeName, options, (err, result, request, response) => { + self._listByType(automationAccountName, moduleName, typeName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -226,8 +222,6 @@ 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. @@ -261,7 +255,7 @@ class Fields { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - listByType(resourceGroupName, automationAccountName, moduleName, typeName, options, optionalCallback) { + listByType(automationAccountName, moduleName, typeName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -270,14 +264,14 @@ class Fields { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._listByType(resourceGroupName, automationAccountName, moduleName, typeName, options, (err, result, request, response) => { + self._listByType(automationAccountName, moduleName, typeName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._listByType(resourceGroupName, automationAccountName, moduleName, typeName, options, optionalCallback); + return self._listByType(automationAccountName, moduleName, typeName, options, optionalCallback); } } diff --git a/lib/services/automationManagement/lib/operations/hybridRunbookWorkerGroupOperations.js b/lib/services/automationManagement/lib/operations/hybridRunbookWorkerGroupOperations.js index a4fe69fd98..327e721335 100644 --- a/lib/services/automationManagement/lib/operations/hybridRunbookWorkerGroupOperations.js +++ b/lib/services/automationManagement/lib/operations/hybridRunbookWorkerGroupOperations.js @@ -17,8 +17,6 @@ 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 @@ -41,7 +39,7 @@ const WebResource = msRest.WebResource; * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _deleteMethod(resourceGroupName, automationAccountName, hybridRunbookWorkerGroupName, options, callback) { +function _deleteMethod(automationAccountName, hybridRunbookWorkerGroupName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -54,13 +52,13 @@ function _deleteMethod(resourceGroupName, automationAccountName, hybridRunbookWo let apiVersion = '2015-10-31'; // Validate try { - 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 || 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) { - if (resourceGroupName.match(/^[-\w\._]+$/) === null) + if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { + if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -82,7 +80,7 @@ function _deleteMethod(resourceGroupName, automationAccountName, hybridRunbookWo // 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(resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{hybridRunbookWorkerGroupName}', encodeURIComponent(hybridRunbookWorkerGroupName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -156,8 +154,6 @@ function _deleteMethod(resourceGroupName, automationAccountName, hybridRunbookWo /** * 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 @@ -182,7 +178,7 @@ function _deleteMethod(resourceGroupName, automationAccountName, hybridRunbookWo * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _get(resourceGroupName, automationAccountName, hybridRunbookWorkerGroupName, options, callback) { +function _get(automationAccountName, hybridRunbookWorkerGroupName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -195,13 +191,13 @@ function _get(resourceGroupName, automationAccountName, hybridRunbookWorkerGroup let apiVersion = '2015-10-31'; // Validate try { - 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 || 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) { - if (resourceGroupName.match(/^[-\w\._]+$/) === null) + if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { + if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -223,7 +219,7 @@ function _get(resourceGroupName, automationAccountName, hybridRunbookWorkerGroup // 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(resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{hybridRunbookWorkerGroupName}', encodeURIComponent(hybridRunbookWorkerGroupName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -314,8 +310,6 @@ function _get(resourceGroupName, automationAccountName, hybridRunbookWorkerGroup /** * 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 @@ -348,7 +342,7 @@ function _get(resourceGroupName, automationAccountName, hybridRunbookWorkerGroup * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _update(resourceGroupName, automationAccountName, hybridRunbookWorkerGroupName, parameters, options, callback) { +function _update(automationAccountName, hybridRunbookWorkerGroupName, parameters, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -361,13 +355,13 @@ function _update(resourceGroupName, automationAccountName, hybridRunbookWorkerGr let apiVersion = '2015-10-31'; // Validate try { - 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 || 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) { - if (resourceGroupName.match(/^[-\w\._]+$/) === null) + if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { + if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -392,7 +386,7 @@ function _update(resourceGroupName, automationAccountName, hybridRunbookWorkerGr // 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(resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{hybridRunbookWorkerGroupName}', encodeURIComponent(hybridRunbookWorkerGroupName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -497,8 +491,6 @@ function _update(resourceGroupName, automationAccountName, hybridRunbookWorkerGr /** * 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. @@ -520,7 +512,7 @@ function _update(resourceGroupName, automationAccountName, hybridRunbookWorkerGr * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _listByAutomationAccount(resourceGroupName, automationAccountName, options, callback) { +function _listByAutomationAccount(automationAccountName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -533,13 +525,13 @@ function _listByAutomationAccount(resourceGroupName, automationAccountName, opti let apiVersion = '2015-10-31'; // Validate try { - 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 || 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) { - if (resourceGroupName.match(/^[-\w\._]+$/) === null) + if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { + if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -558,7 +550,7 @@ function _listByAutomationAccount(resourceGroupName, automationAccountName, opti // 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(resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; @@ -792,8 +784,6 @@ 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 @@ -810,11 +800,11 @@ class HybridRunbookWorkerGroupOperations { * * @reject {Error} - The error object. */ - deleteMethodWithHttpOperationResponse(resourceGroupName, automationAccountName, hybridRunbookWorkerGroupName, options) { + deleteMethodWithHttpOperationResponse(automationAccountName, hybridRunbookWorkerGroupName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._deleteMethod(resourceGroupName, automationAccountName, hybridRunbookWorkerGroupName, options, (err, result, request, response) => { + self._deleteMethod(automationAccountName, hybridRunbookWorkerGroupName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -827,8 +817,6 @@ 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 @@ -860,7 +848,7 @@ class HybridRunbookWorkerGroupOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(resourceGroupName, automationAccountName, hybridRunbookWorkerGroupName, options, optionalCallback) { + deleteMethod(automationAccountName, hybridRunbookWorkerGroupName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -869,22 +857,20 @@ class HybridRunbookWorkerGroupOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._deleteMethod(resourceGroupName, automationAccountName, hybridRunbookWorkerGroupName, options, (err, result, request, response) => { + self._deleteMethod(automationAccountName, hybridRunbookWorkerGroupName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._deleteMethod(resourceGroupName, automationAccountName, hybridRunbookWorkerGroupName, options, optionalCallback); + return self._deleteMethod(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 @@ -901,11 +887,11 @@ class HybridRunbookWorkerGroupOperations { * * @reject {Error} - The error object. */ - getWithHttpOperationResponse(resourceGroupName, automationAccountName, hybridRunbookWorkerGroupName, options) { + getWithHttpOperationResponse(automationAccountName, hybridRunbookWorkerGroupName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._get(resourceGroupName, automationAccountName, hybridRunbookWorkerGroupName, options, (err, result, request, response) => { + self._get(automationAccountName, hybridRunbookWorkerGroupName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -918,8 +904,6 @@ 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 @@ -953,7 +937,7 @@ class HybridRunbookWorkerGroupOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - get(resourceGroupName, automationAccountName, hybridRunbookWorkerGroupName, options, optionalCallback) { + get(automationAccountName, hybridRunbookWorkerGroupName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -962,22 +946,20 @@ class HybridRunbookWorkerGroupOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._get(resourceGroupName, automationAccountName, hybridRunbookWorkerGroupName, options, (err, result, request, response) => { + self._get(automationAccountName, hybridRunbookWorkerGroupName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._get(resourceGroupName, automationAccountName, hybridRunbookWorkerGroupName, options, optionalCallback); + return self._get(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 @@ -1002,11 +984,11 @@ class HybridRunbookWorkerGroupOperations { * * @reject {Error} - The error object. */ - updateWithHttpOperationResponse(resourceGroupName, automationAccountName, hybridRunbookWorkerGroupName, parameters, options) { + updateWithHttpOperationResponse(automationAccountName, hybridRunbookWorkerGroupName, parameters, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._update(resourceGroupName, automationAccountName, hybridRunbookWorkerGroupName, parameters, options, (err, result, request, response) => { + self._update(automationAccountName, hybridRunbookWorkerGroupName, parameters, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1019,8 +1001,6 @@ 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 @@ -1062,7 +1042,7 @@ class HybridRunbookWorkerGroupOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - update(resourceGroupName, automationAccountName, hybridRunbookWorkerGroupName, parameters, options, optionalCallback) { + update(automationAccountName, hybridRunbookWorkerGroupName, parameters, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1071,22 +1051,20 @@ class HybridRunbookWorkerGroupOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._update(resourceGroupName, automationAccountName, hybridRunbookWorkerGroupName, parameters, options, (err, result, request, response) => { + self._update(automationAccountName, hybridRunbookWorkerGroupName, parameters, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._update(resourceGroupName, automationAccountName, hybridRunbookWorkerGroupName, parameters, options, optionalCallback); + return self._update(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. @@ -1100,11 +1078,11 @@ class HybridRunbookWorkerGroupOperations { * * @reject {Error} - The error object. */ - listByAutomationAccountWithHttpOperationResponse(resourceGroupName, automationAccountName, options) { + listByAutomationAccountWithHttpOperationResponse(automationAccountName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._listByAutomationAccount(resourceGroupName, automationAccountName, options, (err, result, request, response) => { + self._listByAutomationAccount(automationAccountName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1117,8 +1095,6 @@ 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. @@ -1149,7 +1125,7 @@ class HybridRunbookWorkerGroupOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - listByAutomationAccount(resourceGroupName, automationAccountName, options, optionalCallback) { + listByAutomationAccount(automationAccountName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1158,14 +1134,14 @@ class HybridRunbookWorkerGroupOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._listByAutomationAccount(resourceGroupName, automationAccountName, options, (err, result, request, response) => { + self._listByAutomationAccount(automationAccountName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._listByAutomationAccount(resourceGroupName, automationAccountName, options, optionalCallback); + return self._listByAutomationAccount(automationAccountName, options, optionalCallback); } } diff --git a/lib/services/automationManagement/lib/operations/index.d.ts b/lib/services/automationManagement/lib/operations/index.d.ts index 0e84521842..2041f688c2 100644 --- a/lib/services/automationManagement/lib/operations/index.d.ts +++ b/lib/services/automationManagement/lib/operations/index.d.ts @@ -782,8 +782,6 @@ 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. @@ -799,13 +797,11 @@ export interface CertificateOperations { * * @reject {Error|ServiceError} - The error object. */ - deleteMethodWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, certificateName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + deleteMethodWithHttpOperationResponse(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. @@ -836,16 +832,14 @@ export interface CertificateOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - 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; + 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; /** * 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. @@ -861,13 +855,11 @@ export interface CertificateOperations { * * @reject {Error|ServiceError} - The error object. */ - getWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, certificateName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(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. @@ -899,16 +891,14 @@ export interface CertificateOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - 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; + 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; /** * 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 @@ -942,13 +932,11 @@ export interface CertificateOperations { * * @reject {Error|ServiceError} - The error object. */ - createOrUpdateWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, certificateName: string, parameters: models.CertificateCreateOrUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + createOrUpdateWithHttpOperationResponse(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 @@ -998,16 +986,14 @@ export interface CertificateOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - 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; + 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; /** * 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 @@ -1032,13 +1018,11 @@ export interface CertificateOperations { * * @reject {Error|ServiceError} - The error object. */ - updateWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, certificateName: string, parameters: models.CertificateUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + updateWithHttpOperationResponse(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 @@ -1079,16 +1063,14 @@ export interface CertificateOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - 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; + 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; /** * Retrieve a list of certificates. * - * @param {string} resourceGroupName The resource group name. - * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -1102,13 +1084,11 @@ export interface CertificateOperations { * * @reject {Error|ServiceError} - The error object. */ - listByAutomationAccountWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listByAutomationAccountWithHttpOperationResponse(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. @@ -1138,9 +1118,9 @@ export interface CertificateOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - 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; + 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; /** @@ -1212,8 +1192,6 @@ 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. @@ -1229,13 +1207,11 @@ export interface ConnectionOperations { * * @reject {Error|ServiceError} - The error object. */ - deleteMethodWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, connectionName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + deleteMethodWithHttpOperationResponse(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. @@ -1267,16 +1243,14 @@ export interface ConnectionOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - 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; + 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; /** * 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. @@ -1292,13 +1266,11 @@ export interface ConnectionOperations { * * @reject {Error|ServiceError} - The error object. */ - getWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, connectionName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(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. @@ -1330,16 +1302,14 @@ export interface ConnectionOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - 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; + 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; /** * 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 @@ -1373,13 +1343,11 @@ export interface ConnectionOperations { * * @reject {Error|ServiceError} - The error object. */ - createOrUpdateWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, connectionName: string, parameters: models.ConnectionCreateOrUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + createOrUpdateWithHttpOperationResponse(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 @@ -1429,16 +1397,14 @@ export interface ConnectionOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - 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; + 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; /** * 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 @@ -1466,13 +1432,11 @@ export interface ConnectionOperations { * * @reject {Error|ServiceError} - The error object. */ - updateWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, connectionName: string, parameters: models.ConnectionUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + updateWithHttpOperationResponse(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 @@ -1516,16 +1480,14 @@ export interface ConnectionOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - 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; + 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; /** * Retrieve a list of connections. * - * @param {string} resourceGroupName The resource group name. - * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -1539,13 +1501,11 @@ export interface ConnectionOperations { * * @reject {Error|ServiceError} - The error object. */ - listByAutomationAccountWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listByAutomationAccountWithHttpOperationResponse(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. @@ -1575,9 +1535,9 @@ export interface ConnectionOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - 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; + 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; /** @@ -1649,8 +1609,6 @@ 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. @@ -1666,13 +1624,11 @@ export interface ConnectionTypeOperations { * * @reject {Error|ServiceError} - The error object. */ - deleteMethodWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, connectionTypeName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + deleteMethodWithHttpOperationResponse(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. @@ -1703,16 +1659,14 @@ export interface ConnectionTypeOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - 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; + 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; /** * 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. @@ -1728,13 +1682,11 @@ export interface ConnectionTypeOperations { * * @reject {Error|ServiceError} - The error object. */ - getWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, connectionTypeName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(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. @@ -1766,16 +1718,14 @@ export interface ConnectionTypeOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - 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; + 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; /** * 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 @@ -1804,13 +1754,11 @@ export interface ConnectionTypeOperations { * * @reject {Error|ServiceError} - The error object. */ - createOrUpdateWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, connectionTypeName: string, parameters: models.ConnectionTypeCreateOrUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + createOrUpdateWithHttpOperationResponse(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 @@ -1855,16 +1803,14 @@ export interface ConnectionTypeOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - 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; + 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; /** * Retrieve a list of connectiontypes. * - * @param {string} resourceGroupName The resource group name. - * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -1878,13 +1824,11 @@ export interface ConnectionTypeOperations { * * @reject {Error|ServiceError} - The error object. */ - listByAutomationAccountWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listByAutomationAccountWithHttpOperationResponse(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. @@ -1915,9 +1859,9 @@ export interface ConnectionTypeOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - 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; + 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; /** @@ -1990,8 +1934,6 @@ 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. @@ -2007,13 +1949,11 @@ export interface CredentialOperations { * * @reject {Error|ServiceError} - The error object. */ - deleteMethodWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, credentialName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + deleteMethodWithHttpOperationResponse(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. @@ -2044,16 +1984,14 @@ export interface CredentialOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - 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; + 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; /** * 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. @@ -2069,13 +2007,11 @@ export interface CredentialOperations { * * @reject {Error|ServiceError} - The error object. */ - getWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, credentialName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(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. @@ -2107,16 +2043,14 @@ export interface CredentialOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - 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; + 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; /** * 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 @@ -2147,13 +2081,11 @@ export interface CredentialOperations { * * @reject {Error|ServiceError} - The error object. */ - createOrUpdateWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, credentialName: string, parameters: models.CredentialCreateOrUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + createOrUpdateWithHttpOperationResponse(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 @@ -2200,16 +2132,14 @@ export interface CredentialOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - 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; + 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; /** * 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 @@ -2240,13 +2170,11 @@ export interface CredentialOperations { * * @reject {Error|ServiceError} - The error object. */ - updateWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, credentialName: string, parameters: models.CredentialUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + updateWithHttpOperationResponse(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 @@ -2293,16 +2221,14 @@ export interface CredentialOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - 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; + 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; /** * Retrieve a list of credentials. * - * @param {string} resourceGroupName The resource group name. - * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -2316,13 +2242,11 @@ export interface CredentialOperations { * * @reject {Error|ServiceError} - The error object. */ - listByAutomationAccountWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listByAutomationAccountWithHttpOperationResponse(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. @@ -2352,9 +2276,9 @@ export interface CredentialOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - 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; + 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; /** @@ -2426,8 +2350,6 @@ 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. @@ -2465,13 +2387,11 @@ export interface DscCompilationJobOperations { * * @reject {Error|ServiceError} - The error object. */ - createWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, compilationJobId: string, parameters: models.DscCompilationJobCreateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + createWithHttpOperationResponse(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. @@ -2525,16 +2445,14 @@ export interface DscCompilationJobOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - 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; + 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; /** * 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. @@ -2550,13 +2468,11 @@ export interface DscCompilationJobOperations { * * @reject {Error|ServiceError} - The error object. */ - getWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, compilationJobId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(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. @@ -2588,16 +2504,14 @@ export interface DscCompilationJobOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - 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; + 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; /** * 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. @@ -2613,13 +2527,11 @@ export interface DscCompilationJobOperations { * * @reject {Error|ServiceError} - The error object. */ - listByAutomationAccountWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, options?: { filter? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; + listByAutomationAccountWithHttpOperationResponse(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. @@ -2652,16 +2564,14 @@ export interface DscCompilationJobOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - 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; + 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; /** * 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. @@ -2679,13 +2589,11 @@ export interface DscCompilationJobOperations { * * @reject {Error|ServiceError} - The error object. */ - getStreamWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, jobId: string, jobStreamId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getStreamWithHttpOperationResponse(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. @@ -2719,9 +2627,9 @@ export interface DscCompilationJobOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - 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; + 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; /** @@ -2794,8 +2702,6 @@ 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. @@ -2811,13 +2717,11 @@ export interface DscCompilationJobStream { * * @reject {Error|ServiceError} - The error object. */ - listByJobWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, jobId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listByJobWithHttpOperationResponse(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. @@ -2849,9 +2753,9 @@ export interface DscCompilationJobStream { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - 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; + 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; } /** @@ -2866,8 +2770,6 @@ 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. @@ -2883,13 +2785,11 @@ export interface DscConfigurationOperations { * * @reject {Error|ServiceError} - The error object. */ - deleteMethodWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, configurationName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + deleteMethodWithHttpOperationResponse(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. @@ -2920,16 +2820,14 @@ export interface DscConfigurationOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - 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; + 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; /** * 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. @@ -2945,13 +2843,11 @@ export interface DscConfigurationOperations { * * @reject {Error|ServiceError} - The error object. */ - getWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, configurationName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(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. @@ -2983,16 +2879,14 @@ export interface DscConfigurationOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - 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; + 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; /** * 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 @@ -3049,13 +2943,11 @@ export interface DscConfigurationOperations { * * @reject {Error|ServiceError} - The error object. */ - createOrUpdateWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, configurationName: string, parameters: models.DscConfigurationCreateOrUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + createOrUpdateWithHttpOperationResponse(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 @@ -3128,155 +3020,14 @@ export interface DscConfigurationOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - 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; - - - /** - * Create the configuration identified by configuration name. - * - * @param {string} automationAccountName The automation account name. - * - * @param {string} configurationName The create or update parameters for - * configuration. - * - * @param {object} [options] Optional Parameters. - * - * @param {object} [options.parameters] The create or update parameters for - * configuration. - * - * @param {boolean} [options.parameters.logVerbose] Gets or sets verbose log - * option. - * - * @param {boolean} [options.parameters.logProgress] Gets or sets progress log - * option. - * - * @param {object} options.parameters.source Gets or sets the source. - * - * @param {object} [options.parameters.source.hash] Gets or sets the hash. - * - * @param {string} options.parameters.source.hash.algorithm Gets or sets the - * content hash algorithm used to hash the content. - * - * @param {string} options.parameters.source.hash.value Gets or sets expected - * hash value of the content. - * - * @param {string} [options.parameters.source.type] Gets or sets the content - * source type. Possible values include: 'embeddedContent', 'uri' - * - * @param {string} [options.parameters.source.value] Gets or sets the value of - * the content. This is based on the content source type. - * - * @param {string} [options.parameters.source.version] Gets or sets the version - * of the content. - * - * @param {object} [options.parameters.parameters] Gets or sets the - * configuration parameters. - * - * @param {string} [options.parameters.description] Gets or sets the - * description of the configuration. - * - * @param {string} [options.parameters.name] Gets or sets name of the resource. - * - * @param {object} [options.parameters.tags] Gets or sets the tags attached to - * the resource. - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @returns {Promise} A promise is returned - * - * @resolve {HttpOperationResponse} - The deserialized result object. - * - * @reject {Error|ServiceError} - The error object. - */ - updateWithHttpOperationResponse(automationAccountName: string, configurationName: string, options?: { parameters? : models.DscConfigurationUpdateParameters, customHeaders? : { [headerName: string]: string; } }): Promise>; - - /** - * Create the configuration identified by configuration name. - * - * @param {string} automationAccountName The automation account name. - * - * @param {string} configurationName The create or update parameters for - * configuration. - * - * @param {object} [options] Optional Parameters. - * - * @param {object} [options.parameters] The create or update parameters for - * configuration. - * - * @param {boolean} [options.parameters.logVerbose] Gets or sets verbose log - * option. - * - * @param {boolean} [options.parameters.logProgress] Gets or sets progress log - * option. - * - * @param {object} options.parameters.source Gets or sets the source. - * - * @param {object} [options.parameters.source.hash] Gets or sets the hash. - * - * @param {string} options.parameters.source.hash.algorithm Gets or sets the - * content hash algorithm used to hash the content. - * - * @param {string} options.parameters.source.hash.value Gets or sets expected - * hash value of the content. - * - * @param {string} [options.parameters.source.type] Gets or sets the content - * source type. Possible values include: 'embeddedContent', 'uri' - * - * @param {string} [options.parameters.source.value] Gets or sets the value of - * the content. This is based on the content source type. - * - * @param {string} [options.parameters.source.version] Gets or sets the version - * of the content. - * - * @param {object} [options.parameters.parameters] Gets or sets the - * configuration parameters. - * - * @param {string} [options.parameters.description] Gets or sets the - * description of the configuration. - * - * @param {string} [options.parameters.name] Gets or sets name of the resource. - * - * @param {object} [options.parameters.tags] Gets or sets the tags attached to - * the resource. - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @param {ServiceCallback} [optionalCallback] - The optional callback. - * - * @returns {ServiceCallback|Promise} If a callback was passed as the last - * parameter then it returns the callback else returns a Promise. - * - * {Promise} A promise is returned. - * - * @resolve {DscConfiguration} - The deserialized result object. - * - * @reject {Error|ServiceError} - The error object. - * - * {ServiceCallback} optionalCallback(err, result, request, response) - * - * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. - * - * {DscConfiguration} [result] - The deserialized result object if an error did not occur. - * See {@link DscConfiguration} for more information. - * - * {WebResource} [request] - The HTTP Request object if an error did not occur. - * - * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. - */ - update(automationAccountName: string, configurationName: string, options?: { parameters? : models.DscConfigurationUpdateParameters, customHeaders? : { [headerName: string]: string; } }): Promise; - update(automationAccountName: string, configurationName: string, callback: ServiceCallback): void; - update(automationAccountName: string, configurationName: string, options: { parameters? : models.DscConfigurationUpdateParameters, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + 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; /** * 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. @@ -3292,13 +3043,11 @@ export interface DscConfigurationOperations { * * @reject {Error|ServiceError} - The error object. */ - getContentWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, configurationName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getContentWithHttpOperationResponse(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. @@ -3329,16 +3078,14 @@ export interface DscConfigurationOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - 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; + 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; /** * Retrieve a list of configurations. * - * @param {string} resourceGroupName The resource group name. - * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -3352,13 +3099,11 @@ export interface DscConfigurationOperations { * * @reject {Error|ServiceError} - The error object. */ - listByAutomationAccountWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listByAutomationAccountWithHttpOperationResponse(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. @@ -3389,9 +3134,9 @@ export interface DscConfigurationOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - 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; + 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; /** @@ -3464,8 +3209,6 @@ 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. @@ -3479,13 +3222,11 @@ export interface AgentRegistrationInformation { * * @reject {Error|ServiceError} - The error object. */ - getWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(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. @@ -3515,16 +3256,14 @@ export interface AgentRegistrationInformation { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - 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; + 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; /** * 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 @@ -3552,13 +3291,11 @@ export interface AgentRegistrationInformation { * * @reject {Error|ServiceError} - The error object. */ - regenerateKeyWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, parameters: models.AgentRegistrationRegenerateKeyParameter, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + regenerateKeyWithHttpOperationResponse(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 @@ -3602,9 +3339,9 @@ export interface AgentRegistrationInformation { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - 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; + 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; } /** @@ -3619,8 +3356,6 @@ 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. @@ -3636,13 +3371,11 @@ export interface DscNodeOperations { * * @reject {Error|ServiceError} - The error object. */ - deleteMethodWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, nodeId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + deleteMethodWithHttpOperationResponse(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. @@ -3674,16 +3407,14 @@ export interface DscNodeOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - 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; + 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; /** * 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. @@ -3699,13 +3430,11 @@ export interface DscNodeOperations { * * @reject {Error|ServiceError} - The error object. */ - getWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, nodeId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(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. @@ -3737,16 +3466,14 @@ export interface DscNodeOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - 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; + 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; /** * 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. @@ -3772,13 +3499,11 @@ export interface DscNodeOperations { * * @reject {Error|ServiceError} - The error object. */ - updateWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, nodeId: string, parameters: models.DscNodeUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + updateWithHttpOperationResponse(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. @@ -3820,16 +3545,14 @@ export interface DscNodeOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - 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; + 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; /** * 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. @@ -3845,13 +3568,11 @@ export interface DscNodeOperations { * * @reject {Error|ServiceError} - The error object. */ - listByAutomationAccountWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, options?: { filter? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; + listByAutomationAccountWithHttpOperationResponse(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. @@ -3883,9 +3604,9 @@ export interface DscNodeOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - 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; + 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; /** @@ -3957,8 +3678,6 @@ 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. @@ -3976,13 +3695,11 @@ export interface NodeReports { * * @reject {Error|ServiceError} - The error object. */ - listByNodeWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, nodeId: string, options?: { filter? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; + listByNodeWithHttpOperationResponse(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. @@ -4017,16 +3734,14 @@ export interface NodeReports { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - 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; + 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; /** * 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. @@ -4044,13 +3759,11 @@ export interface NodeReports { * * @reject {Error|ServiceError} - The error object. */ - getWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, nodeId: string, reportId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(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. @@ -4084,16 +3797,14 @@ export interface NodeReports { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - 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; + 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; /** * 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. @@ -4111,13 +3822,11 @@ export interface NodeReports { * * @reject {Error|ServiceError} - The error object. */ - getContentWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, nodeId: string, reportId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getContentWithHttpOperationResponse(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. @@ -4150,9 +3859,9 @@ export interface NodeReports { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - 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; + 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; /** @@ -4225,8 +3934,6 @@ 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. @@ -4242,13 +3949,11 @@ export interface DscNodeConfigurationOperations { * * @reject {Error|ServiceError} - The error object. */ - deleteMethodWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, nodeConfigurationName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + deleteMethodWithHttpOperationResponse(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. @@ -4279,16 +3984,14 @@ export interface DscNodeConfigurationOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - 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; + 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; /** * 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. @@ -4304,13 +4007,11 @@ export interface DscNodeConfigurationOperations { * * @reject {Error|ServiceError} - The error object. */ - getWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, nodeConfigurationName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(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. @@ -4342,16 +4043,14 @@ export interface DscNodeConfigurationOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - 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; + 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; /** * 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 @@ -4401,13 +4100,11 @@ export interface DscNodeConfigurationOperations { * * @reject {Error|ServiceError} - The error object. */ - createOrUpdateWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, nodeConfigurationName: string, parameters: models.DscNodeConfigurationCreateOrUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + createOrUpdateWithHttpOperationResponse(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 @@ -4473,16 +4170,14 @@ export interface DscNodeConfigurationOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - 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; + 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; /** * 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. @@ -4498,13 +4193,11 @@ export interface DscNodeConfigurationOperations { * * @reject {Error|ServiceError} - The error object. */ - listByAutomationAccountWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, options?: { filter? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; + listByAutomationAccountWithHttpOperationResponse(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. @@ -4537,9 +4230,9 @@ export interface DscNodeConfigurationOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - 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; + 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; /** @@ -4612,8 +4305,6 @@ 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 @@ -4630,13 +4321,11 @@ export interface HybridRunbookWorkerGroupOperations { * * @reject {Error|ServiceError} - The error object. */ - deleteMethodWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, hybridRunbookWorkerGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + deleteMethodWithHttpOperationResponse(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 @@ -4668,16 +4357,14 @@ export interface HybridRunbookWorkerGroupOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - 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; + 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; /** * 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 @@ -4694,13 +4381,11 @@ export interface HybridRunbookWorkerGroupOperations { * * @reject {Error|ServiceError} - The error object. */ - getWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, hybridRunbookWorkerGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(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 @@ -4734,16 +4419,14 @@ export interface HybridRunbookWorkerGroupOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - 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; + 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; /** * 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 @@ -4768,13 +4451,11 @@ export interface HybridRunbookWorkerGroupOperations { * * @reject {Error|ServiceError} - The error object. */ - updateWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, hybridRunbookWorkerGroupName: string, parameters: models.HybridRunbookWorkerGroupUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + updateWithHttpOperationResponse(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 @@ -4816,16 +4497,14 @@ export interface HybridRunbookWorkerGroupOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - 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; + 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; /** * 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. @@ -4839,13 +4518,11 @@ export interface HybridRunbookWorkerGroupOperations { * * @reject {Error|ServiceError} - The error object. */ - listByAutomationAccountWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listByAutomationAccountWithHttpOperationResponse(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. @@ -4876,9 +4553,9 @@ export interface HybridRunbookWorkerGroupOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - 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; + 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; /** @@ -4951,8 +4628,6 @@ 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. @@ -4968,13 +4643,11 @@ export interface JobScheduleOperations { * * @reject {Error|ServiceError} - The error object. */ - deleteMethodWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, jobScheduleId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + deleteMethodWithHttpOperationResponse(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. @@ -5005,16 +4678,14 @@ export interface JobScheduleOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - 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; + 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; /** * 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. @@ -5030,13 +4701,11 @@ export interface JobScheduleOperations { * * @reject {Error|ServiceError} - The error object. */ - getWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, jobScheduleId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(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. @@ -5068,16 +4737,14 @@ export interface JobScheduleOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - 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; + 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; /** * 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. @@ -5112,13 +4779,11 @@ export interface JobScheduleOperations { * * @reject {Error|ServiceError} - The error object. */ - createWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, jobScheduleId: string, parameters: models.JobScheduleCreateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + createWithHttpOperationResponse(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. @@ -5169,16 +4834,14 @@ export interface JobScheduleOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - 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; + 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; /** * 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. @@ -5192,13 +4855,11 @@ export interface JobScheduleOperations { * * @reject {Error|ServiceError} - The error object. */ - listByAutomationAccountWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listByAutomationAccountWithHttpOperationResponse(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. @@ -5228,9 +4889,9 @@ export interface JobScheduleOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - 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; + 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; /** @@ -5302,8 +4963,6 @@ 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. @@ -5317,13 +4976,11 @@ export interface LinkedWorkspaceOperations { * * @reject {Error|ServiceError} - The error object. */ - getWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(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. @@ -5353,9 +5010,9 @@ export interface LinkedWorkspaceOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - 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; + 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; } /** @@ -5371,8 +5028,6 @@ 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. @@ -5390,14 +5045,12 @@ export interface ActivityOperations { * * @reject {Error|ServiceError} - The error object. */ - getWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, moduleName: string, activityName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(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. @@ -5431,16 +5084,14 @@ export interface ActivityOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - 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; + 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; /** * 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. @@ -5456,13 +5107,11 @@ export interface ActivityOperations { * * @reject {Error|ServiceError} - The error object. */ - listByModuleWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, moduleName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listByModuleWithHttpOperationResponse(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. @@ -5494,9 +5143,9 @@ export interface ActivityOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - 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; + 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; /** @@ -5568,8 +5217,6 @@ 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. @@ -5585,13 +5232,11 @@ export interface ModuleOperations { * * @reject {Error|ServiceError} - The error object. */ - deleteMethodWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, moduleName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + deleteMethodWithHttpOperationResponse(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. @@ -5622,16 +5267,14 @@ export interface ModuleOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - 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; + 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; /** * 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. @@ -5647,13 +5290,11 @@ export interface ModuleOperations { * * @reject {Error|ServiceError} - The error object. */ - getWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, moduleName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(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. @@ -5685,16 +5326,14 @@ export interface ModuleOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - 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; + 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; /** * 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. @@ -5736,13 +5375,11 @@ export interface ModuleOperations { * * @reject {Error|ServiceError} - The error object. */ - createOrUpdateWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, moduleName: string, parameters: models.ModuleCreateOrUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + createOrUpdateWithHttpOperationResponse(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. @@ -5800,16 +5437,14 @@ export interface ModuleOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - 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; + 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; /** * 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. @@ -5852,13 +5487,11 @@ export interface ModuleOperations { * * @reject {Error|ServiceError} - The error object. */ - updateWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, moduleName: string, parameters: models.ModuleUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + updateWithHttpOperationResponse(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. @@ -5917,16 +5550,14 @@ export interface ModuleOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - 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; + 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; /** * Retrieve a list of modules. * - * @param {string} resourceGroupName The resource group name. - * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -5940,13 +5571,11 @@ export interface ModuleOperations { * * @reject {Error|ServiceError} - The error object. */ - listByAutomationAccountWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listByAutomationAccountWithHttpOperationResponse(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. @@ -5976,9 +5605,9 @@ export interface ModuleOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - 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; + 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; /** @@ -6050,8 +5679,6 @@ 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. @@ -6069,13 +5696,11 @@ export interface ObjectDataTypes { * * @reject {Error|ServiceError} - The error object. */ - listFieldsByModuleAndTypeWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, moduleName: string, typeName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listFieldsByModuleAndTypeWithHttpOperationResponse(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. @@ -6109,16 +5734,14 @@ export interface ObjectDataTypes { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - 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; + 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; /** * 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. @@ -6134,13 +5757,11 @@ export interface ObjectDataTypes { * * @reject {Error|ServiceError} - The error object. */ - listFieldsByTypeWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, typeName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listFieldsByTypeWithHttpOperationResponse(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. @@ -6172,9 +5793,9 @@ export interface ObjectDataTypes { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - 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; + 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; } /** @@ -6189,8 +5810,6 @@ 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. @@ -6208,13 +5827,11 @@ export interface Fields { * * @reject {Error|ServiceError} - The error object. */ - listByTypeWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, moduleName: string, typeName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listByTypeWithHttpOperationResponse(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. @@ -6248,9 +5865,9 @@ export interface Fields { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - 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; + 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; } /** @@ -6265,8 +5882,6 @@ 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. @@ -6282,13 +5897,11 @@ export interface RunbookDraftOperations { * * @reject {Error|ServiceError} - The error object. */ - getContentWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, runbookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getContentWithHttpOperationResponse(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. @@ -6319,16 +5932,14 @@ export interface RunbookDraftOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - 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; + 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; /** * 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. @@ -6346,13 +5957,11 @@ export interface RunbookDraftOperations { * * @reject {Error|ServiceError} - The error object. */ - replaceContentWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, runbookName: string, runbookContent: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + replaceContentWithHttpOperationResponse(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. @@ -6385,16 +5994,14 @@ export interface RunbookDraftOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - 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; + 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; /** * 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. @@ -6410,13 +6017,11 @@ export interface RunbookDraftOperations { * * @reject {Error|ServiceError} - The error object. */ - getWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, runbookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(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. @@ -6448,16 +6053,14 @@ export interface RunbookDraftOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - 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; + 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; /** * 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 @@ -6474,13 +6077,11 @@ export interface RunbookDraftOperations { * * @reject {Error|ServiceError} - The error object. */ - publishWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, runbookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + publishWithHttpOperationResponse(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 @@ -6512,16 +6113,14 @@ export interface RunbookDraftOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - 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; + 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; /** * 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. @@ -6537,13 +6136,11 @@ export interface RunbookDraftOperations { * * @reject {Error|ServiceError} - The error object. */ - undoEditWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, runbookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + undoEditWithHttpOperationResponse(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. @@ -6576,16 +6173,14 @@ export interface RunbookDraftOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - 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; + 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; /** * 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. @@ -6603,13 +6198,11 @@ export interface RunbookDraftOperations { * * @reject {Error|ServiceError} - The error object. */ - beginReplaceContentWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, runbookName: string, runbookContent: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginReplaceContentWithHttpOperationResponse(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. @@ -6642,16 +6235,14 @@ export interface RunbookDraftOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - 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; + 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; /** * 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 @@ -6668,13 +6259,11 @@ export interface RunbookDraftOperations { * * @reject {Error|ServiceError} - The error object. */ - beginPublishWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, runbookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginPublishWithHttpOperationResponse(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 @@ -6706,9 +6295,9 @@ export interface RunbookDraftOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - 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; + 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; } /** @@ -6723,8 +6312,6 @@ 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. @@ -6740,13 +6327,11 @@ export interface RunbookOperations { * * @reject {Error|ServiceError} - The error object. */ - getContentWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, runbookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getContentWithHttpOperationResponse(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. @@ -6777,16 +6362,14 @@ export interface RunbookOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - 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; + 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; /** * 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. @@ -6802,13 +6385,11 @@ export interface RunbookOperations { * * @reject {Error|ServiceError} - The error object. */ - getWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, runbookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(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. @@ -6840,16 +6421,14 @@ export interface RunbookOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - 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; + 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; /** * 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. @@ -6929,13 +6508,11 @@ export interface RunbookOperations { * * @reject {Error|ServiceError} - The error object. */ - createOrUpdateWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, runbookName: string, parameters: models.RunbookCreateOrUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + createOrUpdateWithHttpOperationResponse(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. @@ -7031,16 +6608,14 @@ export interface RunbookOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - 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; + 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; /** * 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. @@ -7076,13 +6651,11 @@ export interface RunbookOperations { * * @reject {Error|ServiceError} - The error object. */ - updateWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, runbookName: string, parameters: models.RunbookUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + updateWithHttpOperationResponse(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. @@ -7134,16 +6707,14 @@ export interface RunbookOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - 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; + 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; /** * 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. @@ -7159,13 +6730,11 @@ export interface RunbookOperations { * * @reject {Error|ServiceError} - The error object. */ - deleteMethodWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, runbookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + deleteMethodWithHttpOperationResponse(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. @@ -7196,16 +6765,14 @@ export interface RunbookOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - 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; + 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; /** * Retrieve a list of runbooks. * - * @param {string} resourceGroupName The resource group name. - * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -7219,13 +6786,11 @@ export interface RunbookOperations { * * @reject {Error|ServiceError} - The error object. */ - listByAutomationAccountWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listByAutomationAccountWithHttpOperationResponse(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. @@ -7255,9 +6820,9 @@ export interface RunbookOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - 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; + 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; /** @@ -7330,8 +6895,6 @@ 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. @@ -7349,14 +6912,12 @@ export interface TestJobStreams { * * @reject {Error|ServiceError} - The error object. */ - getWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, runbookName: string, jobStreamId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(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. @@ -7390,16 +6951,14 @@ export interface TestJobStreams { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - 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; + 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; /** * 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. @@ -7417,13 +6976,11 @@ export interface TestJobStreams { * * @reject {Error|ServiceError} - The error object. */ - listByTestJobWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, runbookName: string, options?: { filter? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; + listByTestJobWithHttpOperationResponse(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. @@ -7457,9 +7014,9 @@ export interface TestJobStreams { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - 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; + 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; /** @@ -7531,8 +7088,6 @@ 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 @@ -7558,13 +7113,11 @@ export interface TestJobOperations { * * @reject {Error|ServiceError} - The error object. */ - createWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, runbookName: string, parameters: models.TestJobCreateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + createWithHttpOperationResponse(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 @@ -7606,16 +7159,14 @@ export interface TestJobOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - 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; + 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; /** * 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. @@ -7631,13 +7182,11 @@ export interface TestJobOperations { * * @reject {Error|ServiceError} - The error object. */ - getWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, runbookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(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. @@ -7669,16 +7218,14 @@ export interface TestJobOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - 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; + 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; /** * Resume the test job. * - * @param {string} resourceGroupName The resource group name. - * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -7694,13 +7241,11 @@ export interface TestJobOperations { * * @reject {Error|ServiceError} - The error object. */ - resumeWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, runbookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + resumeWithHttpOperationResponse(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. @@ -7731,16 +7276,14 @@ export interface TestJobOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - 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; + 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; /** * Stop the test job. * - * @param {string} resourceGroupName The resource group name. - * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -7756,13 +7299,11 @@ export interface TestJobOperations { * * @reject {Error|ServiceError} - The error object. */ - stopWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, runbookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + stopWithHttpOperationResponse(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. @@ -7793,16 +7334,14 @@ export interface TestJobOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - 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; + 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; /** * Suspend the test job. * - * @param {string} resourceGroupName The resource group name. - * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -7818,13 +7357,11 @@ export interface TestJobOperations { * * @reject {Error|ServiceError} - The error object. */ - suspendWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, runbookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + suspendWithHttpOperationResponse(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. @@ -7855,9 +7392,9 @@ export interface TestJobOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - 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; + 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; } /** @@ -7872,8 +7409,6 @@ 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. @@ -7924,13 +7459,11 @@ export interface ScheduleOperations { * * @reject {Error|ServiceError} - The error object. */ - createOrUpdateWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, scheduleName: string, parameters: models.ScheduleCreateOrUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + createOrUpdateWithHttpOperationResponse(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. @@ -7997,16 +7530,14 @@ export interface ScheduleOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - 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; + 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; /** * 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. @@ -8033,13 +7564,11 @@ export interface ScheduleOperations { * * @reject {Error|ServiceError} - The error object. */ - updateWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, scheduleName: string, parameters: models.ScheduleUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + updateWithHttpOperationResponse(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. @@ -8082,16 +7611,14 @@ export interface ScheduleOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - 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; + 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; /** * 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. @@ -8107,13 +7634,11 @@ export interface ScheduleOperations { * * @reject {Error|ServiceError} - The error object. */ - getWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, scheduleName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(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. @@ -8145,16 +7670,14 @@ export interface ScheduleOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - 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; + 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; /** * 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. @@ -8170,13 +7693,11 @@ export interface ScheduleOperations { * * @reject {Error|ServiceError} - The error object. */ - deleteMethodWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, scheduleName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + deleteMethodWithHttpOperationResponse(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. @@ -8207,16 +7728,14 @@ export interface ScheduleOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - 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; + 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; /** * Retrieve a list of schedules. * - * @param {string} resourceGroupName The resource group name. - * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -8230,13 +7749,11 @@ export interface ScheduleOperations { * * @reject {Error|ServiceError} - The error object. */ - listByAutomationAccountWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listByAutomationAccountWithHttpOperationResponse(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. @@ -8266,9 +7783,9 @@ export interface ScheduleOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - 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; + 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; /** @@ -8340,8 +7857,6 @@ 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. @@ -8370,13 +7885,11 @@ export interface VariableOperations { * * @reject {Error|ServiceError} - The error object. */ - createOrUpdateWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, variableName: string, parameters: models.VariableCreateOrUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + createOrUpdateWithHttpOperationResponse(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. @@ -8421,16 +7934,14 @@ export interface VariableOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - 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; + 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; /** * Update a variable. * - * @param {string} resourceGroupName The resource group name. - * * @param {string} automationAccountName The automation account name. * * @param {string} variableName The variable name. @@ -8456,13 +7967,11 @@ export interface VariableOperations { * * @reject {Error|ServiceError} - The error object. */ - updateWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, variableName: string, parameters: models.VariableUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + updateWithHttpOperationResponse(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. @@ -8504,16 +8013,14 @@ export interface VariableOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - 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; + 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; /** * Delete the variable. * - * @param {string} resourceGroupName The resource group name. - * * @param {string} automationAccountName The automation account name. * * @param {string} variableName The name of variable. @@ -8529,13 +8036,11 @@ export interface VariableOperations { * * @reject {Error|ServiceError} - The error object. */ - deleteMethodWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, variableName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + deleteMethodWithHttpOperationResponse(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. @@ -8566,16 +8071,14 @@ export interface VariableOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - 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; + 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; /** * 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. @@ -8591,13 +8094,11 @@ export interface VariableOperations { * * @reject {Error|ServiceError} - The error object. */ - getWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, variableName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(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. @@ -8629,16 +8130,14 @@ export interface VariableOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - 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; + 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; /** * Retrieve a list of variables. * - * @param {string} resourceGroupName The resource group name. - * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -8652,13 +8151,11 @@ export interface VariableOperations { * * @reject {Error|ServiceError} - The error object. */ - listByAutomationAccountWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listByAutomationAccountWithHttpOperationResponse(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. @@ -8688,9 +8185,9 @@ export interface VariableOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - 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; + 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; /** @@ -8762,8 +8259,6 @@ 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. @@ -8777,13 +8272,11 @@ export interface WebhookOperations { * * @reject {Error|ServiceError} - The error object. */ - generateUriWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + generateUriWithHttpOperationResponse(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. @@ -8812,16 +8305,14 @@ export interface WebhookOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - 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; + 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; /** * 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. @@ -8837,13 +8328,11 @@ export interface WebhookOperations { * * @reject {Error|ServiceError} - The error object. */ - deleteMethodWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, webhookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + deleteMethodWithHttpOperationResponse(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. @@ -8874,16 +8363,14 @@ export interface WebhookOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - 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; + 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; /** * 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. @@ -8899,13 +8386,11 @@ export interface WebhookOperations { * * @reject {Error|ServiceError} - The error object. */ - getWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, webhookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(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. @@ -8937,16 +8422,14 @@ export interface WebhookOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - 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; + 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; /** * 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. @@ -8984,13 +8467,11 @@ export interface WebhookOperations { * * @reject {Error|ServiceError} - The error object. */ - createOrUpdateWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, webhookName: string, parameters: models.WebhookCreateOrUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + createOrUpdateWithHttpOperationResponse(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. @@ -9044,16 +8525,14 @@ export interface WebhookOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - 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; + 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; /** * 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. @@ -9085,13 +8564,11 @@ export interface WebhookOperations { * * @reject {Error|ServiceError} - The error object. */ - updateWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, webhookName: string, parameters: models.WebhookUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + updateWithHttpOperationResponse(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. @@ -9139,16 +8616,14 @@ export interface WebhookOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - 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; + 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; /** * Retrieve a list of webhooks. * - * @param {string} resourceGroupName The resource group name. - * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -9164,13 +8639,11 @@ export interface WebhookOperations { * * @reject {Error|ServiceError} - The error object. */ - listByAutomationAccountWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, options?: { filter? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; + listByAutomationAccountWithHttpOperationResponse(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. @@ -9202,9 +8675,9 @@ export interface WebhookOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - 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; + 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; /** @@ -9276,10 +8749,6 @@ 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. * @@ -9389,9 +8858,6 @@ 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 * @@ -9401,15 +8867,11 @@ export interface SoftwareUpdateConfigurations { * * @reject {Error|ServiceError} - The error object. */ - createWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, softwareUpdateConfigurationName: string, parameters: models.SoftwareUpdateConfiguration, options?: { clientRequestId? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; + createWithHttpOperationResponse(softwareUpdateConfigurationName: string, parameters: models.SoftwareUpdateConfiguration, options?: { 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. * @@ -9519,9 +8981,6 @@ 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 * @@ -9548,26 +9007,19 @@ export interface SoftwareUpdateConfigurations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - 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; + 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; /** * 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 * @@ -9577,23 +9029,16 @@ export interface SoftwareUpdateConfigurations { * * @reject {Error|ServiceError} - The error object. */ - getByNameWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, softwareUpdateConfigurationName: string, options?: { clientRequestId? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; + getByNameWithHttpOperationResponse(softwareUpdateConfigurationName: string, options?: { 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 * @@ -9620,26 +9065,19 @@ export interface SoftwareUpdateConfigurations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - 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; + 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; /** * 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 * @@ -9649,23 +9087,16 @@ export interface SoftwareUpdateConfigurations { * * @reject {Error|ServiceError} - The error object. */ - deleteMethodWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, softwareUpdateConfigurationName: string, options?: { clientRequestId? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; + deleteMethodWithHttpOperationResponse(softwareUpdateConfigurationName: string, options?: { 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 * @@ -9690,23 +9121,16 @@ export interface SoftwareUpdateConfigurations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - 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; + 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; /** * 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 @@ -9718,20 +9142,13 @@ export interface SoftwareUpdateConfigurations { * * @reject {Error|ServiceError} - The error object. */ - listWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, options?: { clientRequestId? : string, filter? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; + listWithHttpOperationResponse(options?: { 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 @@ -9760,9 +9177,9 @@ export interface SoftwareUpdateConfigurations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - 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; + list(options?: { filter? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + list(callback: ServiceCallback): void; + list(options: { filter? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; } /** @@ -9777,18 +9194,11 @@ 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 * @@ -9798,23 +9208,16 @@ export interface SoftwareUpdateConfigurationRuns { * * @reject {Error|ServiceError} - The error object. */ - getByIdWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, softwareUpdateConfigurationRunId: string, options?: { clientRequestId? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; + getByIdWithHttpOperationResponse(softwareUpdateConfigurationRunId: string, options?: { 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 * @@ -9841,23 +9244,16 @@ export interface SoftwareUpdateConfigurationRuns { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - 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; + 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; /** * 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' @@ -9877,20 +9273,13 @@ export interface SoftwareUpdateConfigurationRuns { * * @reject {Error|ServiceError} - The error object. */ - listWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, options?: { clientRequestId? : string, filter? : string, skip? : string, top? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; + listWithHttpOperationResponse(options?: { 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' @@ -9927,9 +9316,9 @@ export interface SoftwareUpdateConfigurationRuns { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - 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; + 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; } /** @@ -9944,18 +9333,11 @@ 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 * @@ -9965,23 +9347,16 @@ export interface SoftwareUpdateConfigurationMachineRuns { * * @reject {Error|ServiceError} - The error object. */ - getByIdWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, softwareUpdateConfigurationMachineRunId: string, options?: { clientRequestId? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; + getByIdWithHttpOperationResponse(softwareUpdateConfigurationMachineRunId: string, options?: { 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 * @@ -10008,23 +9383,16 @@ export interface SoftwareUpdateConfigurationMachineRuns { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - 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; + 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; /** * 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' @@ -10044,20 +9412,13 @@ export interface SoftwareUpdateConfigurationMachineRuns { * * @reject {Error|ServiceError} - The error object. */ - listWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, options?: { clientRequestId? : string, filter? : string, skip? : string, top? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; + listWithHttpOperationResponse(options?: { 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' @@ -10095,9 +9456,9 @@ export interface SoftwareUpdateConfigurationMachineRuns { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - 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; + 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; } /** @@ -10112,8 +9473,6 @@ 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. @@ -10157,13 +9516,11 @@ export interface SourceControlOperations { * * @reject {Error|ServiceError} - The error object. */ - createOrUpdateWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, sourceControlName: string, parameters: models.SourceControlCreateOrUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + createOrUpdateWithHttpOperationResponse(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. @@ -10223,16 +9580,14 @@ export interface SourceControlOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - 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; + 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; /** * 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. @@ -10269,13 +9624,11 @@ export interface SourceControlOperations { * * @reject {Error|ServiceError} - The error object. */ - updateWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, sourceControlName: string, parameters: models.SourceControlUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + updateWithHttpOperationResponse(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. @@ -10328,16 +9681,14 @@ export interface SourceControlOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - 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; + 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; /** * 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. @@ -10353,13 +9704,11 @@ export interface SourceControlOperations { * * @reject {Error|ServiceError} - The error object. */ - deleteMethodWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, sourceControlName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + deleteMethodWithHttpOperationResponse(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. @@ -10390,16 +9739,14 @@ export interface SourceControlOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - 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; + 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; /** * 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. @@ -10415,13 +9762,11 @@ export interface SourceControlOperations { * * @reject {Error|ServiceError} - The error object. */ - getWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, sourceControlName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(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. @@ -10453,16 +9798,14 @@ export interface SourceControlOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - 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; + 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; /** * 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. @@ -10478,13 +9821,11 @@ export interface SourceControlOperations { * * @reject {Error|ServiceError} - The error object. */ - listByAutomationAccountWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, options?: { filter? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; + listByAutomationAccountWithHttpOperationResponse(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. @@ -10517,9 +9858,9 @@ export interface SourceControlOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - 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; + 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; /** @@ -10592,8 +9933,6 @@ 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. @@ -10611,13 +9950,11 @@ export interface SourceControlSyncJobOperations { * * @reject {Error|ServiceError} - The error object. */ - createWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, sourceControlName: string, sourceControlSyncJobId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + createWithHttpOperationResponse(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. @@ -10651,16 +9988,14 @@ export interface SourceControlSyncJobOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - 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; + 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; /** * 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. @@ -10678,13 +10013,11 @@ export interface SourceControlSyncJobOperations { * * @reject {Error|ServiceError} - The error object. */ - getWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, sourceControlName: string, sourceControlSyncJobId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(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. @@ -10719,16 +10052,14 @@ export interface SourceControlSyncJobOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - 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; + 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; /** * 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. @@ -10746,13 +10077,11 @@ export interface SourceControlSyncJobOperations { * * @reject {Error|ServiceError} - The error object. */ - listByAutomationAccountWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, sourceControlName: string, options?: { filter? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; + listByAutomationAccountWithHttpOperationResponse(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. @@ -10787,9 +10116,9 @@ export interface SourceControlSyncJobOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - 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; + 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; /** @@ -10862,17 +10191,10 @@ 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 * @@ -10882,22 +10204,15 @@ export interface JobOperations { * * @reject {Error|ServiceError} - The error object. */ - getOutputWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, jobName: string, options?: { clientRequestId? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; + getOutputWithHttpOperationResponse(jobName: string, options?: { 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 * @@ -10922,25 +10237,18 @@ export interface JobOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - 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; + 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; /** * 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 * @@ -10950,22 +10258,15 @@ export interface JobOperations { * * @reject {Error|ServiceError} - The error object. */ - getRunbookContentWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, jobName: string, options?: { clientRequestId? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; + getRunbookContentWithHttpOperationResponse(jobName: string, options?: { 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 * @@ -10990,25 +10291,18 @@ export interface JobOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - 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; + 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; /** * 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 * @@ -11018,22 +10312,15 @@ export interface JobOperations { * * @reject {Error|ServiceError} - The error object. */ - suspendWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, jobName: string, options?: { clientRequestId? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; + suspendWithHttpOperationResponse(jobName: string, options?: { 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 * @@ -11058,25 +10345,18 @@ export interface JobOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - 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; + 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; /** * 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 * @@ -11086,22 +10366,15 @@ export interface JobOperations { * * @reject {Error|ServiceError} - The error object. */ - stopWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, jobName: string, options?: { clientRequestId? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; + stopWithHttpOperationResponse(jobName: string, options?: { 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 * @@ -11126,25 +10399,18 @@ export interface JobOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - 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; + 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; /** * 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 * @@ -11154,22 +10420,15 @@ export interface JobOperations { * * @reject {Error|ServiceError} - The error object. */ - getWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, jobName: string, options?: { clientRequestId? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(jobName: string, options?: { 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 * @@ -11195,18 +10454,14 @@ export interface JobOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - 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; + 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; /** * 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 @@ -11225,9 +10480,6 @@ 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 * @@ -11237,15 +10489,11 @@ export interface JobOperations { * * @reject {Error|ServiceError} - The error object. */ - createWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, jobName: string, parameters: models.JobCreateParameters, options?: { clientRequestId? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; + createWithHttpOperationResponse(jobName: string, parameters: models.JobCreateParameters, options?: { 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 @@ -11264,9 +10512,6 @@ 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 * @@ -11292,25 +10537,18 @@ export interface JobOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - 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; + 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; /** * 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 * @@ -11320,22 +10558,15 @@ export interface JobOperations { * * @reject {Error|ServiceError} - The error object. */ - listByAutomationAccountWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, options?: { filter? : string, clientRequestId? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; + listByAutomationAccountWithHttpOperationResponse(options?: { filter? : 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 * @@ -11361,25 +10592,18 @@ export interface JobOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - 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; + listByAutomationAccount(options?: { filter? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + listByAutomationAccount(callback: ServiceCallback): void; + listByAutomationAccount(options: { filter? : 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 * @@ -11389,22 +10613,15 @@ export interface JobOperations { * * @reject {Error|ServiceError} - The error object. */ - resumeWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, jobName: string, options?: { clientRequestId? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; + resumeWithHttpOperationResponse(jobName: string, options?: { 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 * @@ -11429,9 +10646,9 @@ export interface JobOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - 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; + 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; /** @@ -11442,9 +10659,6 @@ 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 * @@ -11454,7 +10668,7 @@ export interface JobOperations { * * @reject {Error|ServiceError} - The error object. */ - listByAutomationAccountNextWithHttpOperationResponse(nextPageLink: string, options?: { clientRequestId? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; + listByAutomationAccountNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieve a list of jobs. @@ -11464,9 +10678,6 @@ 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 * @@ -11492,9 +10703,9 @@ export interface JobOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listByAutomationAccountNext(nextPageLink: string, options?: { clientRequestId? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + listByAutomationAccountNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; listByAutomationAccountNext(nextPageLink: string, callback: ServiceCallback): void; - listByAutomationAccountNext(nextPageLink: string, options: { clientRequestId? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listByAutomationAccountNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; } /** @@ -11509,19 +10720,12 @@ 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 * @@ -11531,24 +10735,17 @@ export interface JobStreamOperations { * * @reject {Error|ServiceError} - The error object. */ - getWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, jobName: string, jobStreamId: string, options?: { clientRequestId? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(jobName: 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 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 * @@ -11574,27 +10771,20 @@ export interface JobStreamOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - 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; + 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; /** * 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 * @@ -11604,24 +10794,17 @@ export interface JobStreamOperations { * * @reject {Error|ServiceError} - The error object. */ - listByJobWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, jobName: string, options?: { filter? : string, clientRequestId? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; + listByJobWithHttpOperationResponse(jobName: string, options?: { filter? : 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 * @@ -11647,9 +10830,9 @@ export interface JobStreamOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - 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; + 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; /** @@ -11660,9 +10843,6 @@ 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 * @@ -11672,7 +10852,7 @@ export interface JobStreamOperations { * * @reject {Error|ServiceError} - The error object. */ - listByJobNextWithHttpOperationResponse(nextPageLink: string, options?: { clientRequestId? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; + listByJobNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieve a list of jobs streams identified by job name. @@ -11682,9 +10862,6 @@ 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 * @@ -11710,7 +10887,7 @@ export interface JobStreamOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listByJobNext(nextPageLink: string, options?: { clientRequestId? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + listByJobNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; listByJobNext(nextPageLink: string, callback: ServiceCallback): void; - listByJobNext(nextPageLink: string, options: { clientRequestId? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listByJobNext(nextPageLink: string, options: { 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 fac6162054..05c64386ee 100644 --- a/lib/services/automationManagement/lib/operations/jobOperations.js +++ b/lib/services/automationManagement/lib/operations/jobOperations.js @@ -17,17 +17,10 @@ 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 * @@ -43,7 +36,7 @@ const WebResource = msRest.WebResource; * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _getOutput(resourceGroupName, automationAccountName, jobName, options, callback) { +function _getOutput(jobName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -53,30 +46,29 @@ function _getOutput(resourceGroupName, automationAccountName, jobName, options, 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 (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 || 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) { - if (resourceGroupName.match(/^[-\w\._]+$/) === null) + if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { + if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } - 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.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 (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 (clientRequestId !== null && clientRequestId !== undefined && typeof clientRequestId.valueOf() !== 'string') { - throw new Error('clientRequestId 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 (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.'); @@ -89,8 +81,8 @@ function _getOutput(resourceGroupName, automationAccountName, jobName, options, 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(resourceGroupName)); - requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(this.client.automationAccountName)); requestUrl = requestUrl.replace('{jobName}', encodeURIComponent(jobName)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); @@ -108,8 +100,8 @@ function _getOutput(resourceGroupName, automationAccountName, jobName, options, if (this.client.generateClientRequestId) { httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); } - if (clientRequestId !== undefined && clientRequestId !== null) { - httpRequest.headers['clientRequestId'] = clientRequestId; + if (this.client.clientRequestId !== undefined && this.client.clientRequestId !== null) { + httpRequest.headers['clientRequestId'] = this.client.clientRequestId; } if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { httpRequest.headers['accept-language'] = this.client.acceptLanguage; @@ -187,17 +179,10 @@ function _getOutput(resourceGroupName, automationAccountName, jobName, options, /** * 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 * @@ -213,7 +198,7 @@ function _getOutput(resourceGroupName, automationAccountName, jobName, options, * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _getRunbookContent(resourceGroupName, automationAccountName, jobName, options, callback) { +function _getRunbookContent(jobName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -223,30 +208,29 @@ function _getRunbookContent(resourceGroupName, automationAccountName, jobName, o 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 (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 || 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) { - if (resourceGroupName.match(/^[-\w\._]+$/) === null) + if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { + if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } - 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.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 (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 (clientRequestId !== null && clientRequestId !== undefined && typeof clientRequestId.valueOf() !== 'string') { - throw new Error('clientRequestId 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 (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.'); @@ -259,8 +243,8 @@ function _getRunbookContent(resourceGroupName, automationAccountName, jobName, o 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(resourceGroupName)); - requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(this.client.automationAccountName)); requestUrl = requestUrl.replace('{jobName}', encodeURIComponent(jobName)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); @@ -278,8 +262,8 @@ function _getRunbookContent(resourceGroupName, automationAccountName, jobName, o if (this.client.generateClientRequestId) { httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); } - if (clientRequestId !== undefined && clientRequestId !== null) { - httpRequest.headers['clientRequestId'] = clientRequestId; + if (this.client.clientRequestId !== undefined && this.client.clientRequestId !== null) { + httpRequest.headers['clientRequestId'] = this.client.clientRequestId; } if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { httpRequest.headers['accept-language'] = this.client.acceptLanguage; @@ -357,17 +341,10 @@ function _getRunbookContent(resourceGroupName, automationAccountName, jobName, o /** * 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 * @@ -383,7 +360,7 @@ function _getRunbookContent(resourceGroupName, automationAccountName, jobName, o * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _suspend(resourceGroupName, automationAccountName, jobName, options, callback) { +function _suspend(jobName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -393,30 +370,29 @@ function _suspend(resourceGroupName, automationAccountName, jobName, options, ca 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 (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 || 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) { - if (resourceGroupName.match(/^[-\w\._]+$/) === null) + if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { + if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } - 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.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 (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 (clientRequestId !== null && clientRequestId !== undefined && typeof clientRequestId.valueOf() !== 'string') { - throw new Error('clientRequestId 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 (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.'); @@ -429,8 +405,8 @@ function _suspend(resourceGroupName, automationAccountName, jobName, options, ca 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(resourceGroupName)); - requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(this.client.automationAccountName)); requestUrl = requestUrl.replace('{jobName}', encodeURIComponent(jobName)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); @@ -448,8 +424,8 @@ function _suspend(resourceGroupName, automationAccountName, jobName, options, ca if (this.client.generateClientRequestId) { httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); } - if (clientRequestId !== undefined && clientRequestId !== null) { - httpRequest.headers['clientRequestId'] = clientRequestId; + if (this.client.clientRequestId !== undefined && this.client.clientRequestId !== null) { + httpRequest.headers['clientRequestId'] = this.client.clientRequestId; } if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { httpRequest.headers['accept-language'] = this.client.acceptLanguage; @@ -505,17 +481,10 @@ function _suspend(resourceGroupName, automationAccountName, jobName, options, ca /** * 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 * @@ -531,7 +500,7 @@ function _suspend(resourceGroupName, automationAccountName, jobName, options, ca * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _stop(resourceGroupName, automationAccountName, jobName, options, callback) { +function _stop(jobName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -541,21 +510,20 @@ function _stop(resourceGroupName, automationAccountName, jobName, options, callb 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 (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 || 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) { - if (resourceGroupName.match(/^[-\w\._]+$/) === null) + if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { + if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } - 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.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 (jobName === null || jobName === undefined || typeof jobName.valueOf() !== 'string') { throw new Error('jobName cannot be null or undefined and it must be of type string.'); @@ -563,8 +531,8 @@ function _stop(resourceGroupName, automationAccountName, jobName, options, callb 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 (clientRequestId !== null && clientRequestId !== undefined && typeof clientRequestId.valueOf() !== 'string') { - throw new Error('clientRequestId 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 (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.'); @@ -576,8 +544,8 @@ function _stop(resourceGroupName, automationAccountName, jobName, options, callb // 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(resourceGroupName)); - requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(this.client.automationAccountName)); requestUrl = requestUrl.replace('{jobName}', encodeURIComponent(jobName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; @@ -596,8 +564,8 @@ function _stop(resourceGroupName, automationAccountName, jobName, options, callb if (this.client.generateClientRequestId) { httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); } - if (clientRequestId !== undefined && clientRequestId !== null) { - httpRequest.headers['clientRequestId'] = clientRequestId; + if (this.client.clientRequestId !== undefined && this.client.clientRequestId !== null) { + httpRequest.headers['clientRequestId'] = this.client.clientRequestId; } if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { httpRequest.headers['accept-language'] = this.client.acceptLanguage; @@ -653,17 +621,10 @@ function _stop(resourceGroupName, automationAccountName, jobName, options, callb /** * 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 * @@ -680,7 +641,7 @@ function _stop(resourceGroupName, automationAccountName, jobName, options, callb * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _get(resourceGroupName, automationAccountName, jobName, options, callback) { +function _get(jobName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -690,30 +651,29 @@ function _get(resourceGroupName, automationAccountName, jobName, options, callba 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 (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 || 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) { - if (resourceGroupName.match(/^[-\w\._]+$/) === null) + if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { + if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } - 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.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 (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 (clientRequestId !== null && clientRequestId !== undefined && typeof clientRequestId.valueOf() !== 'string') { - throw new Error('clientRequestId 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 (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.'); @@ -726,8 +686,8 @@ function _get(resourceGroupName, automationAccountName, jobName, options, callba 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(resourceGroupName)); - requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(this.client.automationAccountName)); requestUrl = requestUrl.replace('{jobName}', encodeURIComponent(jobName)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); @@ -745,8 +705,8 @@ function _get(resourceGroupName, automationAccountName, jobName, options, callba if (this.client.generateClientRequestId) { httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); } - if (clientRequestId !== undefined && clientRequestId !== null) { - httpRequest.headers['clientRequestId'] = clientRequestId; + if (this.client.clientRequestId !== undefined && this.client.clientRequestId !== null) { + httpRequest.headers['clientRequestId'] = this.client.clientRequestId; } if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { httpRequest.headers['accept-language'] = this.client.acceptLanguage; @@ -819,10 +779,6 @@ function _get(resourceGroupName, automationAccountName, jobName, options, callba /** * 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 @@ -841,9 +797,6 @@ function _get(resourceGroupName, automationAccountName, jobName, options, callba * * @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 * @@ -860,7 +813,7 @@ function _get(resourceGroupName, automationAccountName, jobName, options, callba * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _create(resourceGroupName, automationAccountName, jobName, parameters, options, callback) { +function _create(jobName, parameters, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -870,24 +823,23 @@ function _create(resourceGroupName, automationAccountName, jobName, parameters, 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 (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 || 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) { - if (resourceGroupName.match(/^[-\w\._]+$/) === null) + if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { + if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } - 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.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 (jobName === null || jobName === undefined || typeof jobName.valueOf() !== 'string') { throw new Error('jobName cannot be null or undefined and it must be of type string.'); @@ -895,8 +847,8 @@ function _create(resourceGroupName, automationAccountName, jobName, parameters, if (parameters === null || parameters === undefined) { throw new Error('parameters cannot be null or undefined.'); } - if (clientRequestId !== null && clientRequestId !== undefined && typeof clientRequestId.valueOf() !== 'string') { - throw new Error('clientRequestId 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 (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.'); @@ -909,8 +861,8 @@ function _create(resourceGroupName, automationAccountName, jobName, parameters, 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(resourceGroupName)); - requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(this.client.automationAccountName)); requestUrl = requestUrl.replace('{jobName}', encodeURIComponent(jobName)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); @@ -928,8 +880,8 @@ function _create(resourceGroupName, automationAccountName, jobName, parameters, if (this.client.generateClientRequestId) { httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); } - if (clientRequestId !== undefined && clientRequestId !== null) { - httpRequest.headers['clientRequestId'] = clientRequestId; + if (this.client.clientRequestId !== undefined && this.client.clientRequestId !== null) { + httpRequest.headers['clientRequestId'] = this.client.clientRequestId; } if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { httpRequest.headers['accept-language'] = this.client.acceptLanguage; @@ -1016,17 +968,10 @@ function _create(resourceGroupName, automationAccountName, jobName, parameters, /** * 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 * @@ -1043,7 +988,7 @@ function _create(resourceGroupName, automationAccountName, jobName, parameters, * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _listByAutomationAccount(resourceGroupName, automationAccountName, options, callback) { +function _listByAutomationAccount(options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -1054,21 +999,20 @@ function _listByAutomationAccount(resourceGroupName, automationAccountName, opti 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 (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 || 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) { - if (resourceGroupName.match(/^[-\w\._]+$/) === null) + if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { + if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } - 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.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 (filter !== null && filter !== undefined && typeof filter.valueOf() !== 'string') { throw new Error('filter must be of type string.'); @@ -1076,8 +1020,8 @@ function _listByAutomationAccount(resourceGroupName, automationAccountName, opti 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 (clientRequestId !== null && clientRequestId !== undefined && typeof clientRequestId.valueOf() !== 'string') { - throw new Error('clientRequestId 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 (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.'); @@ -1089,8 +1033,8 @@ function _listByAutomationAccount(resourceGroupName, automationAccountName, opti // 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(resourceGroupName)); - requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(this.client.automationAccountName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; if (filter !== null && filter !== undefined) { @@ -1111,8 +1055,8 @@ function _listByAutomationAccount(resourceGroupName, automationAccountName, opti if (this.client.generateClientRequestId) { httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); } - if (clientRequestId !== undefined && clientRequestId !== null) { - httpRequest.headers['clientRequestId'] = clientRequestId; + if (this.client.clientRequestId !== undefined && this.client.clientRequestId !== null) { + httpRequest.headers['clientRequestId'] = this.client.clientRequestId; } if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { httpRequest.headers['accept-language'] = this.client.acceptLanguage; @@ -1185,17 +1129,10 @@ function _listByAutomationAccount(resourceGroupName, automationAccountName, opti /** * 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 * @@ -1211,7 +1148,7 @@ function _listByAutomationAccount(resourceGroupName, automationAccountName, opti * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _resume(resourceGroupName, automationAccountName, jobName, options, callback) { +function _resume(jobName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -1221,21 +1158,20 @@ function _resume(resourceGroupName, automationAccountName, jobName, options, cal 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 (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 || 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) { - if (resourceGroupName.match(/^[-\w\._]+$/) === null) + if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { + if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } - 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.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 (jobName === null || jobName === undefined || typeof jobName.valueOf() !== 'string') { throw new Error('jobName cannot be null or undefined and it must be of type string.'); @@ -1243,8 +1179,8 @@ function _resume(resourceGroupName, automationAccountName, jobName, options, cal 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 (clientRequestId !== null && clientRequestId !== undefined && typeof clientRequestId.valueOf() !== 'string') { - throw new Error('clientRequestId 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 (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.'); @@ -1256,8 +1192,8 @@ function _resume(resourceGroupName, automationAccountName, jobName, options, cal // 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(resourceGroupName)); - requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(this.client.automationAccountName)); requestUrl = requestUrl.replace('{jobName}', encodeURIComponent(jobName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; @@ -1276,8 +1212,8 @@ function _resume(resourceGroupName, automationAccountName, jobName, options, cal if (this.client.generateClientRequestId) { httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); } - if (clientRequestId !== undefined && clientRequestId !== null) { - httpRequest.headers['clientRequestId'] = clientRequestId; + if (this.client.clientRequestId !== undefined && this.client.clientRequestId !== null) { + httpRequest.headers['clientRequestId'] = this.client.clientRequestId; } if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { httpRequest.headers['accept-language'] = this.client.acceptLanguage; @@ -1338,9 +1274,6 @@ function _resume(resourceGroupName, automationAccountName, jobName, options, cal * * @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 * @@ -1367,14 +1300,13 @@ 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 (clientRequestId !== null && clientRequestId !== undefined && typeof clientRequestId.valueOf() !== 'string') { - throw new Error('clientRequestId 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 (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.'); @@ -1397,8 +1329,8 @@ function _listByAutomationAccountNext(nextPageLink, options, callback) { if (this.client.generateClientRequestId) { httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); } - if (clientRequestId !== undefined && clientRequestId !== null) { - httpRequest.headers['clientRequestId'] = clientRequestId; + if (this.client.clientRequestId !== undefined && this.client.clientRequestId !== null) { + httpRequest.headers['clientRequestId'] = this.client.clientRequestId; } if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { httpRequest.headers['accept-language'] = this.client.acceptLanguage; @@ -1490,17 +1422,10 @@ 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 * @@ -1510,11 +1435,11 @@ class JobOperations { * * @reject {Error} - The error object. */ - getOutputWithHttpOperationResponse(resourceGroupName, automationAccountName, jobName, options) { + getOutputWithHttpOperationResponse(jobName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._getOutput(resourceGroupName, automationAccountName, jobName, options, (err, result, request, response) => { + self._getOutput(jobName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1527,17 +1452,10 @@ 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 * @@ -1562,7 +1480,7 @@ class JobOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getOutput(resourceGroupName, automationAccountName, jobName, options, optionalCallback) { + getOutput(jobName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1571,31 +1489,24 @@ class JobOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getOutput(resourceGroupName, automationAccountName, jobName, options, (err, result, request, response) => { + self._getOutput(jobName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getOutput(resourceGroupName, automationAccountName, jobName, options, optionalCallback); + return self._getOutput(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 * @@ -1605,11 +1516,11 @@ class JobOperations { * * @reject {Error} - The error object. */ - getRunbookContentWithHttpOperationResponse(resourceGroupName, automationAccountName, jobName, options) { + getRunbookContentWithHttpOperationResponse(jobName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._getRunbookContent(resourceGroupName, automationAccountName, jobName, options, (err, result, request, response) => { + self._getRunbookContent(jobName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1622,17 +1533,10 @@ 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 * @@ -1657,7 +1561,7 @@ class JobOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getRunbookContent(resourceGroupName, automationAccountName, jobName, options, optionalCallback) { + getRunbookContent(jobName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1666,31 +1570,24 @@ class JobOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getRunbookContent(resourceGroupName, automationAccountName, jobName, options, (err, result, request, response) => { + self._getRunbookContent(jobName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getRunbookContent(resourceGroupName, automationAccountName, jobName, options, optionalCallback); + return self._getRunbookContent(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 * @@ -1700,11 +1597,11 @@ class JobOperations { * * @reject {Error} - The error object. */ - suspendWithHttpOperationResponse(resourceGroupName, automationAccountName, jobName, options) { + suspendWithHttpOperationResponse(jobName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._suspend(resourceGroupName, automationAccountName, jobName, options, (err, result, request, response) => { + self._suspend(jobName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1717,17 +1614,10 @@ 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 * @@ -1752,7 +1642,7 @@ class JobOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - suspend(resourceGroupName, automationAccountName, jobName, options, optionalCallback) { + suspend(jobName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1761,31 +1651,24 @@ class JobOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._suspend(resourceGroupName, automationAccountName, jobName, options, (err, result, request, response) => { + self._suspend(jobName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._suspend(resourceGroupName, automationAccountName, jobName, options, optionalCallback); + return self._suspend(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 * @@ -1795,11 +1678,11 @@ class JobOperations { * * @reject {Error} - The error object. */ - stopWithHttpOperationResponse(resourceGroupName, automationAccountName, jobName, options) { + stopWithHttpOperationResponse(jobName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._stop(resourceGroupName, automationAccountName, jobName, options, (err, result, request, response) => { + self._stop(jobName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1812,17 +1695,10 @@ 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 * @@ -1847,7 +1723,7 @@ class JobOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - stop(resourceGroupName, automationAccountName, jobName, options, optionalCallback) { + stop(jobName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1856,31 +1732,24 @@ class JobOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._stop(resourceGroupName, automationAccountName, jobName, options, (err, result, request, response) => { + self._stop(jobName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._stop(resourceGroupName, automationAccountName, jobName, options, optionalCallback); + return self._stop(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 * @@ -1890,11 +1759,11 @@ class JobOperations { * * @reject {Error} - The error object. */ - getWithHttpOperationResponse(resourceGroupName, automationAccountName, jobName, options) { + getWithHttpOperationResponse(jobName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._get(resourceGroupName, automationAccountName, jobName, options, (err, result, request, response) => { + self._get(jobName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1907,17 +1776,10 @@ 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 * @@ -1943,7 +1805,7 @@ class JobOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - get(resourceGroupName, automationAccountName, jobName, options, optionalCallback) { + get(jobName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1952,24 +1814,20 @@ class JobOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._get(resourceGroupName, automationAccountName, jobName, options, (err, result, request, response) => { + self._get(jobName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._get(resourceGroupName, automationAccountName, jobName, options, optionalCallback); + return self._get(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 @@ -1988,9 +1846,6 @@ 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 * @@ -2000,11 +1855,11 @@ class JobOperations { * * @reject {Error} - The error object. */ - createWithHttpOperationResponse(resourceGroupName, automationAccountName, jobName, parameters, options) { + createWithHttpOperationResponse(jobName, parameters, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._create(resourceGroupName, automationAccountName, jobName, parameters, options, (err, result, request, response) => { + self._create(jobName, parameters, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -2017,10 +1872,6 @@ 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 @@ -2039,9 +1890,6 @@ 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 * @@ -2067,7 +1915,7 @@ class JobOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - create(resourceGroupName, automationAccountName, jobName, parameters, options, optionalCallback) { + create(jobName, parameters, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -2076,31 +1924,24 @@ class JobOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._create(resourceGroupName, automationAccountName, jobName, parameters, options, (err, result, request, response) => { + self._create(jobName, parameters, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._create(resourceGroupName, automationAccountName, jobName, parameters, options, optionalCallback); + return self._create(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 * @@ -2110,11 +1951,11 @@ class JobOperations { * * @reject {Error} - The error object. */ - listByAutomationAccountWithHttpOperationResponse(resourceGroupName, automationAccountName, options) { + listByAutomationAccountWithHttpOperationResponse(options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._listByAutomationAccount(resourceGroupName, automationAccountName, options, (err, result, request, response) => { + self._listByAutomationAccount(options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -2127,17 +1968,10 @@ 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 * @@ -2163,7 +1997,7 @@ class JobOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - listByAutomationAccount(resourceGroupName, automationAccountName, options, optionalCallback) { + listByAutomationAccount(options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -2172,31 +2006,24 @@ class JobOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._listByAutomationAccount(resourceGroupName, automationAccountName, options, (err, result, request, response) => { + self._listByAutomationAccount(options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._listByAutomationAccount(resourceGroupName, automationAccountName, options, optionalCallback); + return self._listByAutomationAccount(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 * @@ -2206,11 +2033,11 @@ class JobOperations { * * @reject {Error} - The error object. */ - resumeWithHttpOperationResponse(resourceGroupName, automationAccountName, jobName, options) { + resumeWithHttpOperationResponse(jobName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._resume(resourceGroupName, automationAccountName, jobName, options, (err, result, request, response) => { + self._resume(jobName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -2223,17 +2050,10 @@ 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 * @@ -2258,7 +2078,7 @@ class JobOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - resume(resourceGroupName, automationAccountName, jobName, options, optionalCallback) { + resume(jobName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -2267,14 +2087,14 @@ class JobOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._resume(resourceGroupName, automationAccountName, jobName, options, (err, result, request, response) => { + self._resume(jobName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._resume(resourceGroupName, automationAccountName, jobName, options, optionalCallback); + return self._resume(jobName, options, optionalCallback); } } @@ -2286,9 +2106,6 @@ 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 * @@ -2320,9 +2137,6 @@ 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 1d2333cd93..073d28a536 100644 --- a/lib/services/automationManagement/lib/operations/jobScheduleOperations.js +++ b/lib/services/automationManagement/lib/operations/jobScheduleOperations.js @@ -17,8 +17,6 @@ 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. @@ -40,7 +38,7 @@ const WebResource = msRest.WebResource; * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _deleteMethod(resourceGroupName, automationAccountName, jobScheduleId, options, callback) { +function _deleteMethod(automationAccountName, jobScheduleId, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -53,13 +51,13 @@ function _deleteMethod(resourceGroupName, automationAccountName, jobScheduleId, let apiVersion = '2015-10-31'; // Validate try { - 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 || 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) { - if (resourceGroupName.match(/^[-\w\._]+$/) === null) + if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { + if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -81,7 +79,7 @@ function _deleteMethod(resourceGroupName, automationAccountName, jobScheduleId, // 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(resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{jobScheduleId}', encodeURIComponent(jobScheduleId.toString())); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -155,8 +153,6 @@ function _deleteMethod(resourceGroupName, automationAccountName, jobScheduleId, /** * 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. @@ -179,7 +175,7 @@ function _deleteMethod(resourceGroupName, automationAccountName, jobScheduleId, * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _get(resourceGroupName, automationAccountName, jobScheduleId, options, callback) { +function _get(automationAccountName, jobScheduleId, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -192,13 +188,13 @@ function _get(resourceGroupName, automationAccountName, jobScheduleId, options, let apiVersion = '2015-10-31'; // Validate try { - 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 || 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) { - if (resourceGroupName.match(/^[-\w\._]+$/) === null) + if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { + if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -220,7 +216,7 @@ function _get(resourceGroupName, automationAccountName, jobScheduleId, options, // 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(resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{jobScheduleId}', encodeURIComponent(jobScheduleId.toString())); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -311,8 +307,6 @@ function _get(resourceGroupName, automationAccountName, jobScheduleId, options, /** * 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. @@ -354,7 +348,7 @@ function _get(resourceGroupName, automationAccountName, jobScheduleId, options, * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _create(resourceGroupName, automationAccountName, jobScheduleId, parameters, options, callback) { +function _create(automationAccountName, jobScheduleId, parameters, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -367,13 +361,13 @@ function _create(resourceGroupName, automationAccountName, jobScheduleId, parame let apiVersion = '2015-10-31'; // Validate try { - 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 || 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) { - if (resourceGroupName.match(/^[-\w\._]+$/) === null) + if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { + if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -398,7 +392,7 @@ function _create(resourceGroupName, automationAccountName, jobScheduleId, parame // 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(resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{jobScheduleId}', encodeURIComponent(jobScheduleId.toString())); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -503,8 +497,6 @@ function _create(resourceGroupName, automationAccountName, jobScheduleId, parame /** * 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. @@ -525,7 +517,7 @@ function _create(resourceGroupName, automationAccountName, jobScheduleId, parame * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _listByAutomationAccount(resourceGroupName, automationAccountName, options, callback) { +function _listByAutomationAccount(automationAccountName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -538,13 +530,13 @@ function _listByAutomationAccount(resourceGroupName, automationAccountName, opti let apiVersion = '2015-10-31'; // Validate try { - 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 || 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) { - if (resourceGroupName.match(/^[-\w\._]+$/) === null) + if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { + if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -563,7 +555,7 @@ function _listByAutomationAccount(resourceGroupName, automationAccountName, opti // 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(resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; @@ -796,8 +788,6 @@ 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. @@ -813,11 +803,11 @@ class JobScheduleOperations { * * @reject {Error} - The error object. */ - deleteMethodWithHttpOperationResponse(resourceGroupName, automationAccountName, jobScheduleId, options) { + deleteMethodWithHttpOperationResponse(automationAccountName, jobScheduleId, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._deleteMethod(resourceGroupName, automationAccountName, jobScheduleId, options, (err, result, request, response) => { + self._deleteMethod(automationAccountName, jobScheduleId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -830,8 +820,6 @@ 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. @@ -862,7 +850,7 @@ class JobScheduleOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(resourceGroupName, automationAccountName, jobScheduleId, options, optionalCallback) { + deleteMethod(automationAccountName, jobScheduleId, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -871,22 +859,20 @@ class JobScheduleOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._deleteMethod(resourceGroupName, automationAccountName, jobScheduleId, options, (err, result, request, response) => { + self._deleteMethod(automationAccountName, jobScheduleId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._deleteMethod(resourceGroupName, automationAccountName, jobScheduleId, options, optionalCallback); + return self._deleteMethod(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. @@ -902,11 +888,11 @@ class JobScheduleOperations { * * @reject {Error} - The error object. */ - getWithHttpOperationResponse(resourceGroupName, automationAccountName, jobScheduleId, options) { + getWithHttpOperationResponse(automationAccountName, jobScheduleId, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._get(resourceGroupName, automationAccountName, jobScheduleId, options, (err, result, request, response) => { + self._get(automationAccountName, jobScheduleId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -919,8 +905,6 @@ 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. @@ -952,7 +936,7 @@ class JobScheduleOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - get(resourceGroupName, automationAccountName, jobScheduleId, options, optionalCallback) { + get(automationAccountName, jobScheduleId, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -961,22 +945,20 @@ class JobScheduleOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._get(resourceGroupName, automationAccountName, jobScheduleId, options, (err, result, request, response) => { + self._get(automationAccountName, jobScheduleId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._get(resourceGroupName, automationAccountName, jobScheduleId, options, optionalCallback); + return self._get(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. @@ -1011,11 +993,11 @@ class JobScheduleOperations { * * @reject {Error} - The error object. */ - createWithHttpOperationResponse(resourceGroupName, automationAccountName, jobScheduleId, parameters, options) { + createWithHttpOperationResponse(automationAccountName, jobScheduleId, parameters, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._create(resourceGroupName, automationAccountName, jobScheduleId, parameters, options, (err, result, request, response) => { + self._create(automationAccountName, jobScheduleId, parameters, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1028,8 +1010,6 @@ 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. @@ -1080,7 +1060,7 @@ class JobScheduleOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - create(resourceGroupName, automationAccountName, jobScheduleId, parameters, options, optionalCallback) { + create(automationAccountName, jobScheduleId, parameters, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1089,22 +1069,20 @@ class JobScheduleOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._create(resourceGroupName, automationAccountName, jobScheduleId, parameters, options, (err, result, request, response) => { + self._create(automationAccountName, jobScheduleId, parameters, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._create(resourceGroupName, automationAccountName, jobScheduleId, parameters, options, optionalCallback); + return self._create(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. @@ -1118,11 +1096,11 @@ class JobScheduleOperations { * * @reject {Error} - The error object. */ - listByAutomationAccountWithHttpOperationResponse(resourceGroupName, automationAccountName, options) { + listByAutomationAccountWithHttpOperationResponse(automationAccountName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._listByAutomationAccount(resourceGroupName, automationAccountName, options, (err, result, request, response) => { + self._listByAutomationAccount(automationAccountName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1135,8 +1113,6 @@ 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. @@ -1166,7 +1142,7 @@ class JobScheduleOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - listByAutomationAccount(resourceGroupName, automationAccountName, options, optionalCallback) { + listByAutomationAccount(automationAccountName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1175,14 +1151,14 @@ class JobScheduleOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._listByAutomationAccount(resourceGroupName, automationAccountName, options, (err, result, request, response) => { + self._listByAutomationAccount(automationAccountName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._listByAutomationAccount(resourceGroupName, automationAccountName, options, optionalCallback); + return self._listByAutomationAccount(automationAccountName, options, optionalCallback); } } diff --git a/lib/services/automationManagement/lib/operations/jobStreamOperations.js b/lib/services/automationManagement/lib/operations/jobStreamOperations.js index 7527b8fad3..75db40543f 100644 --- a/lib/services/automationManagement/lib/operations/jobStreamOperations.js +++ b/lib/services/automationManagement/lib/operations/jobStreamOperations.js @@ -17,19 +17,12 @@ 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 * @@ -46,7 +39,7 @@ const WebResource = msRest.WebResource; * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _get(resourceGroupName, automationAccountName, jobName, jobStreamId, options, callback) { +function _get(jobName, jobStreamId, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -56,24 +49,23 @@ function _get(resourceGroupName, automationAccountName, jobName, jobStreamId, op 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 (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 || 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) { - if (resourceGroupName.match(/^[-\w\._]+$/) === null) + if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { + if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } - 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.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 (jobName === null || jobName === undefined || typeof jobName.valueOf() !== 'string') { throw new Error('jobName cannot be null or undefined and it must be of type string.'); @@ -81,8 +73,8 @@ function _get(resourceGroupName, automationAccountName, jobName, jobStreamId, op 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 (clientRequestId !== null && clientRequestId !== undefined && typeof clientRequestId.valueOf() !== 'string') { - throw new Error('clientRequestId 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 (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.'); @@ -95,8 +87,8 @@ function _get(resourceGroupName, automationAccountName, jobName, jobStreamId, op 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(resourceGroupName)); - requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(this.client.automationAccountName)); requestUrl = requestUrl.replace('{jobName}', encodeURIComponent(jobName)); requestUrl = requestUrl.replace('{jobStreamId}', encodeURIComponent(jobStreamId)); let queryParameters = []; @@ -115,8 +107,8 @@ function _get(resourceGroupName, automationAccountName, jobName, jobStreamId, op if (this.client.generateClientRequestId) { httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); } - if (clientRequestId !== undefined && clientRequestId !== null) { - httpRequest.headers['clientRequestId'] = clientRequestId; + if (this.client.clientRequestId !== undefined && this.client.clientRequestId !== null) { + httpRequest.headers['clientRequestId'] = this.client.clientRequestId; } if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { httpRequest.headers['accept-language'] = this.client.acceptLanguage; @@ -189,19 +181,12 @@ function _get(resourceGroupName, automationAccountName, jobName, jobStreamId, op /** * 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 * @@ -218,7 +203,7 @@ function _get(resourceGroupName, automationAccountName, jobName, jobStreamId, op * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _listByJob(resourceGroupName, automationAccountName, jobName, options, callback) { +function _listByJob(jobName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -229,21 +214,20 @@ function _listByJob(resourceGroupName, automationAccountName, jobName, options, 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 (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 || 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) { - if (resourceGroupName.match(/^[-\w\._]+$/) === null) + if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { + if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } - 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.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 (jobName === null || jobName === undefined || typeof jobName.valueOf() !== 'string') { throw new Error('jobName cannot be null or undefined and it must be of type string.'); @@ -254,8 +238,8 @@ function _listByJob(resourceGroupName, automationAccountName, jobName, 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 (clientRequestId !== null && clientRequestId !== undefined && typeof clientRequestId.valueOf() !== 'string') { - throw new Error('clientRequestId 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 (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.'); @@ -267,8 +251,8 @@ function _listByJob(resourceGroupName, automationAccountName, jobName, options, // 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(resourceGroupName)); - requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(this.client.automationAccountName)); requestUrl = requestUrl.replace('{jobName}', encodeURIComponent(jobName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; @@ -290,8 +274,8 @@ function _listByJob(resourceGroupName, automationAccountName, jobName, options, if (this.client.generateClientRequestId) { httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); } - if (clientRequestId !== undefined && clientRequestId !== null) { - httpRequest.headers['clientRequestId'] = clientRequestId; + if (this.client.clientRequestId !== undefined && this.client.clientRequestId !== null) { + httpRequest.headers['clientRequestId'] = this.client.clientRequestId; } if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { httpRequest.headers['accept-language'] = this.client.acceptLanguage; @@ -369,9 +353,6 @@ function _listByJob(resourceGroupName, automationAccountName, jobName, options, * * @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 * @@ -398,14 +379,13 @@ 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 (clientRequestId !== null && clientRequestId !== undefined && typeof clientRequestId.valueOf() !== 'string') { - throw new Error('clientRequestId 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 (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.'); @@ -428,8 +408,8 @@ function _listByJobNext(nextPageLink, options, callback) { if (this.client.generateClientRequestId) { httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); } - if (clientRequestId !== undefined && clientRequestId !== null) { - httpRequest.headers['clientRequestId'] = clientRequestId; + if (this.client.clientRequestId !== undefined && this.client.clientRequestId !== null) { + httpRequest.headers['clientRequestId'] = this.client.clientRequestId; } if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { httpRequest.headers['accept-language'] = this.client.acceptLanguage; @@ -515,19 +495,12 @@ 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 * @@ -537,11 +510,11 @@ class JobStreamOperations { * * @reject {Error} - The error object. */ - getWithHttpOperationResponse(resourceGroupName, automationAccountName, jobName, jobStreamId, options) { + getWithHttpOperationResponse(jobName, jobStreamId, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._get(resourceGroupName, automationAccountName, jobName, jobStreamId, options, (err, result, request, response) => { + self._get(jobName, jobStreamId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -554,19 +527,12 @@ 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 * @@ -592,7 +558,7 @@ class JobStreamOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - get(resourceGroupName, automationAccountName, jobName, jobStreamId, options, optionalCallback) { + get(jobName, jobStreamId, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -601,33 +567,26 @@ class JobStreamOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._get(resourceGroupName, automationAccountName, jobName, jobStreamId, options, (err, result, request, response) => { + self._get(jobName, jobStreamId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._get(resourceGroupName, automationAccountName, jobName, jobStreamId, options, optionalCallback); + return self._get(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 * @@ -637,11 +596,11 @@ class JobStreamOperations { * * @reject {Error} - The error object. */ - listByJobWithHttpOperationResponse(resourceGroupName, automationAccountName, jobName, options) { + listByJobWithHttpOperationResponse(jobName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._listByJob(resourceGroupName, automationAccountName, jobName, options, (err, result, request, response) => { + self._listByJob(jobName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -654,19 +613,12 @@ 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 * @@ -692,7 +644,7 @@ class JobStreamOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - listByJob(resourceGroupName, automationAccountName, jobName, options, optionalCallback) { + listByJob(jobName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -701,14 +653,14 @@ class JobStreamOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._listByJob(resourceGroupName, automationAccountName, jobName, options, (err, result, request, response) => { + self._listByJob(jobName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._listByJob(resourceGroupName, automationAccountName, jobName, options, optionalCallback); + return self._listByJob(jobName, options, optionalCallback); } } @@ -720,9 +672,6 @@ 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 * @@ -754,9 +703,6 @@ 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 29ae1f29af..1853bbf687 100644 --- a/lib/services/automationManagement/lib/operations/linkedWorkspaceOperations.js +++ b/lib/services/automationManagement/lib/operations/linkedWorkspaceOperations.js @@ -17,8 +17,6 @@ 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. @@ -39,7 +37,7 @@ const WebResource = msRest.WebResource; * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _get(resourceGroupName, automationAccountName, options, callback) { +function _get(automationAccountName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -52,13 +50,13 @@ function _get(resourceGroupName, automationAccountName, options, callback) { let apiVersion = '2015-10-31'; // Validate try { - 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 || 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) { - if (resourceGroupName.match(/^[-\w\._]+$/) === null) + if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { + if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -77,7 +75,7 @@ function _get(resourceGroupName, 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(resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; @@ -178,8 +176,6 @@ 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. @@ -193,11 +189,11 @@ class LinkedWorkspaceOperations { * * @reject {Error} - The error object. */ - getWithHttpOperationResponse(resourceGroupName, automationAccountName, options) { + getWithHttpOperationResponse(automationAccountName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._get(resourceGroupName, automationAccountName, options, (err, result, request, response) => { + self._get(automationAccountName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -210,8 +206,6 @@ 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. @@ -241,7 +235,7 @@ class LinkedWorkspaceOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - get(resourceGroupName, automationAccountName, options, optionalCallback) { + get(automationAccountName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -250,14 +244,14 @@ class LinkedWorkspaceOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._get(resourceGroupName, automationAccountName, options, (err, result, request, response) => { + self._get(automationAccountName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._get(resourceGroupName, automationAccountName, options, optionalCallback); + return self._get(automationAccountName, options, optionalCallback); } } diff --git a/lib/services/automationManagement/lib/operations/moduleOperations.js b/lib/services/automationManagement/lib/operations/moduleOperations.js index 54438c961e..edef4bcdce 100644 --- a/lib/services/automationManagement/lib/operations/moduleOperations.js +++ b/lib/services/automationManagement/lib/operations/moduleOperations.js @@ -17,8 +17,6 @@ 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. @@ -40,7 +38,7 @@ const WebResource = msRest.WebResource; * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _deleteMethod(resourceGroupName, automationAccountName, moduleName, options, callback) { +function _deleteMethod(automationAccountName, moduleName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -53,13 +51,13 @@ function _deleteMethod(resourceGroupName, automationAccountName, moduleName, opt let apiVersion = '2015-10-31'; // Validate try { - 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 || 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) { - if (resourceGroupName.match(/^[-\w\._]+$/) === null) + if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { + if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -81,7 +79,7 @@ function _deleteMethod(resourceGroupName, automationAccountName, moduleName, opt // 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(resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{moduleName}', encodeURIComponent(moduleName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -155,8 +153,6 @@ function _deleteMethod(resourceGroupName, automationAccountName, moduleName, opt /** * 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. @@ -179,7 +175,7 @@ function _deleteMethod(resourceGroupName, automationAccountName, moduleName, opt * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _get(resourceGroupName, automationAccountName, moduleName, options, callback) { +function _get(automationAccountName, moduleName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -192,13 +188,13 @@ function _get(resourceGroupName, automationAccountName, moduleName, options, cal let apiVersion = '2015-10-31'; // Validate try { - 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 || 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) { - if (resourceGroupName.match(/^[-\w\._]+$/) === null) + if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { + if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -220,7 +216,7 @@ function _get(resourceGroupName, automationAccountName, moduleName, options, cal // 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(resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{moduleName}', encodeURIComponent(moduleName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -311,8 +307,6 @@ function _get(resourceGroupName, automationAccountName, moduleName, options, cal /** * 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. @@ -361,7 +355,7 @@ function _get(resourceGroupName, automationAccountName, moduleName, options, cal * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _createOrUpdate(resourceGroupName, automationAccountName, moduleName, parameters, options, callback) { +function _createOrUpdate(automationAccountName, moduleName, parameters, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -374,13 +368,13 @@ function _createOrUpdate(resourceGroupName, automationAccountName, moduleName, p let apiVersion = '2015-10-31'; // Validate try { - 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 || 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) { - if (resourceGroupName.match(/^[-\w\._]+$/) === null) + if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { + if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -405,7 +399,7 @@ function _createOrUpdate(resourceGroupName, automationAccountName, moduleName, p // 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(resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{moduleName}', encodeURIComponent(moduleName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -527,8 +521,6 @@ function _createOrUpdate(resourceGroupName, automationAccountName, moduleName, p /** * 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. @@ -578,7 +570,7 @@ function _createOrUpdate(resourceGroupName, automationAccountName, moduleName, p * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _update(resourceGroupName, automationAccountName, moduleName, parameters, options, callback) { +function _update(automationAccountName, moduleName, parameters, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -591,13 +583,13 @@ function _update(resourceGroupName, automationAccountName, moduleName, parameter let apiVersion = '2015-10-31'; // Validate try { - 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 || 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) { - if (resourceGroupName.match(/^[-\w\._]+$/) === null) + if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { + if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -622,7 +614,7 @@ function _update(resourceGroupName, automationAccountName, moduleName, parameter // 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(resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{moduleName}', encodeURIComponent(moduleName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -727,8 +719,6 @@ function _update(resourceGroupName, automationAccountName, moduleName, parameter /** * Retrieve a list of modules. * - * @param {string} resourceGroupName The resource group name. - * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -749,7 +739,7 @@ function _update(resourceGroupName, automationAccountName, moduleName, parameter * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _listByAutomationAccount(resourceGroupName, automationAccountName, options, callback) { +function _listByAutomationAccount(automationAccountName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -762,13 +752,13 @@ function _listByAutomationAccount(resourceGroupName, automationAccountName, opti let apiVersion = '2015-10-31'; // Validate try { - 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 || 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) { - if (resourceGroupName.match(/^[-\w\._]+$/) === null) + if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { + if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -787,7 +777,7 @@ function _listByAutomationAccount(resourceGroupName, automationAccountName, opti // 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(resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; @@ -1021,8 +1011,6 @@ 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. @@ -1038,11 +1026,11 @@ class ModuleOperations { * * @reject {Error} - The error object. */ - deleteMethodWithHttpOperationResponse(resourceGroupName, automationAccountName, moduleName, options) { + deleteMethodWithHttpOperationResponse(automationAccountName, moduleName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._deleteMethod(resourceGroupName, automationAccountName, moduleName, options, (err, result, request, response) => { + self._deleteMethod(automationAccountName, moduleName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1055,8 +1043,6 @@ 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. @@ -1087,7 +1073,7 @@ class ModuleOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(resourceGroupName, automationAccountName, moduleName, options, optionalCallback) { + deleteMethod(automationAccountName, moduleName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1096,22 +1082,20 @@ class ModuleOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._deleteMethod(resourceGroupName, automationAccountName, moduleName, options, (err, result, request, response) => { + self._deleteMethod(automationAccountName, moduleName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._deleteMethod(resourceGroupName, automationAccountName, moduleName, options, optionalCallback); + return self._deleteMethod(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. @@ -1127,11 +1111,11 @@ class ModuleOperations { * * @reject {Error} - The error object. */ - getWithHttpOperationResponse(resourceGroupName, automationAccountName, moduleName, options) { + getWithHttpOperationResponse(automationAccountName, moduleName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._get(resourceGroupName, automationAccountName, moduleName, options, (err, result, request, response) => { + self._get(automationAccountName, moduleName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1144,8 +1128,6 @@ 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. @@ -1177,7 +1159,7 @@ class ModuleOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - get(resourceGroupName, automationAccountName, moduleName, options, optionalCallback) { + get(automationAccountName, moduleName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1186,22 +1168,20 @@ class ModuleOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._get(resourceGroupName, automationAccountName, moduleName, options, (err, result, request, response) => { + self._get(automationAccountName, moduleName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._get(resourceGroupName, automationAccountName, moduleName, options, optionalCallback); + return self._get(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. @@ -1243,11 +1223,11 @@ class ModuleOperations { * * @reject {Error} - The error object. */ - createOrUpdateWithHttpOperationResponse(resourceGroupName, automationAccountName, moduleName, parameters, options) { + createOrUpdateWithHttpOperationResponse(automationAccountName, moduleName, parameters, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._createOrUpdate(resourceGroupName, automationAccountName, moduleName, parameters, options, (err, result, request, response) => { + self._createOrUpdate(automationAccountName, moduleName, parameters, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1260,8 +1240,6 @@ 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. @@ -1319,7 +1297,7 @@ class ModuleOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - createOrUpdate(resourceGroupName, automationAccountName, moduleName, parameters, options, optionalCallback) { + createOrUpdate(automationAccountName, moduleName, parameters, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1328,22 +1306,20 @@ class ModuleOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._createOrUpdate(resourceGroupName, automationAccountName, moduleName, parameters, options, (err, result, request, response) => { + self._createOrUpdate(automationAccountName, moduleName, parameters, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._createOrUpdate(resourceGroupName, automationAccountName, moduleName, parameters, options, optionalCallback); + return self._createOrUpdate(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. @@ -1386,11 +1362,11 @@ class ModuleOperations { * * @reject {Error} - The error object. */ - updateWithHttpOperationResponse(resourceGroupName, automationAccountName, moduleName, parameters, options) { + updateWithHttpOperationResponse(automationAccountName, moduleName, parameters, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._update(resourceGroupName, automationAccountName, moduleName, parameters, options, (err, result, request, response) => { + self._update(automationAccountName, moduleName, parameters, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1403,8 +1379,6 @@ 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. @@ -1463,7 +1437,7 @@ class ModuleOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - update(resourceGroupName, automationAccountName, moduleName, parameters, options, optionalCallback) { + update(automationAccountName, moduleName, parameters, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1472,22 +1446,20 @@ class ModuleOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._update(resourceGroupName, automationAccountName, moduleName, parameters, options, (err, result, request, response) => { + self._update(automationAccountName, moduleName, parameters, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._update(resourceGroupName, automationAccountName, moduleName, parameters, options, optionalCallback); + return self._update(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. @@ -1501,11 +1473,11 @@ class ModuleOperations { * * @reject {Error} - The error object. */ - listByAutomationAccountWithHttpOperationResponse(resourceGroupName, automationAccountName, options) { + listByAutomationAccountWithHttpOperationResponse(automationAccountName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._listByAutomationAccount(resourceGroupName, automationAccountName, options, (err, result, request, response) => { + self._listByAutomationAccount(automationAccountName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1518,8 +1490,6 @@ 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. @@ -1549,7 +1519,7 @@ class ModuleOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - listByAutomationAccount(resourceGroupName, automationAccountName, options, optionalCallback) { + listByAutomationAccount(automationAccountName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1558,14 +1528,14 @@ class ModuleOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._listByAutomationAccount(resourceGroupName, automationAccountName, options, (err, result, request, response) => { + self._listByAutomationAccount(automationAccountName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._listByAutomationAccount(resourceGroupName, automationAccountName, options, optionalCallback); + return self._listByAutomationAccount(automationAccountName, options, optionalCallback); } } diff --git a/lib/services/automationManagement/lib/operations/nodeReports.js b/lib/services/automationManagement/lib/operations/nodeReports.js index 49e13fd659..aea8ef8eb3 100644 --- a/lib/services/automationManagement/lib/operations/nodeReports.js +++ b/lib/services/automationManagement/lib/operations/nodeReports.js @@ -17,8 +17,6 @@ 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. @@ -44,7 +42,7 @@ const WebResource = msRest.WebResource; * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _listByNode(resourceGroupName, automationAccountName, nodeId, options, callback) { +function _listByNode(automationAccountName, nodeId, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -58,13 +56,13 @@ function _listByNode(resourceGroupName, automationAccountName, nodeId, options, let apiVersion = '2015-10-31'; // Validate try { - 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 || 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) { - if (resourceGroupName.match(/^[-\w\._]+$/) === null) + if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { + if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -89,7 +87,7 @@ function _listByNode(resourceGroupName, automationAccountName, nodeId, options, // 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(resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{nodeId}', encodeURIComponent(nodeId)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -183,8 +181,6 @@ function _listByNode(resourceGroupName, automationAccountName, nodeId, options, /** * 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. @@ -209,7 +205,7 @@ function _listByNode(resourceGroupName, automationAccountName, nodeId, options, * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _get(resourceGroupName, automationAccountName, nodeId, reportId, options, callback) { +function _get(automationAccountName, nodeId, reportId, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -222,13 +218,13 @@ function _get(resourceGroupName, automationAccountName, nodeId, reportId, option let apiVersion = '2015-10-31'; // Validate try { - 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 || 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) { - if (resourceGroupName.match(/^[-\w\._]+$/) === null) + if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { + if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -253,7 +249,7 @@ function _get(resourceGroupName, automationAccountName, nodeId, reportId, option // 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(resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{nodeId}', encodeURIComponent(nodeId)); requestUrl = requestUrl.replace('{reportId}', encodeURIComponent(reportId)); @@ -345,8 +341,6 @@ function _get(resourceGroupName, automationAccountName, nodeId, reportId, option /** * 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. @@ -370,7 +364,7 @@ function _get(resourceGroupName, automationAccountName, nodeId, reportId, option * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _getContent(resourceGroupName, automationAccountName, nodeId, reportId, options, callback) { +function _getContent(automationAccountName, nodeId, reportId, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -383,13 +377,13 @@ function _getContent(resourceGroupName, automationAccountName, nodeId, reportId, let apiVersion = '2015-10-31'; // Validate try { - 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 || 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) { - if (resourceGroupName.match(/^[-\w\._]+$/) === null) + if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { + if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -414,7 +408,7 @@ function _getContent(resourceGroupName, automationAccountName, nodeId, reportId, // 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(resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{nodeId}', encodeURIComponent(nodeId)); requestUrl = requestUrl.replace('{reportId}', encodeURIComponent(reportId)); @@ -655,8 +649,6 @@ 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. @@ -674,11 +666,11 @@ class NodeReports { * * @reject {Error} - The error object. */ - listByNodeWithHttpOperationResponse(resourceGroupName, automationAccountName, nodeId, options) { + listByNodeWithHttpOperationResponse(automationAccountName, nodeId, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._listByNode(resourceGroupName, automationAccountName, nodeId, options, (err, result, request, response) => { + self._listByNode(automationAccountName, nodeId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -691,8 +683,6 @@ 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. @@ -727,7 +717,7 @@ class NodeReports { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - listByNode(resourceGroupName, automationAccountName, nodeId, options, optionalCallback) { + listByNode(automationAccountName, nodeId, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -736,22 +726,20 @@ class NodeReports { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._listByNode(resourceGroupName, automationAccountName, nodeId, options, (err, result, request, response) => { + self._listByNode(automationAccountName, nodeId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._listByNode(resourceGroupName, automationAccountName, nodeId, options, optionalCallback); + return self._listByNode(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. @@ -769,11 +757,11 @@ class NodeReports { * * @reject {Error} - The error object. */ - getWithHttpOperationResponse(resourceGroupName, automationAccountName, nodeId, reportId, options) { + getWithHttpOperationResponse(automationAccountName, nodeId, reportId, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._get(resourceGroupName, automationAccountName, nodeId, reportId, options, (err, result, request, response) => { + self._get(automationAccountName, nodeId, reportId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -786,8 +774,6 @@ 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. @@ -821,7 +807,7 @@ class NodeReports { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - get(resourceGroupName, automationAccountName, nodeId, reportId, options, optionalCallback) { + get(automationAccountName, nodeId, reportId, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -830,22 +816,20 @@ class NodeReports { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._get(resourceGroupName, automationAccountName, nodeId, reportId, options, (err, result, request, response) => { + self._get(automationAccountName, nodeId, reportId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._get(resourceGroupName, automationAccountName, nodeId, reportId, options, optionalCallback); + return self._get(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. @@ -863,11 +847,11 @@ class NodeReports { * * @reject {Error} - The error object. */ - getContentWithHttpOperationResponse(resourceGroupName, automationAccountName, nodeId, reportId, options) { + getContentWithHttpOperationResponse(automationAccountName, nodeId, reportId, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._getContent(resourceGroupName, automationAccountName, nodeId, reportId, options, (err, result, request, response) => { + self._getContent(automationAccountName, nodeId, reportId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -880,8 +864,6 @@ 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. @@ -914,7 +896,7 @@ class NodeReports { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getContent(resourceGroupName, automationAccountName, nodeId, reportId, options, optionalCallback) { + getContent(automationAccountName, nodeId, reportId, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -923,14 +905,14 @@ class NodeReports { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getContent(resourceGroupName, automationAccountName, nodeId, reportId, options, (err, result, request, response) => { + self._getContent(automationAccountName, nodeId, reportId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getContent(resourceGroupName, automationAccountName, nodeId, reportId, options, optionalCallback); + return self._getContent(automationAccountName, nodeId, reportId, options, optionalCallback); } } diff --git a/lib/services/automationManagement/lib/operations/objectDataTypes.js b/lib/services/automationManagement/lib/operations/objectDataTypes.js index 5b3a4f44f7..86d9aad839 100644 --- a/lib/services/automationManagement/lib/operations/objectDataTypes.js +++ b/lib/services/automationManagement/lib/operations/objectDataTypes.js @@ -17,8 +17,6 @@ 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. @@ -43,7 +41,7 @@ const WebResource = msRest.WebResource; * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _listFieldsByModuleAndType(resourceGroupName, automationAccountName, moduleName, typeName, options, callback) { +function _listFieldsByModuleAndType(automationAccountName, moduleName, typeName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -56,13 +54,13 @@ function _listFieldsByModuleAndType(resourceGroupName, automationAccountName, mo let apiVersion = '2015-10-31'; // Validate try { - 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 || 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) { - if (resourceGroupName.match(/^[-\w\._]+$/) === null) + if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { + if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -87,7 +85,7 @@ function _listFieldsByModuleAndType(resourceGroupName, automationAccountName, mo // 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(resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{moduleName}', encodeURIComponent(moduleName)); requestUrl = requestUrl.replace('{typeName}', encodeURIComponent(typeName)); @@ -179,8 +177,6 @@ function _listFieldsByModuleAndType(resourceGroupName, automationAccountName, mo /** * 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. @@ -203,7 +199,7 @@ function _listFieldsByModuleAndType(resourceGroupName, automationAccountName, mo * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _listFieldsByType(resourceGroupName, automationAccountName, typeName, options, callback) { +function _listFieldsByType(automationAccountName, typeName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -216,13 +212,13 @@ function _listFieldsByType(resourceGroupName, automationAccountName, typeName, o let apiVersion = '2015-10-31'; // Validate try { - 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 || 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) { - if (resourceGroupName.match(/^[-\w\._]+$/) === null) + if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { + if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -244,7 +240,7 @@ function _listFieldsByType(resourceGroupName, automationAccountName, typeName, o // 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(resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{typeName}', encodeURIComponent(typeName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -347,8 +343,6 @@ 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. @@ -366,11 +360,11 @@ class ObjectDataTypes { * * @reject {Error} - The error object. */ - listFieldsByModuleAndTypeWithHttpOperationResponse(resourceGroupName, automationAccountName, moduleName, typeName, options) { + listFieldsByModuleAndTypeWithHttpOperationResponse(automationAccountName, moduleName, typeName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._listFieldsByModuleAndType(resourceGroupName, automationAccountName, moduleName, typeName, options, (err, result, request, response) => { + self._listFieldsByModuleAndType(automationAccountName, moduleName, typeName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -383,8 +377,6 @@ 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. @@ -418,7 +410,7 @@ class ObjectDataTypes { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - listFieldsByModuleAndType(resourceGroupName, automationAccountName, moduleName, typeName, options, optionalCallback) { + listFieldsByModuleAndType(automationAccountName, moduleName, typeName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -427,22 +419,20 @@ class ObjectDataTypes { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._listFieldsByModuleAndType(resourceGroupName, automationAccountName, moduleName, typeName, options, (err, result, request, response) => { + self._listFieldsByModuleAndType(automationAccountName, moduleName, typeName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._listFieldsByModuleAndType(resourceGroupName, automationAccountName, moduleName, typeName, options, optionalCallback); + return self._listFieldsByModuleAndType(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. @@ -458,11 +448,11 @@ class ObjectDataTypes { * * @reject {Error} - The error object. */ - listFieldsByTypeWithHttpOperationResponse(resourceGroupName, automationAccountName, typeName, options) { + listFieldsByTypeWithHttpOperationResponse(automationAccountName, typeName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._listFieldsByType(resourceGroupName, automationAccountName, typeName, options, (err, result, request, response) => { + self._listFieldsByType(automationAccountName, typeName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -475,8 +465,6 @@ 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. @@ -508,7 +496,7 @@ class ObjectDataTypes { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - listFieldsByType(resourceGroupName, automationAccountName, typeName, options, optionalCallback) { + listFieldsByType(automationAccountName, typeName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -517,14 +505,14 @@ class ObjectDataTypes { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._listFieldsByType(resourceGroupName, automationAccountName, typeName, options, (err, result, request, response) => { + self._listFieldsByType(automationAccountName, typeName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._listFieldsByType(resourceGroupName, automationAccountName, typeName, options, optionalCallback); + return self._listFieldsByType(automationAccountName, typeName, options, optionalCallback); } } diff --git a/lib/services/automationManagement/lib/operations/runbookDraftOperations.js b/lib/services/automationManagement/lib/operations/runbookDraftOperations.js index 2bd90ce433..e4e627796f 100644 --- a/lib/services/automationManagement/lib/operations/runbookDraftOperations.js +++ b/lib/services/automationManagement/lib/operations/runbookDraftOperations.js @@ -17,8 +17,6 @@ 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. @@ -40,7 +38,7 @@ const WebResource = msRest.WebResource; * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _getContent(resourceGroupName, automationAccountName, runbookName, options, callback) { +function _getContent(automationAccountName, runbookName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -56,13 +54,13 @@ function _getContent(resourceGroupName, automationAccountName, runbookName, opti 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 (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 || 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) { - if (resourceGroupName.match(/^[-\w\._]+$/) === null) + if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { + if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -82,7 +80,7 @@ function _getContent(resourceGroupName, automationAccountName, runbookName, opti 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(resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{runbookName}', encodeURIComponent(runbookName)); let queryParameters = []; @@ -178,8 +176,6 @@ function _getContent(resourceGroupName, automationAccountName, runbookName, opti /** * 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. @@ -203,7 +199,7 @@ function _getContent(resourceGroupName, automationAccountName, runbookName, opti * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _replaceContent(resourceGroupName, automationAccountName, runbookName, runbookContent, options, callback) { +function _replaceContent(automationAccountName, runbookName, runbookContent, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -216,7 +212,7 @@ function _replaceContent(resourceGroupName, automationAccountName, runbookName, } // Send request - this.beginReplaceContent(resourceGroupName, automationAccountName, runbookName, runbookContent, options, (err, parsedResult, httpRequest, response) => { + this.beginReplaceContent(automationAccountName, runbookName, runbookContent, options, (err, parsedResult, httpRequest, response) => { if (err) return callback(err); let initialResult = new msRest.HttpOperationResponse(); @@ -244,8 +240,6 @@ function _replaceContent(resourceGroupName, automationAccountName, runbookName, /** * 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. @@ -268,7 +262,7 @@ function _replaceContent(resourceGroupName, automationAccountName, runbookName, * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _get(resourceGroupName, automationAccountName, runbookName, options, callback) { +function _get(automationAccountName, runbookName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -284,13 +278,13 @@ function _get(resourceGroupName, automationAccountName, runbookName, options, ca 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 (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 || 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) { - if (resourceGroupName.match(/^[-\w\._]+$/) === null) + if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { + if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -310,7 +304,7 @@ function _get(resourceGroupName, automationAccountName, runbookName, options, ca 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(resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{runbookName}', encodeURIComponent(runbookName)); let queryParameters = []; @@ -401,8 +395,6 @@ function _get(resourceGroupName, automationAccountName, runbookName, options, ca /** * 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 @@ -425,7 +417,7 @@ function _get(resourceGroupName, automationAccountName, runbookName, options, ca * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _publish(resourceGroupName, automationAccountName, runbookName, options, callback) { +function _publish(automationAccountName, runbookName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -438,7 +430,7 @@ function _publish(resourceGroupName, automationAccountName, runbookName, options } // Send request - this.beginPublish(resourceGroupName, automationAccountName, runbookName, options, (err, parsedResult, httpRequest, response) => { + this.beginPublish(automationAccountName, runbookName, options, (err, parsedResult, httpRequest, response) => { if (err) return callback(err); let initialResult = new msRest.HttpOperationResponse(); @@ -466,8 +458,6 @@ function _publish(resourceGroupName, automationAccountName, runbookName, options /** * 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. @@ -491,7 +481,7 @@ function _publish(resourceGroupName, automationAccountName, runbookName, options * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _undoEdit(resourceGroupName, automationAccountName, runbookName, options, callback) { +function _undoEdit(automationAccountName, runbookName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -507,13 +497,13 @@ function _undoEdit(resourceGroupName, automationAccountName, runbookName, option 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 (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 || 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) { - if (resourceGroupName.match(/^[-\w\._]+$/) === null) + if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { + if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -533,7 +523,7 @@ function _undoEdit(resourceGroupName, automationAccountName, runbookName, option 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(resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{runbookName}', encodeURIComponent(runbookName)); let queryParameters = []; @@ -623,8 +613,6 @@ function _undoEdit(resourceGroupName, automationAccountName, runbookName, option /** * 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. @@ -648,7 +636,7 @@ function _undoEdit(resourceGroupName, automationAccountName, runbookName, option * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _beginReplaceContent(resourceGroupName, automationAccountName, runbookName, runbookContent, options, callback) { +function _beginReplaceContent(automationAccountName, runbookName, runbookContent, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -664,13 +652,13 @@ function _beginReplaceContent(resourceGroupName, automationAccountName, runbookN 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 (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 || 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) { - if (resourceGroupName.match(/^[-\w\._]+$/) === null) + if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { + if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -693,7 +681,7 @@ function _beginReplaceContent(resourceGroupName, automationAccountName, runbookN 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(resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{runbookName}', encodeURIComponent(runbookName)); let queryParameters = []; @@ -786,8 +774,6 @@ function _beginReplaceContent(resourceGroupName, automationAccountName, runbookN /** * 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 @@ -810,7 +796,7 @@ function _beginReplaceContent(resourceGroupName, automationAccountName, runbookN * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _beginPublish(resourceGroupName, automationAccountName, runbookName, options, callback) { +function _beginPublish(automationAccountName, runbookName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -826,13 +812,13 @@ function _beginPublish(resourceGroupName, automationAccountName, runbookName, op 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 (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 || 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) { - if (resourceGroupName.match(/^[-\w\._]+$/) === null) + if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { + if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -852,7 +838,7 @@ function _beginPublish(resourceGroupName, automationAccountName, runbookName, op 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(resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{runbookName}', encodeURIComponent(runbookName)); let queryParameters = []; @@ -942,8 +928,6 @@ 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. @@ -959,11 +943,11 @@ class RunbookDraftOperations { * * @reject {Error} - The error object. */ - getContentWithHttpOperationResponse(resourceGroupName, automationAccountName, runbookName, options) { + getContentWithHttpOperationResponse(automationAccountName, runbookName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._getContent(resourceGroupName, automationAccountName, runbookName, options, (err, result, request, response) => { + self._getContent(automationAccountName, runbookName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -976,8 +960,6 @@ 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. @@ -1008,7 +990,7 @@ class RunbookDraftOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getContent(resourceGroupName, automationAccountName, runbookName, options, optionalCallback) { + getContent(automationAccountName, runbookName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1017,22 +999,20 @@ class RunbookDraftOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getContent(resourceGroupName, automationAccountName, runbookName, options, (err, result, request, response) => { + self._getContent(automationAccountName, runbookName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getContent(resourceGroupName, automationAccountName, runbookName, options, optionalCallback); + return self._getContent(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. @@ -1050,11 +1030,11 @@ class RunbookDraftOperations { * * @reject {Error} - The error object. */ - replaceContentWithHttpOperationResponse(resourceGroupName, automationAccountName, runbookName, runbookContent, options) { + replaceContentWithHttpOperationResponse(automationAccountName, runbookName, runbookContent, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._replaceContent(resourceGroupName, automationAccountName, runbookName, runbookContent, options, (err, result, request, response) => { + self._replaceContent(automationAccountName, runbookName, runbookContent, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1067,8 +1047,6 @@ 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. @@ -1101,7 +1079,7 @@ class RunbookDraftOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - replaceContent(resourceGroupName, automationAccountName, runbookName, runbookContent, options, optionalCallback) { + replaceContent(automationAccountName, runbookName, runbookContent, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1110,22 +1088,20 @@ class RunbookDraftOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._replaceContent(resourceGroupName, automationAccountName, runbookName, runbookContent, options, (err, result, request, response) => { + self._replaceContent(automationAccountName, runbookName, runbookContent, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._replaceContent(resourceGroupName, automationAccountName, runbookName, runbookContent, options, optionalCallback); + return self._replaceContent(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. @@ -1141,11 +1117,11 @@ class RunbookDraftOperations { * * @reject {Error} - The error object. */ - getWithHttpOperationResponse(resourceGroupName, automationAccountName, runbookName, options) { + getWithHttpOperationResponse(automationAccountName, runbookName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._get(resourceGroupName, automationAccountName, runbookName, options, (err, result, request, response) => { + self._get(automationAccountName, runbookName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1158,8 +1134,6 @@ 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. @@ -1191,7 +1165,7 @@ class RunbookDraftOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - get(resourceGroupName, automationAccountName, runbookName, options, optionalCallback) { + get(automationAccountName, runbookName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1200,22 +1174,20 @@ class RunbookDraftOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._get(resourceGroupName, automationAccountName, runbookName, options, (err, result, request, response) => { + self._get(automationAccountName, runbookName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._get(resourceGroupName, automationAccountName, runbookName, options, optionalCallback); + return self._get(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 @@ -1232,11 +1204,11 @@ class RunbookDraftOperations { * * @reject {Error} - The error object. */ - publishWithHttpOperationResponse(resourceGroupName, automationAccountName, runbookName, options) { + publishWithHttpOperationResponse(automationAccountName, runbookName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._publish(resourceGroupName, automationAccountName, runbookName, options, (err, result, request, response) => { + self._publish(automationAccountName, runbookName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1249,8 +1221,6 @@ 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 @@ -1282,7 +1252,7 @@ class RunbookDraftOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - publish(resourceGroupName, automationAccountName, runbookName, options, optionalCallback) { + publish(automationAccountName, runbookName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1291,22 +1261,20 @@ class RunbookDraftOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._publish(resourceGroupName, automationAccountName, runbookName, options, (err, result, request, response) => { + self._publish(automationAccountName, runbookName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._publish(resourceGroupName, automationAccountName, runbookName, options, optionalCallback); + return self._publish(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. @@ -1322,11 +1290,11 @@ class RunbookDraftOperations { * * @reject {Error} - The error object. */ - undoEditWithHttpOperationResponse(resourceGroupName, automationAccountName, runbookName, options) { + undoEditWithHttpOperationResponse(automationAccountName, runbookName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._undoEdit(resourceGroupName, automationAccountName, runbookName, options, (err, result, request, response) => { + self._undoEdit(automationAccountName, runbookName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1339,8 +1307,6 @@ 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. @@ -1373,7 +1339,7 @@ class RunbookDraftOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - undoEdit(resourceGroupName, automationAccountName, runbookName, options, optionalCallback) { + undoEdit(automationAccountName, runbookName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1382,22 +1348,20 @@ class RunbookDraftOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._undoEdit(resourceGroupName, automationAccountName, runbookName, options, (err, result, request, response) => { + self._undoEdit(automationAccountName, runbookName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._undoEdit(resourceGroupName, automationAccountName, runbookName, options, optionalCallback); + return self._undoEdit(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. @@ -1415,11 +1379,11 @@ class RunbookDraftOperations { * * @reject {Error} - The error object. */ - beginReplaceContentWithHttpOperationResponse(resourceGroupName, automationAccountName, runbookName, runbookContent, options) { + beginReplaceContentWithHttpOperationResponse(automationAccountName, runbookName, runbookContent, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._beginReplaceContent(resourceGroupName, automationAccountName, runbookName, runbookContent, options, (err, result, request, response) => { + self._beginReplaceContent(automationAccountName, runbookName, runbookContent, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1432,8 +1396,6 @@ 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. @@ -1466,7 +1428,7 @@ class RunbookDraftOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - beginReplaceContent(resourceGroupName, automationAccountName, runbookName, runbookContent, options, optionalCallback) { + beginReplaceContent(automationAccountName, runbookName, runbookContent, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1475,22 +1437,20 @@ class RunbookDraftOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._beginReplaceContent(resourceGroupName, automationAccountName, runbookName, runbookContent, options, (err, result, request, response) => { + self._beginReplaceContent(automationAccountName, runbookName, runbookContent, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._beginReplaceContent(resourceGroupName, automationAccountName, runbookName, runbookContent, options, optionalCallback); + return self._beginReplaceContent(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 @@ -1507,11 +1467,11 @@ class RunbookDraftOperations { * * @reject {Error} - The error object. */ - beginPublishWithHttpOperationResponse(resourceGroupName, automationAccountName, runbookName, options) { + beginPublishWithHttpOperationResponse(automationAccountName, runbookName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._beginPublish(resourceGroupName, automationAccountName, runbookName, options, (err, result, request, response) => { + self._beginPublish(automationAccountName, runbookName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1524,8 +1484,6 @@ 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 @@ -1557,7 +1515,7 @@ class RunbookDraftOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - beginPublish(resourceGroupName, automationAccountName, runbookName, options, optionalCallback) { + beginPublish(automationAccountName, runbookName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1566,14 +1524,14 @@ class RunbookDraftOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._beginPublish(resourceGroupName, automationAccountName, runbookName, options, (err, result, request, response) => { + self._beginPublish(automationAccountName, runbookName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._beginPublish(resourceGroupName, automationAccountName, runbookName, options, optionalCallback); + return self._beginPublish(automationAccountName, runbookName, options, optionalCallback); } } diff --git a/lib/services/automationManagement/lib/operations/runbookOperations.js b/lib/services/automationManagement/lib/operations/runbookOperations.js index bc857a50b5..727f2c4ed7 100644 --- a/lib/services/automationManagement/lib/operations/runbookOperations.js +++ b/lib/services/automationManagement/lib/operations/runbookOperations.js @@ -17,8 +17,6 @@ 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. @@ -40,7 +38,7 @@ const WebResource = msRest.WebResource; * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _getContent(resourceGroupName, automationAccountName, runbookName, options, callback) { +function _getContent(automationAccountName, runbookName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -56,13 +54,13 @@ function _getContent(resourceGroupName, automationAccountName, runbookName, opti 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 (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 || 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) { - if (resourceGroupName.match(/^[-\w\._]+$/) === null) + if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { + if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -82,7 +80,7 @@ function _getContent(resourceGroupName, automationAccountName, runbookName, opti 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(resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{runbookName}', encodeURIComponent(runbookName)); let queryParameters = []; @@ -177,8 +175,6 @@ function _getContent(resourceGroupName, automationAccountName, runbookName, opti /** * 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. @@ -201,7 +197,7 @@ function _getContent(resourceGroupName, automationAccountName, runbookName, opti * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _get(resourceGroupName, automationAccountName, runbookName, options, callback) { +function _get(automationAccountName, runbookName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -217,13 +213,13 @@ function _get(resourceGroupName, automationAccountName, runbookName, options, ca 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 (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 || 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) { - if (resourceGroupName.match(/^[-\w\._]+$/) === null) + if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { + if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -243,7 +239,7 @@ function _get(resourceGroupName, automationAccountName, runbookName, options, ca 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(resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{runbookName}', encodeURIComponent(runbookName)); let queryParameters = []; @@ -333,8 +329,6 @@ function _get(resourceGroupName, automationAccountName, runbookName, options, ca /** * 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. @@ -421,7 +415,7 @@ function _get(resourceGroupName, automationAccountName, runbookName, options, ca * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _createOrUpdate(resourceGroupName, automationAccountName, runbookName, parameters, options, callback) { +function _createOrUpdate(automationAccountName, runbookName, parameters, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -437,13 +431,13 @@ function _createOrUpdate(resourceGroupName, automationAccountName, runbookName, 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 (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 || 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) { - if (resourceGroupName.match(/^[-\w\._]+$/) === null) + if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { + if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -466,7 +460,7 @@ function _createOrUpdate(resourceGroupName, automationAccountName, runbookName, 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(resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{runbookName}', encodeURIComponent(runbookName)); let queryParameters = []; @@ -587,8 +581,6 @@ function _createOrUpdate(resourceGroupName, automationAccountName, runbookName, /** * 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. @@ -631,7 +623,7 @@ function _createOrUpdate(resourceGroupName, automationAccountName, runbookName, * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _update(resourceGroupName, automationAccountName, runbookName, parameters, options, callback) { +function _update(automationAccountName, runbookName, parameters, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -647,13 +639,13 @@ function _update(resourceGroupName, automationAccountName, runbookName, paramete 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 (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 || 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) { - if (resourceGroupName.match(/^[-\w\._]+$/) === null) + if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { + if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -676,7 +668,7 @@ function _update(resourceGroupName, automationAccountName, runbookName, paramete 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(resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{runbookName}', encodeURIComponent(runbookName)); let queryParameters = []; @@ -780,8 +772,6 @@ function _update(resourceGroupName, automationAccountName, runbookName, paramete /** * 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. @@ -803,7 +793,7 @@ function _update(resourceGroupName, automationAccountName, runbookName, paramete * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _deleteMethod(resourceGroupName, automationAccountName, runbookName, options, callback) { +function _deleteMethod(automationAccountName, runbookName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -819,13 +809,13 @@ function _deleteMethod(resourceGroupName, automationAccountName, runbookName, op 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 (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 || 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) { - if (resourceGroupName.match(/^[-\w\._]+$/) === null) + if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { + if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -845,7 +835,7 @@ function _deleteMethod(resourceGroupName, automationAccountName, runbookName, op 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(resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{runbookName}', encodeURIComponent(runbookName)); let queryParameters = []; @@ -918,8 +908,6 @@ function _deleteMethod(resourceGroupName, automationAccountName, runbookName, op /** * Retrieve a list of runbooks. * - * @param {string} resourceGroupName The resource group name. - * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -940,7 +928,7 @@ function _deleteMethod(resourceGroupName, automationAccountName, runbookName, op * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _listByAutomationAccount(resourceGroupName, automationAccountName, options, callback) { +function _listByAutomationAccount(automationAccountName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -956,13 +944,13 @@ function _listByAutomationAccount(resourceGroupName, automationAccountName, opti 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 (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 || 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) { - if (resourceGroupName.match(/^[-\w\._]+$/) === null) + if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { + if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -979,7 +967,7 @@ function _listByAutomationAccount(resourceGroupName, automationAccountName, opti 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(resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); @@ -1213,8 +1201,6 @@ 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. @@ -1230,11 +1216,11 @@ class RunbookOperations { * * @reject {Error} - The error object. */ - getContentWithHttpOperationResponse(resourceGroupName, automationAccountName, runbookName, options) { + getContentWithHttpOperationResponse(automationAccountName, runbookName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._getContent(resourceGroupName, automationAccountName, runbookName, options, (err, result, request, response) => { + self._getContent(automationAccountName, runbookName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1247,8 +1233,6 @@ 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. @@ -1279,7 +1263,7 @@ class RunbookOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getContent(resourceGroupName, automationAccountName, runbookName, options, optionalCallback) { + getContent(automationAccountName, runbookName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1288,22 +1272,20 @@ class RunbookOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getContent(resourceGroupName, automationAccountName, runbookName, options, (err, result, request, response) => { + self._getContent(automationAccountName, runbookName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getContent(resourceGroupName, automationAccountName, runbookName, options, optionalCallback); + return self._getContent(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. @@ -1319,11 +1301,11 @@ class RunbookOperations { * * @reject {Error} - The error object. */ - getWithHttpOperationResponse(resourceGroupName, automationAccountName, runbookName, options) { + getWithHttpOperationResponse(automationAccountName, runbookName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._get(resourceGroupName, automationAccountName, runbookName, options, (err, result, request, response) => { + self._get(automationAccountName, runbookName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1336,8 +1318,6 @@ 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. @@ -1369,7 +1349,7 @@ class RunbookOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - get(resourceGroupName, automationAccountName, runbookName, options, optionalCallback) { + get(automationAccountName, runbookName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1378,22 +1358,20 @@ class RunbookOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._get(resourceGroupName, automationAccountName, runbookName, options, (err, result, request, response) => { + self._get(automationAccountName, runbookName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._get(resourceGroupName, automationAccountName, runbookName, options, optionalCallback); + return self._get(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. @@ -1473,11 +1451,11 @@ class RunbookOperations { * * @reject {Error} - The error object. */ - createOrUpdateWithHttpOperationResponse(resourceGroupName, automationAccountName, runbookName, parameters, options) { + createOrUpdateWithHttpOperationResponse(automationAccountName, runbookName, parameters, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._createOrUpdate(resourceGroupName, automationAccountName, runbookName, parameters, options, (err, result, request, response) => { + self._createOrUpdate(automationAccountName, runbookName, parameters, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1490,8 +1468,6 @@ 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. @@ -1587,7 +1563,7 @@ class RunbookOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - createOrUpdate(resourceGroupName, automationAccountName, runbookName, parameters, options, optionalCallback) { + createOrUpdate(automationAccountName, runbookName, parameters, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1596,22 +1572,20 @@ class RunbookOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._createOrUpdate(resourceGroupName, automationAccountName, runbookName, parameters, options, (err, result, request, response) => { + self._createOrUpdate(automationAccountName, runbookName, parameters, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._createOrUpdate(resourceGroupName, automationAccountName, runbookName, parameters, options, optionalCallback); + return self._createOrUpdate(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. @@ -1647,11 +1621,11 @@ class RunbookOperations { * * @reject {Error} - The error object. */ - updateWithHttpOperationResponse(resourceGroupName, automationAccountName, runbookName, parameters, options) { + updateWithHttpOperationResponse(automationAccountName, runbookName, parameters, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._update(resourceGroupName, automationAccountName, runbookName, parameters, options, (err, result, request, response) => { + self._update(automationAccountName, runbookName, parameters, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1664,8 +1638,6 @@ 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. @@ -1717,7 +1689,7 @@ class RunbookOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - update(resourceGroupName, automationAccountName, runbookName, parameters, options, optionalCallback) { + update(automationAccountName, runbookName, parameters, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1726,22 +1698,20 @@ class RunbookOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._update(resourceGroupName, automationAccountName, runbookName, parameters, options, (err, result, request, response) => { + self._update(automationAccountName, runbookName, parameters, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._update(resourceGroupName, automationAccountName, runbookName, parameters, options, optionalCallback); + return self._update(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. @@ -1757,11 +1727,11 @@ class RunbookOperations { * * @reject {Error} - The error object. */ - deleteMethodWithHttpOperationResponse(resourceGroupName, automationAccountName, runbookName, options) { + deleteMethodWithHttpOperationResponse(automationAccountName, runbookName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._deleteMethod(resourceGroupName, automationAccountName, runbookName, options, (err, result, request, response) => { + self._deleteMethod(automationAccountName, runbookName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1774,8 +1744,6 @@ 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. @@ -1806,7 +1774,7 @@ class RunbookOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(resourceGroupName, automationAccountName, runbookName, options, optionalCallback) { + deleteMethod(automationAccountName, runbookName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1815,22 +1783,20 @@ class RunbookOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._deleteMethod(resourceGroupName, automationAccountName, runbookName, options, (err, result, request, response) => { + self._deleteMethod(automationAccountName, runbookName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._deleteMethod(resourceGroupName, automationAccountName, runbookName, options, optionalCallback); + return self._deleteMethod(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. @@ -1844,11 +1810,11 @@ class RunbookOperations { * * @reject {Error} - The error object. */ - listByAutomationAccountWithHttpOperationResponse(resourceGroupName, automationAccountName, options) { + listByAutomationAccountWithHttpOperationResponse(automationAccountName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._listByAutomationAccount(resourceGroupName, automationAccountName, options, (err, result, request, response) => { + self._listByAutomationAccount(automationAccountName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1861,8 +1827,6 @@ 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. @@ -1892,7 +1856,7 @@ class RunbookOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - listByAutomationAccount(resourceGroupName, automationAccountName, options, optionalCallback) { + listByAutomationAccount(automationAccountName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1901,14 +1865,14 @@ class RunbookOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._listByAutomationAccount(resourceGroupName, automationAccountName, options, (err, result, request, response) => { + self._listByAutomationAccount(automationAccountName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._listByAutomationAccount(resourceGroupName, automationAccountName, options, optionalCallback); + return self._listByAutomationAccount(automationAccountName, options, optionalCallback); } } diff --git a/lib/services/automationManagement/lib/operations/scheduleOperations.js b/lib/services/automationManagement/lib/operations/scheduleOperations.js index ab725860f2..48f5c87207 100644 --- a/lib/services/automationManagement/lib/operations/scheduleOperations.js +++ b/lib/services/automationManagement/lib/operations/scheduleOperations.js @@ -17,8 +17,6 @@ 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. @@ -76,7 +74,7 @@ const WebResource = msRest.WebResource; * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _createOrUpdate(resourceGroupName, automationAccountName, scheduleName, parameters, options, callback) { +function _createOrUpdate(automationAccountName, scheduleName, parameters, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -89,13 +87,13 @@ function _createOrUpdate(resourceGroupName, automationAccountName, scheduleName, let apiVersion = '2015-10-31'; // Validate try { - 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 || 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) { - if (resourceGroupName.match(/^[-\w\._]+$/) === null) + if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { + if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -120,7 +118,7 @@ function _createOrUpdate(resourceGroupName, automationAccountName, scheduleName, // 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(resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{scheduleName}', encodeURIComponent(scheduleName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -225,8 +223,6 @@ function _createOrUpdate(resourceGroupName, automationAccountName, scheduleName, /** * 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. @@ -260,7 +256,7 @@ function _createOrUpdate(resourceGroupName, automationAccountName, scheduleName, * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _update(resourceGroupName, automationAccountName, scheduleName, parameters, options, callback) { +function _update(automationAccountName, scheduleName, parameters, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -273,13 +269,13 @@ function _update(resourceGroupName, automationAccountName, scheduleName, paramet let apiVersion = '2015-10-31'; // Validate try { - 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 || 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) { - if (resourceGroupName.match(/^[-\w\._]+$/) === null) + if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { + if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -304,7 +300,7 @@ function _update(resourceGroupName, automationAccountName, scheduleName, paramet // 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(resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{scheduleName}', encodeURIComponent(scheduleName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -409,8 +405,6 @@ function _update(resourceGroupName, automationAccountName, scheduleName, paramet /** * 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. @@ -433,7 +427,7 @@ function _update(resourceGroupName, automationAccountName, scheduleName, paramet * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _get(resourceGroupName, automationAccountName, scheduleName, options, callback) { +function _get(automationAccountName, scheduleName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -446,13 +440,13 @@ function _get(resourceGroupName, automationAccountName, scheduleName, options, c let apiVersion = '2015-10-31'; // Validate try { - 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 || 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) { - if (resourceGroupName.match(/^[-\w\._]+$/) === null) + if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { + if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -474,7 +468,7 @@ function _get(resourceGroupName, automationAccountName, scheduleName, options, c // 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(resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{scheduleName}', encodeURIComponent(scheduleName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -565,8 +559,6 @@ function _get(resourceGroupName, automationAccountName, scheduleName, options, c /** * 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. @@ -588,7 +580,7 @@ function _get(resourceGroupName, automationAccountName, scheduleName, options, c * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _deleteMethod(resourceGroupName, automationAccountName, scheduleName, options, callback) { +function _deleteMethod(automationAccountName, scheduleName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -601,13 +593,13 @@ function _deleteMethod(resourceGroupName, automationAccountName, scheduleName, o let apiVersion = '2015-10-31'; // Validate try { - 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 || 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) { - if (resourceGroupName.match(/^[-\w\._]+$/) === null) + if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { + if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -629,7 +621,7 @@ function _deleteMethod(resourceGroupName, automationAccountName, scheduleName, o // 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(resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{scheduleName}', encodeURIComponent(scheduleName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -703,8 +695,6 @@ function _deleteMethod(resourceGroupName, automationAccountName, scheduleName, o /** * Retrieve a list of schedules. * - * @param {string} resourceGroupName The resource group name. - * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -725,7 +715,7 @@ function _deleteMethod(resourceGroupName, automationAccountName, scheduleName, o * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _listByAutomationAccount(resourceGroupName, automationAccountName, options, callback) { +function _listByAutomationAccount(automationAccountName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -738,13 +728,13 @@ function _listByAutomationAccount(resourceGroupName, automationAccountName, opti let apiVersion = '2015-10-31'; // Validate try { - 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 || 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) { - if (resourceGroupName.match(/^[-\w\._]+$/) === null) + if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { + if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -763,7 +753,7 @@ function _listByAutomationAccount(resourceGroupName, automationAccountName, opti // 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(resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; @@ -997,8 +987,6 @@ 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. @@ -1049,11 +1037,11 @@ class ScheduleOperations { * * @reject {Error} - The error object. */ - createOrUpdateWithHttpOperationResponse(resourceGroupName, automationAccountName, scheduleName, parameters, options) { + createOrUpdateWithHttpOperationResponse(automationAccountName, scheduleName, parameters, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._createOrUpdate(resourceGroupName, automationAccountName, scheduleName, parameters, options, (err, result, request, response) => { + self._createOrUpdate(automationAccountName, scheduleName, parameters, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1066,8 +1054,6 @@ 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. @@ -1134,7 +1120,7 @@ class ScheduleOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - createOrUpdate(resourceGroupName, automationAccountName, scheduleName, parameters, options, optionalCallback) { + createOrUpdate(automationAccountName, scheduleName, parameters, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1143,22 +1129,20 @@ class ScheduleOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._createOrUpdate(resourceGroupName, automationAccountName, scheduleName, parameters, options, (err, result, request, response) => { + self._createOrUpdate(automationAccountName, scheduleName, parameters, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._createOrUpdate(resourceGroupName, automationAccountName, scheduleName, parameters, options, optionalCallback); + return self._createOrUpdate(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. @@ -1185,11 +1169,11 @@ class ScheduleOperations { * * @reject {Error} - The error object. */ - updateWithHttpOperationResponse(resourceGroupName, automationAccountName, scheduleName, parameters, options) { + updateWithHttpOperationResponse(automationAccountName, scheduleName, parameters, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._update(resourceGroupName, automationAccountName, scheduleName, parameters, options, (err, result, request, response) => { + self._update(automationAccountName, scheduleName, parameters, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1202,8 +1186,6 @@ 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. @@ -1246,7 +1228,7 @@ class ScheduleOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - update(resourceGroupName, automationAccountName, scheduleName, parameters, options, optionalCallback) { + update(automationAccountName, scheduleName, parameters, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1255,22 +1237,20 @@ class ScheduleOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._update(resourceGroupName, automationAccountName, scheduleName, parameters, options, (err, result, request, response) => { + self._update(automationAccountName, scheduleName, parameters, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._update(resourceGroupName, automationAccountName, scheduleName, parameters, options, optionalCallback); + return self._update(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. @@ -1286,11 +1266,11 @@ class ScheduleOperations { * * @reject {Error} - The error object. */ - getWithHttpOperationResponse(resourceGroupName, automationAccountName, scheduleName, options) { + getWithHttpOperationResponse(automationAccountName, scheduleName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._get(resourceGroupName, automationAccountName, scheduleName, options, (err, result, request, response) => { + self._get(automationAccountName, scheduleName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1303,8 +1283,6 @@ 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. @@ -1336,7 +1314,7 @@ class ScheduleOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - get(resourceGroupName, automationAccountName, scheduleName, options, optionalCallback) { + get(automationAccountName, scheduleName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1345,22 +1323,20 @@ class ScheduleOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._get(resourceGroupName, automationAccountName, scheduleName, options, (err, result, request, response) => { + self._get(automationAccountName, scheduleName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._get(resourceGroupName, automationAccountName, scheduleName, options, optionalCallback); + return self._get(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. @@ -1376,11 +1352,11 @@ class ScheduleOperations { * * @reject {Error} - The error object. */ - deleteMethodWithHttpOperationResponse(resourceGroupName, automationAccountName, scheduleName, options) { + deleteMethodWithHttpOperationResponse(automationAccountName, scheduleName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._deleteMethod(resourceGroupName, automationAccountName, scheduleName, options, (err, result, request, response) => { + self._deleteMethod(automationAccountName, scheduleName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1393,8 +1369,6 @@ 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. @@ -1425,7 +1399,7 @@ class ScheduleOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(resourceGroupName, automationAccountName, scheduleName, options, optionalCallback) { + deleteMethod(automationAccountName, scheduleName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1434,22 +1408,20 @@ class ScheduleOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._deleteMethod(resourceGroupName, automationAccountName, scheduleName, options, (err, result, request, response) => { + self._deleteMethod(automationAccountName, scheduleName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._deleteMethod(resourceGroupName, automationAccountName, scheduleName, options, optionalCallback); + return self._deleteMethod(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. @@ -1463,11 +1435,11 @@ class ScheduleOperations { * * @reject {Error} - The error object. */ - listByAutomationAccountWithHttpOperationResponse(resourceGroupName, automationAccountName, options) { + listByAutomationAccountWithHttpOperationResponse(automationAccountName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._listByAutomationAccount(resourceGroupName, automationAccountName, options, (err, result, request, response) => { + self._listByAutomationAccount(automationAccountName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1480,8 +1452,6 @@ 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. @@ -1511,7 +1481,7 @@ class ScheduleOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - listByAutomationAccount(resourceGroupName, automationAccountName, options, optionalCallback) { + listByAutomationAccount(automationAccountName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1520,14 +1490,14 @@ class ScheduleOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._listByAutomationAccount(resourceGroupName, automationAccountName, options, (err, result, request, response) => { + self._listByAutomationAccount(automationAccountName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._listByAutomationAccount(resourceGroupName, automationAccountName, options, optionalCallback); + return self._listByAutomationAccount(automationAccountName, options, optionalCallback); } } diff --git a/lib/services/automationManagement/lib/operations/softwareUpdateConfigurationMachineRuns.js b/lib/services/automationManagement/lib/operations/softwareUpdateConfigurationMachineRuns.js index e70e258544..0e7ecad27e 100644 --- a/lib/services/automationManagement/lib/operations/softwareUpdateConfigurationMachineRuns.js +++ b/lib/services/automationManagement/lib/operations/softwareUpdateConfigurationMachineRuns.js @@ -17,18 +17,11 @@ 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 * @@ -46,7 +39,7 @@ const WebResource = msRest.WebResource; * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _getById(resourceGroupName, automationAccountName, softwareUpdateConfigurationMachineRunId, options, callback) { +function _getById(softwareUpdateConfigurationMachineRunId, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -56,30 +49,29 @@ function _getById(resourceGroupName, automationAccountName, softwareUpdateConfig 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 (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 || 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) { - if (resourceGroupName.match(/^[-\w\._]+$/) === null) + if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { + if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } - 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.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 (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 (clientRequestId !== null && clientRequestId !== undefined && typeof clientRequestId.valueOf() !== 'string') { - throw new Error('clientRequestId 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 (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.'); @@ -92,8 +84,8 @@ function _getById(resourceGroupName, automationAccountName, softwareUpdateConfig 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(resourceGroupName)); - requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(this.client.automationAccountName)); requestUrl = requestUrl.replace('{softwareUpdateConfigurationMachineRunId}', encodeURIComponent(softwareUpdateConfigurationMachineRunId.toString())); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); @@ -111,8 +103,8 @@ function _getById(resourceGroupName, automationAccountName, softwareUpdateConfig if (this.client.generateClientRequestId) { httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); } - if (clientRequestId !== undefined && clientRequestId !== null) { - httpRequest.headers['clientRequestId'] = clientRequestId; + if (this.client.clientRequestId !== undefined && this.client.clientRequestId !== null) { + httpRequest.headers['clientRequestId'] = this.client.clientRequestId; } if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { httpRequest.headers['accept-language'] = this.client.acceptLanguage; @@ -184,15 +176,8 @@ function _getById(resourceGroupName, automationAccountName, softwareUpdateConfig /** * 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' @@ -221,7 +206,7 @@ function _getById(resourceGroupName, automationAccountName, softwareUpdateConfig * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _list(resourceGroupName, automationAccountName, options, callback) { +function _list(options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -231,7 +216,6 @@ function _list(resourceGroupName, automationAccountName, 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; @@ -241,20 +225,20 @@ function _list(resourceGroupName, 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 (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 || 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) { - if (resourceGroupName.match(/^[-\w\._]+$/) === null) + if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { + if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } - 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.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 (clientRequestId !== null && clientRequestId !== undefined && typeof clientRequestId.valueOf() !== 'string') { - throw new Error('clientRequestId 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 (filter !== null && filter !== undefined && typeof filter.valueOf() !== 'string') { throw new Error('filter must be of type string.'); @@ -276,8 +260,8 @@ function _list(resourceGroupName, automationAccountName, 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(resourceGroupName)); - requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(this.client.automationAccountName)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); if (filter !== null && filter !== undefined) { @@ -303,8 +287,8 @@ function _list(resourceGroupName, automationAccountName, options, callback) { if (this.client.generateClientRequestId) { httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); } - if (clientRequestId !== undefined && clientRequestId !== null) { - httpRequest.headers['clientRequestId'] = clientRequestId; + if (this.client.clientRequestId !== undefined && this.client.clientRequestId !== null) { + httpRequest.headers['clientRequestId'] = this.client.clientRequestId; } if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { httpRequest.headers['accept-language'] = this.client.acceptLanguage; @@ -388,18 +372,11 @@ 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 * @@ -409,11 +386,11 @@ class SoftwareUpdateConfigurationMachineRuns { * * @reject {Error} - The error object. */ - getByIdWithHttpOperationResponse(resourceGroupName, automationAccountName, softwareUpdateConfigurationMachineRunId, options) { + getByIdWithHttpOperationResponse(softwareUpdateConfigurationMachineRunId, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._getById(resourceGroupName, automationAccountName, softwareUpdateConfigurationMachineRunId, options, (err, result, request, response) => { + self._getById(softwareUpdateConfigurationMachineRunId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -426,18 +403,11 @@ 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 * @@ -464,7 +434,7 @@ class SoftwareUpdateConfigurationMachineRuns { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getById(resourceGroupName, automationAccountName, softwareUpdateConfigurationMachineRunId, options, optionalCallback) { + getById(softwareUpdateConfigurationMachineRunId, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -473,29 +443,22 @@ class SoftwareUpdateConfigurationMachineRuns { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getById(resourceGroupName, automationAccountName, softwareUpdateConfigurationMachineRunId, options, (err, result, request, response) => { + self._getById(softwareUpdateConfigurationMachineRunId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getById(resourceGroupName, automationAccountName, softwareUpdateConfigurationMachineRunId, options, optionalCallback); + return self._getById(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' @@ -515,11 +478,11 @@ class SoftwareUpdateConfigurationMachineRuns { * * @reject {Error} - The error object. */ - listWithHttpOperationResponse(resourceGroupName, automationAccountName, options) { + listWithHttpOperationResponse(options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._list(resourceGroupName, automationAccountName, options, (err, result, request, response) => { + self._list(options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -532,15 +495,8 @@ 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' @@ -578,7 +534,7 @@ class SoftwareUpdateConfigurationMachineRuns { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - list(resourceGroupName, automationAccountName, options, optionalCallback) { + list(options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -587,14 +543,14 @@ class SoftwareUpdateConfigurationMachineRuns { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._list(resourceGroupName, automationAccountName, options, (err, result, request, response) => { + self._list(options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._list(resourceGroupName, automationAccountName, options, optionalCallback); + return self._list(options, optionalCallback); } } diff --git a/lib/services/automationManagement/lib/operations/softwareUpdateConfigurationRuns.js b/lib/services/automationManagement/lib/operations/softwareUpdateConfigurationRuns.js index 0aaec32ede..ed70966f40 100644 --- a/lib/services/automationManagement/lib/operations/softwareUpdateConfigurationRuns.js +++ b/lib/services/automationManagement/lib/operations/softwareUpdateConfigurationRuns.js @@ -17,18 +17,11 @@ 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 * @@ -46,7 +39,7 @@ const WebResource = msRest.WebResource; * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _getById(resourceGroupName, automationAccountName, softwareUpdateConfigurationRunId, options, callback) { +function _getById(softwareUpdateConfigurationRunId, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -56,30 +49,29 @@ function _getById(resourceGroupName, automationAccountName, softwareUpdateConfig 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 (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 || 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) { - if (resourceGroupName.match(/^[-\w\._]+$/) === null) + if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { + if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } - 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.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 (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 (clientRequestId !== null && clientRequestId !== undefined && typeof clientRequestId.valueOf() !== 'string') { - throw new Error('clientRequestId 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 (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.'); @@ -92,8 +84,8 @@ function _getById(resourceGroupName, automationAccountName, softwareUpdateConfig 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(resourceGroupName)); - requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(this.client.automationAccountName)); requestUrl = requestUrl.replace('{softwareUpdateConfigurationRunId}', encodeURIComponent(softwareUpdateConfigurationRunId.toString())); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); @@ -111,8 +103,8 @@ function _getById(resourceGroupName, automationAccountName, softwareUpdateConfig if (this.client.generateClientRequestId) { httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); } - if (clientRequestId !== undefined && clientRequestId !== null) { - httpRequest.headers['clientRequestId'] = clientRequestId; + if (this.client.clientRequestId !== undefined && this.client.clientRequestId !== null) { + httpRequest.headers['clientRequestId'] = this.client.clientRequestId; } if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { httpRequest.headers['accept-language'] = this.client.acceptLanguage; @@ -184,15 +176,8 @@ function _getById(resourceGroupName, automationAccountName, softwareUpdateConfig /** * 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' @@ -220,7 +205,7 @@ function _getById(resourceGroupName, automationAccountName, softwareUpdateConfig * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _list(resourceGroupName, automationAccountName, options, callback) { +function _list(options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -230,7 +215,6 @@ function _list(resourceGroupName, automationAccountName, 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; @@ -240,20 +224,20 @@ function _list(resourceGroupName, 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 (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 || 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) { - if (resourceGroupName.match(/^[-\w\._]+$/) === null) + if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { + if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } - 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.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 (clientRequestId !== null && clientRequestId !== undefined && typeof clientRequestId.valueOf() !== 'string') { - throw new Error('clientRequestId 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 (filter !== null && filter !== undefined && typeof filter.valueOf() !== 'string') { throw new Error('filter must be of type string.'); @@ -275,8 +259,8 @@ function _list(resourceGroupName, automationAccountName, 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(resourceGroupName)); - requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(this.client.automationAccountName)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); if (filter !== null && filter !== undefined) { @@ -302,8 +286,8 @@ function _list(resourceGroupName, automationAccountName, options, callback) { if (this.client.generateClientRequestId) { httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); } - if (clientRequestId !== undefined && clientRequestId !== null) { - httpRequest.headers['clientRequestId'] = clientRequestId; + if (this.client.clientRequestId !== undefined && this.client.clientRequestId !== null) { + httpRequest.headers['clientRequestId'] = this.client.clientRequestId; } if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { httpRequest.headers['accept-language'] = this.client.acceptLanguage; @@ -387,18 +371,11 @@ 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 * @@ -408,11 +385,11 @@ class SoftwareUpdateConfigurationRuns { * * @reject {Error} - The error object. */ - getByIdWithHttpOperationResponse(resourceGroupName, automationAccountName, softwareUpdateConfigurationRunId, options) { + getByIdWithHttpOperationResponse(softwareUpdateConfigurationRunId, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._getById(resourceGroupName, automationAccountName, softwareUpdateConfigurationRunId, options, (err, result, request, response) => { + self._getById(softwareUpdateConfigurationRunId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -425,18 +402,11 @@ 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 * @@ -463,7 +433,7 @@ class SoftwareUpdateConfigurationRuns { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getById(resourceGroupName, automationAccountName, softwareUpdateConfigurationRunId, options, optionalCallback) { + getById(softwareUpdateConfigurationRunId, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -472,29 +442,22 @@ class SoftwareUpdateConfigurationRuns { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getById(resourceGroupName, automationAccountName, softwareUpdateConfigurationRunId, options, (err, result, request, response) => { + self._getById(softwareUpdateConfigurationRunId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getById(resourceGroupName, automationAccountName, softwareUpdateConfigurationRunId, options, optionalCallback); + return self._getById(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' @@ -514,11 +477,11 @@ class SoftwareUpdateConfigurationRuns { * * @reject {Error} - The error object. */ - listWithHttpOperationResponse(resourceGroupName, automationAccountName, options) { + listWithHttpOperationResponse(options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._list(resourceGroupName, automationAccountName, options, (err, result, request, response) => { + self._list(options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -531,15 +494,8 @@ 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' @@ -576,7 +532,7 @@ class SoftwareUpdateConfigurationRuns { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - list(resourceGroupName, automationAccountName, options, optionalCallback) { + list(options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -585,14 +541,14 @@ class SoftwareUpdateConfigurationRuns { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._list(resourceGroupName, automationAccountName, options, (err, result, request, response) => { + self._list(options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._list(resourceGroupName, automationAccountName, options, optionalCallback); + return self._list(options, optionalCallback); } } diff --git a/lib/services/automationManagement/lib/operations/softwareUpdateConfigurations.js b/lib/services/automationManagement/lib/operations/softwareUpdateConfigurations.js index 24f7f61710..2bac5ec8b4 100644 --- a/lib/services/automationManagement/lib/operations/softwareUpdateConfigurations.js +++ b/lib/services/automationManagement/lib/operations/softwareUpdateConfigurations.js @@ -17,10 +17,6 @@ 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. * @@ -130,9 +126,6 @@ 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 * @@ -150,7 +143,7 @@ const WebResource = msRest.WebResource; * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _create(resourceGroupName, automationAccountName, softwareUpdateConfigurationName, parameters, options, callback) { +function _create(softwareUpdateConfigurationName, parameters, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -160,30 +153,29 @@ function _create(resourceGroupName, automationAccountName, softwareUpdateConfigu 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 (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 || 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) { - if (resourceGroupName.match(/^[-\w\._]+$/) === null) + if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { + if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } - 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.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 (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 (clientRequestId !== null && clientRequestId !== undefined && typeof clientRequestId.valueOf() !== 'string') { - throw new Error('clientRequestId 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 (parameters === null || parameters === undefined) { throw new Error('parameters cannot be null or undefined.'); @@ -199,8 +191,8 @@ function _create(resourceGroupName, automationAccountName, softwareUpdateConfigu 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(resourceGroupName)); - requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(this.client.automationAccountName)); requestUrl = requestUrl.replace('{softwareUpdateConfigurationName}', encodeURIComponent(softwareUpdateConfigurationName)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); @@ -218,8 +210,8 @@ function _create(resourceGroupName, automationAccountName, softwareUpdateConfigu if (this.client.generateClientRequestId) { httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); } - if (clientRequestId !== undefined && clientRequestId !== null) { - httpRequest.headers['clientRequestId'] = clientRequestId; + if (this.client.clientRequestId !== undefined && this.client.clientRequestId !== null) { + httpRequest.headers['clientRequestId'] = this.client.clientRequestId; } if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { httpRequest.headers['accept-language'] = this.client.acceptLanguage; @@ -322,18 +314,11 @@ function _create(resourceGroupName, automationAccountName, softwareUpdateConfigu /** * 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 * @@ -351,7 +336,7 @@ function _create(resourceGroupName, automationAccountName, softwareUpdateConfigu * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _getByName(resourceGroupName, automationAccountName, softwareUpdateConfigurationName, options, callback) { +function _getByName(softwareUpdateConfigurationName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -361,30 +346,29 @@ function _getByName(resourceGroupName, automationAccountName, softwareUpdateConf 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 (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 || 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) { - if (resourceGroupName.match(/^[-\w\._]+$/) === null) + if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { + if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } - 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.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 (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 (clientRequestId !== null && clientRequestId !== undefined && typeof clientRequestId.valueOf() !== 'string') { - throw new Error('clientRequestId 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 (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.'); @@ -397,8 +381,8 @@ function _getByName(resourceGroupName, automationAccountName, softwareUpdateConf 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(resourceGroupName)); - requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(this.client.automationAccountName)); requestUrl = requestUrl.replace('{softwareUpdateConfigurationName}', encodeURIComponent(softwareUpdateConfigurationName)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); @@ -416,8 +400,8 @@ function _getByName(resourceGroupName, automationAccountName, softwareUpdateConf if (this.client.generateClientRequestId) { httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); } - if (clientRequestId !== undefined && clientRequestId !== null) { - httpRequest.headers['clientRequestId'] = clientRequestId; + if (this.client.clientRequestId !== undefined && this.client.clientRequestId !== null) { + httpRequest.headers['clientRequestId'] = this.client.clientRequestId; } if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { httpRequest.headers['accept-language'] = this.client.acceptLanguage; @@ -489,18 +473,11 @@ function _getByName(resourceGroupName, automationAccountName, softwareUpdateConf /** * 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 * @@ -516,7 +493,7 @@ function _getByName(resourceGroupName, automationAccountName, softwareUpdateConf * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _deleteMethod(resourceGroupName, automationAccountName, softwareUpdateConfigurationName, options, callback) { +function _deleteMethod(softwareUpdateConfigurationName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -526,30 +503,29 @@ function _deleteMethod(resourceGroupName, automationAccountName, softwareUpdateC 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 (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 || 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) { - if (resourceGroupName.match(/^[-\w\._]+$/) === null) + if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { + if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } - 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.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 (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 (clientRequestId !== null && clientRequestId !== undefined && typeof clientRequestId.valueOf() !== 'string') { - throw new Error('clientRequestId 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 (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.'); @@ -562,8 +538,8 @@ function _deleteMethod(resourceGroupName, automationAccountName, softwareUpdateC 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(resourceGroupName)); - requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(this.client.automationAccountName)); requestUrl = requestUrl.replace('{softwareUpdateConfigurationName}', encodeURIComponent(softwareUpdateConfigurationName)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); @@ -581,8 +557,8 @@ function _deleteMethod(resourceGroupName, automationAccountName, softwareUpdateC if (this.client.generateClientRequestId) { httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); } - if (clientRequestId !== undefined && clientRequestId !== null) { - httpRequest.headers['clientRequestId'] = clientRequestId; + if (this.client.clientRequestId !== undefined && this.client.clientRequestId !== null) { + httpRequest.headers['clientRequestId'] = this.client.clientRequestId; } if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { httpRequest.headers['accept-language'] = this.client.acceptLanguage; @@ -637,15 +613,8 @@ function _deleteMethod(resourceGroupName, automationAccountName, softwareUpdateC /** * 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 @@ -665,7 +634,7 @@ function _deleteMethod(resourceGroupName, automationAccountName, softwareUpdateC * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _list(resourceGroupName, automationAccountName, options, callback) { +function _list(options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -675,7 +644,6 @@ function _list(resourceGroupName, automationAccountName, 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 @@ -683,20 +651,20 @@ function _list(resourceGroupName, 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 (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 || 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) { - if (resourceGroupName.match(/^[-\w\._]+$/) === null) + if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { + if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } - 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.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 (clientRequestId !== null && clientRequestId !== undefined && typeof clientRequestId.valueOf() !== 'string') { - throw new Error('clientRequestId 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 (filter !== null && filter !== undefined && typeof filter.valueOf() !== 'string') { throw new Error('filter must be of type string.'); @@ -712,8 +680,8 @@ function _list(resourceGroupName, automationAccountName, 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(resourceGroupName)); - requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(this.client.automationAccountName)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); if (filter !== null && filter !== undefined) { @@ -733,8 +701,8 @@ function _list(resourceGroupName, automationAccountName, options, callback) { if (this.client.generateClientRequestId) { httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); } - if (clientRequestId !== undefined && clientRequestId !== null) { - httpRequest.headers['clientRequestId'] = clientRequestId; + if (this.client.clientRequestId !== undefined && this.client.clientRequestId !== null) { + httpRequest.headers['clientRequestId'] = this.client.clientRequestId; } if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { httpRequest.headers['accept-language'] = this.client.acceptLanguage; @@ -820,10 +788,6 @@ 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. * @@ -933,9 +897,6 @@ 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 * @@ -945,11 +906,11 @@ class SoftwareUpdateConfigurations { * * @reject {Error} - The error object. */ - createWithHttpOperationResponse(resourceGroupName, automationAccountName, softwareUpdateConfigurationName, parameters, options) { + createWithHttpOperationResponse(softwareUpdateConfigurationName, parameters, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._create(resourceGroupName, automationAccountName, softwareUpdateConfigurationName, parameters, options, (err, result, request, response) => { + self._create(softwareUpdateConfigurationName, parameters, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -962,10 +923,6 @@ 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. * @@ -1075,9 +1032,6 @@ 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 * @@ -1104,7 +1058,7 @@ class SoftwareUpdateConfigurations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - create(resourceGroupName, automationAccountName, softwareUpdateConfigurationName, parameters, options, optionalCallback) { + create(softwareUpdateConfigurationName, parameters, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1113,32 +1067,25 @@ class SoftwareUpdateConfigurations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._create(resourceGroupName, automationAccountName, softwareUpdateConfigurationName, parameters, options, (err, result, request, response) => { + self._create(softwareUpdateConfigurationName, parameters, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._create(resourceGroupName, automationAccountName, softwareUpdateConfigurationName, parameters, options, optionalCallback); + return self._create(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 * @@ -1148,11 +1095,11 @@ class SoftwareUpdateConfigurations { * * @reject {Error} - The error object. */ - getByNameWithHttpOperationResponse(resourceGroupName, automationAccountName, softwareUpdateConfigurationName, options) { + getByNameWithHttpOperationResponse(softwareUpdateConfigurationName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._getByName(resourceGroupName, automationAccountName, softwareUpdateConfigurationName, options, (err, result, request, response) => { + self._getByName(softwareUpdateConfigurationName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1165,18 +1112,11 @@ 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 * @@ -1203,7 +1143,7 @@ class SoftwareUpdateConfigurations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getByName(resourceGroupName, automationAccountName, softwareUpdateConfigurationName, options, optionalCallback) { + getByName(softwareUpdateConfigurationName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1212,32 +1152,25 @@ class SoftwareUpdateConfigurations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getByName(resourceGroupName, automationAccountName, softwareUpdateConfigurationName, options, (err, result, request, response) => { + self._getByName(softwareUpdateConfigurationName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getByName(resourceGroupName, automationAccountName, softwareUpdateConfigurationName, options, optionalCallback); + return self._getByName(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 * @@ -1247,11 +1180,11 @@ class SoftwareUpdateConfigurations { * * @reject {Error} - The error object. */ - deleteMethodWithHttpOperationResponse(resourceGroupName, automationAccountName, softwareUpdateConfigurationName, options) { + deleteMethodWithHttpOperationResponse(softwareUpdateConfigurationName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._deleteMethod(resourceGroupName, automationAccountName, softwareUpdateConfigurationName, options, (err, result, request, response) => { + self._deleteMethod(softwareUpdateConfigurationName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1264,18 +1197,11 @@ 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 * @@ -1300,7 +1226,7 @@ class SoftwareUpdateConfigurations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(resourceGroupName, automationAccountName, softwareUpdateConfigurationName, options, optionalCallback) { + deleteMethod(softwareUpdateConfigurationName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1309,29 +1235,22 @@ class SoftwareUpdateConfigurations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._deleteMethod(resourceGroupName, automationAccountName, softwareUpdateConfigurationName, options, (err, result, request, response) => { + self._deleteMethod(softwareUpdateConfigurationName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._deleteMethod(resourceGroupName, automationAccountName, softwareUpdateConfigurationName, options, optionalCallback); + return self._deleteMethod(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 @@ -1343,11 +1262,11 @@ class SoftwareUpdateConfigurations { * * @reject {Error} - The error object. */ - listWithHttpOperationResponse(resourceGroupName, automationAccountName, options) { + listWithHttpOperationResponse(options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._list(resourceGroupName, automationAccountName, options, (err, result, request, response) => { + self._list(options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1360,15 +1279,8 @@ 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 @@ -1397,7 +1309,7 @@ class SoftwareUpdateConfigurations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - list(resourceGroupName, automationAccountName, options, optionalCallback) { + list(options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1406,14 +1318,14 @@ class SoftwareUpdateConfigurations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._list(resourceGroupName, automationAccountName, options, (err, result, request, response) => { + self._list(options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._list(resourceGroupName, automationAccountName, options, optionalCallback); + return self._list(options, optionalCallback); } } diff --git a/lib/services/automationManagement/lib/operations/sourceControlOperations.js b/lib/services/automationManagement/lib/operations/sourceControlOperations.js index 45f6f96beb..cc165f3f21 100644 --- a/lib/services/automationManagement/lib/operations/sourceControlOperations.js +++ b/lib/services/automationManagement/lib/operations/sourceControlOperations.js @@ -17,8 +17,6 @@ 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. @@ -69,7 +67,7 @@ const WebResource = msRest.WebResource; * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _createOrUpdate(resourceGroupName, automationAccountName, sourceControlName, parameters, options, callback) { +function _createOrUpdate(automationAccountName, sourceControlName, parameters, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -82,13 +80,13 @@ function _createOrUpdate(resourceGroupName, automationAccountName, sourceControl let apiVersion = '2017-05-15-preview'; // Validate try { - 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 || 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) { - if (resourceGroupName.match(/^[-\w\._]+$/) === null) + if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { + if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -113,7 +111,7 @@ function _createOrUpdate(resourceGroupName, automationAccountName, sourceControl // 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(resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{sourceControlName}', encodeURIComponent(sourceControlName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -235,8 +233,6 @@ function _createOrUpdate(resourceGroupName, automationAccountName, sourceControl /** * 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. @@ -280,7 +276,7 @@ function _createOrUpdate(resourceGroupName, automationAccountName, sourceControl * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _update(resourceGroupName, automationAccountName, sourceControlName, parameters, options, callback) { +function _update(automationAccountName, sourceControlName, parameters, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -293,13 +289,13 @@ function _update(resourceGroupName, automationAccountName, sourceControlName, pa let apiVersion = '2017-05-15-preview'; // Validate try { - 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 || 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) { - if (resourceGroupName.match(/^[-\w\._]+$/) === null) + if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { + if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -324,7 +320,7 @@ function _update(resourceGroupName, automationAccountName, sourceControlName, pa // 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(resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{sourceControlName}', encodeURIComponent(sourceControlName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -429,8 +425,6 @@ function _update(resourceGroupName, automationAccountName, sourceControlName, pa /** * 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. @@ -452,7 +446,7 @@ function _update(resourceGroupName, automationAccountName, sourceControlName, pa * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _deleteMethod(resourceGroupName, automationAccountName, sourceControlName, options, callback) { +function _deleteMethod(automationAccountName, sourceControlName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -465,13 +459,13 @@ function _deleteMethod(resourceGroupName, automationAccountName, sourceControlNa let apiVersion = '2017-05-15-preview'; // Validate try { - 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 || 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) { - if (resourceGroupName.match(/^[-\w\._]+$/) === null) + if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { + if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -493,7 +487,7 @@ function _deleteMethod(resourceGroupName, automationAccountName, sourceControlNa // 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(resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{sourceControlName}', encodeURIComponent(sourceControlName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -567,8 +561,6 @@ function _deleteMethod(resourceGroupName, automationAccountName, sourceControlNa /** * 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. @@ -591,7 +583,7 @@ function _deleteMethod(resourceGroupName, automationAccountName, sourceControlNa * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _get(resourceGroupName, automationAccountName, sourceControlName, options, callback) { +function _get(automationAccountName, sourceControlName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -604,13 +596,13 @@ function _get(resourceGroupName, automationAccountName, sourceControlName, optio let apiVersion = '2017-05-15-preview'; // Validate try { - 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 || 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) { - if (resourceGroupName.match(/^[-\w\._]+$/) === null) + if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { + if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -632,7 +624,7 @@ function _get(resourceGroupName, automationAccountName, sourceControlName, optio // 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(resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{sourceControlName}', encodeURIComponent(sourceControlName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -723,8 +715,6 @@ function _get(resourceGroupName, automationAccountName, sourceControlName, optio /** * 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. @@ -748,7 +738,7 @@ function _get(resourceGroupName, automationAccountName, sourceControlName, optio * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _listByAutomationAccount(resourceGroupName, automationAccountName, options, callback) { +function _listByAutomationAccount(automationAccountName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -762,13 +752,13 @@ function _listByAutomationAccount(resourceGroupName, automationAccountName, opti let apiVersion = '2017-05-15-preview'; // Validate try { - 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 || 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) { - if (resourceGroupName.match(/^[-\w\._]+$/) === null) + if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { + if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -790,7 +780,7 @@ function _listByAutomationAccount(resourceGroupName, automationAccountName, opti // 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(resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; @@ -1028,8 +1018,6 @@ 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. @@ -1073,11 +1061,11 @@ class SourceControlOperations { * * @reject {Error} - The error object. */ - createOrUpdateWithHttpOperationResponse(resourceGroupName, automationAccountName, sourceControlName, parameters, options) { + createOrUpdateWithHttpOperationResponse(automationAccountName, sourceControlName, parameters, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._createOrUpdate(resourceGroupName, automationAccountName, sourceControlName, parameters, options, (err, result, request, response) => { + self._createOrUpdate(automationAccountName, sourceControlName, parameters, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1090,8 +1078,6 @@ 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. @@ -1151,7 +1137,7 @@ class SourceControlOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - createOrUpdate(resourceGroupName, automationAccountName, sourceControlName, parameters, options, optionalCallback) { + createOrUpdate(automationAccountName, sourceControlName, parameters, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1160,22 +1146,20 @@ class SourceControlOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._createOrUpdate(resourceGroupName, automationAccountName, sourceControlName, parameters, options, (err, result, request, response) => { + self._createOrUpdate(automationAccountName, sourceControlName, parameters, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._createOrUpdate(resourceGroupName, automationAccountName, sourceControlName, parameters, options, optionalCallback); + return self._createOrUpdate(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. @@ -1212,11 +1196,11 @@ class SourceControlOperations { * * @reject {Error} - The error object. */ - updateWithHttpOperationResponse(resourceGroupName, automationAccountName, sourceControlName, parameters, options) { + updateWithHttpOperationResponse(automationAccountName, sourceControlName, parameters, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._update(resourceGroupName, automationAccountName, sourceControlName, parameters, options, (err, result, request, response) => { + self._update(automationAccountName, sourceControlName, parameters, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1229,8 +1213,6 @@ 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. @@ -1283,7 +1265,7 @@ class SourceControlOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - update(resourceGroupName, automationAccountName, sourceControlName, parameters, options, optionalCallback) { + update(automationAccountName, sourceControlName, parameters, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1292,22 +1274,20 @@ class SourceControlOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._update(resourceGroupName, automationAccountName, sourceControlName, parameters, options, (err, result, request, response) => { + self._update(automationAccountName, sourceControlName, parameters, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._update(resourceGroupName, automationAccountName, sourceControlName, parameters, options, optionalCallback); + return self._update(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. @@ -1323,11 +1303,11 @@ class SourceControlOperations { * * @reject {Error} - The error object. */ - deleteMethodWithHttpOperationResponse(resourceGroupName, automationAccountName, sourceControlName, options) { + deleteMethodWithHttpOperationResponse(automationAccountName, sourceControlName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._deleteMethod(resourceGroupName, automationAccountName, sourceControlName, options, (err, result, request, response) => { + self._deleteMethod(automationAccountName, sourceControlName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1340,8 +1320,6 @@ 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. @@ -1372,7 +1350,7 @@ class SourceControlOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(resourceGroupName, automationAccountName, sourceControlName, options, optionalCallback) { + deleteMethod(automationAccountName, sourceControlName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1381,22 +1359,20 @@ class SourceControlOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._deleteMethod(resourceGroupName, automationAccountName, sourceControlName, options, (err, result, request, response) => { + self._deleteMethod(automationAccountName, sourceControlName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._deleteMethod(resourceGroupName, automationAccountName, sourceControlName, options, optionalCallback); + return self._deleteMethod(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. @@ -1412,11 +1388,11 @@ class SourceControlOperations { * * @reject {Error} - The error object. */ - getWithHttpOperationResponse(resourceGroupName, automationAccountName, sourceControlName, options) { + getWithHttpOperationResponse(automationAccountName, sourceControlName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._get(resourceGroupName, automationAccountName, sourceControlName, options, (err, result, request, response) => { + self._get(automationAccountName, sourceControlName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1429,8 +1405,6 @@ 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. @@ -1462,7 +1436,7 @@ class SourceControlOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - get(resourceGroupName, automationAccountName, sourceControlName, options, optionalCallback) { + get(automationAccountName, sourceControlName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1471,22 +1445,20 @@ class SourceControlOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._get(resourceGroupName, automationAccountName, sourceControlName, options, (err, result, request, response) => { + self._get(automationAccountName, sourceControlName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._get(resourceGroupName, automationAccountName, sourceControlName, options, optionalCallback); + return self._get(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. @@ -1502,11 +1474,11 @@ class SourceControlOperations { * * @reject {Error} - The error object. */ - listByAutomationAccountWithHttpOperationResponse(resourceGroupName, automationAccountName, options) { + listByAutomationAccountWithHttpOperationResponse(automationAccountName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._listByAutomationAccount(resourceGroupName, automationAccountName, options, (err, result, request, response) => { + self._listByAutomationAccount(automationAccountName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1519,8 +1491,6 @@ 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. @@ -1553,7 +1523,7 @@ class SourceControlOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - listByAutomationAccount(resourceGroupName, automationAccountName, options, optionalCallback) { + listByAutomationAccount(automationAccountName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1562,14 +1532,14 @@ class SourceControlOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._listByAutomationAccount(resourceGroupName, automationAccountName, options, (err, result, request, response) => { + self._listByAutomationAccount(automationAccountName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._listByAutomationAccount(resourceGroupName, automationAccountName, options, optionalCallback); + return self._listByAutomationAccount(automationAccountName, options, optionalCallback); } } diff --git a/lib/services/automationManagement/lib/operations/sourceControlSyncJobOperations.js b/lib/services/automationManagement/lib/operations/sourceControlSyncJobOperations.js index d0159af758..9c083f2028 100644 --- a/lib/services/automationManagement/lib/operations/sourceControlSyncJobOperations.js +++ b/lib/services/automationManagement/lib/operations/sourceControlSyncJobOperations.js @@ -17,8 +17,6 @@ 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. @@ -43,7 +41,7 @@ const WebResource = msRest.WebResource; * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _create(resourceGroupName, automationAccountName, sourceControlName, sourceControlSyncJobId, options, callback) { +function _create(automationAccountName, sourceControlName, sourceControlSyncJobId, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -56,13 +54,13 @@ function _create(resourceGroupName, automationAccountName, sourceControlName, so let apiVersion = '2017-05-15-preview'; // Validate try { - 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 || 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) { - if (resourceGroupName.match(/^[-\w\._]+$/) === null) + if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { + if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -87,7 +85,7 @@ function _create(resourceGroupName, automationAccountName, sourceControlName, so // 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(resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{sourceControlName}', encodeURIComponent(sourceControlName)); requestUrl = requestUrl.replace('{sourceControlSyncJobId}', encodeURIComponent(sourceControlSyncJobId.toString())); @@ -179,8 +177,6 @@ function _create(resourceGroupName, automationAccountName, sourceControlName, so /** * 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. @@ -206,7 +202,7 @@ function _create(resourceGroupName, automationAccountName, sourceControlName, so * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _get(resourceGroupName, automationAccountName, sourceControlName, sourceControlSyncJobId, options, callback) { +function _get(automationAccountName, sourceControlName, sourceControlSyncJobId, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -219,13 +215,13 @@ function _get(resourceGroupName, automationAccountName, sourceControlName, sourc let apiVersion = '2017-05-15-preview'; // Validate try { - 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 || 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) { - if (resourceGroupName.match(/^[-\w\._]+$/) === null) + if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { + if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -250,7 +246,7 @@ function _get(resourceGroupName, automationAccountName, sourceControlName, sourc // 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(resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{sourceControlName}', encodeURIComponent(sourceControlName)); requestUrl = requestUrl.replace('{sourceControlSyncJobId}', encodeURIComponent(sourceControlSyncJobId.toString())); @@ -342,8 +338,6 @@ function _get(resourceGroupName, automationAccountName, sourceControlName, sourc /** * 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. @@ -369,7 +363,7 @@ function _get(resourceGroupName, automationAccountName, sourceControlName, sourc * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _listByAutomationAccount(resourceGroupName, automationAccountName, sourceControlName, options, callback) { +function _listByAutomationAccount(automationAccountName, sourceControlName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -383,13 +377,13 @@ function _listByAutomationAccount(resourceGroupName, automationAccountName, sour let apiVersion = '2017-05-15-preview'; // Validate try { - 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 || 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) { - if (resourceGroupName.match(/^[-\w\._]+$/) === null) + if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { + if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -414,7 +408,7 @@ function _listByAutomationAccount(resourceGroupName, automationAccountName, sour // 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(resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{sourceControlName}', encodeURIComponent(sourceControlName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -651,8 +645,6 @@ 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. @@ -670,11 +662,11 @@ class SourceControlSyncJobOperations { * * @reject {Error} - The error object. */ - createWithHttpOperationResponse(resourceGroupName, automationAccountName, sourceControlName, sourceControlSyncJobId, options) { + createWithHttpOperationResponse(automationAccountName, sourceControlName, sourceControlSyncJobId, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._create(resourceGroupName, automationAccountName, sourceControlName, sourceControlSyncJobId, options, (err, result, request, response) => { + self._create(automationAccountName, sourceControlName, sourceControlSyncJobId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -687,8 +679,6 @@ 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. @@ -722,7 +712,7 @@ class SourceControlSyncJobOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - create(resourceGroupName, automationAccountName, sourceControlName, sourceControlSyncJobId, options, optionalCallback) { + create(automationAccountName, sourceControlName, sourceControlSyncJobId, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -731,22 +721,20 @@ class SourceControlSyncJobOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._create(resourceGroupName, automationAccountName, sourceControlName, sourceControlSyncJobId, options, (err, result, request, response) => { + self._create(automationAccountName, sourceControlName, sourceControlSyncJobId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._create(resourceGroupName, automationAccountName, sourceControlName, sourceControlSyncJobId, options, optionalCallback); + return self._create(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. @@ -764,11 +752,11 @@ class SourceControlSyncJobOperations { * * @reject {Error} - The error object. */ - getWithHttpOperationResponse(resourceGroupName, automationAccountName, sourceControlName, sourceControlSyncJobId, options) { + getWithHttpOperationResponse(automationAccountName, sourceControlName, sourceControlSyncJobId, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._get(resourceGroupName, automationAccountName, sourceControlName, sourceControlSyncJobId, options, (err, result, request, response) => { + self._get(automationAccountName, sourceControlName, sourceControlSyncJobId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -781,8 +769,6 @@ 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. @@ -817,7 +803,7 @@ class SourceControlSyncJobOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - get(resourceGroupName, automationAccountName, sourceControlName, sourceControlSyncJobId, options, optionalCallback) { + get(automationAccountName, sourceControlName, sourceControlSyncJobId, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -826,22 +812,20 @@ class SourceControlSyncJobOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._get(resourceGroupName, automationAccountName, sourceControlName, sourceControlSyncJobId, options, (err, result, request, response) => { + self._get(automationAccountName, sourceControlName, sourceControlSyncJobId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._get(resourceGroupName, automationAccountName, sourceControlName, sourceControlSyncJobId, options, optionalCallback); + return self._get(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. @@ -859,11 +843,11 @@ class SourceControlSyncJobOperations { * * @reject {Error} - The error object. */ - listByAutomationAccountWithHttpOperationResponse(resourceGroupName, automationAccountName, sourceControlName, options) { + listByAutomationAccountWithHttpOperationResponse(automationAccountName, sourceControlName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._listByAutomationAccount(resourceGroupName, automationAccountName, sourceControlName, options, (err, result, request, response) => { + self._listByAutomationAccount(automationAccountName, sourceControlName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -876,8 +860,6 @@ 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. @@ -912,7 +894,7 @@ class SourceControlSyncJobOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - listByAutomationAccount(resourceGroupName, automationAccountName, sourceControlName, options, optionalCallback) { + listByAutomationAccount(automationAccountName, sourceControlName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -921,14 +903,14 @@ class SourceControlSyncJobOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._listByAutomationAccount(resourceGroupName, automationAccountName, sourceControlName, options, (err, result, request, response) => { + self._listByAutomationAccount(automationAccountName, sourceControlName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._listByAutomationAccount(resourceGroupName, automationAccountName, sourceControlName, options, optionalCallback); + return self._listByAutomationAccount(automationAccountName, sourceControlName, options, optionalCallback); } } diff --git a/lib/services/automationManagement/lib/operations/testJobOperations.js b/lib/services/automationManagement/lib/operations/testJobOperations.js index d6bdd29dcc..fe584dc175 100644 --- a/lib/services/automationManagement/lib/operations/testJobOperations.js +++ b/lib/services/automationManagement/lib/operations/testJobOperations.js @@ -17,8 +17,6 @@ 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 @@ -51,7 +49,7 @@ const WebResource = msRest.WebResource; * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _create(resourceGroupName, automationAccountName, runbookName, parameters, options, callback) { +function _create(automationAccountName, runbookName, parameters, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -67,13 +65,13 @@ function _create(resourceGroupName, automationAccountName, runbookName, paramete 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 (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 || 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) { - if (resourceGroupName.match(/^[-\w\._]+$/) === null) + if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { + if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -96,7 +94,7 @@ function _create(resourceGroupName, automationAccountName, runbookName, paramete 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(resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{runbookName}', encodeURIComponent(runbookName)); let queryParameters = []; @@ -200,8 +198,6 @@ function _create(resourceGroupName, automationAccountName, runbookName, paramete /** * 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. @@ -224,7 +220,7 @@ function _create(resourceGroupName, automationAccountName, runbookName, paramete * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _get(resourceGroupName, automationAccountName, runbookName, options, callback) { +function _get(automationAccountName, runbookName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -240,13 +236,13 @@ function _get(resourceGroupName, automationAccountName, runbookName, options, ca 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 (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 || 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) { - if (resourceGroupName.match(/^[-\w\._]+$/) === null) + if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { + if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -266,7 +262,7 @@ function _get(resourceGroupName, automationAccountName, runbookName, options, ca 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(resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{runbookName}', encodeURIComponent(runbookName)); let queryParameters = []; @@ -356,8 +352,6 @@ function _get(resourceGroupName, automationAccountName, runbookName, options, ca /** * Resume the test job. * - * @param {string} resourceGroupName The resource group name. - * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -379,7 +373,7 @@ function _get(resourceGroupName, automationAccountName, runbookName, options, ca * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _resume(resourceGroupName, automationAccountName, runbookName, options, callback) { +function _resume(automationAccountName, runbookName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -395,13 +389,13 @@ function _resume(resourceGroupName, automationAccountName, runbookName, 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 (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 || 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) { - if (resourceGroupName.match(/^[-\w\._]+$/) === null) + if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { + if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -421,7 +415,7 @@ function _resume(resourceGroupName, automationAccountName, runbookName, options, 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(resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{runbookName}', encodeURIComponent(runbookName)); let queryParameters = []; @@ -494,8 +488,6 @@ function _resume(resourceGroupName, automationAccountName, runbookName, options, /** * Stop the test job. * - * @param {string} resourceGroupName The resource group name. - * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -517,7 +509,7 @@ function _resume(resourceGroupName, automationAccountName, runbookName, options, * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _stop(resourceGroupName, automationAccountName, runbookName, options, callback) { +function _stop(automationAccountName, runbookName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -533,13 +525,13 @@ function _stop(resourceGroupName, automationAccountName, runbookName, options, c 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 (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 || 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) { - if (resourceGroupName.match(/^[-\w\._]+$/) === null) + if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { + if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -559,7 +551,7 @@ function _stop(resourceGroupName, automationAccountName, runbookName, options, c 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(resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{runbookName}', encodeURIComponent(runbookName)); let queryParameters = []; @@ -632,8 +624,6 @@ function _stop(resourceGroupName, automationAccountName, runbookName, options, c /** * Suspend the test job. * - * @param {string} resourceGroupName The resource group name. - * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -655,7 +645,7 @@ function _stop(resourceGroupName, automationAccountName, runbookName, options, c * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _suspend(resourceGroupName, automationAccountName, runbookName, options, callback) { +function _suspend(automationAccountName, runbookName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -671,13 +661,13 @@ function _suspend(resourceGroupName, automationAccountName, runbookName, 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 (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 || 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) { - if (resourceGroupName.match(/^[-\w\._]+$/) === null) + if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { + if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -697,7 +687,7 @@ function _suspend(resourceGroupName, automationAccountName, runbookName, options 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(resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{runbookName}', encodeURIComponent(runbookName)); let queryParameters = []; @@ -785,8 +775,6 @@ 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 @@ -812,11 +800,11 @@ class TestJobOperations { * * @reject {Error} - The error object. */ - createWithHttpOperationResponse(resourceGroupName, automationAccountName, runbookName, parameters, options) { + createWithHttpOperationResponse(automationAccountName, runbookName, parameters, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._create(resourceGroupName, automationAccountName, runbookName, parameters, options, (err, result, request, response) => { + self._create(automationAccountName, runbookName, parameters, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -829,8 +817,6 @@ 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 @@ -872,7 +858,7 @@ class TestJobOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - create(resourceGroupName, automationAccountName, runbookName, parameters, options, optionalCallback) { + create(automationAccountName, runbookName, parameters, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -881,22 +867,20 @@ class TestJobOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._create(resourceGroupName, automationAccountName, runbookName, parameters, options, (err, result, request, response) => { + self._create(automationAccountName, runbookName, parameters, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._create(resourceGroupName, automationAccountName, runbookName, parameters, options, optionalCallback); + return self._create(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. @@ -912,11 +896,11 @@ class TestJobOperations { * * @reject {Error} - The error object. */ - getWithHttpOperationResponse(resourceGroupName, automationAccountName, runbookName, options) { + getWithHttpOperationResponse(automationAccountName, runbookName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._get(resourceGroupName, automationAccountName, runbookName, options, (err, result, request, response) => { + self._get(automationAccountName, runbookName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -929,8 +913,6 @@ 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. @@ -962,7 +944,7 @@ class TestJobOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - get(resourceGroupName, automationAccountName, runbookName, options, optionalCallback) { + get(automationAccountName, runbookName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -971,22 +953,20 @@ class TestJobOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._get(resourceGroupName, automationAccountName, runbookName, options, (err, result, request, response) => { + self._get(automationAccountName, runbookName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._get(resourceGroupName, automationAccountName, runbookName, options, optionalCallback); + return self._get(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. @@ -1002,11 +982,11 @@ class TestJobOperations { * * @reject {Error} - The error object. */ - resumeWithHttpOperationResponse(resourceGroupName, automationAccountName, runbookName, options) { + resumeWithHttpOperationResponse(automationAccountName, runbookName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._resume(resourceGroupName, automationAccountName, runbookName, options, (err, result, request, response) => { + self._resume(automationAccountName, runbookName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1019,8 +999,6 @@ 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. @@ -1051,7 +1029,7 @@ class TestJobOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - resume(resourceGroupName, automationAccountName, runbookName, options, optionalCallback) { + resume(automationAccountName, runbookName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1060,22 +1038,20 @@ class TestJobOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._resume(resourceGroupName, automationAccountName, runbookName, options, (err, result, request, response) => { + self._resume(automationAccountName, runbookName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._resume(resourceGroupName, automationAccountName, runbookName, options, optionalCallback); + return self._resume(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. @@ -1091,11 +1067,11 @@ class TestJobOperations { * * @reject {Error} - The error object. */ - stopWithHttpOperationResponse(resourceGroupName, automationAccountName, runbookName, options) { + stopWithHttpOperationResponse(automationAccountName, runbookName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._stop(resourceGroupName, automationAccountName, runbookName, options, (err, result, request, response) => { + self._stop(automationAccountName, runbookName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1108,8 +1084,6 @@ 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. @@ -1140,7 +1114,7 @@ class TestJobOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - stop(resourceGroupName, automationAccountName, runbookName, options, optionalCallback) { + stop(automationAccountName, runbookName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1149,22 +1123,20 @@ class TestJobOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._stop(resourceGroupName, automationAccountName, runbookName, options, (err, result, request, response) => { + self._stop(automationAccountName, runbookName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._stop(resourceGroupName, automationAccountName, runbookName, options, optionalCallback); + return self._stop(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. @@ -1180,11 +1152,11 @@ class TestJobOperations { * * @reject {Error} - The error object. */ - suspendWithHttpOperationResponse(resourceGroupName, automationAccountName, runbookName, options) { + suspendWithHttpOperationResponse(automationAccountName, runbookName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._suspend(resourceGroupName, automationAccountName, runbookName, options, (err, result, request, response) => { + self._suspend(automationAccountName, runbookName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1197,8 +1169,6 @@ 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. @@ -1229,7 +1199,7 @@ class TestJobOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - suspend(resourceGroupName, automationAccountName, runbookName, options, optionalCallback) { + suspend(automationAccountName, runbookName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1238,14 +1208,14 @@ class TestJobOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._suspend(resourceGroupName, automationAccountName, runbookName, options, (err, result, request, response) => { + self._suspend(automationAccountName, runbookName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._suspend(resourceGroupName, automationAccountName, runbookName, options, optionalCallback); + return self._suspend(automationAccountName, runbookName, options, optionalCallback); } } diff --git a/lib/services/automationManagement/lib/operations/testJobStreams.js b/lib/services/automationManagement/lib/operations/testJobStreams.js index 7ca01bb89b..028a130fda 100644 --- a/lib/services/automationManagement/lib/operations/testJobStreams.js +++ b/lib/services/automationManagement/lib/operations/testJobStreams.js @@ -18,8 +18,6 @@ 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. @@ -44,7 +42,7 @@ const WebResource = msRest.WebResource; * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _get(resourceGroupName, automationAccountName, runbookName, jobStreamId, options, callback) { +function _get(automationAccountName, runbookName, jobStreamId, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -60,13 +58,13 @@ function _get(resourceGroupName, automationAccountName, runbookName, jobStreamId 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 (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 || 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) { - if (resourceGroupName.match(/^[-\w\._]+$/) === null) + if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { + if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -89,7 +87,7 @@ function _get(resourceGroupName, automationAccountName, runbookName, jobStreamId 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(resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{runbookName}', encodeURIComponent(runbookName)); requestUrl = requestUrl.replace('{jobStreamId}', encodeURIComponent(jobStreamId)); @@ -180,8 +178,6 @@ function _get(resourceGroupName, automationAccountName, runbookName, jobStreamId /** * 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. @@ -206,7 +202,7 @@ function _get(resourceGroupName, automationAccountName, runbookName, jobStreamId * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _listByTestJob(resourceGroupName, automationAccountName, runbookName, options, callback) { +function _listByTestJob(automationAccountName, runbookName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -223,13 +219,13 @@ function _listByTestJob(resourceGroupName, automationAccountName, runbookName, o 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 (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 || 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) { - if (resourceGroupName.match(/^[-\w\._]+$/) === null) + if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { + if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -252,7 +248,7 @@ function _listByTestJob(resourceGroupName, automationAccountName, runbookName, o 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(resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{runbookName}', encodeURIComponent(runbookName)); let queryParameters = []; @@ -487,8 +483,6 @@ 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. @@ -506,11 +500,11 @@ class TestJobStreams { * * @reject {Error} - The error object. */ - getWithHttpOperationResponse(resourceGroupName, automationAccountName, runbookName, jobStreamId, options) { + getWithHttpOperationResponse(automationAccountName, runbookName, jobStreamId, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._get(resourceGroupName, automationAccountName, runbookName, jobStreamId, options, (err, result, request, response) => { + self._get(automationAccountName, runbookName, jobStreamId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -524,8 +518,6 @@ 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. @@ -559,7 +551,7 @@ class TestJobStreams { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - get(resourceGroupName, automationAccountName, runbookName, jobStreamId, options, optionalCallback) { + get(automationAccountName, runbookName, jobStreamId, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -568,22 +560,20 @@ class TestJobStreams { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._get(resourceGroupName, automationAccountName, runbookName, jobStreamId, options, (err, result, request, response) => { + self._get(automationAccountName, runbookName, jobStreamId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._get(resourceGroupName, automationAccountName, runbookName, jobStreamId, options, optionalCallback); + return self._get(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. @@ -601,11 +591,11 @@ class TestJobStreams { * * @reject {Error} - The error object. */ - listByTestJobWithHttpOperationResponse(resourceGroupName, automationAccountName, runbookName, options) { + listByTestJobWithHttpOperationResponse(automationAccountName, runbookName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._listByTestJob(resourceGroupName, automationAccountName, runbookName, options, (err, result, request, response) => { + self._listByTestJob(automationAccountName, runbookName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -618,8 +608,6 @@ 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. @@ -653,7 +641,7 @@ class TestJobStreams { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - listByTestJob(resourceGroupName, automationAccountName, runbookName, options, optionalCallback) { + listByTestJob(automationAccountName, runbookName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -662,14 +650,14 @@ class TestJobStreams { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._listByTestJob(resourceGroupName, automationAccountName, runbookName, options, (err, result, request, response) => { + self._listByTestJob(automationAccountName, runbookName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._listByTestJob(resourceGroupName, automationAccountName, runbookName, options, optionalCallback); + return self._listByTestJob(automationAccountName, runbookName, options, optionalCallback); } } diff --git a/lib/services/automationManagement/lib/operations/variableOperations.js b/lib/services/automationManagement/lib/operations/variableOperations.js index 8717c55b1e..704a306729 100644 --- a/lib/services/automationManagement/lib/operations/variableOperations.js +++ b/lib/services/automationManagement/lib/operations/variableOperations.js @@ -17,8 +17,6 @@ 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. @@ -54,7 +52,7 @@ const WebResource = msRest.WebResource; * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _createOrUpdate(resourceGroupName, automationAccountName, variableName, parameters, options, callback) { +function _createOrUpdate(automationAccountName, variableName, parameters, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -67,13 +65,13 @@ function _createOrUpdate(resourceGroupName, automationAccountName, variableName, let apiVersion = '2015-10-31'; // Validate try { - 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 || 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) { - if (resourceGroupName.match(/^[-\w\._]+$/) === null) + if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { + if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -98,7 +96,7 @@ function _createOrUpdate(resourceGroupName, automationAccountName, variableName, // 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(resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{variableName}', encodeURIComponent(variableName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -220,8 +218,6 @@ function _createOrUpdate(resourceGroupName, automationAccountName, variableName, /** * Update a variable. * - * @param {string} resourceGroupName The resource group name. - * * @param {string} automationAccountName The automation account name. * * @param {string} variableName The variable name. @@ -254,7 +250,7 @@ function _createOrUpdate(resourceGroupName, automationAccountName, variableName, * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _update(resourceGroupName, automationAccountName, variableName, parameters, options, callback) { +function _update(automationAccountName, variableName, parameters, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -267,13 +263,13 @@ function _update(resourceGroupName, automationAccountName, variableName, paramet let apiVersion = '2015-10-31'; // Validate try { - 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 || 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) { - if (resourceGroupName.match(/^[-\w\._]+$/) === null) + if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { + if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -298,7 +294,7 @@ function _update(resourceGroupName, automationAccountName, variableName, paramet // 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(resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{variableName}', encodeURIComponent(variableName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -403,8 +399,6 @@ function _update(resourceGroupName, automationAccountName, variableName, paramet /** * Delete the variable. * - * @param {string} resourceGroupName The resource group name. - * * @param {string} automationAccountName The automation account name. * * @param {string} variableName The name of variable. @@ -426,7 +420,7 @@ function _update(resourceGroupName, automationAccountName, variableName, paramet * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _deleteMethod(resourceGroupName, automationAccountName, variableName, options, callback) { +function _deleteMethod(automationAccountName, variableName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -439,13 +433,13 @@ function _deleteMethod(resourceGroupName, automationAccountName, variableName, o let apiVersion = '2015-10-31'; // Validate try { - 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 || 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) { - if (resourceGroupName.match(/^[-\w\._]+$/) === null) + if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { + if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -467,7 +461,7 @@ function _deleteMethod(resourceGroupName, automationAccountName, variableName, o // 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(resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{variableName}', encodeURIComponent(variableName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -541,8 +535,6 @@ function _deleteMethod(resourceGroupName, automationAccountName, variableName, o /** * 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. @@ -565,7 +557,7 @@ function _deleteMethod(resourceGroupName, automationAccountName, variableName, o * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _get(resourceGroupName, automationAccountName, variableName, options, callback) { +function _get(automationAccountName, variableName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -578,13 +570,13 @@ function _get(resourceGroupName, automationAccountName, variableName, options, c let apiVersion = '2015-10-31'; // Validate try { - 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 || 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) { - if (resourceGroupName.match(/^[-\w\._]+$/) === null) + if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { + if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -606,7 +598,7 @@ function _get(resourceGroupName, automationAccountName, variableName, options, c // 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(resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{variableName}', encodeURIComponent(variableName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -697,8 +689,6 @@ function _get(resourceGroupName, automationAccountName, variableName, options, c /** * Retrieve a list of variables. * - * @param {string} resourceGroupName The resource group name. - * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -719,7 +709,7 @@ function _get(resourceGroupName, automationAccountName, variableName, options, c * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _listByAutomationAccount(resourceGroupName, automationAccountName, options, callback) { +function _listByAutomationAccount(automationAccountName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -732,13 +722,13 @@ function _listByAutomationAccount(resourceGroupName, automationAccountName, opti let apiVersion = '2015-10-31'; // Validate try { - 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 || 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) { - if (resourceGroupName.match(/^[-\w\._]+$/) === null) + if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { + if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -757,7 +747,7 @@ function _listByAutomationAccount(resourceGroupName, automationAccountName, opti // 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(resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; @@ -991,8 +981,6 @@ 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. @@ -1021,11 +1009,11 @@ class VariableOperations { * * @reject {Error} - The error object. */ - createOrUpdateWithHttpOperationResponse(resourceGroupName, automationAccountName, variableName, parameters, options) { + createOrUpdateWithHttpOperationResponse(automationAccountName, variableName, parameters, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._createOrUpdate(resourceGroupName, automationAccountName, variableName, parameters, options, (err, result, request, response) => { + self._createOrUpdate(automationAccountName, variableName, parameters, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1038,8 +1026,6 @@ 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. @@ -1084,7 +1070,7 @@ class VariableOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - createOrUpdate(resourceGroupName, automationAccountName, variableName, parameters, options, optionalCallback) { + createOrUpdate(automationAccountName, variableName, parameters, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1093,22 +1079,20 @@ class VariableOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._createOrUpdate(resourceGroupName, automationAccountName, variableName, parameters, options, (err, result, request, response) => { + self._createOrUpdate(automationAccountName, variableName, parameters, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._createOrUpdate(resourceGroupName, automationAccountName, variableName, parameters, options, optionalCallback); + return self._createOrUpdate(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. @@ -1134,11 +1118,11 @@ class VariableOperations { * * @reject {Error} - The error object. */ - updateWithHttpOperationResponse(resourceGroupName, automationAccountName, variableName, parameters, options) { + updateWithHttpOperationResponse(automationAccountName, variableName, parameters, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._update(resourceGroupName, automationAccountName, variableName, parameters, options, (err, result, request, response) => { + self._update(automationAccountName, variableName, parameters, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1151,8 +1135,6 @@ 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. @@ -1194,7 +1176,7 @@ class VariableOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - update(resourceGroupName, automationAccountName, variableName, parameters, options, optionalCallback) { + update(automationAccountName, variableName, parameters, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1203,22 +1185,20 @@ class VariableOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._update(resourceGroupName, automationAccountName, variableName, parameters, options, (err, result, request, response) => { + self._update(automationAccountName, variableName, parameters, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._update(resourceGroupName, automationAccountName, variableName, parameters, options, optionalCallback); + return self._update(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. @@ -1234,11 +1214,11 @@ class VariableOperations { * * @reject {Error} - The error object. */ - deleteMethodWithHttpOperationResponse(resourceGroupName, automationAccountName, variableName, options) { + deleteMethodWithHttpOperationResponse(automationAccountName, variableName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._deleteMethod(resourceGroupName, automationAccountName, variableName, options, (err, result, request, response) => { + self._deleteMethod(automationAccountName, variableName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1251,8 +1231,6 @@ 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. @@ -1283,7 +1261,7 @@ class VariableOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(resourceGroupName, automationAccountName, variableName, options, optionalCallback) { + deleteMethod(automationAccountName, variableName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1292,22 +1270,20 @@ class VariableOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._deleteMethod(resourceGroupName, automationAccountName, variableName, options, (err, result, request, response) => { + self._deleteMethod(automationAccountName, variableName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._deleteMethod(resourceGroupName, automationAccountName, variableName, options, optionalCallback); + return self._deleteMethod(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. @@ -1323,11 +1299,11 @@ class VariableOperations { * * @reject {Error} - The error object. */ - getWithHttpOperationResponse(resourceGroupName, automationAccountName, variableName, options) { + getWithHttpOperationResponse(automationAccountName, variableName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._get(resourceGroupName, automationAccountName, variableName, options, (err, result, request, response) => { + self._get(automationAccountName, variableName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1340,8 +1316,6 @@ 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. @@ -1373,7 +1347,7 @@ class VariableOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - get(resourceGroupName, automationAccountName, variableName, options, optionalCallback) { + get(automationAccountName, variableName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1382,22 +1356,20 @@ class VariableOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._get(resourceGroupName, automationAccountName, variableName, options, (err, result, request, response) => { + self._get(automationAccountName, variableName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._get(resourceGroupName, automationAccountName, variableName, options, optionalCallback); + return self._get(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. @@ -1411,11 +1383,11 @@ class VariableOperations { * * @reject {Error} - The error object. */ - listByAutomationAccountWithHttpOperationResponse(resourceGroupName, automationAccountName, options) { + listByAutomationAccountWithHttpOperationResponse(automationAccountName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._listByAutomationAccount(resourceGroupName, automationAccountName, options, (err, result, request, response) => { + self._listByAutomationAccount(automationAccountName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1428,8 +1400,6 @@ 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. @@ -1459,7 +1429,7 @@ class VariableOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - listByAutomationAccount(resourceGroupName, automationAccountName, options, optionalCallback) { + listByAutomationAccount(automationAccountName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1468,14 +1438,14 @@ class VariableOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._listByAutomationAccount(resourceGroupName, automationAccountName, options, (err, result, request, response) => { + self._listByAutomationAccount(automationAccountName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._listByAutomationAccount(resourceGroupName, automationAccountName, options, optionalCallback); + return self._listByAutomationAccount(automationAccountName, options, optionalCallback); } } diff --git a/lib/services/automationManagement/lib/operations/webhookOperations.js b/lib/services/automationManagement/lib/operations/webhookOperations.js index ce2de10941..b10646ad9d 100644 --- a/lib/services/automationManagement/lib/operations/webhookOperations.js +++ b/lib/services/automationManagement/lib/operations/webhookOperations.js @@ -17,8 +17,6 @@ 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. @@ -38,7 +36,7 @@ const WebResource = msRest.WebResource; * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _generateUri(resourceGroupName, automationAccountName, options, callback) { +function _generateUri(automationAccountName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -51,13 +49,13 @@ function _generateUri(resourceGroupName, automationAccountName, options, callbac let apiVersion = '2015-10-31'; // Validate try { - 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 || 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) { - if (resourceGroupName.match(/^[-\w\._]+$/) === null) + if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { + if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -76,7 +74,7 @@ function _generateUri(resourceGroupName, automationAccountName, options, callbac // 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(resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; @@ -172,8 +170,6 @@ function _generateUri(resourceGroupName, automationAccountName, options, callbac /** * 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. @@ -195,7 +191,7 @@ function _generateUri(resourceGroupName, automationAccountName, options, callbac * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _deleteMethod(resourceGroupName, automationAccountName, webhookName, options, callback) { +function _deleteMethod(automationAccountName, webhookName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -208,13 +204,13 @@ function _deleteMethod(resourceGroupName, automationAccountName, webhookName, op let apiVersion = '2015-10-31'; // Validate try { - 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 || 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) { - if (resourceGroupName.match(/^[-\w\._]+$/) === null) + if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { + if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -236,7 +232,7 @@ function _deleteMethod(resourceGroupName, automationAccountName, webhookName, op // 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(resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{webhookName}', encodeURIComponent(webhookName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -310,8 +306,6 @@ function _deleteMethod(resourceGroupName, automationAccountName, webhookName, op /** * 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. @@ -334,7 +328,7 @@ function _deleteMethod(resourceGroupName, automationAccountName, webhookName, op * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _get(resourceGroupName, automationAccountName, webhookName, options, callback) { +function _get(automationAccountName, webhookName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -347,13 +341,13 @@ function _get(resourceGroupName, automationAccountName, webhookName, options, ca let apiVersion = '2015-10-31'; // Validate try { - 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 || 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) { - if (resourceGroupName.match(/^[-\w\._]+$/) === null) + if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { + if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -375,7 +369,7 @@ function _get(resourceGroupName, automationAccountName, webhookName, options, ca // 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(resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{webhookName}', encodeURIComponent(webhookName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -466,8 +460,6 @@ function _get(resourceGroupName, automationAccountName, webhookName, options, ca /** * 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. @@ -512,7 +504,7 @@ function _get(resourceGroupName, automationAccountName, webhookName, options, ca * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _createOrUpdate(resourceGroupName, automationAccountName, webhookName, parameters, options, callback) { +function _createOrUpdate(automationAccountName, webhookName, parameters, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -525,13 +517,13 @@ function _createOrUpdate(resourceGroupName, automationAccountName, webhookName, let apiVersion = '2015-10-31'; // Validate try { - 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 || 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) { - if (resourceGroupName.match(/^[-\w\._]+$/) === null) + if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { + if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -556,7 +548,7 @@ function _createOrUpdate(resourceGroupName, automationAccountName, webhookName, // 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(resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{webhookName}', encodeURIComponent(webhookName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -678,8 +670,6 @@ function _createOrUpdate(resourceGroupName, automationAccountName, webhookName, /** * 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. @@ -718,7 +708,7 @@ function _createOrUpdate(resourceGroupName, automationAccountName, webhookName, * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _update(resourceGroupName, automationAccountName, webhookName, parameters, options, callback) { +function _update(automationAccountName, webhookName, parameters, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -731,13 +721,13 @@ function _update(resourceGroupName, automationAccountName, webhookName, paramete let apiVersion = '2015-10-31'; // Validate try { - 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 || 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) { - if (resourceGroupName.match(/^[-\w\._]+$/) === null) + if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { + if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -762,7 +752,7 @@ function _update(resourceGroupName, automationAccountName, webhookName, paramete // 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(resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{webhookName}', encodeURIComponent(webhookName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -867,8 +857,6 @@ function _update(resourceGroupName, automationAccountName, webhookName, paramete /** * Retrieve a list of webhooks. * - * @param {string} resourceGroupName The resource group name. - * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -891,7 +879,7 @@ function _update(resourceGroupName, automationAccountName, webhookName, paramete * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _listByAutomationAccount(resourceGroupName, automationAccountName, options, callback) { +function _listByAutomationAccount(automationAccountName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -905,13 +893,13 @@ function _listByAutomationAccount(resourceGroupName, automationAccountName, opti let apiVersion = '2015-10-31'; // Validate try { - 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 || 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) { - if (resourceGroupName.match(/^[-\w\._]+$/) === null) + if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { + if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -933,7 +921,7 @@ function _listByAutomationAccount(resourceGroupName, automationAccountName, opti // 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(resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; @@ -1171,8 +1159,6 @@ 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. @@ -1186,11 +1172,11 @@ class WebhookOperations { * * @reject {Error} - The error object. */ - generateUriWithHttpOperationResponse(resourceGroupName, automationAccountName, options) { + generateUriWithHttpOperationResponse(automationAccountName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._generateUri(resourceGroupName, automationAccountName, options, (err, result, request, response) => { + self._generateUri(automationAccountName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1203,8 +1189,6 @@ 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. @@ -1233,7 +1217,7 @@ class WebhookOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - generateUri(resourceGroupName, automationAccountName, options, optionalCallback) { + generateUri(automationAccountName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1242,22 +1226,20 @@ class WebhookOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._generateUri(resourceGroupName, automationAccountName, options, (err, result, request, response) => { + self._generateUri(automationAccountName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._generateUri(resourceGroupName, automationAccountName, options, optionalCallback); + return self._generateUri(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. @@ -1273,11 +1255,11 @@ class WebhookOperations { * * @reject {Error} - The error object. */ - deleteMethodWithHttpOperationResponse(resourceGroupName, automationAccountName, webhookName, options) { + deleteMethodWithHttpOperationResponse(automationAccountName, webhookName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._deleteMethod(resourceGroupName, automationAccountName, webhookName, options, (err, result, request, response) => { + self._deleteMethod(automationAccountName, webhookName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1290,8 +1272,6 @@ 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. @@ -1322,7 +1302,7 @@ class WebhookOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(resourceGroupName, automationAccountName, webhookName, options, optionalCallback) { + deleteMethod(automationAccountName, webhookName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1331,22 +1311,20 @@ class WebhookOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._deleteMethod(resourceGroupName, automationAccountName, webhookName, options, (err, result, request, response) => { + self._deleteMethod(automationAccountName, webhookName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._deleteMethod(resourceGroupName, automationAccountName, webhookName, options, optionalCallback); + return self._deleteMethod(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. @@ -1362,11 +1340,11 @@ class WebhookOperations { * * @reject {Error} - The error object. */ - getWithHttpOperationResponse(resourceGroupName, automationAccountName, webhookName, options) { + getWithHttpOperationResponse(automationAccountName, webhookName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._get(resourceGroupName, automationAccountName, webhookName, options, (err, result, request, response) => { + self._get(automationAccountName, webhookName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1379,8 +1357,6 @@ 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. @@ -1412,7 +1388,7 @@ class WebhookOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - get(resourceGroupName, automationAccountName, webhookName, options, optionalCallback) { + get(automationAccountName, webhookName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1421,22 +1397,20 @@ class WebhookOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._get(resourceGroupName, automationAccountName, webhookName, options, (err, result, request, response) => { + self._get(automationAccountName, webhookName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._get(resourceGroupName, automationAccountName, webhookName, options, optionalCallback); + return self._get(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. @@ -1474,11 +1448,11 @@ class WebhookOperations { * * @reject {Error} - The error object. */ - createOrUpdateWithHttpOperationResponse(resourceGroupName, automationAccountName, webhookName, parameters, options) { + createOrUpdateWithHttpOperationResponse(automationAccountName, webhookName, parameters, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._createOrUpdate(resourceGroupName, automationAccountName, webhookName, parameters, options, (err, result, request, response) => { + self._createOrUpdate(automationAccountName, webhookName, parameters, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1491,8 +1465,6 @@ 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. @@ -1546,7 +1518,7 @@ class WebhookOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - createOrUpdate(resourceGroupName, automationAccountName, webhookName, parameters, options, optionalCallback) { + createOrUpdate(automationAccountName, webhookName, parameters, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1555,22 +1527,20 @@ class WebhookOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._createOrUpdate(resourceGroupName, automationAccountName, webhookName, parameters, options, (err, result, request, response) => { + self._createOrUpdate(automationAccountName, webhookName, parameters, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._createOrUpdate(resourceGroupName, automationAccountName, webhookName, parameters, options, optionalCallback); + return self._createOrUpdate(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. @@ -1602,11 +1572,11 @@ class WebhookOperations { * * @reject {Error} - The error object. */ - updateWithHttpOperationResponse(resourceGroupName, automationAccountName, webhookName, parameters, options) { + updateWithHttpOperationResponse(automationAccountName, webhookName, parameters, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._update(resourceGroupName, automationAccountName, webhookName, parameters, options, (err, result, request, response) => { + self._update(automationAccountName, webhookName, parameters, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1619,8 +1589,6 @@ 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. @@ -1668,7 +1636,7 @@ class WebhookOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - update(resourceGroupName, automationAccountName, webhookName, parameters, options, optionalCallback) { + update(automationAccountName, webhookName, parameters, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1677,22 +1645,20 @@ class WebhookOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._update(resourceGroupName, automationAccountName, webhookName, parameters, options, (err, result, request, response) => { + self._update(automationAccountName, webhookName, parameters, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._update(resourceGroupName, automationAccountName, webhookName, parameters, options, optionalCallback); + return self._update(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. @@ -1708,11 +1674,11 @@ class WebhookOperations { * * @reject {Error} - The error object. */ - listByAutomationAccountWithHttpOperationResponse(resourceGroupName, automationAccountName, options) { + listByAutomationAccountWithHttpOperationResponse(automationAccountName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._listByAutomationAccount(resourceGroupName, automationAccountName, options, (err, result, request, response) => { + self._listByAutomationAccount(automationAccountName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1725,8 +1691,6 @@ 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. @@ -1758,7 +1722,7 @@ class WebhookOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - listByAutomationAccount(resourceGroupName, automationAccountName, options, optionalCallback) { + listByAutomationAccount(automationAccountName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1767,14 +1731,14 @@ class WebhookOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._listByAutomationAccount(resourceGroupName, automationAccountName, options, (err, result, request, response) => { + self._listByAutomationAccount(automationAccountName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._listByAutomationAccount(resourceGroupName, automationAccountName, options, optionalCallback); + return self._listByAutomationAccount(automationAccountName, options, optionalCallback); } }