From a46e63a75d7f054cf234d386bf994a009fc542d4 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Tue, 20 Mar 2018 09:12:17 -0700 Subject: [PATCH 1/6] Generated from 7c8ecc676f97292a87b1373623ac6235ac14082e (#2476) Refactorting DSC resources for preventing conflicts --- .../lib/automationClient.d.ts | 56 +- .../lib/automationClient.js | 33 +- ...agentRegistrationRegenerateKeyParameter.js | 2 +- .../lib/models/certificate.js | 15 +- .../lib/models/certificateUpdateParameters.js | 4 +- .../collectionItemUpdateConfiguration.js | 71 + .../lib/models/connection.js | 13 +- .../lib/models/connectionType.js | 9 + .../lib/models/credential.js | 16 +- .../lib/models/credentialUpdateParameters.js | 4 +- .../lib/models/dscCompilationJob.js | 43 +- .../dscCompilationJobCreateParameters.js | 9 + .../lib/models/dscNode.js | 42 +- .../lib/models/dscNodeConfiguration.js | 30 +- ...deConfigurationCreateOrUpdateParameters.js | 9 + ...NodeExtensionHandlerAssociationProperty.js | 61 + .../lib/models/index.d.ts | 1072 +++- .../automationManagement/lib/models/index.js | 38 +- .../automationManagement/lib/models/job.js | 34 +- .../lib/models/jobCollectionItem.js | 153 + .../lib/models/jobCreateParameters.js | 31 - .../lib/models/jobListResult.js | 9 +- .../lib/models/jobListResultV2.js | 68 + .../lib/models/jobNavigation.js | 54 + .../models/jobProvisioningStateProperty.js | 55 + .../lib/models/jobSchedule.js | 21 +- .../lib/models/linkedWorkspace.js | 53 + .../lib/models/linuxProperties.js | 70 + .../lib/models/proxyResource.js | 75 + .../lib/models/schedule.js | 15 +- .../scheduleCreateOrUpdateParameters.js | 4 +- .../lib/models/scheduleProperties.js | 172 + .../lib/models/scheduleUpdateParameters.js | 4 +- .../lib/models/softwareUpdateConfiguration.js | 218 + ...ftwareUpdateConfigurationCollectionItem.js | 136 + .../softwareUpdateConfigurationListResult.js | 63 + .../softwareUpdateConfigurationMachineRun.js | 218 + ...UpdateConfigurationMachineRunListResult.js | 71 + .../models/softwareUpdateConfigurationRun.js | 184 + ...oftwareUpdateConfigurationRunListResult.js | 71 + .../lib/models/sourceControl.js | 153 + .../sourceControlCreateOrUpdateParameters.js | 132 + .../lib/models/sourceControlListResult.js | 67 + .../lib/models/sourceControlSyncJob.js | 124 + .../lib/models/sourceControlSyncJobById.js | 118 + .../models/sourceControlSyncJobByIdErrors.js | 60 + .../models/sourceControlSyncJobListResult.js | 67 + .../models/sourceControlUpdateParameters.js | 98 + .../lib/models/testJob.js | 9 + .../lib/models/testJobCreateParameters.js | 8 - .../lib/models/updateConfiguration.js | 128 + .../models/updateConfigurationNavigation.js | 54 + .../lib/models/variable.js | 21 +- .../lib/models/variableUpdateParameters.js | 4 +- .../lib/models/webhook.js | 19 +- .../lib/models/webhookUpdateParameters.js | 4 +- .../lib/models/windowsProperties.js | 72 + .../lib/operations/activityOperations.js | 72 +- .../agentRegistrationInformation.js | 78 +- .../operations/automationAccountOperations.js | 42 +- .../lib/operations/certificateOperations.js | 192 +- .../lib/operations/connectionOperations.js | 186 +- .../operations/connectionTypeOperations.js | 144 +- .../lib/operations/credentialOperations.js | 192 +- .../operations/dscCompilationJobOperations.js | 153 +- .../lib/operations/dscCompilationJobStream.js | 270 + .../operations/dscConfigurationOperations.js | 222 +- .../dscNodeConfigurationOperations.js | 172 +- .../lib/operations/dscNodeOperations.js | 144 +- .../lib/operations/fields.js | 36 +- .../hybridRunbookWorkerGroupOperations.js | 144 +- .../lib/operations/index.d.ts | 5574 ++++++++++------- .../lib/operations/index.js | 13 +- .../lib/operations/jobOperations.js | 732 +-- .../lib/operations/jobScheduleOperations.js | 144 +- .../lib/operations/jobStreamOperations.js | 158 +- .../operations/linkedWorkspaceOperations.js | 260 + .../lib/operations/moduleOperations.js | 186 +- .../lib/operations/nodeReports.js | 142 +- .../lib/operations/objectDataTypes.js | 72 +- .../lib/operations/operations.js | 6 +- .../lib/operations/runbookDraftOperations.js | 426 +- .../lib/operations/runbookOperations.js | 361 +- .../lib/operations/scheduleOperations.js | 198 +- .../softwareUpdateConfigurationMachineRuns.js | 559 ++ .../softwareUpdateConfigurationRuns.js | 557 ++ .../softwareUpdateConfigurations.js | 1334 ++++ .../lib/operations/sourceControlOperations.js | 1633 +++++ .../sourceControlSyncJobOperations.js | 1004 +++ .../lib/operations/statisticsOperations.js | 6 +- .../lib/operations/testJobOperations.js | 1224 ++++ .../lib/operations/testJobStreams.js | 97 +- .../lib/operations/usages.js | 6 +- .../lib/operations/variableOperations.js | 186 +- .../lib/operations/webhookOperations.js | 222 +- 95 files changed, 16396 insertions(+), 5195 deletions(-) create mode 100644 lib/services/automationManagement/lib/models/collectionItemUpdateConfiguration.js create mode 100644 lib/services/automationManagement/lib/models/dscNodeExtensionHandlerAssociationProperty.js create mode 100644 lib/services/automationManagement/lib/models/jobCollectionItem.js create mode 100644 lib/services/automationManagement/lib/models/jobListResultV2.js create mode 100644 lib/services/automationManagement/lib/models/jobNavigation.js create mode 100644 lib/services/automationManagement/lib/models/jobProvisioningStateProperty.js create mode 100644 lib/services/automationManagement/lib/models/linkedWorkspace.js create mode 100644 lib/services/automationManagement/lib/models/linuxProperties.js create mode 100644 lib/services/automationManagement/lib/models/proxyResource.js create mode 100644 lib/services/automationManagement/lib/models/scheduleProperties.js create mode 100644 lib/services/automationManagement/lib/models/softwareUpdateConfiguration.js create mode 100644 lib/services/automationManagement/lib/models/softwareUpdateConfigurationCollectionItem.js create mode 100644 lib/services/automationManagement/lib/models/softwareUpdateConfigurationListResult.js create mode 100644 lib/services/automationManagement/lib/models/softwareUpdateConfigurationMachineRun.js create mode 100644 lib/services/automationManagement/lib/models/softwareUpdateConfigurationMachineRunListResult.js create mode 100644 lib/services/automationManagement/lib/models/softwareUpdateConfigurationRun.js create mode 100644 lib/services/automationManagement/lib/models/softwareUpdateConfigurationRunListResult.js create mode 100644 lib/services/automationManagement/lib/models/sourceControl.js create mode 100644 lib/services/automationManagement/lib/models/sourceControlCreateOrUpdateParameters.js create mode 100644 lib/services/automationManagement/lib/models/sourceControlListResult.js create mode 100644 lib/services/automationManagement/lib/models/sourceControlSyncJob.js create mode 100644 lib/services/automationManagement/lib/models/sourceControlSyncJobById.js create mode 100644 lib/services/automationManagement/lib/models/sourceControlSyncJobByIdErrors.js create mode 100644 lib/services/automationManagement/lib/models/sourceControlSyncJobListResult.js create mode 100644 lib/services/automationManagement/lib/models/sourceControlUpdateParameters.js create mode 100644 lib/services/automationManagement/lib/models/updateConfiguration.js create mode 100644 lib/services/automationManagement/lib/models/updateConfigurationNavigation.js create mode 100644 lib/services/automationManagement/lib/models/windowsProperties.js create mode 100644 lib/services/automationManagement/lib/operations/dscCompilationJobStream.js create mode 100644 lib/services/automationManagement/lib/operations/linkedWorkspaceOperations.js create mode 100644 lib/services/automationManagement/lib/operations/softwareUpdateConfigurationMachineRuns.js create mode 100644 lib/services/automationManagement/lib/operations/softwareUpdateConfigurationRuns.js create mode 100644 lib/services/automationManagement/lib/operations/softwareUpdateConfigurations.js create mode 100644 lib/services/automationManagement/lib/operations/sourceControlOperations.js create mode 100644 lib/services/automationManagement/lib/operations/sourceControlSyncJobOperations.js create mode 100644 lib/services/automationManagement/lib/operations/testJobOperations.js diff --git a/lib/services/automationManagement/lib/automationClient.d.ts b/lib/services/automationManagement/lib/automationClient.d.ts index f52b909b93..fc9ad09913 100644 --- a/lib/services/automationManagement/lib/automationClient.d.ts +++ b/lib/services/automationManagement/lib/automationClient.d.ts @@ -10,9 +10,32 @@ import { ServiceClientCredentials } from 'ms-rest'; import { AzureServiceClient, AzureServiceClientOptions } from 'ms-rest-azure'; +import * as models from "./models"; import * as operations from "./operations"; -declare class AutomationClient extends AzureServiceClient { +/** + * 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. * @constructor @@ -22,6 +45,10 @@ declare 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 @@ -33,6 +60,8 @@ declare 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. @@ -40,14 +69,18 @@ declare 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; - apiVersion: string; - subscriptionId: string; + resourceGroupName: string; + + clientRequestId: string; + + automationAccountName: string; + acceptLanguage: string; longRunningOperationRetryTimeout: number; @@ -64,15 +97,15 @@ declare class AutomationClient extends AzureServiceClient { connectionTypeOperations: operations.ConnectionTypeOperations; credentialOperations: operations.CredentialOperations; dscCompilationJobOperations: operations.DscCompilationJobOperations; + dscCompilationJobStream: operations.DscCompilationJobStream; dscConfigurationOperations: operations.DscConfigurationOperations; agentRegistrationInformation: operations.AgentRegistrationInformation; dscNodeOperations: operations.DscNodeOperations; nodeReports: operations.NodeReports; dscNodeConfigurationOperations: operations.DscNodeConfigurationOperations; hybridRunbookWorkerGroupOperations: operations.HybridRunbookWorkerGroupOperations; - jobOperations: operations.JobOperations; - jobStreamOperations: operations.JobStreamOperations; jobScheduleOperations: operations.JobScheduleOperations; + linkedWorkspaceOperations: operations.LinkedWorkspaceOperations; activityOperations: operations.ActivityOperations; moduleOperations: operations.ModuleOperations; objectDataTypes: operations.ObjectDataTypes; @@ -80,10 +113,17 @@ declare class AutomationClient extends AzureServiceClient { runbookDraftOperations: operations.RunbookDraftOperations; runbookOperations: operations.RunbookOperations; testJobStreams: operations.TestJobStreams; - testJobs: operations.TestJobs; + testJobOperations: operations.TestJobOperations; scheduleOperations: operations.ScheduleOperations; variableOperations: operations.VariableOperations; webhookOperations: operations.WebhookOperations; + softwareUpdateConfigurations: operations.SoftwareUpdateConfigurations; + softwareUpdateConfigurationRuns: operations.SoftwareUpdateConfigurationRuns; + softwareUpdateConfigurationMachineRuns: operations.SoftwareUpdateConfigurationMachineRuns; + sourceControlOperations: operations.SourceControlOperations; + sourceControlSyncJobOperations: operations.SourceControlSyncJobOperations; + jobOperations: operations.JobOperations; + jobStreamOperations: operations.JobStreamOperations; } -export = AutomationClient; +export { AutomationClient, models as AutomationModels }; diff --git a/lib/services/automationManagement/lib/automationClient.js b/lib/services/automationManagement/lib/automationClient.js index 123c18aca9..59eda98fcc 100644 --- a/lib/services/automationManagement/lib/automationClient.js +++ b/lib/services/automationManagement/lib/automationClient.js @@ -28,29 +28,37 @@ 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 = {}; super(credentials, options); - this.apiVersion = '2015-10-31'; this.acceptLanguage = 'en-US'; this.longRunningOperationRetryTimeout = 30; this.generateClientRequestId = true; @@ -60,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; } @@ -81,15 +94,15 @@ class AutomationClient extends ServiceClient { this.connectionTypeOperations = new operations.ConnectionTypeOperations(this); this.credentialOperations = new operations.CredentialOperations(this); this.dscCompilationJobOperations = new operations.DscCompilationJobOperations(this); + this.dscCompilationJobStream = new operations.DscCompilationJobStream(this); this.dscConfigurationOperations = new operations.DscConfigurationOperations(this); this.agentRegistrationInformation = new operations.AgentRegistrationInformation(this); this.dscNodeOperations = new operations.DscNodeOperations(this); this.nodeReports = new operations.NodeReports(this); this.dscNodeConfigurationOperations = new operations.DscNodeConfigurationOperations(this); this.hybridRunbookWorkerGroupOperations = new operations.HybridRunbookWorkerGroupOperations(this); - this.jobOperations = new operations.JobOperations(this); - this.jobStreamOperations = new operations.JobStreamOperations(this); this.jobScheduleOperations = new operations.JobScheduleOperations(this); + this.linkedWorkspaceOperations = new operations.LinkedWorkspaceOperations(this); this.activityOperations = new operations.ActivityOperations(this); this.moduleOperations = new operations.ModuleOperations(this); this.objectDataTypes = new operations.ObjectDataTypes(this); @@ -97,10 +110,17 @@ class AutomationClient extends ServiceClient { this.runbookDraftOperations = new operations.RunbookDraftOperations(this); this.runbookOperations = new operations.RunbookOperations(this); this.testJobStreams = new operations.TestJobStreams(this); - this.testJobs = new operations.TestJobs(this); + this.testJobOperations = new operations.TestJobOperations(this); this.scheduleOperations = new operations.ScheduleOperations(this); this.variableOperations = new operations.VariableOperations(this); this.webhookOperations = new operations.WebhookOperations(this); + this.softwareUpdateConfigurations = new operations.SoftwareUpdateConfigurations(this); + this.softwareUpdateConfigurationRuns = new operations.SoftwareUpdateConfigurationRuns(this); + this.softwareUpdateConfigurationMachineRuns = new operations.SoftwareUpdateConfigurationMachineRuns(this); + this.sourceControlOperations = new operations.SourceControlOperations(this); + this.sourceControlSyncJobOperations = new operations.SourceControlSyncJobOperations(this); + this.jobOperations = new operations.JobOperations(this); + this.jobStreamOperations = new operations.JobStreamOperations(this); this.models = models; msRest.addSerializationMixin(this); } @@ -108,3 +128,6 @@ class AutomationClient extends ServiceClient { } module.exports = AutomationClient; +module.exports['default'] = AutomationClient; +module.exports.AutomationClient = AutomationClient; +module.exports.AutomationModels = models; diff --git a/lib/services/automationManagement/lib/models/agentRegistrationRegenerateKeyParameter.js b/lib/services/automationManagement/lib/models/agentRegistrationRegenerateKeyParameter.js index 43d8621cb9..4c7e0e4f9c 100644 --- a/lib/services/automationManagement/lib/models/agentRegistrationRegenerateKeyParameter.js +++ b/lib/services/automationManagement/lib/models/agentRegistrationRegenerateKeyParameter.js @@ -18,7 +18,7 @@ class AgentRegistrationRegenerateKeyParameter { /** * Create a AgentRegistrationRegenerateKeyParameter. * @member {string} keyName Gets or sets the agent registration key name - - * Primary or Secondary. Possible values include: 'Primary', 'Secondary' + * primary or secondary. Possible values include: 'primary', 'secondary' * @member {string} [name] Gets or sets the name of the resource. * @member {string} [location] Gets or sets the location of the resource. * @member {object} [tags] Gets or sets the tags attached to the resource. diff --git a/lib/services/automationManagement/lib/models/certificate.js b/lib/services/automationManagement/lib/models/certificate.js index 24571371bd..03b1cfbcf6 100644 --- a/lib/services/automationManagement/lib/models/certificate.js +++ b/lib/services/automationManagement/lib/models/certificate.js @@ -10,15 +10,19 @@ 'use strict'; +const models = require('./index'); + /** * Definition of the certificate. * + * @extends models['BaseResource'] */ -class Certificate { +class Certificate extends models['BaseResource'] { /** * Create a Certificate. * @member {string} [id] Gets the id of the resource. * @member {string} [name] Gets the name of the certificate. + * @member {string} [type] Resource type * @member {string} [thumbprint] Gets the thumbprint of the certificate. * @member {date} [expiryTime] Gets the expiry time of the certificate. * @member {boolean} [isExportable] Gets the is exportable flag of the @@ -28,6 +32,7 @@ class Certificate { * @member {string} [description] Gets or sets the description. */ constructor() { + super(); } /** @@ -60,6 +65,14 @@ class Certificate { name: 'String' } }, + type: { + required: false, + readOnly: true, + serializedName: 'type', + type: { + name: 'String' + } + }, thumbprint: { required: false, readOnly: true, diff --git a/lib/services/automationManagement/lib/models/certificateUpdateParameters.js b/lib/services/automationManagement/lib/models/certificateUpdateParameters.js index bc375f8fdc..11e6061763 100644 --- a/lib/services/automationManagement/lib/models/certificateUpdateParameters.js +++ b/lib/services/automationManagement/lib/models/certificateUpdateParameters.js @@ -17,7 +17,7 @@ class CertificateUpdateParameters { /** * Create a CertificateUpdateParameters. - * @member {string} name Gets or sets the name of the certificate. + * @member {string} [name] Gets or sets the name of the certificate. * @member {string} [description] Gets or sets the description of the * certificate. */ @@ -39,7 +39,7 @@ class CertificateUpdateParameters { className: 'CertificateUpdateParameters', modelProperties: { name: { - required: true, + required: false, serializedName: 'name', type: { name: 'String' diff --git a/lib/services/automationManagement/lib/models/collectionItemUpdateConfiguration.js b/lib/services/automationManagement/lib/models/collectionItemUpdateConfiguration.js new file mode 100644 index 0000000000..f74f815c18 --- /dev/null +++ b/lib/services/automationManagement/lib/models/collectionItemUpdateConfiguration.js @@ -0,0 +1,71 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * object returned when requesting a collection of software update + * configuration + * + */ +class CollectionItemUpdateConfiguration { + /** + * Create a CollectionItemUpdateConfiguration. + * @member {array} [azureVirtualMachines] List of azure resource Ids for + * azure virtual machines targeted by the software update configuration. + * @member {moment.duration} [duration] Maximum time allowed for the software + * update configuration run. Duration needs to be specified using the format + * PT[n]H[n]M[n]S as per ISO8601 + */ + constructor() { + } + + /** + * Defines the metadata of CollectionItemUpdateConfiguration + * + * @returns {object} metadata of CollectionItemUpdateConfiguration + * + */ + mapper() { + return { + required: false, + serializedName: 'collectionItemUpdateConfiguration', + type: { + name: 'Composite', + className: 'CollectionItemUpdateConfiguration', + modelProperties: { + azureVirtualMachines: { + required: false, + serializedName: 'azureVirtualMachines', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + duration: { + required: false, + serializedName: 'duration', + type: { + name: 'TimeSpan' + } + } + } + } + }; + } +} + +module.exports = CollectionItemUpdateConfiguration; diff --git a/lib/services/automationManagement/lib/models/connection.js b/lib/services/automationManagement/lib/models/connection.js index 57a618e20d..4748007e65 100644 --- a/lib/services/automationManagement/lib/models/connection.js +++ b/lib/services/automationManagement/lib/models/connection.js @@ -15,12 +15,14 @@ const models = require('./index'); /** * Definition of the connection. * + * @extends models['BaseResource'] */ -class Connection { +class Connection extends models['BaseResource'] { /** * Create a Connection. * @member {string} [id] Gets the id of the resource. * @member {string} [name] Gets the name of the connection. + * @member {string} [type] Resource type * @member {object} [connectionType] Gets or sets the connectionType of the * connection. * @member {string} [connectionType.name] Gets or sets the name of the @@ -32,6 +34,7 @@ class Connection { * @member {string} [description] Gets or sets the description. */ constructor() { + super(); } /** @@ -64,6 +67,14 @@ class Connection { name: 'String' } }, + type: { + required: false, + readOnly: true, + serializedName: 'type', + type: { + name: 'String' + } + }, connectionType: { required: false, serializedName: 'properties.connectionType', diff --git a/lib/services/automationManagement/lib/models/connectionType.js b/lib/services/automationManagement/lib/models/connectionType.js index 42cf615909..d5d7e8848d 100644 --- a/lib/services/automationManagement/lib/models/connectionType.js +++ b/lib/services/automationManagement/lib/models/connectionType.js @@ -21,6 +21,7 @@ class ConnectionType { * Create a ConnectionType. * @member {string} [id] Gets the id of the resource. * @member {string} [name] Gets the name of the connection type. + * @member {string} [type] Resource type * @member {boolean} [isGlobal] Gets or sets a Boolean value to indicate if * the connection type is global. * @member {object} [fieldDefinitions] Gets the field definitions of the @@ -62,6 +63,14 @@ class ConnectionType { name: 'String' } }, + type: { + required: false, + readOnly: true, + serializedName: 'type', + type: { + name: 'String' + } + }, isGlobal: { required: false, serializedName: 'properties.isGlobal', diff --git a/lib/services/automationManagement/lib/models/credential.js b/lib/services/automationManagement/lib/models/credential.js index 0100729a6b..6dfa90c958 100644 --- a/lib/services/automationManagement/lib/models/credential.js +++ b/lib/services/automationManagement/lib/models/credential.js @@ -10,21 +10,26 @@ 'use strict'; +const models = require('./index'); + /** * Definition of the credential. * + * @extends models['BaseResource'] */ -class Credential { +class Credential extends models['BaseResource'] { /** * Create a Credential. * @member {string} [id] Gets the id of the resource. * @member {string} [name] Gets the name of the credential. + * @member {string} [type] Resource type * @member {string} [userName] Gets the user name of the credential. * @member {date} [creationTime] Gets the creation time. * @member {date} [lastModifiedTime] Gets the last modified time. * @member {string} [description] Gets or sets the description. */ constructor() { + super(); } /** @@ -51,11 +56,20 @@ class Credential { }, name: { required: false, + readOnly: true, serializedName: 'name', type: { name: 'String' } }, + type: { + required: false, + readOnly: true, + serializedName: 'type', + type: { + name: 'String' + } + }, userName: { required: false, readOnly: true, diff --git a/lib/services/automationManagement/lib/models/credentialUpdateParameters.js b/lib/services/automationManagement/lib/models/credentialUpdateParameters.js index a165812849..44760f420b 100644 --- a/lib/services/automationManagement/lib/models/credentialUpdateParameters.js +++ b/lib/services/automationManagement/lib/models/credentialUpdateParameters.js @@ -17,7 +17,7 @@ class CredentialUpdateParameters { /** * Create a CredentialUpdateParameters. - * @member {string} name Gets or sets the name of the credential. + * @member {string} [name] Gets or sets the name of the credential. * @member {string} [userName] Gets or sets the user name of the credential. * @member {string} [password] Gets or sets the password of the credential. * @member {string} [description] Gets or sets the description of the @@ -41,7 +41,7 @@ class CredentialUpdateParameters { className: 'CredentialUpdateParameters', modelProperties: { name: { - required: true, + required: false, serializedName: 'name', type: { name: 'String' diff --git a/lib/services/automationManagement/lib/models/dscCompilationJob.js b/lib/services/automationManagement/lib/models/dscCompilationJob.js index 856b9560b1..e33fe69c1f 100644 --- a/lib/services/automationManagement/lib/models/dscCompilationJob.js +++ b/lib/services/automationManagement/lib/models/dscCompilationJob.js @@ -15,17 +15,24 @@ const models = require('./index'); /** * Definition of the Dsc Compilation job. * + * @extends models['ProxyResource'] */ -class DscCompilationJob { +class DscCompilationJob extends models['ProxyResource'] { /** * Create a DscCompilationJob. - * @member {string} [id] Gets the id of the resource. * @member {object} [configuration] Gets or sets the configuration. * @member {string} [configuration.name] Gets or sets the name of the Dsc * configuration. * @member {string} [startedBy] Gets the compilation job started by. * @member {uuid} [jobId] Gets the id of the job. * @member {date} [creationTime] Gets the creation time of the job. + * @member {object} [provisioningState] The current provisioning state of the + * job. + * @member {string} [provisioningState.provisioningState] The provisioning + * state of the resource. Possible values include: 'Failed', 'Succeeded', + * 'Suspended', 'Processing' + * @member {string} [runOn] Gets or sets the runOn which specifies the group + * name where the job is to be executed. * @member {string} [status] Gets or sets the status of the job. Possible * values include: 'New', 'Activating', 'Running', 'Completed', 'Failed', * 'Stopped', 'Blocked', 'Suspended', 'Disconnected', 'Suspending', @@ -41,6 +48,7 @@ class DscCompilationJob { * @member {object} [parameters] Gets or sets the parameters of the job. */ constructor() { + super(); } /** @@ -65,6 +73,22 @@ class DscCompilationJob { name: 'String' } }, + name: { + required: false, + readOnly: true, + serializedName: 'name', + type: { + name: 'String' + } + }, + type: { + required: false, + readOnly: true, + serializedName: 'type', + type: { + name: 'String' + } + }, configuration: { required: false, serializedName: 'properties.configuration', @@ -97,6 +121,21 @@ class DscCompilationJob { name: 'DateTime' } }, + provisioningState: { + required: false, + serializedName: 'properties.provisioningState', + type: { + name: 'Composite', + className: 'JobProvisioningStateProperty' + } + }, + runOn: { + required: false, + serializedName: 'properties.runOn', + type: { + name: 'String' + } + }, status: { required: false, serializedName: 'properties.status', diff --git a/lib/services/automationManagement/lib/models/dscCompilationJobCreateParameters.js b/lib/services/automationManagement/lib/models/dscCompilationJobCreateParameters.js index ec7660a646..364f2c99a6 100644 --- a/lib/services/automationManagement/lib/models/dscCompilationJobCreateParameters.js +++ b/lib/services/automationManagement/lib/models/dscCompilationJobCreateParameters.js @@ -23,6 +23,8 @@ class DscCompilationJobCreateParameters { * @member {string} [configuration.name] Gets or sets the name of the Dsc * configuration. * @member {object} [parameters] Gets or sets the parameters of the job. + * @member {boolean} [newNodeConfigurationBuildVersionRequired] If a new + * build version of NodeConfiguration is required. * @member {string} [name] Gets or sets name of the resource. * @member {string} [location] Gets or sets the location of the resource. * @member {object} [tags] Gets or sets the tags attached to the resource. @@ -66,6 +68,13 @@ class DscCompilationJobCreateParameters { } } }, + newNodeConfigurationBuildVersionRequired: { + required: false, + serializedName: 'properties.newNodeConfigurationBuildVersionRequired', + type: { + name: 'Boolean' + } + }, name: { required: false, serializedName: 'name', diff --git a/lib/services/automationManagement/lib/models/dscNode.js b/lib/services/automationManagement/lib/models/dscNode.js index 16f6bdfd47..eb6bc6417c 100644 --- a/lib/services/automationManagement/lib/models/dscNode.js +++ b/lib/services/automationManagement/lib/models/dscNode.js @@ -15,9 +15,9 @@ const models = require('./index'); /** * Definition of the dsc node type. * - * @extends models['Resource'] + * @extends models['ProxyResource'] */ -class DscNode extends models['Resource'] { +class DscNode extends models['ProxyResource'] { /** * Create a DscNode. * @member {date} [lastSeen] Gets or sets the last seen time of the node. @@ -32,6 +32,8 @@ class DscNode extends models['Resource'] { * @member {string} [status] Gets or sets the status of the node. * @member {string} [nodeId] Gets or sets the node id. * @member {string} [etag] Gets or sets the etag of the resource. + * @member {array} [extensionHandler] Gets or sets the list of + * extensionHandler properties for a Node. */ constructor() { super(); @@ -75,27 +77,6 @@ class DscNode extends models['Resource'] { name: 'String' } }, - location: { - required: true, - serializedName: 'location', - type: { - name: 'String' - } - }, - tags: { - required: false, - serializedName: 'tags', - type: { - name: 'Dictionary', - value: { - required: false, - serializedName: 'StringElementType', - type: { - name: 'String' - } - } - } - }, lastSeen: { required: false, serializedName: 'lastSeen', @@ -152,6 +133,21 @@ class DscNode extends models['Resource'] { type: { name: 'String' } + }, + extensionHandler: { + required: false, + serializedName: 'extensionHandler', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'DscNodeExtensionHandlerAssociationPropertyElementType', + type: { + name: 'Composite', + className: 'DscNodeExtensionHandlerAssociationProperty' + } + } + } } } } diff --git a/lib/services/automationManagement/lib/models/dscNodeConfiguration.js b/lib/services/automationManagement/lib/models/dscNodeConfiguration.js index bad654714c..766e78080e 100644 --- a/lib/services/automationManagement/lib/models/dscNodeConfiguration.js +++ b/lib/services/automationManagement/lib/models/dscNodeConfiguration.js @@ -15,20 +15,20 @@ const models = require('./index'); /** * Definition of the dsc node configuration. * + * @extends models['ProxyResource'] */ -class DscNodeConfiguration { +class DscNodeConfiguration extends models['ProxyResource'] { /** * Create a DscNodeConfiguration. - * @member {string} [name] Gets or sets the node configuration name. * @member {date} [lastModifiedTime] Gets or sets the last modified time. * @member {date} [creationTime] Gets or sets creation time. * @member {object} [configuration] Gets or sets the configuration of the * node. * @member {string} [configuration.name] Gets or sets the name of the Dsc * configuration. - * @member {string} [id] Gets or sets the id of the resource. */ constructor() { + super(); } /** @@ -45,13 +45,30 @@ class DscNodeConfiguration { name: 'Composite', className: 'DscNodeConfiguration', modelProperties: { + id: { + required: false, + readOnly: true, + serializedName: 'id', + type: { + name: 'String' + } + }, name: { required: false, + readOnly: true, serializedName: 'name', type: { name: 'String' } }, + type: { + required: false, + readOnly: true, + serializedName: 'type', + type: { + name: 'String' + } + }, lastModifiedTime: { required: false, serializedName: 'lastModifiedTime', @@ -73,13 +90,6 @@ class DscNodeConfiguration { name: 'Composite', className: 'DscConfigurationAssociationProperty' } - }, - id: { - required: false, - serializedName: 'id', - type: { - name: 'String' - } } } } diff --git a/lib/services/automationManagement/lib/models/dscNodeConfigurationCreateOrUpdateParameters.js b/lib/services/automationManagement/lib/models/dscNodeConfigurationCreateOrUpdateParameters.js index c16598b833..35c2d9a93e 100644 --- a/lib/services/automationManagement/lib/models/dscNodeConfigurationCreateOrUpdateParameters.js +++ b/lib/services/automationManagement/lib/models/dscNodeConfigurationCreateOrUpdateParameters.js @@ -35,6 +35,8 @@ class DscNodeConfigurationCreateOrUpdateParameters { * @member {object} configuration Gets or sets the configuration of the node. * @member {string} [configuration.name] Gets or sets the name of the Dsc * configuration. + * @member {boolean} [newNodeConfigurationBuildVersionRequired] If a new + * build version of NodeConfiguration is required. */ constructor() { } @@ -75,6 +77,13 @@ class DscNodeConfigurationCreateOrUpdateParameters { name: 'Composite', className: 'DscConfigurationAssociationProperty' } + }, + newNodeConfigurationBuildVersionRequired: { + required: false, + serializedName: 'newNodeConfigurationBuildVersionRequired', + type: { + name: 'Boolean' + } } } } diff --git a/lib/services/automationManagement/lib/models/dscNodeExtensionHandlerAssociationProperty.js b/lib/services/automationManagement/lib/models/dscNodeExtensionHandlerAssociationProperty.js new file mode 100644 index 0000000000..1f97fc4e80 --- /dev/null +++ b/lib/services/automationManagement/lib/models/dscNodeExtensionHandlerAssociationProperty.js @@ -0,0 +1,61 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * The dsc extensionHandler property associated with the node + * + */ +class DscNodeExtensionHandlerAssociationProperty { + /** + * Create a DscNodeExtensionHandlerAssociationProperty. + * @member {string} [name] Gets or sets the name of the extension handler. + * @member {string} [version] Gets or sets the version of the extension + * handler. + */ + constructor() { + } + + /** + * Defines the metadata of DscNodeExtensionHandlerAssociationProperty + * + * @returns {object} metadata of DscNodeExtensionHandlerAssociationProperty + * + */ + mapper() { + return { + required: false, + serializedName: 'DscNodeExtensionHandlerAssociationProperty', + type: { + name: 'Composite', + className: 'DscNodeExtensionHandlerAssociationProperty', + modelProperties: { + name: { + required: false, + serializedName: 'name', + type: { + name: 'String' + } + }, + version: { + required: false, + serializedName: 'version', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = DscNodeExtensionHandlerAssociationProperty; diff --git a/lib/services/automationManagement/lib/models/index.d.ts b/lib/services/automationManagement/lib/models/index.d.ts index acee0f8488..040e144b4d 100644 --- a/lib/services/automationManagement/lib/models/index.d.ts +++ b/lib/services/automationManagement/lib/models/index.d.ts @@ -340,48 +340,6 @@ export interface Module extends Resource { etag?: string; } -/** - * @class - * Initializes a new instance of the DscNodeConfigurationAssociationProperty class. - * @constructor - * The dsc nodeconfiguration property associated with the entity. - * - * @member {string} [name] Gets or sets the name of the dsc nodeconfiguration. - */ -export interface DscNodeConfigurationAssociationProperty { - name?: string; -} - -/** - * @class - * Initializes a new instance of the DscNode class. - * @constructor - * Definition of the dsc node type. - * - * @member {date} [lastSeen] Gets or sets the last seen time of the node. - * @member {date} [registrationTime] Gets or sets the registration time of the - * node. - * @member {string} [ip] Gets or sets the ip of the node. - * @member {string} [accountId] Gets or sets the account id of the node. - * @member {object} [nodeConfiguration] Gets or sets the configuration of the - * node. - * @member {string} [nodeConfiguration.name] Gets or sets the name of the dsc - * nodeconfiguration. - * @member {string} [status] Gets or sets the status of the node. - * @member {string} [nodeId] Gets or sets the node id. - * @member {string} [etag] Gets or sets the etag of the resource. - */ -export interface DscNode extends Resource { - lastSeen?: Date; - registrationTime?: Date; - ip?: string; - accountId?: string; - nodeConfiguration?: DscNodeConfigurationAssociationProperty; - status?: string; - nodeId?: string; - etag?: string; -} - /** * @class * Initializes a new instance of the ContentSource class. @@ -602,6 +560,7 @@ export interface AutomationAccountUpdateParameters { * * @member {string} [id] Gets the id of the resource. * @member {string} [name] Gets the name of the certificate. + * @member {string} [type] Resource type * @member {string} [thumbprint] Gets the thumbprint of the certificate. * @member {date} [expiryTime] Gets the expiry time of the certificate. * @member {boolean} [isExportable] Gets the is exportable flag of the @@ -610,9 +569,10 @@ export interface AutomationAccountUpdateParameters { * @member {date} [lastModifiedTime] Gets the last modified time. * @member {string} [description] Gets or sets the description. */ -export interface Certificate { +export interface Certificate extends BaseResource { readonly id?: string; readonly name?: string; + readonly type?: string; readonly thumbprint?: string; readonly expiryTime?: Date; readonly isExportable?: boolean; @@ -627,12 +587,12 @@ export interface Certificate { * @constructor * The parameters supplied to the update certificate operation. * - * @member {string} name Gets or sets the name of the certificate. + * @member {string} [name] Gets or sets the name of the certificate. * @member {string} [description] Gets or sets the description of the * certificate. */ export interface CertificateUpdateParameters { - name: string; + name?: string; description?: string; } @@ -681,6 +641,7 @@ export interface ConnectionTypeAssociationProperty { * * @member {string} [id] Gets the id of the resource. * @member {string} [name] Gets the name of the connection. + * @member {string} [type] Resource type * @member {object} [connectionType] Gets or sets the connectionType of the * connection. * @member {string} [connectionType.name] Gets or sets the name of the @@ -691,9 +652,10 @@ export interface ConnectionTypeAssociationProperty { * @member {date} [lastModifiedTime] Gets the last modified time. * @member {string} [description] Gets or sets the description. */ -export interface Connection { +export interface Connection extends BaseResource { readonly id?: string; readonly name?: string; + readonly type?: string; connectionType?: ConnectionTypeAssociationProperty; readonly fieldDefinitionValues?: { [propertyName: string]: string }; readonly creationTime?: Date; @@ -769,6 +731,7 @@ export interface FieldDefinition { * * @member {string} [id] Gets the id of the resource. * @member {string} [name] Gets the name of the connection type. + * @member {string} [type] Resource type * @member {boolean} [isGlobal] Gets or sets a Boolean value to indicate if the * connection type is global. * @member {object} [fieldDefinitions] Gets the field definitions of the @@ -780,6 +743,7 @@ export interface FieldDefinition { export interface ConnectionType { readonly id?: string; readonly name?: string; + readonly type?: string; isGlobal?: boolean; readonly fieldDefinitions?: { [propertyName: string]: FieldDefinition }; readonly creationTime?: Date; @@ -813,14 +777,16 @@ export interface ConnectionTypeCreateOrUpdateParameters { * * @member {string} [id] Gets the id of the resource. * @member {string} [name] Gets the name of the credential. + * @member {string} [type] Resource type * @member {string} [userName] Gets the user name of the credential. * @member {date} [creationTime] Gets the creation time. * @member {date} [lastModifiedTime] Gets the last modified time. * @member {string} [description] Gets or sets the description. */ -export interface Credential { +export interface Credential extends BaseResource { readonly id?: string; - name?: string; + readonly name?: string; + readonly type?: string; readonly userName?: string; readonly creationTime?: Date; readonly lastModifiedTime?: Date; @@ -833,14 +799,14 @@ export interface Credential { * @constructor * The parameters supplied to the Update credential operation. * - * @member {string} name Gets or sets the name of the credential. + * @member {string} [name] Gets or sets the name of the credential. * @member {string} [userName] Gets or sets the user name of the credential. * @member {string} [password] Gets or sets the password of the credential. * @member {string} [description] Gets or sets the description of the * credential. */ export interface CredentialUpdateParameters { - name: string; + name?: string; userName?: string; password?: string; description?: string; @@ -1040,7 +1006,7 @@ export interface AgentRegistration { * The parameters supplied to the regenerate keys operation. * * @member {string} keyName Gets or sets the agent registration key name - - * Primary or Secondary. Possible values include: 'Primary', 'Secondary' + * primary or secondary. Possible values include: 'primary', 'secondary' * @member {string} [name] Gets or sets the name of the resource. * @member {string} [location] Gets or sets the location of the resource. * @member {object} [tags] Gets or sets the tags attached to the resource. @@ -1074,6 +1040,8 @@ export interface DscConfigurationAssociationProperty { * @member {string} [configuration.name] Gets or sets the name of the Dsc * configuration. * @member {object} [parameters] Gets or sets the parameters of the job. + * @member {boolean} [newNodeConfigurationBuildVersionRequired] If a new build + * version of NodeConfiguration is required. * @member {string} [name] Gets or sets name of the resource. * @member {string} [location] Gets or sets the location of the resource. * @member {object} [tags] Gets or sets the tags attached to the resource. @@ -1081,24 +1049,60 @@ export interface DscConfigurationAssociationProperty { export interface DscCompilationJobCreateParameters { configuration: DscConfigurationAssociationProperty; parameters?: { [propertyName: string]: string }; + newNodeConfigurationBuildVersionRequired?: boolean; name?: string; location?: string; tags?: { [propertyName: string]: string }; } +/** + * @class + * Initializes a new instance of the JobProvisioningStateProperty class. + * @constructor + * The provisioning state property. + * + * @member {string} [provisioningState] The provisioning state of the resource. + * Possible values include: 'Failed', 'Succeeded', 'Suspended', 'Processing' + */ +export interface JobProvisioningStateProperty { + readonly provisioningState?: string; +} + +/** + * @class + * Initializes a new instance of the ProxyResource class. + * @constructor + * The Resource definition. + * + * @member {string} [id] Resource Id + * @member {string} [name] Resource name + * @member {string} [type] Resource type + */ +export interface ProxyResource extends BaseResource { + readonly id?: string; + readonly name?: string; + readonly type?: string; +} + /** * @class * Initializes a new instance of the DscCompilationJob class. * @constructor * Definition of the Dsc Compilation job. * - * @member {string} [id] Gets the id of the resource. * @member {object} [configuration] Gets or sets the configuration. * @member {string} [configuration.name] Gets or sets the name of the Dsc * configuration. * @member {string} [startedBy] Gets the compilation job started by. * @member {uuid} [jobId] Gets the id of the job. * @member {date} [creationTime] Gets the creation time of the job. + * @member {object} [provisioningState] The current provisioning state of the + * job. + * @member {string} [provisioningState.provisioningState] The provisioning + * state of the resource. Possible values include: 'Failed', 'Succeeded', + * 'Suspended', 'Processing' + * @member {string} [runOn] Gets or sets the runOn which specifies the group + * name where the job is to be executed. * @member {string} [status] Gets or sets the status of the job. Possible * values include: 'New', 'Activating', 'Running', 'Completed', 'Failed', * 'Stopped', 'Blocked', 'Suspended', 'Disconnected', 'Suspending', 'Stopping', @@ -1112,12 +1116,13 @@ export interface DscCompilationJobCreateParameters { * of the job. * @member {object} [parameters] Gets or sets the parameters of the job. */ -export interface DscCompilationJob { - readonly id?: string; +export interface DscCompilationJob extends ProxyResource { configuration?: DscConfigurationAssociationProperty; readonly startedBy?: string; readonly jobId?: string; readonly creationTime?: Date; + provisioningState?: JobProvisioningStateProperty; + runOn?: string; status?: string; statusDetails?: string; readonly startTime?: Date; @@ -1218,33 +1223,41 @@ export interface DscMetaConfiguration { * @member {object} configuration Gets or sets the configuration of the node. * @member {string} [configuration.name] Gets or sets the name of the Dsc * configuration. + * @member {boolean} [newNodeConfigurationBuildVersionRequired] If a new build + * version of NodeConfiguration is required. */ export interface DscNodeConfigurationCreateOrUpdateParameters { source: ContentSource; name: string; configuration: DscConfigurationAssociationProperty; + newNodeConfigurationBuildVersionRequired?: boolean; } /** * @class - * Initializes a new instance of the DscNodeConfiguration class. + * Initializes a new instance of the DscNodeConfigurationAssociationProperty class. * @constructor - * Definition of the dsc node configuration. + * The dsc nodeconfiguration property associated with the entity. * - * @member {string} [name] Gets or sets the node configuration name. - * @member {date} [lastModifiedTime] Gets or sets the last modified time. - * @member {date} [creationTime] Gets or sets creation time. - * @member {object} [configuration] Gets or sets the configuration of the node. - * @member {string} [configuration.name] Gets or sets the name of the Dsc - * configuration. - * @member {string} [id] Gets or sets the id of the resource. + * @member {string} [name] Gets or sets the name of the dsc nodeconfiguration. */ -export interface DscNodeConfiguration { +export interface DscNodeConfigurationAssociationProperty { name?: string; - lastModifiedTime?: Date; - creationTime?: Date; - configuration?: DscConfigurationAssociationProperty; - id?: string; +} + +/** + * @class + * Initializes a new instance of the DscNodeExtensionHandlerAssociationProperty class. + * @constructor + * The dsc extensionHandler property associated with the node + * + * @member {string} [name] Gets or sets the name of the extension handler. + * @member {string} [version] Gets or sets the version of the extension + * handler. + */ +export interface DscNodeExtensionHandlerAssociationProperty { + name?: string; + version?: string; } /** @@ -1486,7 +1499,6 @@ export interface RunbookAssociationProperty { * @constructor * Definition of the job. * - * @member {string} [id] Gets or sets the id of the resource. * @member {object} [runbook] Gets or sets the runbook. * @member {string} [runbook.name] Gets or sets the name of the runbook. * @member {string} [startedBy] Gets or sets the job started by. @@ -1507,9 +1519,12 @@ export interface RunbookAssociationProperty { * @member {date} [lastStatusModifiedTime] Gets or sets the last status * modified time of the job. * @member {object} [parameters] Gets or sets the parameters of the job. + * @member {object} [provisioningState] The provisioning state of a resource. + * @member {string} [provisioningState.provisioningState] The provisioning + * state of the resource. Possible values include: 'Failed', 'Succeeded', + * 'Suspended', 'Processing' */ -export interface Job { - id?: string; +export interface Job extends ProxyResource { runbook?: RunbookAssociationProperty; startedBy?: string; runOn?: string; @@ -1523,6 +1538,7 @@ export interface Job { lastModifiedTime?: Date; lastStatusModifiedTime?: Date; parameters?: { [propertyName: string]: string }; + provisioningState?: JobProvisioningStateProperty; } /** @@ -1536,17 +1552,25 @@ export interface Job { * @member {object} [parameters] Gets or sets the parameters of the job. * @member {string} [runOn] Gets or sets the runOn which specifies the group * name where the job is to be executed. - * @member {string} [name] Gets or sets name of the resource. - * @member {string} [location] Gets or sets the location of the resource. - * @member {object} [tags] Gets or sets the tags attached to the resource. */ export interface JobCreateParameters { runbook: RunbookAssociationProperty; parameters?: { [propertyName: string]: string }; runOn?: string; - name?: string; - location?: string; - tags?: { [propertyName: string]: string }; +} + +/** + * @class + * Initializes a new instance of the JobListResult class. + * @constructor + * The response model for the list job operation. + * + * @member {array} [value] Gets or sets a list of jobs. + * @member {string} [nextLink] Gets or sets the next link. + */ +export interface JobListResult { + value?: Job[]; + nextLink?: string; } /** @@ -1588,7 +1612,9 @@ export interface JobScheduleCreateParameters { * @constructor * Definition of the job schedule. * - * @member {string} [id] Gets or sets the id of the resource. + * @member {string} [id] Gets the id of the resource. + * @member {string} [name] Gets the name of the variable. + * @member {string} [type] Resource type * @member {string} [jobScheduleId] Gets or sets the id of job schedule. * @member {object} [schedule] Gets or sets the schedule. * @member {string} [schedule.name] Gets or sets the name of the schedule. @@ -1600,7 +1626,9 @@ export interface JobScheduleCreateParameters { * schedule. */ export interface JobSchedule { - id?: string; + readonly id?: string; + readonly name?: string; + readonly type?: string; jobScheduleId?: string; schedule?: ScheduleAssociationProperty; runbook?: RunbookAssociationProperty; @@ -1633,6 +1661,18 @@ export interface JobStream { value?: { [propertyName: string]: any }; } +/** + * @class + * Initializes a new instance of the LinkedWorkspace class. + * @constructor + * Definition of the linked workspace. + * + * @member {string} [id] Gets the id of the linked workspace. + */ +export interface LinkedWorkspace { + readonly id?: string; +} + /** * @class * Initializes a new instance of the ModuleCreateOrUpdateParameters class. @@ -1869,8 +1909,8 @@ export interface RunbookUpdateParameters { * @member {date} startTime Gets or sets the start time of the schedule. * @member {date} [expiryTime] Gets or sets the end time of the schedule. * @member {object} [interval] Gets or sets the interval of the schedule. - * @member {string} frequency Gets or sets the frequency of the schedule. - * Possible values include: 'OneTime', 'Day', 'Hour', 'Week', 'Month' + * @member {string} frequency Possible values include: 'OneTime', 'Day', + * 'Hour', 'Week', 'Month' * @member {string} [timeZone] Gets or sets the time zone of the schedule. * @member {object} [advancedSchedule] Gets or sets the AdvancedSchedule. * @member {array} [advancedSchedule.weekDays] Days of the week that the job @@ -1891,14 +1931,64 @@ export interface ScheduleCreateOrUpdateParameters { advancedSchedule?: AdvancedSchedule; } +/** + * @class + * Initializes a new instance of the ScheduleProperties class. + * @constructor + * Definition of schedule parameters. + * + * @member {date} [startTime] Gets or sets the start time of the schedule. + * @member {number} [startTimeOffsetMinutes] Gets the start time's offset in + * minutes. + * @member {date} [expiryTime] Gets or sets the end time of the schedule. + * @member {number} [expiryTimeOffsetMinutes] Gets or sets the expiry time's + * offset in minutes. + * @member {boolean} [isEnabled] Gets or sets a value indicating whether this + * schedule is enabled. Default value: false . + * @member {date} [nextRun] Gets or sets the next run time of the schedule. + * @member {number} [nextRunOffsetMinutes] Gets or sets the next run time's + * offset in minutes. + * @member {object} [interval] Gets or sets the interval of the schedule. + * @member {string} [frequency] Gets or sets the frequency of the schedule. + * Possible values include: 'OneTime', 'Day', 'Hour', 'Week', 'Month' + * @member {string} [timeZone] Gets or sets the time zone of the schedule. + * @member {object} [advancedSchedule] Gets or sets the advanced schedule. + * @member {array} [advancedSchedule.weekDays] Days of the week that the job + * should execute on. + * @member {array} [advancedSchedule.monthDays] Days of the month that the job + * should execute on. Must be between 1 and 31. + * @member {array} [advancedSchedule.monthlyOccurrences] Occurrences of days + * within a month. + * @member {date} [creationTime] Gets or sets the creation time. + * @member {date} [lastModifiedTime] Gets or sets the last modified time. + * @member {string} [description] Gets or sets the description. + */ +export interface ScheduleProperties { + startTime?: Date; + readonly startTimeOffsetMinutes?: number; + expiryTime?: Date; + expiryTimeOffsetMinutes?: number; + isEnabled?: boolean; + nextRun?: Date; + nextRunOffsetMinutes?: number; + interval?: any; + frequency?: string; + timeZone?: string; + advancedSchedule?: AdvancedSchedule; + creationTime?: Date; + lastModifiedTime?: Date; + description?: string; +} + /** * @class * Initializes a new instance of the Schedule class. * @constructor * Definition of the schedule. * - * @member {string} [id] Gets or sets the id of the resource. - * @member {string} [name] Gets or sets the name of the schedule. + * @member {string} [id] Gets the id of the resource. + * @member {string} [name] Gets name of the schedule. + * @member {string} [type] Resource type * @member {date} [startTime] Gets or sets the start time of the schedule. * @member {number} [startTimeOffsetMinutes] Gets the start time's offset in * minutes. @@ -1926,8 +2016,9 @@ export interface ScheduleCreateOrUpdateParameters { * @member {string} [description] Gets or sets the description. */ export interface Schedule { - id?: string; - name?: string; + readonly id?: string; + readonly name?: string; + readonly type?: string; startTime?: Date; readonly startTimeOffsetMinutes?: number; expiryTime?: Date; @@ -1950,13 +2041,13 @@ export interface Schedule { * @constructor * The parameters supplied to the update schedule operation. * - * @member {string} name Gets or sets the name of the schedule. + * @member {string} [name] Gets or sets the name of the schedule. * @member {string} [description] Gets or sets the description of the schedule. * @member {boolean} [isEnabled] Gets or sets a value indicating whether this * schedule is enabled. */ export interface ScheduleUpdateParameters { - name: string; + name?: string; description?: string; isEnabled?: boolean; } @@ -1979,13 +2070,11 @@ export interface SubResource extends BaseResource { * @constructor * The parameters supplied to the create test job operation. * - * @member {string} runbookName Gets or sets the runbook name. * @member {object} [parameters] Gets or sets the parameters of the test job. * @member {string} [runOn] Gets or sets the runOn which specifies the group * name where the job is to be executed. */ export interface TestJobCreateParameters { - runbookName: string; parameters?: { [propertyName: string]: string }; runOn?: string; } @@ -2011,6 +2100,8 @@ export interface TestJobCreateParameters { * @member {date} [lastStatusModifiedTime] Gets or sets the last status * modified time of the test job. * @member {object} [parameters] Gets or sets the parameters of the test job. + * @member {number} [logActivityTrace] The activity-level tracing options of + * the runbook. */ export interface TestJob { creationTime?: Date; @@ -2023,6 +2114,7 @@ export interface TestJob { lastModifiedTime?: Date; lastStatusModifiedTime?: Date; parameters?: { [propertyName: string]: string }; + logActivityTrace?: number; } /** @@ -2064,8 +2156,9 @@ export interface VariableCreateOrUpdateParameters { * @constructor * Definition of the varible. * - * @member {string} [id] Gets or sets the id of the resource. - * @member {string} [name] Gets or sets the name of the variable. + * @member {string} [id] Gets the id of the resource. + * @member {string} [name] Gets the name of the variable. + * @member {string} [type] Resource type * @member {string} [value] Gets or sets the value of the variable. * @member {boolean} [isEncrypted] Gets or sets the encrypted flag of the * variable. @@ -2073,9 +2166,10 @@ export interface VariableCreateOrUpdateParameters { * @member {date} [lastModifiedTime] Gets or sets the last modified time. * @member {string} [description] Gets or sets the description. */ -export interface Variable { - id?: string; - name?: string; +export interface Variable extends BaseResource { + readonly id?: string; + readonly name?: string; + readonly type?: string; value?: string; isEncrypted?: boolean; creationTime?: Date; @@ -2089,12 +2183,12 @@ export interface Variable { * @constructor * The parameters supplied to the update variable operation. * - * @member {string} name Gets or sets the name of the variable. + * @member {string} [name] Gets or sets the name of the variable. * @member {string} [value] Gets or sets the value of the variable. * @member {string} [description] Gets or sets the description of the variable. */ export interface VariableUpdateParameters { - name: string; + name?: string; value?: string; description?: string; } @@ -2132,8 +2226,9 @@ export interface WebhookCreateOrUpdateParameters { * @constructor * Definition of the webhook type. * - * @member {string} [id] Gets or sets the id of the resource. - * @member {string} [name] Gets or sets the name of the webhook. + * @member {string} [id] Gets the id of the resource. + * @member {string} [name] Gets the name of the webhook. + * @member {string} [type] Gets the type of the resource. * @member {boolean} [isEnabled] Gets or sets the value of the enabled flag of * the webhook. Default value: false . * @member {string} [uri] Gets or sets the webhook uri. @@ -2150,9 +2245,10 @@ export interface WebhookCreateOrUpdateParameters { * @member {date} [lastModifiedTime] Gets or sets the last modified time. * @member {string} [description] Gets or sets the description. */ -export interface Webhook { - id?: string; - name?: string; +export interface Webhook extends BaseResource { + readonly id?: string; + readonly name?: string; + readonly type?: string; isEnabled?: boolean; uri?: string; expiryTime?: Date; @@ -2171,7 +2267,7 @@ export interface Webhook { * @constructor * The parameters supplied to the update webhook operation. * - * @member {string} name Gets or sets the name of the webhook. + * @member {string} [name] Gets or sets the name of the webhook. * @member {boolean} [isEnabled] Gets or sets the value of the enabled flag of * webhook. * @member {string} [runOn] Gets or sets the name of the hybrid worker group @@ -2180,30 +2276,704 @@ export interface Webhook { * @member {string} [description] Gets or sets the description of the webhook. */ export interface WebhookUpdateParameters { - name: string; + name?: string; isEnabled?: boolean; runOn?: string; parameters?: { [propertyName: string]: string }; description?: string; } - /** * @class - * Initializes a new instance of the AutomationAccountListResult class. + * Initializes a new instance of the DscNode class. * @constructor - * The response model for the list account operation. + * Definition of the dsc node type. * - * @member {string} [nextLink] Gets or sets the next link. + * @member {date} [lastSeen] Gets or sets the last seen time of the node. + * @member {date} [registrationTime] Gets or sets the registration time of the + * node. + * @member {string} [ip] Gets or sets the ip of the node. + * @member {string} [accountId] Gets or sets the account id of the node. + * @member {object} [nodeConfiguration] Gets or sets the configuration of the + * node. + * @member {string} [nodeConfiguration.name] Gets or sets the name of the dsc + * nodeconfiguration. + * @member {string} [status] Gets or sets the status of the node. + * @member {string} [nodeId] Gets or sets the node id. + * @member {string} [etag] Gets or sets the etag of the resource. + * @member {array} [extensionHandler] Gets or sets the list of extensionHandler + * properties for a Node. */ -export interface AutomationAccountListResult extends Array { - nextLink?: string; -} - -/** - * @class - * Initializes a new instance of the OperationListResult class. - * @constructor +export interface DscNode extends ProxyResource { + lastSeen?: Date; + registrationTime?: Date; + ip?: string; + accountId?: string; + nodeConfiguration?: DscNodeConfigurationAssociationProperty; + status?: string; + nodeId?: string; + etag?: string; + extensionHandler?: DscNodeExtensionHandlerAssociationProperty[]; +} + +/** + * @class + * Initializes a new instance of the DscNodeConfiguration class. + * @constructor + * Definition of the dsc node configuration. + * + * @member {date} [lastModifiedTime] Gets or sets the last modified time. + * @member {date} [creationTime] Gets or sets creation time. + * @member {object} [configuration] Gets or sets the configuration of the node. + * @member {string} [configuration.name] Gets or sets the name of the Dsc + * configuration. + */ +export interface DscNodeConfiguration extends ProxyResource { + lastModifiedTime?: Date; + creationTime?: Date; + configuration?: DscConfigurationAssociationProperty; +} + +/** + * @class + * Initializes a new instance of the CollectionItemUpdateConfiguration class. + * @constructor + * object returned when requesting a collection of software update + * configuration + * + * @member {array} [azureVirtualMachines] List of azure resource Ids for azure + * virtual machines targeted by the software update configuration. + * @member {moment.duration} [duration] Maximum time allowed for the software + * update configuration run. Duration needs to be specified using the format + * PT[n]H[n]M[n]S as per ISO8601 + */ +export interface CollectionItemUpdateConfiguration { + azureVirtualMachines?: string[]; + duration?: moment.Duration; +} + +/** + * @class + * Initializes a new instance of the SoftwareUpdateConfigurationCollectionItem class. + * @constructor + * Software update configuration collection item properties. + * + * @member {string} [name] Name of the software update configuration. + * @member {string} [id] Resource Id of the software update configuration + * @member {object} [updateConfiguration] Update specific properties of the + * software update configuration. + * @member {array} [updateConfiguration.azureVirtualMachines] List of azure + * resource Ids for azure virtual machines targeted by the software update + * configuration. + * @member {moment.duration} [updateConfiguration.duration] Maximum time + * allowed for the software update configuration run. Duration needs to be + * specified using the format PT[n]H[n]M[n]S as per ISO8601 + * @member {string} [frequency] execution frequency of the schedule associated + * with the software update configuration. Possible values include: 'OneTime', + * 'Day', 'Hour', 'Week', 'Month' + * @member {date} [startTime] the start time of the update. + * @member {date} [creationTime] Creation time of the software update + * configuration, which only appears in the response. + * @member {date} [lastModifiedTime] Last time software update configuration + * was modified, which only appears in the response. + * @member {string} [provisioningState] Provisioning state for the software + * update configuration, which only appears in the response. + * @member {date} [nextRun] ext run time of the update. + */ +export interface SoftwareUpdateConfigurationCollectionItem { + readonly name?: string; + readonly id?: string; + updateConfiguration?: CollectionItemUpdateConfiguration; + frequency?: string; + startTime?: Date; + readonly creationTime?: Date; + readonly lastModifiedTime?: Date; + readonly provisioningState?: string; + nextRun?: Date; +} + +/** + * @class + * Initializes a new instance of the SoftwareUpdateConfigurationListResult class. + * @constructor + * result of listing all software update configuration + * + * @member {array} [value] outer object returned when listing all software + * update configurations + */ +export interface SoftwareUpdateConfigurationListResult { + value?: SoftwareUpdateConfigurationCollectionItem[]; +} + +/** + * @class + * Initializes a new instance of the LinuxProperties class. + * @constructor + * Linux specific update configuration. + * + * @member {string} [includedPackageClassifications] Update classifications + * included in the software update configuration. Possible values include: + * 'Unclassified', 'Critical', 'Security', 'Other' + * @member {array} [excludedPackageNameMasks] packages excluded from the + * software update configuration. + */ +export interface LinuxProperties { + includedPackageClassifications?: string; + excludedPackageNameMasks?: string[]; +} + +/** + * @class + * Initializes a new instance of the WindowsProperties class. + * @constructor + * Windows specific update configuration. + * + * @member {string} [includedUpdateClassifications] Update classification + * included in the software update configuration. A comma separated string with + * required values. Possible values include: 'Unclassified', 'Critical', + * 'Security', 'UpdateRollup', 'FeaturePack', 'ServicePack', 'Definition', + * 'Tools', 'Updates' + * @member {array} [excludedKbNumbers] KB numbers excluded from the software + * update configuration. + */ +export interface WindowsProperties { + includedUpdateClassifications?: string; + excludedKbNumbers?: string[]; +} + +/** + * @class + * Initializes a new instance of the UpdateConfiguration class. + * @constructor + * Update specifc properties of the software update configuration. + * + * @member {string} operatingSystem operating system of target machines. + * Possible values include: 'Windows', 'Linux' + * @member {object} [windows] Windows specific update configuration. + * @member {string} [windows.includedUpdateClassifications] Update + * classification included in the software update configuration. A comma + * separated string with required values. Possible values include: + * 'Unclassified', 'Critical', 'Security', 'UpdateRollup', 'FeaturePack', + * 'ServicePack', 'Definition', 'Tools', 'Updates' + * @member {array} [windows.excludedKbNumbers] KB numbers excluded from the + * software update configuration. + * @member {object} [linux] Linux specific update configuration. + * @member {string} [linux.includedPackageClassifications] Update + * classifications included in the software update configuration. Possible + * values include: 'Unclassified', 'Critical', 'Security', 'Other' + * @member {array} [linux.excludedPackageNameMasks] packages excluded from the + * software update configuration. + * @member {moment.duration} [duration] Maximum time allowed for the software + * update configuration run. Duration needs to be specified using the format + * PT[n]H[n]M[n]S as per ISO8601 + * @member {array} [azureVirtualMachines] List of azure resource Ids for azure + * virtual machines targeted by the software update configuration. + * @member {array} [nonAzureComputerNames] List of names of non-azure machines + * targeted by the software update configuration. + */ +export interface UpdateConfiguration { + operatingSystem: string; + windows?: WindowsProperties; + linux?: LinuxProperties; + duration?: moment.Duration; + azureVirtualMachines?: string[]; + nonAzureComputerNames?: string[]; +} + +/** + * @class + * Initializes a new instance of the SoftwareUpdateConfiguration class. + * @constructor + * Software update configuration properties. + * + * @member {string} [name] Resource name. + * @member {string} [id] Resource Id. + * @member {string} [type] Resource type + * @member {object} updateConfiguration update specific properties for the + * Software update configuration + * @member {string} [updateConfiguration.operatingSystem] operating system of + * target machines. Possible values include: 'Windows', 'Linux' + * @member {object} [updateConfiguration.windows] Windows specific update + * configuration. + * @member {string} [updateConfiguration.windows.includedUpdateClassifications] + * Update classification included in the software update configuration. A comma + * separated string with required values. Possible values include: + * 'Unclassified', 'Critical', 'Security', 'UpdateRollup', 'FeaturePack', + * 'ServicePack', 'Definition', 'Tools', 'Updates' + * @member {array} [updateConfiguration.windows.excludedKbNumbers] KB numbers + * excluded from the software update configuration. + * @member {object} [updateConfiguration.linux] Linux specific update + * configuration. + * @member {string} [updateConfiguration.linux.includedPackageClassifications] + * Update classifications included in the software update configuration. + * Possible values include: 'Unclassified', 'Critical', 'Security', 'Other' + * @member {array} [updateConfiguration.linux.excludedPackageNameMasks] + * packages excluded from the software update configuration. + * @member {moment.duration} [updateConfiguration.duration] Maximum time + * allowed for the software update configuration run. Duration needs to be + * specified using the format PT[n]H[n]M[n]S as per ISO8601 + * @member {array} [updateConfiguration.azureVirtualMachines] List of azure + * resource Ids for azure virtual machines targeted by the software update + * configuration. + * @member {array} [updateConfiguration.nonAzureComputerNames] List of names of + * non-azure machines targeted by the software update configuration. + * @member {object} scheduleInfo Schedule information for the Software update + * configuration + * @member {date} [scheduleInfo.startTime] Gets or sets the start time of the + * schedule. + * @member {number} [scheduleInfo.startTimeOffsetMinutes] Gets the start time's + * offset in minutes. + * @member {date} [scheduleInfo.expiryTime] Gets or sets the end time of the + * schedule. + * @member {number} [scheduleInfo.expiryTimeOffsetMinutes] Gets or sets the + * expiry time's offset in minutes. + * @member {boolean} [scheduleInfo.isEnabled] Gets or sets a value indicating + * whether this schedule is enabled. + * @member {date} [scheduleInfo.nextRun] Gets or sets the next run time of the + * schedule. + * @member {number} [scheduleInfo.nextRunOffsetMinutes] Gets or sets the next + * run time's offset in minutes. + * @member {object} [scheduleInfo.interval] Gets or sets the interval of the + * schedule. + * @member {string} [scheduleInfo.frequency] Gets or sets the frequency of the + * schedule. Possible values include: 'OneTime', 'Day', 'Hour', 'Week', 'Month' + * @member {string} [scheduleInfo.timeZone] Gets or sets the time zone of the + * schedule. + * @member {object} [scheduleInfo.advancedSchedule] Gets or sets the advanced + * schedule. + * @member {array} [scheduleInfo.advancedSchedule.weekDays] Days of the week + * that the job should execute on. + * @member {array} [scheduleInfo.advancedSchedule.monthDays] Days of the month + * that the job should execute on. Must be between 1 and 31. + * @member {array} [scheduleInfo.advancedSchedule.monthlyOccurrences] + * Occurrences of days within a month. + * @member {date} [scheduleInfo.creationTime] Gets or sets the creation time. + * @member {date} [scheduleInfo.lastModifiedTime] Gets or sets the last + * modified time. + * @member {string} [scheduleInfo.description] Gets or sets the description. + * @member {string} [provisioningState] Provisioning state for the software + * update configuration, which only appears in the response. + * @member {object} [error] detailes of provisioning error + * @member {string} [error.code] Error code + * @member {string} [error.message] Error message indicating why the operation + * failed. + * @member {date} [creationTime] Creation time of theresource, which only + * appears in the response. + * @member {string} [createdBy] createdBy property, which only appears in the + * response. + * @member {date} [lastModifiedTime] Last time resource was modified, which + * only appears in the response. + * @member {string} [lastModifiedBy] lastModifiedBy property, which only + * appears in the response. + */ +export interface SoftwareUpdateConfiguration extends BaseResource { + readonly name?: string; + readonly id?: string; + readonly type?: string; + updateConfiguration: UpdateConfiguration; + scheduleInfo: ScheduleProperties; + readonly provisioningState?: string; + error?: ErrorResponse; + readonly creationTime?: Date; + readonly createdBy?: string; + readonly lastModifiedTime?: Date; + readonly lastModifiedBy?: string; +} + +/** + * @class + * Initializes a new instance of the UpdateConfigurationNavigation class. + * @constructor + * Software update configuration Run Navigation model. + * + * @member {string} [name] Name of the software update configuration triggered + * the software update configuration run + */ +export interface UpdateConfigurationNavigation { + readonly name?: string; +} + +/** + * @class + * Initializes a new instance of the SoftwareUpdateConfigurationRun class. + * @constructor + * Software update configuration Run properties. + * + * @member {string} [name] Name of the software update configuration run. + * @member {string} [id] Resource Id of the software update configuration run + * @member {object} [softwareUpdateConfiguration] software update configuration + * triggered this run + * @member {string} [softwareUpdateConfiguration.name] Name of the software + * update configuration triggered the software update configuration run + * @member {string} [status] Status of the software update configuration run. + * @member {string} [configuredDuration] configured duration for the software + * update configuration run. + * @member {string} [osType] Operating system target of the software update + * configuration triggered this run + * @member {date} [startTime] Etart time of the software update configuration + * run. + * @member {date} [endTime] End time of the software update configuration run. + * @member {number} [computerCount] Number of computers in the software update + * configuration run. + * @member {number} [failedCount] Number of computers with failed status. + * @member {date} [creationTime] Creation time of theresource, which only + * appears in the response. + * @member {string} [createdBy] createdBy property, which only appears in the + * response. + * @member {date} [lastModifiedTime] Last time resource was modified, which + * only appears in the response. + * @member {string} [lastModifiedBy] lastModifiedBy property, which only + * appears in the response. + */ +export interface SoftwareUpdateConfigurationRun { + readonly name?: string; + readonly id?: string; + softwareUpdateConfiguration?: UpdateConfigurationNavigation; + readonly status?: string; + readonly configuredDuration?: string; + readonly osType?: string; + readonly startTime?: Date; + readonly endTime?: Date; + readonly computerCount?: number; + readonly failedCount?: number; + readonly creationTime?: Date; + readonly createdBy?: string; + readonly lastModifiedTime?: Date; + readonly lastModifiedBy?: string; +} + +/** + * @class + * Initializes a new instance of the SoftwareUpdateConfigurationRunListResult class. + * @constructor + * result of listing all software update configuration runs + * + * @member {array} [value] outer object returned when listing all software + * update configuration runs + * @member {string} [nextLink] link to next page of results. + */ +export interface SoftwareUpdateConfigurationRunListResult { + value?: SoftwareUpdateConfigurationRun[]; + nextLink?: string; +} + +/** + * @class + * Initializes a new instance of the JobNavigation class. + * @constructor + * Software update configuration machine run job navigation properties. + * + * @member {string} [id] Id of the job associated with the software update + * configuration run + */ +export interface JobNavigation { + readonly id?: string; +} + +/** + * @class + * Initializes a new instance of the SoftwareUpdateConfigurationMachineRun class. + * @constructor + * Software update configuration machine run model. + * + * @member {string} [name] Name of the software update configuration machine + * run + * @member {string} [id] Resource Id of the software update configuration + * machine run + * @member {string} [targetComputer] name of the updated computer + * @member {string} [targetComputerType] type of the updated computer. + * @member {object} [softwareUpdateConfiguration] software update configuration + * triggered this run + * @member {string} [softwareUpdateConfiguration.name] Name of the software + * update configuration triggered the software update configuration run + * @member {string} [status] Status of the software update configuration + * machine run. + * @member {string} [osType] Operating system target of the software update + * configuration triggered this run + * @member {uuid} [correlationId] correlation id of the software update + * configuration machine run + * @member {uuid} [sourceComputerId] source computer id of the software update + * configuration machine run + * @member {date} [startTime] Start time of the software update configuration + * machine run. + * @member {date} [endTime] End time of the software update configuration + * machine run. + * @member {string} [configuredDuration] configured duration for the software + * update configuration run. + * @member {object} [job] Job associated with the software update configuration + * machine run + * @member {string} [job.id] Id of the job associated with the software update + * configuration run + * @member {date} [creationTime] Creation time of theresource, which only + * appears in the response. + * @member {string} [createdBy] createdBy property, which only appears in the + * response. + * @member {date} [lastModifiedTime] Last time resource was modified, which + * only appears in the response. + * @member {string} [lastModifiedBy] lastModifiedBy property, which only + * appears in the response. + */ +export interface SoftwareUpdateConfigurationMachineRun { + readonly name?: string; + readonly id?: string; + readonly targetComputer?: string; + readonly targetComputerType?: string; + softwareUpdateConfiguration?: UpdateConfigurationNavigation; + readonly status?: string; + readonly osType?: string; + readonly correlationId?: string; + readonly sourceComputerId?: string; + readonly startTime?: Date; + readonly endTime?: Date; + readonly configuredDuration?: string; + job?: JobNavigation; + readonly creationTime?: Date; + readonly createdBy?: string; + readonly lastModifiedTime?: Date; + readonly lastModifiedBy?: string; +} + +/** + * @class + * Initializes a new instance of the SoftwareUpdateConfigurationMachineRunListResult class. + * @constructor + * result of listing all software update configuration machine runs + * + * @member {array} [value] outer object returned when listing all software + * update configuration machine runs + * @member {string} [nextLink] link to next page of results. + */ +export interface SoftwareUpdateConfigurationMachineRunListResult { + value?: SoftwareUpdateConfigurationMachineRun[]; + nextLink?: string; +} + +/** + * @class + * Initializes a new instance of the SourceControl class. + * @constructor + * Definition of the source control. + * + * @member {string} [name] Resource name. + * @member {string} [id] Resource Id. + * @member {string} [type] Resource type. + * @member {string} [repoUrl] Gets or sets the repo url of the source control. + * @member {string} [branch] Gets or sets the repo branch of the source + * control. Include branch as empty string for VsoTfvc. + * @member {string} [folderPath] Gets or sets the folder path of the source + * control. + * @member {boolean} [autoSync] Gets or sets auto async of the source control. + * Default is false. + * @member {boolean} [publishRunbook] Gets or sets the auto publish of the + * source control. Default is true. + * @member {string} [sourceType] The source type. Must be one of VsoGit, + * VsoTfvc, GitHub. Possible values include: 'VsoGit', 'VsoTfvc', 'GitHub' + * @member {string} [description] Gets or sets the description. + * @member {date} [creationTime] Gets or sets the creation time. + * @member {date} [lastModifiedTime] Gets or sets the last modified time. + */ +export interface SourceControl extends BaseResource { + readonly name?: string; + readonly id?: string; + readonly type?: string; + repoUrl?: string; + branch?: string; + folderPath?: string; + autoSync?: boolean; + publishRunbook?: boolean; + sourceType?: string; + description?: string; + creationTime?: Date; + lastModifiedTime?: Date; +} + +/** + * @class + * Initializes a new instance of the SourceControlUpdateParameters class. + * @constructor + * The parameters supplied to the update source control operation. + * + * @member {string} [branch] Gets or sets the repo branch of the source + * control. + * @member {string} [folderPath] Gets or sets the folder path of the source + * control. Path must be relative. + * @member {boolean} [autoSync] Gets or sets auto async of the source control. + * Default is false. + * @member {boolean} [publishRunbook] Gets or sets the auto publish of the + * source control. Default is true. + * @member {string} [securityToken] Gets or sets the authorization token for + * the repo of the source control. + * @member {string} [description] Gets or sets the user description of the + * source control. + */ +export interface SourceControlUpdateParameters { + branch?: string; + folderPath?: string; + autoSync?: boolean; + publishRunbook?: boolean; + securityToken?: string; + description?: string; +} + +/** + * @class + * Initializes a new instance of the SourceControlCreateOrUpdateParameters class. + * @constructor + * The parameters supplied to the create or update source control operation. + * + * @member {string} [repoUrl] Gets or sets the repo url of the source control. + * @member {string} [branch] Gets or sets the repo branch of the source + * control. Include branch as empty string for VsoTfvc. + * @member {string} [folderPath] Gets or sets the folder path of the source + * control. Path must be relative. + * @member {boolean} [autoSync] Gets or sets auto async of the source control. + * Default is false. + * @member {boolean} [publishRunbook] Gets or sets the auto publish of the + * source control. Default is true. + * @member {string} [sourceType] The source type. Must be one of VsoGit, + * VsoTfvc, GitHub, case sensitive. Possible values include: 'VsoGit', + * 'VsoTfvc', 'GitHub' + * @member {string} [securityToken] Gets or sets the authorization token for + * the repo of the source control. + * @member {string} [description] Gets or sets the user description of the + * source control. + */ +export interface SourceControlCreateOrUpdateParameters { + repoUrl?: string; + branch?: string; + folderPath?: string; + autoSync?: boolean; + publishRunbook?: boolean; + sourceType?: string; + securityToken?: string; + description?: string; +} + +/** + * @class + * Initializes a new instance of the SourceControlSyncJob class. + * @constructor + * Definition of the source control sync job. + * + * @member {string} [name] Resource name. + * @member {string} [type] Resource type. + * @member {string} [id] Resource id. + * @member {string} [sourceControlSyncJobId] Gets the source control sync job + * id. + * @member {date} [creationTime] Gets the creation time of the job. + * @member {string} [provisioningState] Gets the provisioning state of the job. + * Possible values include: 'Completed', 'Failed', 'Running' + * @member {date} [startTime] Gets the start time of the job. + * @member {date} [endTime] Gets the end time of the job. + * @member {string} [startedBy] Gets the user who started the sync job. + */ +export interface SourceControlSyncJob { + readonly name?: string; + readonly type?: string; + readonly id?: string; + sourceControlSyncJobId?: string; + readonly creationTime?: Date; + provisioningState?: string; + readonly startTime?: Date; + readonly endTime?: Date; + startedBy?: string; +} + +/** + * @class + * Initializes a new instance of the SourceControlSyncJobByIdErrors class. + * @constructor + * Error details of the source control sync job. + * + * @member {string} [code] Gets the error code for the job. + * @member {string} [message] Gets the error message for the job. + */ +export interface SourceControlSyncJobByIdErrors { + code?: string; + message?: string; +} + +/** + * @class + * Initializes a new instance of the SourceControlSyncJobById class. + * @constructor + * Definition of the source control sync job. + * + * @member {string} [id] Gets the id of the job. + * @member {string} [sourceControlSyncJobId] Gets the source control sync job + * id. + * @member {date} [creationTime] Gets the creation time of the job. + * @member {string} [provisioningState] Gets the provisioning state of the job. + * Possible values include: 'Completed', 'Failed', 'Running' + * @member {date} [startTime] Gets the start time of the job. + * @member {date} [endTime] Gets the end time of the job. + * @member {string} [startedBy] Gets the user who started the sync job. + * @member {object} [errors] Error details of the source control sync job. + * @member {string} [errors.code] Gets the error code for the job. + * @member {string} [errors.message] Gets the error message for the job. + */ +export interface SourceControlSyncJobById { + id?: string; + sourceControlSyncJobId?: string; + readonly creationTime?: Date; + provisioningState?: string; + readonly startTime?: Date; + readonly endTime?: Date; + startedBy?: string; + errors?: SourceControlSyncJobByIdErrors; +} + +/** + * @class + * Initializes a new instance of the JobCollectionItem class. + * @constructor + * Job collection item properties. + * + * @member {object} [runbook] The runbook association. + * @member {string} [runbook.name] Gets or sets the name of the runbook. + * @member {uuid} [jobId] The id of the job. + * @member {date} [creationTime] The creation time of the job. + * @member {string} [status] The status of the job. Possible values include: + * 'New', 'Activating', 'Running', 'Completed', 'Failed', 'Stopped', 'Blocked', + * 'Suspended', 'Disconnected', 'Suspending', 'Stopping', 'Resuming', + * 'Removing' + * @member {date} [startTime] The start time of the job. + * @member {date} [endTime] The end time of the job. + * @member {date} [lastModifiedTime] The last modified time of the job. + * @member {object} [provisioningState] The current provisioning state of the + * job. + * @member {string} [provisioningState.provisioningState] The provisioning + * state of the resource. Possible values include: 'Failed', 'Succeeded', + * 'Suspended', 'Processing' + */ +export interface JobCollectionItem extends ProxyResource { + readonly runbook?: RunbookAssociationProperty; + readonly jobId?: string; + readonly creationTime?: Date; + readonly status?: string; + readonly startTime?: Date; + readonly endTime?: Date; + readonly lastModifiedTime?: Date; + provisioningState?: JobProvisioningStateProperty; +} + + +/** + * @class + * Initializes a new instance of the AutomationAccountListResult class. + * @constructor + * The response model for the list account operation. + * + * @member {string} [nextLink] Gets or sets the next link. + */ +export interface AutomationAccountListResult extends Array { + nextLink?: string; +} + +/** + * @class + * Initializes a new instance of the OperationListResult class. + * @constructor * The response model for the list of Automation operations * */ @@ -2350,30 +3120,6 @@ export interface HybridRunbookWorkerGroupsListResult extends Array { - nextLink?: string; -} - -/** - * @class - * Initializes a new instance of the JobStreamListResult class. - * @constructor - * The response model for the list job stream operation. - * - * @member {string} [nextLink] Gets or sets the next link. - */ -export interface JobStreamListResult extends Array { - nextLink?: string; -} - /** * @class * Initializes a new instance of the JobScheduleListResult class. @@ -2432,6 +3178,18 @@ export interface RunbookListResult extends Array { nextLink?: string; } +/** + * @class + * Initializes a new instance of the JobStreamListResult class. + * @constructor + * The response model for the list job stream operation. + * + * @member {string} [nextLink] Gets or sets the next link. + */ +export interface JobStreamListResult extends Array { + nextLink?: string; +} + /** * @class * Initializes a new instance of the ScheduleListResult class. @@ -2467,3 +3225,39 @@ export interface VariableListResult extends Array { export interface WebhookListResult extends Array { nextLink?: string; } + +/** + * @class + * Initializes a new instance of the SourceControlListResult class. + * @constructor + * The response model for the list source controls operation. + * + * @member {string} [nextLink] Gets or sets the next link. + */ +export interface SourceControlListResult extends Array { + nextLink?: string; +} + +/** + * @class + * Initializes a new instance of the SourceControlSyncJobListResult class. + * @constructor + * The response model for the list source control sync jobs operation. + * + * @member {string} [nextLink] Gets or sets the next link. + */ +export interface SourceControlSyncJobListResult extends Array { + nextLink?: string; +} + +/** + * @class + * Initializes a new instance of the JobListResultV2 class. + * @constructor + * The response model for the list job operation. + * + * @member {string} [nextLink] The link to the next page. + */ +export interface JobListResultV2 extends Array { + readonly nextLink?: string; +} diff --git a/lib/services/automationManagement/lib/models/index.js b/lib/services/automationManagement/lib/models/index.js index 8d66af1839..9f35001d96 100644 --- a/lib/services/automationManagement/lib/models/index.js +++ b/lib/services/automationManagement/lib/models/index.js @@ -30,8 +30,6 @@ exports.Resource = require('./resource'); exports.Runbook = require('./runbook'); exports.ModuleErrorInfo = require('./moduleErrorInfo'); exports.Module = require('./module'); -exports.DscNodeConfigurationAssociationProperty = require('./dscNodeConfigurationAssociationProperty'); -exports.DscNode = require('./dscNode'); exports.ContentSource = require('./contentSource'); exports.DscConfigurationParameter = require('./dscConfigurationParameter'); exports.DscConfiguration = require('./dscConfiguration'); @@ -65,11 +63,14 @@ exports.AgentRegistration = require('./agentRegistration'); exports.AgentRegistrationRegenerateKeyParameter = require('./agentRegistrationRegenerateKeyParameter'); exports.DscConfigurationAssociationProperty = require('./dscConfigurationAssociationProperty'); exports.DscCompilationJobCreateParameters = require('./dscCompilationJobCreateParameters'); +exports.JobProvisioningStateProperty = require('./jobProvisioningStateProperty'); +exports.ProxyResource = require('./proxyResource'); exports.DscCompilationJob = require('./dscCompilationJob'); exports.DscConfigurationCreateOrUpdateParameters = require('./dscConfigurationCreateOrUpdateParameters'); exports.DscMetaConfiguration = require('./dscMetaConfiguration'); exports.DscNodeConfigurationCreateOrUpdateParameters = require('./dscNodeConfigurationCreateOrUpdateParameters'); -exports.DscNodeConfiguration = require('./dscNodeConfiguration'); +exports.DscNodeConfigurationAssociationProperty = require('./dscNodeConfigurationAssociationProperty'); +exports.DscNodeExtensionHandlerAssociationProperty = require('./dscNodeExtensionHandlerAssociationProperty'); exports.DscNodeUpdateParameters = require('./dscNodeUpdateParameters'); exports.DscReportError = require('./dscReportError'); exports.DscReportResourceNavigation = require('./dscReportResourceNavigation'); @@ -82,10 +83,12 @@ exports.HybridRunbookWorkerGroupUpdateParameters = require('./hybridRunbookWorke exports.RunbookAssociationProperty = require('./runbookAssociationProperty'); exports.Job = require('./job'); exports.JobCreateParameters = require('./jobCreateParameters'); +exports.JobListResult = require('./jobListResult'); exports.ScheduleAssociationProperty = require('./scheduleAssociationProperty'); exports.JobScheduleCreateParameters = require('./jobScheduleCreateParameters'); exports.JobSchedule = require('./jobSchedule'); exports.JobStream = require('./jobStream'); +exports.LinkedWorkspace = require('./linkedWorkspace'); exports.ModuleCreateOrUpdateParameters = require('./moduleCreateOrUpdateParameters'); exports.ModuleUpdateParameters = require('./moduleUpdateParameters'); exports.RunbookDraftUndoEditResult = require('./runbookDraftUndoEditResult'); @@ -94,6 +97,7 @@ exports.RunbookCreateOrUpdateDraftProperties = require('./runbookCreateOrUpdateD exports.RunbookCreateOrUpdateDraftParameters = require('./runbookCreateOrUpdateDraftParameters'); exports.RunbookUpdateParameters = require('./runbookUpdateParameters'); exports.ScheduleCreateOrUpdateParameters = require('./scheduleCreateOrUpdateParameters'); +exports.ScheduleProperties = require('./scheduleProperties'); exports.Schedule = require('./schedule'); exports.ScheduleUpdateParameters = require('./scheduleUpdateParameters'); exports.SubResource = require('./subResource'); @@ -106,6 +110,28 @@ exports.VariableUpdateParameters = require('./variableUpdateParameters'); exports.WebhookCreateOrUpdateParameters = require('./webhookCreateOrUpdateParameters'); exports.Webhook = require('./webhook'); exports.WebhookUpdateParameters = require('./webhookUpdateParameters'); +exports.DscNode = require('./dscNode'); +exports.DscNodeConfiguration = require('./dscNodeConfiguration'); +exports.CollectionItemUpdateConfiguration = require('./collectionItemUpdateConfiguration'); +exports.SoftwareUpdateConfigurationCollectionItem = require('./softwareUpdateConfigurationCollectionItem'); +exports.SoftwareUpdateConfigurationListResult = require('./softwareUpdateConfigurationListResult'); +exports.LinuxProperties = require('./linuxProperties'); +exports.WindowsProperties = require('./windowsProperties'); +exports.UpdateConfiguration = require('./updateConfiguration'); +exports.SoftwareUpdateConfiguration = require('./softwareUpdateConfiguration'); +exports.UpdateConfigurationNavigation = require('./updateConfigurationNavigation'); +exports.SoftwareUpdateConfigurationRun = require('./softwareUpdateConfigurationRun'); +exports.SoftwareUpdateConfigurationRunListResult = require('./softwareUpdateConfigurationRunListResult'); +exports.JobNavigation = require('./jobNavigation'); +exports.SoftwareUpdateConfigurationMachineRun = require('./softwareUpdateConfigurationMachineRun'); +exports.SoftwareUpdateConfigurationMachineRunListResult = require('./softwareUpdateConfigurationMachineRunListResult'); +exports.SourceControl = require('./sourceControl'); +exports.SourceControlUpdateParameters = require('./sourceControlUpdateParameters'); +exports.SourceControlCreateOrUpdateParameters = require('./sourceControlCreateOrUpdateParameters'); +exports.SourceControlSyncJob = require('./sourceControlSyncJob'); +exports.SourceControlSyncJobByIdErrors = require('./sourceControlSyncJobByIdErrors'); +exports.SourceControlSyncJobById = require('./sourceControlSyncJobById'); +exports.JobCollectionItem = require('./jobCollectionItem'); exports.AutomationAccountListResult = require('./automationAccountListResult'); exports.OperationListResult = require('./operationListResult'); exports.StatisticsListResult = require('./statisticsListResult'); @@ -120,13 +146,15 @@ exports.DscNodeListResult = require('./dscNodeListResult'); exports.DscNodeReportListResult = require('./dscNodeReportListResult'); exports.DscNodeConfigurationListResult = require('./dscNodeConfigurationListResult'); exports.HybridRunbookWorkerGroupsListResult = require('./hybridRunbookWorkerGroupsListResult'); -exports.JobListResult = require('./jobListResult'); -exports.JobStreamListResult = require('./jobStreamListResult'); exports.JobScheduleListResult = require('./jobScheduleListResult'); exports.ActivityListResult = require('./activityListResult'); exports.ModuleListResult = require('./moduleListResult'); exports.TypeFieldListResult = require('./typeFieldListResult'); exports.RunbookListResult = require('./runbookListResult'); +exports.JobStreamListResult = require('./jobStreamListResult'); exports.ScheduleListResult = require('./scheduleListResult'); exports.VariableListResult = require('./variableListResult'); exports.WebhookListResult = require('./webhookListResult'); +exports.SourceControlListResult = require('./sourceControlListResult'); +exports.SourceControlSyncJobListResult = require('./sourceControlSyncJobListResult'); +exports.JobListResultV2 = require('./jobListResultV2'); diff --git a/lib/services/automationManagement/lib/models/job.js b/lib/services/automationManagement/lib/models/job.js index 55e6058256..b75467cfad 100644 --- a/lib/services/automationManagement/lib/models/job.js +++ b/lib/services/automationManagement/lib/models/job.js @@ -15,11 +15,11 @@ const models = require('./index'); /** * Definition of the job. * + * @extends models['ProxyResource'] */ -class Job { +class Job extends models['ProxyResource'] { /** * Create a Job. - * @member {string} [id] Gets or sets the id of the resource. * @member {object} [runbook] Gets or sets the runbook. * @member {string} [runbook.name] Gets or sets the name of the runbook. * @member {string} [startedBy] Gets or sets the job started by. @@ -41,8 +41,13 @@ class Job { * @member {date} [lastStatusModifiedTime] Gets or sets the last status * modified time of the job. * @member {object} [parameters] Gets or sets the parameters of the job. + * @member {object} [provisioningState] The provisioning state of a resource. + * @member {string} [provisioningState.provisioningState] The provisioning + * state of the resource. Possible values include: 'Failed', 'Succeeded', + * 'Suspended', 'Processing' */ constructor() { + super(); } /** @@ -61,11 +66,28 @@ class Job { modelProperties: { id: { required: false, + readOnly: true, serializedName: 'id', type: { name: 'String' } }, + name: { + required: false, + readOnly: true, + serializedName: 'name', + type: { + name: 'String' + } + }, + type: { + required: false, + readOnly: true, + serializedName: 'type', + type: { + name: 'String' + } + }, runbook: { required: false, serializedName: 'properties.runbook', @@ -164,6 +186,14 @@ class Job { } } } + }, + provisioningState: { + required: false, + serializedName: 'properties.provisioningState', + type: { + name: 'Composite', + className: 'JobProvisioningStateProperty' + } } } } diff --git a/lib/services/automationManagement/lib/models/jobCollectionItem.js b/lib/services/automationManagement/lib/models/jobCollectionItem.js new file mode 100644 index 0000000000..221e327502 --- /dev/null +++ b/lib/services/automationManagement/lib/models/jobCollectionItem.js @@ -0,0 +1,153 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Job collection item properties. + * + * @extends models['ProxyResource'] + */ +class JobCollectionItem extends models['ProxyResource'] { + /** + * Create a JobCollectionItem. + * @member {object} [runbook] The runbook association. + * @member {string} [runbook.name] Gets or sets the name of the runbook. + * @member {uuid} [jobId] The id of the job. + * @member {date} [creationTime] The creation time of the job. + * @member {string} [status] The status of the job. Possible values include: + * 'New', 'Activating', 'Running', 'Completed', 'Failed', 'Stopped', + * 'Blocked', 'Suspended', 'Disconnected', 'Suspending', 'Stopping', + * 'Resuming', 'Removing' + * @member {date} [startTime] The start time of the job. + * @member {date} [endTime] The end time of the job. + * @member {date} [lastModifiedTime] The last modified time of the job. + * @member {object} [provisioningState] The current provisioning state of the + * job. + * @member {string} [provisioningState.provisioningState] The provisioning + * state of the resource. Possible values include: 'Failed', 'Succeeded', + * 'Suspended', 'Processing' + */ + constructor() { + super(); + } + + /** + * Defines the metadata of JobCollectionItem + * + * @returns {object} metadata of JobCollectionItem + * + */ + mapper() { + return { + required: false, + serializedName: 'jobCollectionItem', + type: { + name: 'Composite', + className: 'JobCollectionItem', + modelProperties: { + id: { + required: false, + readOnly: true, + serializedName: 'id', + type: { + name: 'String' + } + }, + name: { + required: false, + readOnly: true, + serializedName: 'name', + type: { + name: 'String' + } + }, + type: { + required: false, + readOnly: true, + serializedName: 'type', + type: { + name: 'String' + } + }, + runbook: { + required: false, + readOnly: true, + serializedName: 'properties.runbook', + type: { + name: 'Composite', + className: 'RunbookAssociationProperty' + } + }, + jobId: { + required: false, + readOnly: true, + serializedName: 'properties.jobId', + type: { + name: 'String' + } + }, + creationTime: { + required: false, + readOnly: true, + serializedName: 'properties.creationTime', + type: { + name: 'DateTime' + } + }, + status: { + required: false, + readOnly: true, + serializedName: 'properties.status', + type: { + name: 'String' + } + }, + startTime: { + required: false, + readOnly: true, + serializedName: 'properties.startTime', + type: { + name: 'DateTime' + } + }, + endTime: { + required: false, + readOnly: true, + serializedName: 'properties.endTime', + type: { + name: 'DateTime' + } + }, + lastModifiedTime: { + required: false, + readOnly: true, + serializedName: 'properties.lastModifiedTime', + type: { + name: 'DateTime' + } + }, + provisioningState: { + required: false, + serializedName: 'properties.provisioningState', + type: { + name: 'Composite', + className: 'JobProvisioningStateProperty' + } + } + } + } + }; + } +} + +module.exports = JobCollectionItem; diff --git a/lib/services/automationManagement/lib/models/jobCreateParameters.js b/lib/services/automationManagement/lib/models/jobCreateParameters.js index c5d34416d0..b60f054efd 100644 --- a/lib/services/automationManagement/lib/models/jobCreateParameters.js +++ b/lib/services/automationManagement/lib/models/jobCreateParameters.js @@ -24,9 +24,6 @@ class JobCreateParameters { * @member {object} [parameters] Gets or sets the parameters of the job. * @member {string} [runOn] Gets or sets the runOn which specifies the group * name where the job is to be executed. - * @member {string} [name] Gets or sets name of the resource. - * @member {string} [location] Gets or sets the location of the resource. - * @member {object} [tags] Gets or sets the tags attached to the resource. */ constructor() { } @@ -73,34 +70,6 @@ class JobCreateParameters { type: { name: 'String' } - }, - name: { - required: false, - serializedName: 'name', - type: { - name: 'String' - } - }, - location: { - required: false, - serializedName: 'location', - type: { - name: 'String' - } - }, - tags: { - required: false, - serializedName: 'tags', - type: { - name: 'Dictionary', - value: { - required: false, - serializedName: 'StringElementType', - type: { - name: 'String' - } - } - } } } } diff --git a/lib/services/automationManagement/lib/models/jobListResult.js b/lib/services/automationManagement/lib/models/jobListResult.js index 0e47b41d7c..227b185fd5 100644 --- a/lib/services/automationManagement/lib/models/jobListResult.js +++ b/lib/services/automationManagement/lib/models/jobListResult.js @@ -10,16 +10,19 @@ 'use strict'; +const models = require('./index'); + /** * The response model for the list job operation. + * */ -class JobListResult extends Array { +class JobListResult { /** * Create a JobListResult. + * @member {array} [value] Gets or sets a list of jobs. * @member {string} [nextLink] Gets or sets the next link. */ constructor() { - super(); } /** @@ -38,7 +41,7 @@ class JobListResult extends Array { modelProperties: { value: { required: false, - serializedName: '', + serializedName: 'value', type: { name: 'Sequence', element: { diff --git a/lib/services/automationManagement/lib/models/jobListResultV2.js b/lib/services/automationManagement/lib/models/jobListResultV2.js new file mode 100644 index 0000000000..7124a7c22b --- /dev/null +++ b/lib/services/automationManagement/lib/models/jobListResultV2.js @@ -0,0 +1,68 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * The response model for the list job operation. + */ +class JobListResultV2 extends Array { + /** + * Create a JobListResultV2. + * @member {string} [nextLink] The link to the next page. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of JobListResultV2 + * + * @returns {object} metadata of JobListResultV2 + * + */ + mapper() { + return { + required: false, + serializedName: 'JobListResultV2', + type: { + name: 'Composite', + className: 'JobListResultV2', + modelProperties: { + value: { + required: false, + serializedName: '', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'JobCollectionItemElementType', + type: { + name: 'Composite', + className: 'JobCollectionItem' + } + } + } + }, + nextLink: { + required: false, + readOnly: true, + serializedName: 'nextLink', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = JobListResultV2; diff --git a/lib/services/automationManagement/lib/models/jobNavigation.js b/lib/services/automationManagement/lib/models/jobNavigation.js new file mode 100644 index 0000000000..a2aba8b978 --- /dev/null +++ b/lib/services/automationManagement/lib/models/jobNavigation.js @@ -0,0 +1,54 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * Software update configuration machine run job navigation properties. + * + */ +class JobNavigation { + /** + * Create a JobNavigation. + * @member {string} [id] Id of the job associated with the software update + * configuration run + */ + constructor() { + } + + /** + * Defines the metadata of JobNavigation + * + * @returns {object} metadata of JobNavigation + * + */ + mapper() { + return { + required: false, + serializedName: 'jobNavigation', + type: { + name: 'Composite', + className: 'JobNavigation', + modelProperties: { + id: { + required: false, + readOnly: true, + serializedName: 'id', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = JobNavigation; diff --git a/lib/services/automationManagement/lib/models/jobProvisioningStateProperty.js b/lib/services/automationManagement/lib/models/jobProvisioningStateProperty.js new file mode 100644 index 0000000000..07d50308d4 --- /dev/null +++ b/lib/services/automationManagement/lib/models/jobProvisioningStateProperty.js @@ -0,0 +1,55 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * The provisioning state property. + * + */ +class JobProvisioningStateProperty { + /** + * Create a JobProvisioningStateProperty. + * @member {string} [provisioningState] The provisioning state of the + * resource. Possible values include: 'Failed', 'Succeeded', 'Suspended', + * 'Processing' + */ + constructor() { + } + + /** + * Defines the metadata of JobProvisioningStateProperty + * + * @returns {object} metadata of JobProvisioningStateProperty + * + */ + mapper() { + return { + required: false, + serializedName: 'JobProvisioningStateProperty', + type: { + name: 'Composite', + className: 'JobProvisioningStateProperty', + modelProperties: { + provisioningState: { + required: false, + readOnly: true, + serializedName: 'provisioningState', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = JobProvisioningStateProperty; diff --git a/lib/services/automationManagement/lib/models/jobSchedule.js b/lib/services/automationManagement/lib/models/jobSchedule.js index 791544f7da..f608fc5495 100644 --- a/lib/services/automationManagement/lib/models/jobSchedule.js +++ b/lib/services/automationManagement/lib/models/jobSchedule.js @@ -19,7 +19,9 @@ const models = require('./index'); class JobSchedule { /** * Create a JobSchedule. - * @member {string} [id] Gets or sets the id of the resource. + * @member {string} [id] Gets the id of the resource. + * @member {string} [name] Gets the name of the variable. + * @member {string} [type] Resource type * @member {string} [jobScheduleId] Gets or sets the id of job schedule. * @member {object} [schedule] Gets or sets the schedule. * @member {string} [schedule.name] Gets or sets the name of the schedule. @@ -49,11 +51,28 @@ class JobSchedule { modelProperties: { id: { required: false, + readOnly: true, serializedName: 'id', type: { name: 'String' } }, + name: { + required: false, + readOnly: true, + serializedName: 'name', + type: { + name: 'String' + } + }, + type: { + required: false, + readOnly: true, + serializedName: 'type', + type: { + name: 'String' + } + }, jobScheduleId: { required: false, serializedName: 'properties.jobScheduleId', diff --git a/lib/services/automationManagement/lib/models/linkedWorkspace.js b/lib/services/automationManagement/lib/models/linkedWorkspace.js new file mode 100644 index 0000000000..5daf95ac28 --- /dev/null +++ b/lib/services/automationManagement/lib/models/linkedWorkspace.js @@ -0,0 +1,53 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * Definition of the linked workspace. + * + */ +class LinkedWorkspace { + /** + * Create a LinkedWorkspace. + * @member {string} [id] Gets the id of the linked workspace. + */ + constructor() { + } + + /** + * Defines the metadata of LinkedWorkspace + * + * @returns {object} metadata of LinkedWorkspace + * + */ + mapper() { + return { + required: false, + serializedName: 'LinkedWorkspace', + type: { + name: 'Composite', + className: 'LinkedWorkspace', + modelProperties: { + id: { + required: false, + readOnly: true, + serializedName: 'id', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = LinkedWorkspace; diff --git a/lib/services/automationManagement/lib/models/linuxProperties.js b/lib/services/automationManagement/lib/models/linuxProperties.js new file mode 100644 index 0000000000..3e25b2be22 --- /dev/null +++ b/lib/services/automationManagement/lib/models/linuxProperties.js @@ -0,0 +1,70 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * Linux specific update configuration. + * + */ +class LinuxProperties { + /** + * Create a LinuxProperties. + * @member {string} [includedPackageClassifications] Update classifications + * included in the software update configuration. Possible values include: + * 'Unclassified', 'Critical', 'Security', 'Other' + * @member {array} [excludedPackageNameMasks] packages excluded from the + * software update configuration. + */ + constructor() { + } + + /** + * Defines the metadata of LinuxProperties + * + * @returns {object} metadata of LinuxProperties + * + */ + mapper() { + return { + required: false, + serializedName: 'LinuxProperties', + type: { + name: 'Composite', + className: 'LinuxProperties', + modelProperties: { + includedPackageClassifications: { + required: false, + serializedName: 'includedPackageClassifications', + type: { + name: 'String' + } + }, + excludedPackageNameMasks: { + required: false, + serializedName: 'excludedPackageNameMasks', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'StringElementType', + type: { + name: 'String' + } + } + } + } + } + } + }; + } +} + +module.exports = LinuxProperties; diff --git a/lib/services/automationManagement/lib/models/proxyResource.js b/lib/services/automationManagement/lib/models/proxyResource.js new file mode 100644 index 0000000000..71e7548fc0 --- /dev/null +++ b/lib/services/automationManagement/lib/models/proxyResource.js @@ -0,0 +1,75 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * The Resource definition. + * + * @extends models['BaseResource'] + */ +class ProxyResource extends models['BaseResource'] { + /** + * Create a ProxyResource. + * @member {string} [id] Resource Id + * @member {string} [name] Resource name + * @member {string} [type] Resource type + */ + constructor() { + super(); + } + + /** + * Defines the metadata of ProxyResource + * + * @returns {object} metadata of ProxyResource + * + */ + mapper() { + return { + required: false, + serializedName: 'ProxyResource', + type: { + name: 'Composite', + className: 'ProxyResource', + modelProperties: { + id: { + required: false, + readOnly: true, + serializedName: 'id', + type: { + name: 'String' + } + }, + name: { + required: false, + readOnly: true, + serializedName: 'name', + type: { + name: 'String' + } + }, + type: { + required: false, + readOnly: true, + serializedName: 'type', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = ProxyResource; diff --git a/lib/services/automationManagement/lib/models/schedule.js b/lib/services/automationManagement/lib/models/schedule.js index ccca945bfe..51052d2000 100644 --- a/lib/services/automationManagement/lib/models/schedule.js +++ b/lib/services/automationManagement/lib/models/schedule.js @@ -19,8 +19,9 @@ const models = require('./index'); class Schedule { /** * Create a Schedule. - * @member {string} [id] Gets or sets the id of the resource. - * @member {string} [name] Gets or sets the name of the schedule. + * @member {string} [id] Gets the id of the resource. + * @member {string} [name] Gets name of the schedule. + * @member {string} [type] Resource type * @member {date} [startTime] Gets or sets the start time of the schedule. * @member {number} [startTimeOffsetMinutes] Gets the start time's offset in * minutes. @@ -66,6 +67,7 @@ class Schedule { modelProperties: { id: { required: false, + readOnly: true, serializedName: 'id', type: { name: 'String' @@ -73,11 +75,20 @@ class Schedule { }, name: { required: false, + readOnly: true, serializedName: 'name', type: { name: 'String' } }, + type: { + required: false, + readOnly: true, + serializedName: 'type', + type: { + name: 'String' + } + }, startTime: { required: false, serializedName: 'properties.startTime', diff --git a/lib/services/automationManagement/lib/models/scheduleCreateOrUpdateParameters.js b/lib/services/automationManagement/lib/models/scheduleCreateOrUpdateParameters.js index 77c21ffb80..fd14a76bd3 100644 --- a/lib/services/automationManagement/lib/models/scheduleCreateOrUpdateParameters.js +++ b/lib/services/automationManagement/lib/models/scheduleCreateOrUpdateParameters.js @@ -25,8 +25,8 @@ class ScheduleCreateOrUpdateParameters { * @member {date} startTime Gets or sets the start time of the schedule. * @member {date} [expiryTime] Gets or sets the end time of the schedule. * @member {object} [interval] Gets or sets the interval of the schedule. - * @member {string} frequency Gets or sets the frequency of the schedule. - * Possible values include: 'OneTime', 'Day', 'Hour', 'Week', 'Month' + * @member {string} frequency Possible values include: 'OneTime', 'Day', + * 'Hour', 'Week', 'Month' * @member {string} [timeZone] Gets or sets the time zone of the schedule. * @member {object} [advancedSchedule] Gets or sets the AdvancedSchedule. * @member {array} [advancedSchedule.weekDays] Days of the week that the job diff --git a/lib/services/automationManagement/lib/models/scheduleProperties.js b/lib/services/automationManagement/lib/models/scheduleProperties.js new file mode 100644 index 0000000000..b8c60c2389 --- /dev/null +++ b/lib/services/automationManagement/lib/models/scheduleProperties.js @@ -0,0 +1,172 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Definition of schedule parameters. + * + */ +class ScheduleProperties { + /** + * Create a ScheduleProperties. + * @member {date} [startTime] Gets or sets the start time of the schedule. + * @member {number} [startTimeOffsetMinutes] Gets the start time's offset in + * minutes. + * @member {date} [expiryTime] Gets or sets the end time of the schedule. + * @member {number} [expiryTimeOffsetMinutes] Gets or sets the expiry time's + * offset in minutes. + * @member {boolean} [isEnabled] Gets or sets a value indicating whether this + * schedule is enabled. Default value: false . + * @member {date} [nextRun] Gets or sets the next run time of the schedule. + * @member {number} [nextRunOffsetMinutes] Gets or sets the next run time's + * offset in minutes. + * @member {object} [interval] Gets or sets the interval of the schedule. + * @member {string} [frequency] Gets or sets the frequency of the schedule. + * Possible values include: 'OneTime', 'Day', 'Hour', 'Week', 'Month' + * @member {string} [timeZone] Gets or sets the time zone of the schedule. + * @member {object} [advancedSchedule] Gets or sets the advanced schedule. + * @member {array} [advancedSchedule.weekDays] Days of the week that the job + * should execute on. + * @member {array} [advancedSchedule.monthDays] Days of the month that the + * job should execute on. Must be between 1 and 31. + * @member {array} [advancedSchedule.monthlyOccurrences] Occurrences of days + * within a month. + * @member {date} [creationTime] Gets or sets the creation time. + * @member {date} [lastModifiedTime] Gets or sets the last modified time. + * @member {string} [description] Gets or sets the description. + */ + constructor() { + } + + /** + * Defines the metadata of ScheduleProperties + * + * @returns {object} metadata of ScheduleProperties + * + */ + mapper() { + return { + required: false, + serializedName: 'ScheduleProperties', + type: { + name: 'Composite', + className: 'ScheduleProperties', + modelProperties: { + startTime: { + required: false, + serializedName: 'startTime', + type: { + name: 'DateTime' + } + }, + startTimeOffsetMinutes: { + required: false, + readOnly: true, + serializedName: 'startTimeOffsetMinutes', + type: { + name: 'Number' + } + }, + expiryTime: { + required: false, + serializedName: 'expiryTime', + type: { + name: 'DateTime' + } + }, + expiryTimeOffsetMinutes: { + required: false, + serializedName: 'expiryTimeOffsetMinutes', + type: { + name: 'Number' + } + }, + isEnabled: { + required: false, + serializedName: 'isEnabled', + defaultValue: false, + type: { + name: 'Boolean' + } + }, + nextRun: { + required: false, + serializedName: 'nextRun', + type: { + name: 'DateTime' + } + }, + nextRunOffsetMinutes: { + required: false, + serializedName: 'nextRunOffsetMinutes', + type: { + name: 'Number' + } + }, + interval: { + required: false, + serializedName: 'interval', + type: { + name: 'Object' + } + }, + frequency: { + required: false, + serializedName: 'frequency', + type: { + name: 'String' + } + }, + timeZone: { + required: false, + serializedName: 'timeZone', + type: { + name: 'String' + } + }, + advancedSchedule: { + required: false, + serializedName: 'advancedSchedule', + type: { + name: 'Composite', + className: 'AdvancedSchedule' + } + }, + creationTime: { + required: false, + serializedName: 'creationTime', + type: { + name: 'DateTime' + } + }, + lastModifiedTime: { + required: false, + serializedName: 'lastModifiedTime', + type: { + name: 'DateTime' + } + }, + description: { + required: false, + serializedName: 'description', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = ScheduleProperties; diff --git a/lib/services/automationManagement/lib/models/scheduleUpdateParameters.js b/lib/services/automationManagement/lib/models/scheduleUpdateParameters.js index 70c4a02539..26bd642bec 100644 --- a/lib/services/automationManagement/lib/models/scheduleUpdateParameters.js +++ b/lib/services/automationManagement/lib/models/scheduleUpdateParameters.js @@ -17,7 +17,7 @@ class ScheduleUpdateParameters { /** * Create a ScheduleUpdateParameters. - * @member {string} name Gets or sets the name of the schedule. + * @member {string} [name] Gets or sets the name of the schedule. * @member {string} [description] Gets or sets the description of the * schedule. * @member {boolean} [isEnabled] Gets or sets a value indicating whether this @@ -41,7 +41,7 @@ class ScheduleUpdateParameters { className: 'ScheduleUpdateParameters', modelProperties: { name: { - required: true, + required: false, serializedName: 'name', type: { name: 'String' diff --git a/lib/services/automationManagement/lib/models/softwareUpdateConfiguration.js b/lib/services/automationManagement/lib/models/softwareUpdateConfiguration.js new file mode 100644 index 0000000000..e30cc4dca9 --- /dev/null +++ b/lib/services/automationManagement/lib/models/softwareUpdateConfiguration.js @@ -0,0 +1,218 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Software update configuration properties. + * + * @extends models['BaseResource'] + */ +class SoftwareUpdateConfiguration extends models['BaseResource'] { + /** + * Create a SoftwareUpdateConfiguration. + * @member {string} [name] Resource name. + * @member {string} [id] Resource Id. + * @member {string} [type] Resource type + * @member {object} updateConfiguration update specific properties for the + * Software update configuration + * @member {string} [updateConfiguration.operatingSystem] operating system of + * target machines. Possible values include: 'Windows', 'Linux' + * @member {object} [updateConfiguration.windows] Windows specific update + * configuration. + * @member {string} + * [updateConfiguration.windows.includedUpdateClassifications] Update + * classification included in the software update configuration. A comma + * separated string with required values. Possible values include: + * 'Unclassified', 'Critical', 'Security', 'UpdateRollup', 'FeaturePack', + * 'ServicePack', 'Definition', 'Tools', 'Updates' + * @member {array} [updateConfiguration.windows.excludedKbNumbers] KB numbers + * excluded from the software update configuration. + * @member {object} [updateConfiguration.linux] Linux specific update + * configuration. + * @member {string} + * [updateConfiguration.linux.includedPackageClassifications] Update + * classifications included in the software update configuration. Possible + * values include: 'Unclassified', 'Critical', 'Security', 'Other' + * @member {array} [updateConfiguration.linux.excludedPackageNameMasks] + * packages excluded from the software update configuration. + * @member {moment.duration} [updateConfiguration.duration] Maximum time + * allowed for the software update configuration run. Duration needs to be + * specified using the format PT[n]H[n]M[n]S as per ISO8601 + * @member {array} [updateConfiguration.azureVirtualMachines] List of azure + * resource Ids for azure virtual machines targeted by the software update + * configuration. + * @member {array} [updateConfiguration.nonAzureComputerNames] List of names + * of non-azure machines targeted by the software update configuration. + * @member {object} scheduleInfo Schedule information for the Software update + * configuration + * @member {date} [scheduleInfo.startTime] Gets or sets the start time of the + * schedule. + * @member {number} [scheduleInfo.startTimeOffsetMinutes] Gets the start + * time's offset in minutes. + * @member {date} [scheduleInfo.expiryTime] Gets or sets the end time of the + * schedule. + * @member {number} [scheduleInfo.expiryTimeOffsetMinutes] Gets or sets the + * expiry time's offset in minutes. + * @member {boolean} [scheduleInfo.isEnabled] Gets or sets a value indicating + * whether this schedule is enabled. + * @member {date} [scheduleInfo.nextRun] Gets or sets the next run time of + * the schedule. + * @member {number} [scheduleInfo.nextRunOffsetMinutes] Gets or sets the next + * run time's offset in minutes. + * @member {object} [scheduleInfo.interval] Gets or sets the interval of the + * schedule. + * @member {string} [scheduleInfo.frequency] Gets or sets the frequency of + * the schedule. Possible values include: 'OneTime', 'Day', 'Hour', 'Week', + * 'Month' + * @member {string} [scheduleInfo.timeZone] Gets or sets the time zone of the + * schedule. + * @member {object} [scheduleInfo.advancedSchedule] Gets or sets the advanced + * schedule. + * @member {array} [scheduleInfo.advancedSchedule.weekDays] Days of the week + * that the job should execute on. + * @member {array} [scheduleInfo.advancedSchedule.monthDays] Days of the + * month that the job should execute on. Must be between 1 and 31. + * @member {array} [scheduleInfo.advancedSchedule.monthlyOccurrences] + * Occurrences of days within a month. + * @member {date} [scheduleInfo.creationTime] Gets or sets the creation time. + * @member {date} [scheduleInfo.lastModifiedTime] Gets or sets the last + * modified time. + * @member {string} [scheduleInfo.description] Gets or sets the description. + * @member {string} [provisioningState] Provisioning state for the software + * update configuration, which only appears in the response. + * @member {object} [error] detailes of provisioning error + * @member {string} [error.code] Error code + * @member {string} [error.message] Error message indicating why the + * operation failed. + * @member {date} [creationTime] Creation time of theresource, which only + * appears in the response. + * @member {string} [createdBy] createdBy property, which only appears in the + * response. + * @member {date} [lastModifiedTime] Last time resource was modified, which + * only appears in the response. + * @member {string} [lastModifiedBy] lastModifiedBy property, which only + * appears in the response. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of SoftwareUpdateConfiguration + * + * @returns {object} metadata of SoftwareUpdateConfiguration + * + */ + mapper() { + return { + required: false, + serializedName: 'softwareUpdateConfiguration', + type: { + name: 'Composite', + className: 'SoftwareUpdateConfiguration', + modelProperties: { + name: { + required: false, + readOnly: true, + serializedName: 'name', + type: { + name: 'String' + } + }, + id: { + required: false, + readOnly: true, + serializedName: 'id', + type: { + name: 'String' + } + }, + type: { + required: false, + readOnly: true, + serializedName: 'type', + type: { + name: 'String' + } + }, + updateConfiguration: { + required: true, + serializedName: 'properties.updateConfiguration', + type: { + name: 'Composite', + className: 'UpdateConfiguration' + } + }, + scheduleInfo: { + required: true, + serializedName: 'properties.scheduleInfo', + type: { + name: 'Composite', + className: 'ScheduleProperties' + } + }, + provisioningState: { + required: false, + readOnly: true, + serializedName: 'properties.provisioningState', + type: { + name: 'String' + } + }, + error: { + required: false, + serializedName: 'properties.error', + type: { + name: 'Composite', + className: 'ErrorResponse' + } + }, + creationTime: { + required: false, + readOnly: true, + serializedName: 'properties.creationTime', + type: { + name: 'DateTime' + } + }, + createdBy: { + required: false, + readOnly: true, + serializedName: 'properties.createdBy', + type: { + name: 'String' + } + }, + lastModifiedTime: { + required: false, + readOnly: true, + serializedName: 'properties.lastModifiedTime', + type: { + name: 'DateTime' + } + }, + lastModifiedBy: { + required: false, + readOnly: true, + serializedName: 'properties.lastModifiedBy', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = SoftwareUpdateConfiguration; diff --git a/lib/services/automationManagement/lib/models/softwareUpdateConfigurationCollectionItem.js b/lib/services/automationManagement/lib/models/softwareUpdateConfigurationCollectionItem.js new file mode 100644 index 0000000000..3feed65506 --- /dev/null +++ b/lib/services/automationManagement/lib/models/softwareUpdateConfigurationCollectionItem.js @@ -0,0 +1,136 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Software update configuration collection item properties. + * + */ +class SoftwareUpdateConfigurationCollectionItem { + /** + * Create a SoftwareUpdateConfigurationCollectionItem. + * @member {string} [name] Name of the software update configuration. + * @member {string} [id] Resource Id of the software update configuration + * @member {object} [updateConfiguration] Update specific properties of the + * software update configuration. + * @member {array} [updateConfiguration.azureVirtualMachines] List of azure + * resource Ids for azure virtual machines targeted by the software update + * configuration. + * @member {moment.duration} [updateConfiguration.duration] Maximum time + * allowed for the software update configuration run. Duration needs to be + * specified using the format PT[n]H[n]M[n]S as per ISO8601 + * @member {string} [frequency] execution frequency of the schedule + * associated with the software update configuration. Possible values + * include: 'OneTime', 'Day', 'Hour', 'Week', 'Month' + * @member {date} [startTime] the start time of the update. + * @member {date} [creationTime] Creation time of the software update + * configuration, which only appears in the response. + * @member {date} [lastModifiedTime] Last time software update configuration + * was modified, which only appears in the response. + * @member {string} [provisioningState] Provisioning state for the software + * update configuration, which only appears in the response. + * @member {date} [nextRun] ext run time of the update. + */ + constructor() { + } + + /** + * Defines the metadata of SoftwareUpdateConfigurationCollectionItem + * + * @returns {object} metadata of SoftwareUpdateConfigurationCollectionItem + * + */ + mapper() { + return { + required: false, + serializedName: 'softwareUpdateConfigurationCollectionItem', + type: { + name: 'Composite', + className: 'SoftwareUpdateConfigurationCollectionItem', + modelProperties: { + name: { + required: false, + readOnly: true, + serializedName: 'name', + type: { + name: 'String' + } + }, + id: { + required: false, + readOnly: true, + serializedName: 'id', + type: { + name: 'String' + } + }, + updateConfiguration: { + required: false, + serializedName: 'properties.updateConfiguration', + type: { + name: 'Composite', + className: 'CollectionItemUpdateConfiguration' + } + }, + frequency: { + required: false, + serializedName: 'properties.frequency', + type: { + name: 'String' + } + }, + startTime: { + required: false, + serializedName: 'properties.startTime', + type: { + name: 'DateTime' + } + }, + creationTime: { + required: false, + readOnly: true, + serializedName: 'properties.creationTime', + type: { + name: 'DateTime' + } + }, + lastModifiedTime: { + required: false, + readOnly: true, + serializedName: 'properties.lastModifiedTime', + type: { + name: 'DateTime' + } + }, + provisioningState: { + required: false, + readOnly: true, + serializedName: 'properties.provisioningState', + type: { + name: 'String' + } + }, + nextRun: { + required: false, + serializedName: 'properties.nextRun', + type: { + name: 'DateTime' + } + } + } + } + }; + } +} + +module.exports = SoftwareUpdateConfigurationCollectionItem; diff --git a/lib/services/automationManagement/lib/models/softwareUpdateConfigurationListResult.js b/lib/services/automationManagement/lib/models/softwareUpdateConfigurationListResult.js new file mode 100644 index 0000000000..74f8890db3 --- /dev/null +++ b/lib/services/automationManagement/lib/models/softwareUpdateConfigurationListResult.js @@ -0,0 +1,63 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * result of listing all software update configuration + * + */ +class SoftwareUpdateConfigurationListResult { + /** + * Create a SoftwareUpdateConfigurationListResult. + * @member {array} [value] outer object returned when listing all software + * update configurations + */ + constructor() { + } + + /** + * Defines the metadata of SoftwareUpdateConfigurationListResult + * + * @returns {object} metadata of SoftwareUpdateConfigurationListResult + * + */ + mapper() { + return { + required: false, + serializedName: 'softwareUpdateConfigurationListResult', + type: { + name: 'Composite', + className: 'SoftwareUpdateConfigurationListResult', + modelProperties: { + value: { + required: false, + serializedName: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'SoftwareUpdateConfigurationCollectionItemElementType', + type: { + name: 'Composite', + className: 'SoftwareUpdateConfigurationCollectionItem' + } + } + } + } + } + } + }; + } +} + +module.exports = SoftwareUpdateConfigurationListResult; diff --git a/lib/services/automationManagement/lib/models/softwareUpdateConfigurationMachineRun.js b/lib/services/automationManagement/lib/models/softwareUpdateConfigurationMachineRun.js new file mode 100644 index 0000000000..0220b60692 --- /dev/null +++ b/lib/services/automationManagement/lib/models/softwareUpdateConfigurationMachineRun.js @@ -0,0 +1,218 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Software update configuration machine run model. + * + */ +class SoftwareUpdateConfigurationMachineRun { + /** + * Create a SoftwareUpdateConfigurationMachineRun. + * @member {string} [name] Name of the software update configuration machine + * run + * @member {string} [id] Resource Id of the software update configuration + * machine run + * @member {string} [targetComputer] name of the updated computer + * @member {string} [targetComputerType] type of the updated computer. + * @member {object} [softwareUpdateConfiguration] software update + * configuration triggered this run + * @member {string} [softwareUpdateConfiguration.name] Name of the software + * update configuration triggered the software update configuration run + * @member {string} [status] Status of the software update configuration + * machine run. + * @member {string} [osType] Operating system target of the software update + * configuration triggered this run + * @member {uuid} [correlationId] correlation id of the software update + * configuration machine run + * @member {uuid} [sourceComputerId] source computer id of the software + * update configuration machine run + * @member {date} [startTime] Start time of the software update configuration + * machine run. + * @member {date} [endTime] End time of the software update configuration + * machine run. + * @member {string} [configuredDuration] configured duration for the software + * update configuration run. + * @member {object} [job] Job associated with the software update + * configuration machine run + * @member {string} [job.id] Id of the job associated with the software + * update configuration run + * @member {date} [creationTime] Creation time of theresource, which only + * appears in the response. + * @member {string} [createdBy] createdBy property, which only appears in the + * response. + * @member {date} [lastModifiedTime] Last time resource was modified, which + * only appears in the response. + * @member {string} [lastModifiedBy] lastModifiedBy property, which only + * appears in the response. + */ + constructor() { + } + + /** + * Defines the metadata of SoftwareUpdateConfigurationMachineRun + * + * @returns {object} metadata of SoftwareUpdateConfigurationMachineRun + * + */ + mapper() { + return { + required: false, + serializedName: 'softwareUpdateConfigurationMachineRun', + type: { + name: 'Composite', + className: 'SoftwareUpdateConfigurationMachineRun', + modelProperties: { + name: { + required: false, + readOnly: true, + serializedName: 'name', + type: { + name: 'String' + } + }, + id: { + required: false, + readOnly: true, + serializedName: 'id', + type: { + name: 'String' + } + }, + targetComputer: { + required: false, + readOnly: true, + serializedName: 'properties.targetComputer', + type: { + name: 'String' + } + }, + targetComputerType: { + required: false, + readOnly: true, + serializedName: 'properties.targetComputerType', + type: { + name: 'String' + } + }, + softwareUpdateConfiguration: { + required: false, + serializedName: 'properties.softwareUpdateConfiguration', + type: { + name: 'Composite', + className: 'UpdateConfigurationNavigation' + } + }, + status: { + required: false, + readOnly: true, + serializedName: 'properties.status', + type: { + name: 'String' + } + }, + osType: { + required: false, + readOnly: true, + serializedName: 'properties.osType', + type: { + name: 'String' + } + }, + correlationId: { + required: false, + readOnly: true, + serializedName: 'properties.correlationId', + type: { + name: 'String' + } + }, + sourceComputerId: { + required: false, + readOnly: true, + serializedName: 'properties.sourceComputerId', + type: { + name: 'String' + } + }, + startTime: { + required: false, + readOnly: true, + serializedName: 'properties.startTime', + type: { + name: 'DateTime' + } + }, + endTime: { + required: false, + readOnly: true, + serializedName: 'properties.endTime', + type: { + name: 'DateTime' + } + }, + configuredDuration: { + required: false, + readOnly: true, + serializedName: 'properties.configuredDuration', + type: { + name: 'String' + } + }, + job: { + required: false, + serializedName: 'properties.job', + type: { + name: 'Composite', + className: 'JobNavigation' + } + }, + creationTime: { + required: false, + readOnly: true, + serializedName: 'properties.creationTime', + type: { + name: 'DateTime' + } + }, + createdBy: { + required: false, + readOnly: true, + serializedName: 'properties.createdBy', + type: { + name: 'String' + } + }, + lastModifiedTime: { + required: false, + readOnly: true, + serializedName: 'properties.lastModifiedTime', + type: { + name: 'DateTime' + } + }, + lastModifiedBy: { + required: false, + readOnly: true, + serializedName: 'properties.lastModifiedBy', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = SoftwareUpdateConfigurationMachineRun; diff --git a/lib/services/automationManagement/lib/models/softwareUpdateConfigurationMachineRunListResult.js b/lib/services/automationManagement/lib/models/softwareUpdateConfigurationMachineRunListResult.js new file mode 100644 index 0000000000..e6411a5fec --- /dev/null +++ b/lib/services/automationManagement/lib/models/softwareUpdateConfigurationMachineRunListResult.js @@ -0,0 +1,71 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * result of listing all software update configuration machine runs + * + */ +class SoftwareUpdateConfigurationMachineRunListResult { + /** + * Create a SoftwareUpdateConfigurationMachineRunListResult. + * @member {array} [value] outer object returned when listing all software + * update configuration machine runs + * @member {string} [nextLink] link to next page of results. + */ + constructor() { + } + + /** + * Defines the metadata of SoftwareUpdateConfigurationMachineRunListResult + * + * @returns {object} metadata of SoftwareUpdateConfigurationMachineRunListResult + * + */ + mapper() { + return { + required: false, + serializedName: 'softwareUpdateConfigurationMachineRunListResult', + type: { + name: 'Composite', + className: 'SoftwareUpdateConfigurationMachineRunListResult', + modelProperties: { + value: { + required: false, + serializedName: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'SoftwareUpdateConfigurationMachineRunElementType', + type: { + name: 'Composite', + className: 'SoftwareUpdateConfigurationMachineRun' + } + } + } + }, + nextLink: { + required: false, + serializedName: 'nextLink', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = SoftwareUpdateConfigurationMachineRunListResult; diff --git a/lib/services/automationManagement/lib/models/softwareUpdateConfigurationRun.js b/lib/services/automationManagement/lib/models/softwareUpdateConfigurationRun.js new file mode 100644 index 0000000000..d7c603ce40 --- /dev/null +++ b/lib/services/automationManagement/lib/models/softwareUpdateConfigurationRun.js @@ -0,0 +1,184 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Software update configuration Run properties. + * + */ +class SoftwareUpdateConfigurationRun { + /** + * Create a SoftwareUpdateConfigurationRun. + * @member {string} [name] Name of the software update configuration run. + * @member {string} [id] Resource Id of the software update configuration run + * @member {object} [softwareUpdateConfiguration] software update + * configuration triggered this run + * @member {string} [softwareUpdateConfiguration.name] Name of the software + * update configuration triggered the software update configuration run + * @member {string} [status] Status of the software update configuration run. + * @member {string} [configuredDuration] configured duration for the software + * update configuration run. + * @member {string} [osType] Operating system target of the software update + * configuration triggered this run + * @member {date} [startTime] Etart time of the software update configuration + * run. + * @member {date} [endTime] End time of the software update configuration + * run. + * @member {number} [computerCount] Number of computers in the software + * update configuration run. + * @member {number} [failedCount] Number of computers with failed status. + * @member {date} [creationTime] Creation time of theresource, which only + * appears in the response. + * @member {string} [createdBy] createdBy property, which only appears in the + * response. + * @member {date} [lastModifiedTime] Last time resource was modified, which + * only appears in the response. + * @member {string} [lastModifiedBy] lastModifiedBy property, which only + * appears in the response. + */ + constructor() { + } + + /** + * Defines the metadata of SoftwareUpdateConfigurationRun + * + * @returns {object} metadata of SoftwareUpdateConfigurationRun + * + */ + mapper() { + return { + required: false, + serializedName: 'softwareUpdateConfigurationRun', + type: { + name: 'Composite', + className: 'SoftwareUpdateConfigurationRun', + modelProperties: { + name: { + required: false, + readOnly: true, + serializedName: 'name', + type: { + name: 'String' + } + }, + id: { + required: false, + readOnly: true, + serializedName: 'id', + type: { + name: 'String' + } + }, + softwareUpdateConfiguration: { + required: false, + serializedName: 'properties.softwareUpdateConfiguration', + type: { + name: 'Composite', + className: 'UpdateConfigurationNavigation' + } + }, + status: { + required: false, + readOnly: true, + serializedName: 'properties.status', + type: { + name: 'String' + } + }, + configuredDuration: { + required: false, + readOnly: true, + serializedName: 'properties.configuredDuration', + type: { + name: 'String' + } + }, + osType: { + required: false, + readOnly: true, + serializedName: 'properties.osType', + type: { + name: 'String' + } + }, + startTime: { + required: false, + readOnly: true, + serializedName: 'properties.startTime', + type: { + name: 'DateTime' + } + }, + endTime: { + required: false, + readOnly: true, + serializedName: 'properties.endTime', + type: { + name: 'DateTime' + } + }, + computerCount: { + required: false, + readOnly: true, + serializedName: 'properties.computerCount', + type: { + name: 'Number' + } + }, + failedCount: { + required: false, + readOnly: true, + serializedName: 'properties.failedCount', + type: { + name: 'Number' + } + }, + creationTime: { + required: false, + readOnly: true, + serializedName: 'properties.creationTime', + type: { + name: 'DateTime' + } + }, + createdBy: { + required: false, + readOnly: true, + serializedName: 'properties.createdBy', + type: { + name: 'String' + } + }, + lastModifiedTime: { + required: false, + readOnly: true, + serializedName: 'properties.lastModifiedTime', + type: { + name: 'DateTime' + } + }, + lastModifiedBy: { + required: false, + readOnly: true, + serializedName: 'properties.lastModifiedBy', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = SoftwareUpdateConfigurationRun; diff --git a/lib/services/automationManagement/lib/models/softwareUpdateConfigurationRunListResult.js b/lib/services/automationManagement/lib/models/softwareUpdateConfigurationRunListResult.js new file mode 100644 index 0000000000..24ccdc2172 --- /dev/null +++ b/lib/services/automationManagement/lib/models/softwareUpdateConfigurationRunListResult.js @@ -0,0 +1,71 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * result of listing all software update configuration runs + * + */ +class SoftwareUpdateConfigurationRunListResult { + /** + * Create a SoftwareUpdateConfigurationRunListResult. + * @member {array} [value] outer object returned when listing all software + * update configuration runs + * @member {string} [nextLink] link to next page of results. + */ + constructor() { + } + + /** + * Defines the metadata of SoftwareUpdateConfigurationRunListResult + * + * @returns {object} metadata of SoftwareUpdateConfigurationRunListResult + * + */ + mapper() { + return { + required: false, + serializedName: 'softwareUpdateConfigurationRunListResult', + type: { + name: 'Composite', + className: 'SoftwareUpdateConfigurationRunListResult', + modelProperties: { + value: { + required: false, + serializedName: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'SoftwareUpdateConfigurationRunElementType', + type: { + name: 'Composite', + className: 'SoftwareUpdateConfigurationRun' + } + } + } + }, + nextLink: { + required: false, + serializedName: 'nextLink', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = SoftwareUpdateConfigurationRunListResult; diff --git a/lib/services/automationManagement/lib/models/sourceControl.js b/lib/services/automationManagement/lib/models/sourceControl.js new file mode 100644 index 0000000000..b926558d2e --- /dev/null +++ b/lib/services/automationManagement/lib/models/sourceControl.js @@ -0,0 +1,153 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Definition of the source control. + * + * @extends models['BaseResource'] + */ +class SourceControl extends models['BaseResource'] { + /** + * Create a SourceControl. + * @member {string} [name] Resource name. + * @member {string} [id] Resource Id. + * @member {string} [type] Resource type. + * @member {string} [repoUrl] Gets or sets the repo url of the source + * control. + * @member {string} [branch] Gets or sets the repo branch of the source + * control. Include branch as empty string for VsoTfvc. + * @member {string} [folderPath] Gets or sets the folder path of the source + * control. + * @member {boolean} [autoSync] Gets or sets auto async of the source + * control. Default is false. + * @member {boolean} [publishRunbook] Gets or sets the auto publish of the + * source control. Default is true. + * @member {string} [sourceType] The source type. Must be one of VsoGit, + * VsoTfvc, GitHub. Possible values include: 'VsoGit', 'VsoTfvc', 'GitHub' + * @member {string} [description] Gets or sets the description. + * @member {date} [creationTime] Gets or sets the creation time. + * @member {date} [lastModifiedTime] Gets or sets the last modified time. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of SourceControl + * + * @returns {object} metadata of SourceControl + * + */ + mapper() { + return { + required: false, + serializedName: 'SourceControl', + type: { + name: 'Composite', + className: 'SourceControl', + modelProperties: { + name: { + required: false, + readOnly: true, + serializedName: 'name', + type: { + name: 'String' + } + }, + id: { + required: false, + readOnly: true, + serializedName: 'id', + type: { + name: 'String' + } + }, + type: { + required: false, + readOnly: true, + serializedName: 'type', + type: { + name: 'String' + } + }, + repoUrl: { + required: false, + serializedName: 'properties.repoUrl', + type: { + name: 'String' + } + }, + branch: { + required: false, + serializedName: 'properties.branch', + type: { + name: 'String' + } + }, + folderPath: { + required: false, + serializedName: 'properties.folderPath', + type: { + name: 'String' + } + }, + autoSync: { + required: false, + serializedName: 'properties.autoSync', + type: { + name: 'Boolean' + } + }, + publishRunbook: { + required: false, + serializedName: 'properties.publishRunbook', + type: { + name: 'Boolean' + } + }, + sourceType: { + required: false, + serializedName: 'properties.sourceType', + type: { + name: 'String' + } + }, + description: { + required: false, + serializedName: 'properties.description', + type: { + name: 'String' + } + }, + creationTime: { + required: false, + serializedName: 'properties.creationTime', + type: { + name: 'DateTime' + } + }, + lastModifiedTime: { + required: false, + serializedName: 'properties.lastModifiedTime', + type: { + name: 'DateTime' + } + } + } + } + }; + } +} + +module.exports = SourceControl; diff --git a/lib/services/automationManagement/lib/models/sourceControlCreateOrUpdateParameters.js b/lib/services/automationManagement/lib/models/sourceControlCreateOrUpdateParameters.js new file mode 100644 index 0000000000..ebed49622d --- /dev/null +++ b/lib/services/automationManagement/lib/models/sourceControlCreateOrUpdateParameters.js @@ -0,0 +1,132 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * The parameters supplied to the create or update source control operation. + * + */ +class SourceControlCreateOrUpdateParameters { + /** + * Create a SourceControlCreateOrUpdateParameters. + * @member {string} [repoUrl] Gets or sets the repo url of the source + * control. + * @member {string} [branch] Gets or sets the repo branch of the source + * control. Include branch as empty string for VsoTfvc. + * @member {string} [folderPath] Gets or sets the folder path of the source + * control. Path must be relative. + * @member {boolean} [autoSync] Gets or sets auto async of the source + * control. Default is false. + * @member {boolean} [publishRunbook] Gets or sets the auto publish of the + * source control. Default is true. + * @member {string} [sourceType] The source type. Must be one of VsoGit, + * VsoTfvc, GitHub, case sensitive. Possible values include: 'VsoGit', + * 'VsoTfvc', 'GitHub' + * @member {string} [securityToken] Gets or sets the authorization token for + * the repo of the source control. + * @member {string} [description] Gets or sets the user description of the + * source control. + */ + constructor() { + } + + /** + * Defines the metadata of SourceControlCreateOrUpdateParameters + * + * @returns {object} metadata of SourceControlCreateOrUpdateParameters + * + */ + mapper() { + return { + required: false, + serializedName: 'SourceControlCreateOrUpdateParameters', + type: { + name: 'Composite', + className: 'SourceControlCreateOrUpdateParameters', + modelProperties: { + repoUrl: { + required: false, + serializedName: 'properties.repoUrl', + constraints: { + MaxLength: 2000 + }, + type: { + name: 'String' + } + }, + branch: { + required: false, + serializedName: 'properties.branch', + constraints: { + MaxLength: 255 + }, + type: { + name: 'String' + } + }, + folderPath: { + required: false, + serializedName: 'properties.folderPath', + constraints: { + MaxLength: 255 + }, + type: { + name: 'String' + } + }, + autoSync: { + required: false, + serializedName: 'properties.autoSync', + type: { + name: 'Boolean' + } + }, + publishRunbook: { + required: false, + serializedName: 'properties.publishRunbook', + type: { + name: 'Boolean' + } + }, + sourceType: { + required: false, + serializedName: 'properties.sourceType', + type: { + name: 'String' + } + }, + securityToken: { + required: false, + serializedName: 'properties.securityToken', + constraints: { + MaxLength: 1024 + }, + type: { + name: 'String' + } + }, + description: { + required: false, + serializedName: 'properties.description', + constraints: { + MaxLength: 512 + }, + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = SourceControlCreateOrUpdateParameters; diff --git a/lib/services/automationManagement/lib/models/sourceControlListResult.js b/lib/services/automationManagement/lib/models/sourceControlListResult.js new file mode 100644 index 0000000000..18028ab656 --- /dev/null +++ b/lib/services/automationManagement/lib/models/sourceControlListResult.js @@ -0,0 +1,67 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * The response model for the list source controls operation. + */ +class SourceControlListResult extends Array { + /** + * Create a SourceControlListResult. + * @member {string} [nextLink] Gets or sets the next link. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of SourceControlListResult + * + * @returns {object} metadata of SourceControlListResult + * + */ + mapper() { + return { + required: false, + serializedName: 'SourceControlListResult', + type: { + name: 'Composite', + className: 'SourceControlListResult', + modelProperties: { + value: { + required: false, + serializedName: '', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'SourceControlElementType', + type: { + name: 'Composite', + className: 'SourceControl' + } + } + } + }, + nextLink: { + required: false, + serializedName: 'nextLink', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = SourceControlListResult; diff --git a/lib/services/automationManagement/lib/models/sourceControlSyncJob.js b/lib/services/automationManagement/lib/models/sourceControlSyncJob.js new file mode 100644 index 0000000000..77494ea6a2 --- /dev/null +++ b/lib/services/automationManagement/lib/models/sourceControlSyncJob.js @@ -0,0 +1,124 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * Definition of the source control sync job. + * + */ +class SourceControlSyncJob { + /** + * Create a SourceControlSyncJob. + * @member {string} [name] Resource name. + * @member {string} [type] Resource type. + * @member {string} [id] Resource id. + * @member {string} [sourceControlSyncJobId] Gets the source control sync job + * id. + * @member {date} [creationTime] Gets the creation time of the job. + * @member {string} [provisioningState] Gets the provisioning state of the + * job. Possible values include: 'Completed', 'Failed', 'Running' + * @member {date} [startTime] Gets the start time of the job. + * @member {date} [endTime] Gets the end time of the job. + * @member {string} [startedBy] Gets the user who started the sync job. + */ + constructor() { + } + + /** + * Defines the metadata of SourceControlSyncJob + * + * @returns {object} metadata of SourceControlSyncJob + * + */ + mapper() { + return { + required: false, + serializedName: 'SourceControlSyncJob', + type: { + name: 'Composite', + className: 'SourceControlSyncJob', + modelProperties: { + name: { + required: false, + readOnly: true, + serializedName: 'name', + type: { + name: 'String' + } + }, + type: { + required: false, + readOnly: true, + serializedName: 'type', + type: { + name: 'String' + } + }, + id: { + required: false, + readOnly: true, + serializedName: 'id', + type: { + name: 'String' + } + }, + sourceControlSyncJobId: { + required: false, + serializedName: 'properties.sourceControlSyncJobId', + type: { + name: 'String' + } + }, + creationTime: { + required: false, + readOnly: true, + serializedName: 'properties.creationTime', + type: { + name: 'DateTime' + } + }, + provisioningState: { + required: false, + serializedName: 'properties.provisioningState', + type: { + name: 'String' + } + }, + startTime: { + required: false, + readOnly: true, + serializedName: 'properties.startTime', + type: { + name: 'DateTime' + } + }, + endTime: { + required: false, + readOnly: true, + serializedName: 'properties.endTime', + type: { + name: 'DateTime' + } + }, + startedBy: { + required: false, + serializedName: 'properties.startedBy', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = SourceControlSyncJob; diff --git a/lib/services/automationManagement/lib/models/sourceControlSyncJobById.js b/lib/services/automationManagement/lib/models/sourceControlSyncJobById.js new file mode 100644 index 0000000000..5936289484 --- /dev/null +++ b/lib/services/automationManagement/lib/models/sourceControlSyncJobById.js @@ -0,0 +1,118 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Definition of the source control sync job. + * + */ +class SourceControlSyncJobById { + /** + * Create a SourceControlSyncJobById. + * @member {string} [id] Gets the id of the job. + * @member {string} [sourceControlSyncJobId] Gets the source control sync job + * id. + * @member {date} [creationTime] Gets the creation time of the job. + * @member {string} [provisioningState] Gets the provisioning state of the + * job. Possible values include: 'Completed', 'Failed', 'Running' + * @member {date} [startTime] Gets the start time of the job. + * @member {date} [endTime] Gets the end time of the job. + * @member {string} [startedBy] Gets the user who started the sync job. + * @member {object} [errors] Error details of the source control sync job. + * @member {string} [errors.code] Gets the error code for the job. + * @member {string} [errors.message] Gets the error message for the job. + */ + constructor() { + } + + /** + * Defines the metadata of SourceControlSyncJobById + * + * @returns {object} metadata of SourceControlSyncJobById + * + */ + mapper() { + return { + required: false, + serializedName: 'SourceControlSyncJobById', + type: { + name: 'Composite', + className: 'SourceControlSyncJobById', + modelProperties: { + id: { + required: false, + serializedName: 'id', + type: { + name: 'String' + } + }, + sourceControlSyncJobId: { + required: false, + serializedName: 'properties.sourceControlSyncJobId', + type: { + name: 'String' + } + }, + creationTime: { + required: false, + readOnly: true, + serializedName: 'properties.creationTime', + type: { + name: 'DateTime' + } + }, + provisioningState: { + required: false, + serializedName: 'properties.provisioningState', + type: { + name: 'String' + } + }, + startTime: { + required: false, + readOnly: true, + serializedName: 'properties.startTime', + type: { + name: 'DateTime' + } + }, + endTime: { + required: false, + readOnly: true, + serializedName: 'properties.endTime', + type: { + name: 'DateTime' + } + }, + startedBy: { + required: false, + serializedName: 'properties.startedBy', + type: { + name: 'String' + } + }, + errors: { + required: false, + serializedName: 'properties.errors', + type: { + name: 'Composite', + className: 'SourceControlSyncJobByIdErrors' + } + } + } + } + }; + } +} + +module.exports = SourceControlSyncJobById; diff --git a/lib/services/automationManagement/lib/models/sourceControlSyncJobByIdErrors.js b/lib/services/automationManagement/lib/models/sourceControlSyncJobByIdErrors.js new file mode 100644 index 0000000000..94a8ee52d0 --- /dev/null +++ b/lib/services/automationManagement/lib/models/sourceControlSyncJobByIdErrors.js @@ -0,0 +1,60 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * Error details of the source control sync job. + * + */ +class SourceControlSyncJobByIdErrors { + /** + * Create a SourceControlSyncJobByIdErrors. + * @member {string} [code] Gets the error code for the job. + * @member {string} [message] Gets the error message for the job. + */ + constructor() { + } + + /** + * Defines the metadata of SourceControlSyncJobByIdErrors + * + * @returns {object} metadata of SourceControlSyncJobByIdErrors + * + */ + mapper() { + return { + required: false, + serializedName: 'SourceControlSyncJobByIdErrors', + type: { + name: 'Composite', + className: 'SourceControlSyncJobByIdErrors', + modelProperties: { + code: { + required: false, + serializedName: 'code', + type: { + name: 'String' + } + }, + message: { + required: false, + serializedName: 'message', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = SourceControlSyncJobByIdErrors; diff --git a/lib/services/automationManagement/lib/models/sourceControlSyncJobListResult.js b/lib/services/automationManagement/lib/models/sourceControlSyncJobListResult.js new file mode 100644 index 0000000000..328361f520 --- /dev/null +++ b/lib/services/automationManagement/lib/models/sourceControlSyncJobListResult.js @@ -0,0 +1,67 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * The response model for the list source control sync jobs operation. + */ +class SourceControlSyncJobListResult extends Array { + /** + * Create a SourceControlSyncJobListResult. + * @member {string} [nextLink] Gets or sets the next link. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of SourceControlSyncJobListResult + * + * @returns {object} metadata of SourceControlSyncJobListResult + * + */ + mapper() { + return { + required: false, + serializedName: 'SourceControlSyncJobListResult', + type: { + name: 'Composite', + className: 'SourceControlSyncJobListResult', + modelProperties: { + value: { + required: false, + serializedName: '', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'SourceControlSyncJobElementType', + type: { + name: 'Composite', + className: 'SourceControlSyncJob' + } + } + } + }, + nextLink: { + required: false, + serializedName: 'nextLink', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = SourceControlSyncJobListResult; diff --git a/lib/services/automationManagement/lib/models/sourceControlUpdateParameters.js b/lib/services/automationManagement/lib/models/sourceControlUpdateParameters.js new file mode 100644 index 0000000000..bd0062ebd6 --- /dev/null +++ b/lib/services/automationManagement/lib/models/sourceControlUpdateParameters.js @@ -0,0 +1,98 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * The parameters supplied to the update source control operation. + * + */ +class SourceControlUpdateParameters { + /** + * Create a SourceControlUpdateParameters. + * @member {string} [branch] Gets or sets the repo branch of the source + * control. + * @member {string} [folderPath] Gets or sets the folder path of the source + * control. Path must be relative. + * @member {boolean} [autoSync] Gets or sets auto async of the source + * control. Default is false. + * @member {boolean} [publishRunbook] Gets or sets the auto publish of the + * source control. Default is true. + * @member {string} [securityToken] Gets or sets the authorization token for + * the repo of the source control. + * @member {string} [description] Gets or sets the user description of the + * source control. + */ + constructor() { + } + + /** + * Defines the metadata of SourceControlUpdateParameters + * + * @returns {object} metadata of SourceControlUpdateParameters + * + */ + mapper() { + return { + required: false, + serializedName: 'SourceControlUpdateParameters', + type: { + name: 'Composite', + className: 'SourceControlUpdateParameters', + modelProperties: { + branch: { + required: false, + serializedName: 'properties.branch', + type: { + name: 'String' + } + }, + folderPath: { + required: false, + serializedName: 'properties.folderPath', + type: { + name: 'String' + } + }, + autoSync: { + required: false, + serializedName: 'properties.autoSync', + type: { + name: 'Boolean' + } + }, + publishRunbook: { + required: false, + serializedName: 'properties.publishRunbook', + type: { + name: 'Boolean' + } + }, + securityToken: { + required: false, + serializedName: 'properties.securityToken', + type: { + name: 'String' + } + }, + description: { + required: false, + serializedName: 'properties.description', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = SourceControlUpdateParameters; diff --git a/lib/services/automationManagement/lib/models/testJob.js b/lib/services/automationManagement/lib/models/testJob.js index ce4b2de4b2..5dfc6c310a 100644 --- a/lib/services/automationManagement/lib/models/testJob.js +++ b/lib/services/automationManagement/lib/models/testJob.js @@ -32,6 +32,8 @@ class TestJob { * @member {date} [lastStatusModifiedTime] Gets or sets the last status * modified time of the test job. * @member {object} [parameters] Gets or sets the parameters of the test job. + * @member {number} [logActivityTrace] The activity-level tracing options of + * the runbook. */ constructor() { } @@ -126,6 +128,13 @@ class TestJob { } } } + }, + logActivityTrace: { + required: false, + serializedName: 'logActivityTrace', + type: { + name: 'Number' + } } } } diff --git a/lib/services/automationManagement/lib/models/testJobCreateParameters.js b/lib/services/automationManagement/lib/models/testJobCreateParameters.js index 82eabcba96..23468ce8fd 100644 --- a/lib/services/automationManagement/lib/models/testJobCreateParameters.js +++ b/lib/services/automationManagement/lib/models/testJobCreateParameters.js @@ -17,7 +17,6 @@ class TestJobCreateParameters { /** * Create a TestJobCreateParameters. - * @member {string} runbookName Gets or sets the runbook name. * @member {object} [parameters] Gets or sets the parameters of the test job. * @member {string} [runOn] Gets or sets the runOn which specifies the group * name where the job is to be executed. @@ -39,13 +38,6 @@ class TestJobCreateParameters { name: 'Composite', className: 'TestJobCreateParameters', modelProperties: { - runbookName: { - required: true, - serializedName: 'runbookName', - type: { - name: 'String' - } - }, parameters: { required: false, serializedName: 'parameters', diff --git a/lib/services/automationManagement/lib/models/updateConfiguration.js b/lib/services/automationManagement/lib/models/updateConfiguration.js new file mode 100644 index 0000000000..49842befcc --- /dev/null +++ b/lib/services/automationManagement/lib/models/updateConfiguration.js @@ -0,0 +1,128 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Update specifc properties of the software update configuration. + * + */ +class UpdateConfiguration { + /** + * Create a UpdateConfiguration. + * @member {string} operatingSystem operating system of target machines. + * Possible values include: 'Windows', 'Linux' + * @member {object} [windows] Windows specific update configuration. + * @member {string} [windows.includedUpdateClassifications] Update + * classification included in the software update configuration. A comma + * separated string with required values. Possible values include: + * 'Unclassified', 'Critical', 'Security', 'UpdateRollup', 'FeaturePack', + * 'ServicePack', 'Definition', 'Tools', 'Updates' + * @member {array} [windows.excludedKbNumbers] KB numbers excluded from the + * software update configuration. + * @member {object} [linux] Linux specific update configuration. + * @member {string} [linux.includedPackageClassifications] Update + * classifications included in the software update configuration. Possible + * values include: 'Unclassified', 'Critical', 'Security', 'Other' + * @member {array} [linux.excludedPackageNameMasks] packages excluded from + * the software update configuration. + * @member {moment.duration} [duration] Maximum time allowed for the software + * update configuration run. Duration needs to be specified using the format + * PT[n]H[n]M[n]S as per ISO8601 + * @member {array} [azureVirtualMachines] List of azure resource Ids for + * azure virtual machines targeted by the software update configuration. + * @member {array} [nonAzureComputerNames] List of names of non-azure + * machines targeted by the software update configuration. + */ + constructor() { + } + + /** + * Defines the metadata of UpdateConfiguration + * + * @returns {object} metadata of UpdateConfiguration + * + */ + mapper() { + return { + required: false, + serializedName: 'updateConfiguration', + type: { + name: 'Composite', + className: 'UpdateConfiguration', + modelProperties: { + operatingSystem: { + required: true, + serializedName: 'operatingSystem', + type: { + name: 'Enum', + allowedValues: [ 'Windows', 'Linux' ] + } + }, + windows: { + required: false, + serializedName: 'windows', + type: { + name: 'Composite', + className: 'WindowsProperties' + } + }, + linux: { + required: false, + serializedName: 'linux', + type: { + name: 'Composite', + className: 'LinuxProperties' + } + }, + duration: { + required: false, + serializedName: 'duration', + type: { + name: 'TimeSpan' + } + }, + azureVirtualMachines: { + required: false, + serializedName: 'azureVirtualMachines', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + nonAzureComputerNames: { + required: false, + serializedName: 'nonAzureComputerNames', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'StringElementType', + type: { + name: 'String' + } + } + } + } + } + } + }; + } +} + +module.exports = UpdateConfiguration; diff --git a/lib/services/automationManagement/lib/models/updateConfigurationNavigation.js b/lib/services/automationManagement/lib/models/updateConfigurationNavigation.js new file mode 100644 index 0000000000..0b35837171 --- /dev/null +++ b/lib/services/automationManagement/lib/models/updateConfigurationNavigation.js @@ -0,0 +1,54 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * Software update configuration Run Navigation model. + * + */ +class UpdateConfigurationNavigation { + /** + * Create a UpdateConfigurationNavigation. + * @member {string} [name] Name of the software update configuration + * triggered the software update configuration run + */ + constructor() { + } + + /** + * Defines the metadata of UpdateConfigurationNavigation + * + * @returns {object} metadata of UpdateConfigurationNavigation + * + */ + mapper() { + return { + required: false, + serializedName: 'updateConfigurationNavigation', + type: { + name: 'Composite', + className: 'UpdateConfigurationNavigation', + modelProperties: { + name: { + required: false, + readOnly: true, + serializedName: 'name', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = UpdateConfigurationNavigation; diff --git a/lib/services/automationManagement/lib/models/variable.js b/lib/services/automationManagement/lib/models/variable.js index 15cecf4457..192421272a 100644 --- a/lib/services/automationManagement/lib/models/variable.js +++ b/lib/services/automationManagement/lib/models/variable.js @@ -10,15 +10,19 @@ 'use strict'; +const models = require('./index'); + /** * Definition of the varible. * + * @extends models['BaseResource'] */ -class Variable { +class Variable extends models['BaseResource'] { /** * Create a Variable. - * @member {string} [id] Gets or sets the id of the resource. - * @member {string} [name] Gets or sets the name of the variable. + * @member {string} [id] Gets the id of the resource. + * @member {string} [name] Gets the name of the variable. + * @member {string} [type] Resource type * @member {string} [value] Gets or sets the value of the variable. * @member {boolean} [isEncrypted] Gets or sets the encrypted flag of the * variable. @@ -27,6 +31,7 @@ class Variable { * @member {string} [description] Gets or sets the description. */ constructor() { + super(); } /** @@ -45,6 +50,7 @@ class Variable { modelProperties: { id: { required: false, + readOnly: true, serializedName: 'id', type: { name: 'String' @@ -52,11 +58,20 @@ class Variable { }, name: { required: false, + readOnly: true, serializedName: 'name', type: { name: 'String' } }, + type: { + required: false, + readOnly: true, + serializedName: 'type', + type: { + name: 'String' + } + }, value: { required: false, serializedName: 'properties.value', diff --git a/lib/services/automationManagement/lib/models/variableUpdateParameters.js b/lib/services/automationManagement/lib/models/variableUpdateParameters.js index 14a64e03fa..d81497a7fe 100644 --- a/lib/services/automationManagement/lib/models/variableUpdateParameters.js +++ b/lib/services/automationManagement/lib/models/variableUpdateParameters.js @@ -17,7 +17,7 @@ class VariableUpdateParameters { /** * Create a VariableUpdateParameters. - * @member {string} name Gets or sets the name of the variable. + * @member {string} [name] Gets or sets the name of the variable. * @member {string} [value] Gets or sets the value of the variable. * @member {string} [description] Gets or sets the description of the * variable. @@ -40,7 +40,7 @@ class VariableUpdateParameters { className: 'VariableUpdateParameters', modelProperties: { name: { - required: true, + required: false, serializedName: 'name', type: { name: 'String' diff --git a/lib/services/automationManagement/lib/models/webhook.js b/lib/services/automationManagement/lib/models/webhook.js index 8c67739dfe..8f6f569ec5 100644 --- a/lib/services/automationManagement/lib/models/webhook.js +++ b/lib/services/automationManagement/lib/models/webhook.js @@ -15,12 +15,14 @@ const models = require('./index'); /** * Definition of the webhook type. * + * @extends models['BaseResource'] */ -class Webhook { +class Webhook extends models['BaseResource'] { /** * Create a Webhook. - * @member {string} [id] Gets or sets the id of the resource. - * @member {string} [name] Gets or sets the name of the webhook. + * @member {string} [id] Gets the id of the resource. + * @member {string} [name] Gets the name of the webhook. + * @member {string} [type] Gets the type of the resource. * @member {boolean} [isEnabled] Gets or sets the value of the enabled flag * of the webhook. Default value: false . * @member {string} [uri] Gets or sets the webhook uri. @@ -38,6 +40,7 @@ class Webhook { * @member {string} [description] Gets or sets the description. */ constructor() { + super(); } /** @@ -56,6 +59,7 @@ class Webhook { modelProperties: { id: { required: false, + readOnly: true, serializedName: 'id', type: { name: 'String' @@ -63,11 +67,20 @@ class Webhook { }, name: { required: false, + readOnly: true, serializedName: 'name', type: { name: 'String' } }, + type: { + required: false, + readOnly: true, + serializedName: 'type', + type: { + name: 'String' + } + }, isEnabled: { required: false, serializedName: 'properties.isEnabled', diff --git a/lib/services/automationManagement/lib/models/webhookUpdateParameters.js b/lib/services/automationManagement/lib/models/webhookUpdateParameters.js index 689df09516..99d7772239 100644 --- a/lib/services/automationManagement/lib/models/webhookUpdateParameters.js +++ b/lib/services/automationManagement/lib/models/webhookUpdateParameters.js @@ -17,7 +17,7 @@ class WebhookUpdateParameters { /** * Create a WebhookUpdateParameters. - * @member {string} name Gets or sets the name of the webhook. + * @member {string} [name] Gets or sets the name of the webhook. * @member {boolean} [isEnabled] Gets or sets the value of the enabled flag * of webhook. * @member {string} [runOn] Gets or sets the name of the hybrid worker group @@ -44,7 +44,7 @@ class WebhookUpdateParameters { className: 'WebhookUpdateParameters', modelProperties: { name: { - required: true, + required: false, serializedName: 'name', type: { name: 'String' diff --git a/lib/services/automationManagement/lib/models/windowsProperties.js b/lib/services/automationManagement/lib/models/windowsProperties.js new file mode 100644 index 0000000000..d58407607d --- /dev/null +++ b/lib/services/automationManagement/lib/models/windowsProperties.js @@ -0,0 +1,72 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * Windows specific update configuration. + * + */ +class WindowsProperties { + /** + * Create a WindowsProperties. + * @member {string} [includedUpdateClassifications] Update classification + * included in the software update configuration. A comma separated string + * with required values. Possible values include: 'Unclassified', 'Critical', + * 'Security', 'UpdateRollup', 'FeaturePack', 'ServicePack', 'Definition', + * 'Tools', 'Updates' + * @member {array} [excludedKbNumbers] KB numbers excluded from the software + * update configuration. + */ + constructor() { + } + + /** + * Defines the metadata of WindowsProperties + * + * @returns {object} metadata of WindowsProperties + * + */ + mapper() { + return { + required: false, + serializedName: 'WindowsProperties', + type: { + name: 'Composite', + className: 'WindowsProperties', + modelProperties: { + includedUpdateClassifications: { + required: false, + serializedName: 'includedUpdateClassifications', + type: { + name: 'String' + } + }, + excludedKbNumbers: { + required: false, + serializedName: 'excludedKbNumbers', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'StringElementType', + type: { + name: 'String' + } + } + } + } + } + } + }; + } +} + +module.exports = WindowsProperties; diff --git a/lib/services/automationManagement/lib/operations/activityOperations.js b/lib/services/automationManagement/lib/operations/activityOperations.js index 7745455e88..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') { @@ -54,15 +52,16 @@ function _get(resourceGroupName, automationAccountName, moduleName, activityName 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 (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,9 +76,6 @@ function _get(resourceGroupName, automationAccountName, moduleName, activityName 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.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { - throw new Error('this.client.apiVersion 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.'); } @@ -90,13 +86,13 @@ 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)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; - queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); if (queryParameters.length > 0) { requestUrl += '?' + queryParameters.join('&'); } @@ -182,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. @@ -206,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') { @@ -216,15 +210,16 @@ function _listByModule(resourceGroupName, automationAccountName, moduleName, opt 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 (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,9 +231,6 @@ function _listByModule(resourceGroupName, automationAccountName, moduleName, opt 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.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { - throw new Error('this.client.apiVersion 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.'); } @@ -249,12 +241,12 @@ 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)); let queryParameters = []; - queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); if (queryParameters.length > 0) { requestUrl += '?' + queryParameters.join('&'); } @@ -482,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. @@ -501,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); } @@ -519,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. @@ -554,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') { @@ -563,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. @@ -594,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); } @@ -611,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. @@ -644,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') { @@ -653,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 d772297337..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') { @@ -49,15 +47,16 @@ function _get(resourceGroupName, automationAccountName, options, callback) { 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 (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') { @@ -66,9 +65,6 @@ function _get(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 (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { - throw new Error('this.client.apiVersion 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.'); } @@ -79,11 +75,11 @@ 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 = []; - queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); if (queryParameters.length > 0) { requestUrl += '?' + queryParameters.join('&'); } @@ -169,15 +165,13 @@ 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 * regenerated * * @param {string} parameters.keyName Gets or sets the agent registration key - * name - Primary or Secondary. Possible values include: 'Primary', 'Secondary' + * name - primary or secondary. Possible values include: 'primary', 'secondary' * * @param {string} [parameters.name] Gets or sets the name of the resource. * @@ -205,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') { @@ -215,15 +209,16 @@ function _regenerateKey(resourceGroupName, automationAccountName, parameters, op 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 (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') { @@ -235,9 +230,6 @@ function _regenerateKey(resourceGroupName, automationAccountName, parameters, 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 (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { - throw new Error('this.client.apiVersion 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.'); } @@ -248,11 +240,11 @@ 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 = []; - queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); if (queryParameters.length > 0) { requestUrl += '?' + queryParameters.join('&'); } @@ -364,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. @@ -379,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); } @@ -396,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. @@ -427,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') { @@ -436,29 +424,27 @@ 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 * regenerated * * @param {string} parameters.keyName Gets or sets the agent registration key - * name - Primary or Secondary. Possible values include: 'Primary', 'Secondary' + * name - primary or secondary. Possible values include: 'primary', 'secondary' * * @param {string} [parameters.name] Gets or sets the name of the resource. * @@ -479,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); } @@ -496,15 +482,13 @@ 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 * regenerated * * @param {string} parameters.keyName Gets or sets the agent registration key - * name - Primary or Secondary. Possible values include: 'Primary', 'Secondary' + * name - primary or secondary. Possible values include: 'primary', 'secondary' * * @param {string} [parameters.name] Gets or sets the name of the resource. * @@ -541,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') { @@ -550,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/automationAccountOperations.js b/lib/services/automationManagement/lib/operations/automationAccountOperations.js index e7b24e4893..a35d725c5a 100644 --- a/lib/services/automationManagement/lib/operations/automationAccountOperations.js +++ b/lib/services/automationManagement/lib/operations/automationAccountOperations.js @@ -69,6 +69,7 @@ function _update(resourceGroupName, automationAccountName, parameters, options, 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') { @@ -89,9 +90,6 @@ function _update(resourceGroupName, automationAccountName, parameters, options, if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); } - if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { - throw new Error('this.client.apiVersion 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.'); } @@ -106,7 +104,7 @@ function _update(resourceGroupName, automationAccountName, parameters, options, requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; - queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); if (queryParameters.length > 0) { requestUrl += '?' + queryParameters.join('&'); } @@ -259,6 +257,7 @@ function _createOrUpdate(resourceGroupName, automationAccountName, parameters, o 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') { @@ -279,9 +278,6 @@ function _createOrUpdate(resourceGroupName, automationAccountName, parameters, 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 (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { - throw new Error('this.client.apiVersion 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.'); } @@ -296,7 +292,7 @@ function _createOrUpdate(resourceGroupName, automationAccountName, parameters, o requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; - queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); if (queryParameters.length > 0) { requestUrl += '?' + queryParameters.join('&'); } @@ -342,7 +338,7 @@ function _createOrUpdate(resourceGroupName, automationAccountName, parameters, o return callback(err); } let statusCode = response.statusCode; - if (statusCode !== 201 && statusCode !== 200) { + if (statusCode !== 200 && statusCode !== 201) { let error = new Error(responseBody); error.statusCode = response.statusCode; error.request = msRest.stripRequest(httpRequest); @@ -372,7 +368,7 @@ function _createOrUpdate(resourceGroupName, automationAccountName, parameters, o let result = null; if (responseBody === '') responseBody = null; // Deserialize Response - if (statusCode === 201) { + if (statusCode === 200) { let parsedResponse = null; try { parsedResponse = JSON.parse(responseBody); @@ -389,7 +385,7 @@ function _createOrUpdate(resourceGroupName, automationAccountName, parameters, o } } // Deserialize Response - if (statusCode === 200) { + if (statusCode === 201) { let parsedResponse = null; try { parsedResponse = JSON.parse(responseBody); @@ -444,6 +440,7 @@ function _deleteMethod(resourceGroupName, automationAccountName, options, callba 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') { @@ -461,9 +458,6 @@ function _deleteMethod(resourceGroupName, automationAccountName, options, callba if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); } - if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { - throw new Error('this.client.apiVersion 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.'); } @@ -478,7 +472,7 @@ function _deleteMethod(resourceGroupName, automationAccountName, options, callba requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; - queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); if (queryParameters.length > 0) { requestUrl += '?' + queryParameters.join('&'); } @@ -579,6 +573,7 @@ function _get(resourceGroupName, automationAccountName, options, callback) { 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') { @@ -596,9 +591,6 @@ function _get(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 (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { - throw new Error('this.client.apiVersion 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.'); } @@ -613,7 +605,7 @@ function _get(resourceGroupName, automationAccountName, options, callback) { requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; - queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); if (queryParameters.length > 0) { requestUrl += '?' + queryParameters.join('&'); } @@ -730,6 +722,7 @@ function _listByResourceGroup(resourceGroupName, options, callback) { 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') { @@ -744,9 +737,6 @@ function _listByResourceGroup(resourceGroupName, options, callback) { if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); } - if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { - throw new Error('this.client.apiVersion 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.'); } @@ -760,7 +750,7 @@ function _listByResourceGroup(resourceGroupName, options, callback) { requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; - queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); if (queryParameters.length > 0) { requestUrl += '?' + queryParameters.join('&'); } @@ -877,14 +867,12 @@ function _list(options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } + let apiVersion = '2015-10-31'; // Validate try { if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); } - if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { - throw new Error('this.client.apiVersion 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.'); } @@ -897,7 +885,7 @@ function _list(options, callback) { let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/providers/Microsoft.Automation/automationAccounts'; requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; - queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); if (queryParameters.length > 0) { requestUrl += '?' + queryParameters.join('&'); } diff --git a/lib/services/automationManagement/lib/operations/certificateOperations.js b/lib/services/automationManagement/lib/operations/certificateOperations.js index 3023bbdcc3..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') { @@ -50,15 +48,16 @@ function _deleteMethod(resourceGroupName, automationAccountName, certificateName 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 (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') { @@ -70,9 +69,6 @@ function _deleteMethod(resourceGroupName, automationAccountName, certificateName 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.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { - throw new Error('this.client.apiVersion 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.'); } @@ -83,12 +79,12 @@ 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)); let queryParameters = []; - queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); if (queryParameters.length > 0) { requestUrl += '?' + queryParameters.join('&'); } @@ -157,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. @@ -181,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') { @@ -191,15 +185,16 @@ function _get(resourceGroupName, automationAccountName, certificateName, options 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 (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') { @@ -211,9 +206,6 @@ function _get(resourceGroupName, automationAccountName, certificateName, options if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); } - if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { - throw new Error('this.client.apiVersion 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.'); } @@ -224,12 +216,12 @@ 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)); let queryParameters = []; - queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); if (queryParameters.length > 0) { requestUrl += '?' + queryParameters.join('&'); } @@ -315,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 @@ -357,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') { @@ -367,15 +357,16 @@ function _createOrUpdate(resourceGroupName, automationAccountName, certificateNa 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 (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') { @@ -390,9 +381,6 @@ function _createOrUpdate(resourceGroupName, automationAccountName, certificateNa 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.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { - throw new Error('this.client.apiVersion 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.'); } @@ -403,12 +391,12 @@ 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)); let queryParameters = []; - queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); if (queryParameters.length > 0) { requestUrl += '?' + queryParameters.join('&'); } @@ -454,7 +442,7 @@ function _createOrUpdate(resourceGroupName, automationAccountName, certificateNa return callback(err); } let statusCode = response.statusCode; - if (statusCode !== 201 && statusCode !== 200) { + if (statusCode !== 200 && statusCode !== 201) { let error = new Error(responseBody); error.statusCode = response.statusCode; error.request = msRest.stripRequest(httpRequest); @@ -484,7 +472,7 @@ function _createOrUpdate(resourceGroupName, automationAccountName, certificateNa let result = null; if (responseBody === '') responseBody = null; // Deserialize Response - if (statusCode === 201) { + if (statusCode === 200) { let parsedResponse = null; try { parsedResponse = JSON.parse(responseBody); @@ -501,7 +489,7 @@ function _createOrUpdate(resourceGroupName, automationAccountName, certificateNa } } // Deserialize Response - if (statusCode === 200) { + if (statusCode === 201) { let parsedResponse = null; try { parsedResponse = JSON.parse(responseBody); @@ -525,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 @@ -535,7 +521,7 @@ function _createOrUpdate(resourceGroupName, automationAccountName, certificateNa * @param {object} parameters The parameters supplied to the update certificate * operation. * - * @param {string} parameters.name Gets or sets the name of the certificate. + * @param {string} [parameters.name] Gets or sets the name of the certificate. * * @param {string} [parameters.description] Gets or sets the description of the * certificate. @@ -558,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') { @@ -568,15 +554,16 @@ function _update(resourceGroupName, automationAccountName, certificateName, para 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 (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') { @@ -591,9 +578,6 @@ function _update(resourceGroupName, automationAccountName, certificateName, para 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.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { - throw new Error('this.client.apiVersion 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.'); } @@ -604,12 +588,12 @@ 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)); let queryParameters = []; - queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); if (queryParameters.length > 0) { requestUrl += '?' + queryParameters.join('&'); } @@ -709,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. @@ -731,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') { @@ -741,15 +723,16 @@ function _listByAutomationAccount(resourceGroupName, automationAccountName, opti 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 (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') { @@ -758,9 +741,6 @@ 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 (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { - throw new Error('this.client.apiVersion 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.'); } @@ -771,11 +751,11 @@ 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 = []; - queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); if (queryParameters.length > 0) { requestUrl += '?' + queryParameters.join('&'); } @@ -1005,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. @@ -1022,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); } @@ -1039,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. @@ -1071,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') { @@ -1080,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. @@ -1111,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); } @@ -1128,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. @@ -1161,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') { @@ -1170,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 @@ -1219,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); } @@ -1236,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 @@ -1287,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') { @@ -1296,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 @@ -1320,7 +1286,7 @@ class CertificateOperations { * @param {object} parameters The parameters supplied to the update certificate * operation. * - * @param {string} parameters.name Gets or sets the name of the certificate. + * @param {string} [parameters.name] Gets or sets the name of the certificate. * * @param {string} [parameters.description] Gets or sets the description of the * certificate. @@ -1336,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); } @@ -1353,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 @@ -1363,7 +1327,7 @@ class CertificateOperations { * @param {object} parameters The parameters supplied to the update certificate * operation. * - * @param {string} parameters.name Gets or sets the name of the certificate. + * @param {string} [parameters.name] Gets or sets the name of the certificate. * * @param {string} [parameters.description] Gets or sets the description of the * certificate. @@ -1395,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') { @@ -1404,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. @@ -1433,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); } @@ -1450,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. @@ -1481,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') { @@ -1490,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 69a0c90857..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') { @@ -51,15 +49,16 @@ function _deleteMethod(resourceGroupName, automationAccountName, connectionName, 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 (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') { @@ -71,9 +70,6 @@ function _deleteMethod(resourceGroupName, automationAccountName, connectionName, 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.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { - throw new Error('this.client.apiVersion 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.'); } @@ -84,12 +80,12 @@ 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)); let queryParameters = []; - queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); if (queryParameters.length > 0) { requestUrl += '?' + queryParameters.join('&'); } @@ -175,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. @@ -199,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') { @@ -209,15 +203,16 @@ function _get(resourceGroupName, automationAccountName, connectionName, options, 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 (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') { @@ -229,9 +224,6 @@ function _get(resourceGroupName, automationAccountName, connectionName, options, if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); } - if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { - throw new Error('this.client.apiVersion 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.'); } @@ -242,12 +234,12 @@ 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)); let queryParameters = []; - queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); if (queryParameters.length > 0) { requestUrl += '?' + queryParameters.join('&'); } @@ -333,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 @@ -375,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') { @@ -385,15 +375,16 @@ function _createOrUpdate(resourceGroupName, automationAccountName, connectionNam 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 (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') { @@ -408,9 +399,6 @@ function _createOrUpdate(resourceGroupName, automationAccountName, connectionNam 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.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { - throw new Error('this.client.apiVersion 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.'); } @@ -421,12 +409,12 @@ 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)); let queryParameters = []; - queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); if (queryParameters.length > 0) { requestUrl += '?' + queryParameters.join('&'); } @@ -472,7 +460,7 @@ function _createOrUpdate(resourceGroupName, automationAccountName, connectionNam return callback(err); } let statusCode = response.statusCode; - if (statusCode !== 201 && statusCode !== 200) { + if (statusCode !== 200 && statusCode !== 201) { let error = new Error(responseBody); error.statusCode = response.statusCode; error.request = msRest.stripRequest(httpRequest); @@ -502,7 +490,7 @@ function _createOrUpdate(resourceGroupName, automationAccountName, connectionNam let result = null; if (responseBody === '') responseBody = null; // Deserialize Response - if (statusCode === 201) { + if (statusCode === 200) { let parsedResponse = null; try { parsedResponse = JSON.parse(responseBody); @@ -519,7 +507,7 @@ function _createOrUpdate(resourceGroupName, automationAccountName, connectionNam } } // Deserialize Response - if (statusCode === 200) { + if (statusCode === 201) { let parsedResponse = null; try { parsedResponse = JSON.parse(responseBody); @@ -543,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 @@ -579,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') { @@ -589,15 +575,16 @@ function _update(resourceGroupName, automationAccountName, connectionName, param 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 (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') { @@ -612,9 +599,6 @@ function _update(resourceGroupName, automationAccountName, connectionName, param 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.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { - throw new Error('this.client.apiVersion 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.'); } @@ -625,12 +609,12 @@ 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)); let queryParameters = []; - queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); if (queryParameters.length > 0) { requestUrl += '?' + queryParameters.join('&'); } @@ -730,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. @@ -752,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') { @@ -762,15 +744,16 @@ function _listByAutomationAccount(resourceGroupName, automationAccountName, opti 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 (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') { @@ -779,9 +762,6 @@ 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 (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { - throw new Error('this.client.apiVersion 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.'); } @@ -792,11 +772,11 @@ 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 = []; - queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); if (queryParameters.length > 0) { requestUrl += '?' + queryParameters.join('&'); } @@ -1026,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. @@ -1043,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); } @@ -1060,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. @@ -1093,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') { @@ -1102,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. @@ -1133,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); } @@ -1150,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. @@ -1183,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') { @@ -1192,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 @@ -1241,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); } @@ -1258,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 @@ -1309,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') { @@ -1318,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 @@ -1361,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); } @@ -1378,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 @@ -1423,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') { @@ -1432,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. @@ -1461,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); } @@ -1478,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. @@ -1509,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') { @@ -1518,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 462f5136fd..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') { @@ -50,15 +48,16 @@ function _deleteMethod(resourceGroupName, automationAccountName, connectionTypeN 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 (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') { @@ -70,9 +69,6 @@ function _deleteMethod(resourceGroupName, automationAccountName, connectionTypeN 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.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { - throw new Error('this.client.apiVersion 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.'); } @@ -83,12 +79,12 @@ 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)); let queryParameters = []; - queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); if (queryParameters.length > 0) { requestUrl += '?' + queryParameters.join('&'); } @@ -157,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. @@ -181,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') { @@ -191,15 +185,16 @@ function _get(resourceGroupName, automationAccountName, connectionTypeName, opti 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 (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') { @@ -211,9 +206,6 @@ function _get(resourceGroupName, automationAccountName, connectionTypeName, 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 (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { - throw new Error('this.client.apiVersion 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.'); } @@ -224,12 +216,12 @@ 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)); let queryParameters = []; - queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); if (queryParameters.length > 0) { requestUrl += '?' + queryParameters.join('&'); } @@ -315,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 @@ -352,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') { @@ -362,15 +352,16 @@ function _createOrUpdate(resourceGroupName, automationAccountName, connectionTyp 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 (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') { @@ -385,9 +376,6 @@ function _createOrUpdate(resourceGroupName, automationAccountName, connectionTyp 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.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { - throw new Error('this.client.apiVersion 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.'); } @@ -398,12 +386,12 @@ 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)); let queryParameters = []; - queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); if (queryParameters.length > 0) { requestUrl += '?' + queryParameters.join('&'); } @@ -520,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. @@ -543,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') { @@ -553,15 +539,16 @@ function _listByAutomationAccount(resourceGroupName, automationAccountName, opti 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 (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') { @@ -570,9 +557,6 @@ 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 (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { - throw new Error('this.client.apiVersion 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.'); } @@ -583,11 +567,11 @@ 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 = []; - queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); if (queryParameters.length > 0) { requestUrl += '?' + queryParameters.join('&'); } @@ -817,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. @@ -834,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); } @@ -851,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. @@ -883,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') { @@ -892,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. @@ -923,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); } @@ -940,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. @@ -973,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') { @@ -982,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 @@ -1026,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); } @@ -1043,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 @@ -1089,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') { @@ -1098,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. @@ -1127,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); } @@ -1144,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. @@ -1176,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') { @@ -1185,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 ab79ce8fa1..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') { @@ -50,15 +48,16 @@ function _deleteMethod(resourceGroupName, automationAccountName, credentialName, 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 (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') { @@ -70,9 +69,6 @@ function _deleteMethod(resourceGroupName, automationAccountName, credentialName, 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.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { - throw new Error('this.client.apiVersion 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.'); } @@ -83,12 +79,12 @@ 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)); let queryParameters = []; - queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); if (queryParameters.length > 0) { requestUrl += '?' + queryParameters.join('&'); } @@ -157,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. @@ -181,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') { @@ -191,15 +185,16 @@ function _get(resourceGroupName, automationAccountName, credentialName, options, 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 (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') { @@ -211,9 +206,6 @@ function _get(resourceGroupName, automationAccountName, credentialName, options, if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); } - if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { - throw new Error('this.client.apiVersion 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.'); } @@ -224,12 +216,12 @@ 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)); let queryParameters = []; - queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); if (queryParameters.length > 0) { requestUrl += '?' + queryParameters.join('&'); } @@ -315,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 @@ -354,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') { @@ -364,15 +354,16 @@ function _createOrUpdate(resourceGroupName, automationAccountName, credentialNam 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 (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') { @@ -387,9 +378,6 @@ function _createOrUpdate(resourceGroupName, automationAccountName, credentialNam 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.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { - throw new Error('this.client.apiVersion 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.'); } @@ -400,12 +388,12 @@ 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)); let queryParameters = []; - queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); if (queryParameters.length > 0) { requestUrl += '?' + queryParameters.join('&'); } @@ -451,7 +439,7 @@ function _createOrUpdate(resourceGroupName, automationAccountName, credentialNam return callback(err); } let statusCode = response.statusCode; - if (statusCode !== 201 && statusCode !== 200) { + if (statusCode !== 200 && statusCode !== 201) { let error = new Error(responseBody); error.statusCode = response.statusCode; error.request = msRest.stripRequest(httpRequest); @@ -481,7 +469,7 @@ function _createOrUpdate(resourceGroupName, automationAccountName, credentialNam let result = null; if (responseBody === '') responseBody = null; // Deserialize Response - if (statusCode === 201) { + if (statusCode === 200) { let parsedResponse = null; try { parsedResponse = JSON.parse(responseBody); @@ -498,7 +486,7 @@ function _createOrUpdate(resourceGroupName, automationAccountName, credentialNam } } // Deserialize Response - if (statusCode === 200) { + if (statusCode === 201) { let parsedResponse = null; try { parsedResponse = JSON.parse(responseBody); @@ -522,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 @@ -532,7 +518,7 @@ function _createOrUpdate(resourceGroupName, automationAccountName, credentialNam * @param {object} parameters The parameters supplied to the Update credential * operation. * - * @param {string} parameters.name Gets or sets the name of the credential. + * @param {string} [parameters.name] Gets or sets the name of the credential. * * @param {string} [parameters.userName] Gets or sets the user name of the * credential. @@ -561,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') { @@ -571,15 +557,16 @@ function _update(resourceGroupName, automationAccountName, credentialName, param 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 (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') { @@ -594,9 +581,6 @@ function _update(resourceGroupName, automationAccountName, credentialName, param 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.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { - throw new Error('this.client.apiVersion 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.'); } @@ -607,12 +591,12 @@ 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)); let queryParameters = []; - queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); if (queryParameters.length > 0) { requestUrl += '?' + queryParameters.join('&'); } @@ -712,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. @@ -734,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') { @@ -744,15 +726,16 @@ function _listByAutomationAccount(resourceGroupName, automationAccountName, opti 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 (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,9 +744,6 @@ 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 (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { - throw new Error('this.client.apiVersion 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.'); } @@ -774,11 +754,11 @@ 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 = []; - queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); if (queryParameters.length > 0) { requestUrl += '?' + queryParameters.join('&'); } @@ -1006,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. @@ -1023,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); } @@ -1040,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. @@ -1072,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') { @@ -1081,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. @@ -1112,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); } @@ -1129,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. @@ -1162,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') { @@ -1171,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 @@ -1217,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); } @@ -1234,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 @@ -1282,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') { @@ -1291,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 @@ -1315,7 +1281,7 @@ class CredentialOperations { * @param {object} parameters The parameters supplied to the Update credential * operation. * - * @param {string} parameters.name Gets or sets the name of the credential. + * @param {string} [parameters.name] Gets or sets the name of the credential. * * @param {string} [parameters.userName] Gets or sets the user name of the * credential. @@ -1337,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); } @@ -1354,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 @@ -1364,7 +1328,7 @@ class CredentialOperations { * @param {object} parameters The parameters supplied to the Update credential * operation. * - * @param {string} parameters.name Gets or sets the name of the credential. + * @param {string} [parameters.name] Gets or sets the name of the credential. * * @param {string} [parameters.userName] Gets or sets the user name of the * credential. @@ -1402,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') { @@ -1411,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. @@ -1440,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); } @@ -1457,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. @@ -1488,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') { @@ -1497,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 8cb79e5abd..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. @@ -34,6 +32,9 @@ const WebResource = msRest.WebResource; * @param {object} [parameters.parameters] Gets or sets the parameters of the * job. * + * @param {boolean} [parameters.newNodeConfigurationBuildVersionRequired] If a + * new build version of NodeConfiguration is required. + * * @param {string} [parameters.name] Gets or sets name of the resource. * * @param {string} [parameters.location] Gets or sets the location of the @@ -60,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') { @@ -70,15 +71,16 @@ function _create(resourceGroupName, automationAccountName, compilationJobId, par 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 (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') { @@ -93,9 +95,6 @@ function _create(resourceGroupName, automationAccountName, compilationJobId, par 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.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { - throw new Error('this.client.apiVersion 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.'); } @@ -106,12 +105,12 @@ 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)); let queryParameters = []; - queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); if (queryParameters.length > 0) { requestUrl += '?' + queryParameters.join('&'); } @@ -211,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. @@ -235,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') { @@ -245,15 +242,16 @@ function _get(resourceGroupName, automationAccountName, compilationJobId, option 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 (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') { @@ -265,9 +263,6 @@ function _get(resourceGroupName, automationAccountName, compilationJobId, 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 (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { - throw new Error('this.client.apiVersion 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.'); } @@ -278,12 +273,12 @@ 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)); let queryParameters = []; - queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); if (queryParameters.length > 0) { requestUrl += '?' + queryParameters.join('&'); } @@ -369,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. @@ -394,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') { @@ -405,15 +398,16 @@ function _listByAutomationAccount(resourceGroupName, automationAccountName, opti throw new Error('callback cannot be null.'); } let filter = (options && options.filter !== undefined) ? options.filter : undefined; + 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') { @@ -425,9 +419,6 @@ 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 (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { - throw new Error('this.client.apiVersion 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.'); } @@ -438,14 +429,14 @@ 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 = []; if (filter !== null && filter !== undefined) { queryParameters.push('$filter=' + encodeURIComponent(filter)); } - queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); if (queryParameters.length > 0) { requestUrl += '?' + queryParameters.join('&'); } @@ -531,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. @@ -557,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,15 +556,16 @@ function _getStream(resourceGroupName, automationAccountName, jobId, jobStreamId 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 (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') { @@ -590,9 +580,6 @@ function _getStream(resourceGroupName, automationAccountName, jobId, 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 (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { - throw new Error('this.client.apiVersion 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.'); } @@ -603,13 +590,13 @@ 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)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; - queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); if (queryParameters.length > 0) { requestUrl += '?' + queryParameters.join('&'); } @@ -839,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. @@ -856,6 +841,9 @@ class DscCompilationJobOperations { * @param {object} [parameters.parameters] Gets or sets the parameters of the * job. * + * @param {boolean} [parameters.newNodeConfigurationBuildVersionRequired] If a + * new build version of NodeConfiguration is required. + * * @param {string} [parameters.name] Gets or sets name of the resource. * * @param {string} [parameters.location] Gets or sets the location of the @@ -875,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); } @@ -892,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. @@ -909,6 +895,9 @@ class DscCompilationJobOperations { * @param {object} [parameters.parameters] Gets or sets the parameters of the * job. * + * @param {boolean} [parameters.newNodeConfigurationBuildVersionRequired] If a + * new build version of NodeConfiguration is required. + * * @param {string} [parameters.name] Gets or sets name of the resource. * * @param {string} [parameters.location] Gets or sets the location of the @@ -944,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') { @@ -953,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. @@ -984,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); } @@ -1001,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. @@ -1034,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') { @@ -1043,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. @@ -1074,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); } @@ -1091,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. @@ -1125,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') { @@ -1134,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. @@ -1167,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); } @@ -1184,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. @@ -1219,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') { @@ -1228,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 new file mode 100644 index 0000000000..4afe189714 --- /dev/null +++ b/lib/services/automationManagement/lib/operations/dscCompilationJobStream.js @@ -0,0 +1,270 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const msRest = require('ms-rest'); +const msRestAzure = require('ms-rest-azure'); +const WebResource = msRest.WebResource; + +/** + * Retrieve all the job streams for the compilation Job. + * + * @param {string} automationAccountName The automation account name. + * + * @param {uuid} jobId The job id. + * + * @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. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link JobStreamListResult} 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. + */ +function _listByJob(automationAccountName, jobId, 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 (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 (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { + if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + { + 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 (jobId === null || jobId === undefined || typeof jobId.valueOf() !== 'string' || !msRest.isValidUuid(jobId)) { + throw new Error('jobId cannot be null or undefined and it must be of type string and must be a valid uuid.'); + } + 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}/compilationjobs/{jobId}/streams/'; + 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)); + 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 = 'GET'; + 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]; + } + } + } + httpRequest.body = null; + // 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['JobStreamListResult']().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); + }); +} + +/** Class representing a DscCompilationJobStream. */ +class DscCompilationJobStream { + /** + * Create a DscCompilationJobStream. + * @param {AutomationClient} client Reference to the service client. + */ + constructor(client) { + this.client = client; + this._listByJob = _listByJob; + } + + /** + * Retrieve all the job streams for the compilation Job. + * + * @param {string} automationAccountName The automation account name. + * + * @param {uuid} jobId The job id. + * + * @param {object} [options] Optional Parameters. + * + * @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. + */ + listByJobWithHttpOperationResponse(automationAccountName, jobId, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._listByJob(automationAccountName, jobId, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Retrieve all the job streams for the compilation Job. + * + * @param {string} automationAccountName The automation account name. + * + * @param {uuid} jobId The job id. + * + * @param {object} [options] Optional Parameters. + * + * @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 {JobStreamListResult} - 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 JobStreamListResult} 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. + */ + listByJob(automationAccountName, jobId, 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._listByJob(automationAccountName, jobId, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._listByJob(automationAccountName, jobId, options, optionalCallback); + } + } + +} + +module.exports = DscCompilationJobStream; diff --git a/lib/services/automationManagement/lib/operations/dscConfigurationOperations.js b/lib/services/automationManagement/lib/operations/dscConfigurationOperations.js index 6cdfe616bb..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') { @@ -50,15 +48,16 @@ function _deleteMethod(resourceGroupName, automationAccountName, configurationNa 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 (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') { @@ -70,9 +69,6 @@ function _deleteMethod(resourceGroupName, automationAccountName, configurationNa 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.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { - throw new Error('this.client.apiVersion 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.'); } @@ -83,12 +79,12 @@ 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)); let queryParameters = []; - queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); if (queryParameters.length > 0) { requestUrl += '?' + queryParameters.join('&'); } @@ -157,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. @@ -181,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') { @@ -191,15 +185,16 @@ function _get(resourceGroupName, automationAccountName, configurationName, optio 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 (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') { @@ -211,9 +206,6 @@ function _get(resourceGroupName, automationAccountName, configurationName, optio 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.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { - throw new Error('this.client.apiVersion 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.'); } @@ -224,12 +216,12 @@ 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)); let queryParameters = []; - queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); if (queryParameters.length > 0) { requestUrl += '?' + queryParameters.join('&'); } @@ -315,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 @@ -380,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') { @@ -390,15 +380,16 @@ function _createOrUpdate(resourceGroupName, automationAccountName, configuration 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 (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,9 +404,6 @@ function _createOrUpdate(resourceGroupName, automationAccountName, configuration 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.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { - throw new Error('this.client.apiVersion 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.'); } @@ -426,12 +414,12 @@ 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)); let queryParameters = []; - queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); if (queryParameters.length > 0) { requestUrl += '?' + queryParameters.join('&'); } @@ -548,8 +536,6 @@ function _createOrUpdate(resourceGroupName, automationAccountName, configuration /** * 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. @@ -565,13 +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. + * {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) { +function _getContent(automationAccountName, configurationName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -581,15 +567,16 @@ function _getContent(resourceGroupName, automationAccountName, configurationName 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 (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') { @@ -601,9 +588,6 @@ function _getContent(resourceGroupName, automationAccountName, configurationName 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.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { - throw new Error('this.client.apiVersion 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.'); } @@ -614,12 +598,12 @@ function _getContent(resourceGroupName, automationAccountName, configurationName // 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)); let queryParameters = []; - queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); if (queryParameters.length > 0) { requestUrl += '?' + queryParameters.join('&'); } @@ -646,22 +630,20 @@ function _getContent(resourceGroupName, automationAccountName, configurationName } httpRequest.body = null; // Send Request - httpRequest.streamedResponse = true; return client.pipeline(httpRequest, (err, response, responseBody) => { if (err) { return callback(err); } - let statusCode = response.statusCode; if (statusCode !== 200) { - let error = new Error(`Unexpected status code: ${statusCode}`); + 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 { - if (responseBody !== undefined) parsedErrorResponse = JSON.parse(responseBody); + parsedErrorResponse = JSON.parse(responseBody); if (parsedErrorResponse) { let internalError = null; if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; @@ -679,9 +661,33 @@ function _getContent(resourceGroupName, automationAccountName, configurationName } return callback(error); } - // Create Result - let result = response; + 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 = { + required: false, + serializedName: 'parsedResponse', + type: { + name: 'String' + } + }; + 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); }); } @@ -689,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. @@ -712,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') { @@ -722,15 +726,16 @@ function _listByAutomationAccount(resourceGroupName, automationAccountName, opti 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 (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') { @@ -739,9 +744,6 @@ 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 (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { - throw new Error('this.client.apiVersion 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.'); } @@ -752,11 +754,11 @@ 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 = []; - queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); if (queryParameters.length > 0) { requestUrl += '?' + queryParameters.join('&'); } @@ -987,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. @@ -1004,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); } @@ -1021,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. @@ -1053,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') { @@ -1062,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. @@ -1093,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); } @@ -1110,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. @@ -1143,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') { @@ -1152,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 @@ -1224,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); } @@ -1241,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 @@ -1315,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') { @@ -1324,22 +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); + 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. @@ -1351,15 +1339,15 @@ class DscConfigurationOperations { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @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); } @@ -1372,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. @@ -1390,7 +1376,7 @@ class DscConfigurationOperations { * * {Promise} A promise is returned * - * @resolve {Object} - The deserialized result object. + * @resolve {String} - The deserialized result object. * * @reject {Error} - The error object. * @@ -1398,13 +1384,13 @@ class DscConfigurationOperations { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. + * {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. */ - getContent(resourceGroupName, automationAccountName, configurationName, options, optionalCallback) { + getContent(automationAccountName, configurationName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1413,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. @@ -1442,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); } @@ -1459,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. @@ -1491,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') { @@ -1500,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 127b0969d5..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') { @@ -50,15 +48,16 @@ function _deleteMethod(resourceGroupName, automationAccountName, nodeConfigurati 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 (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') { @@ -70,9 +69,6 @@ function _deleteMethod(resourceGroupName, automationAccountName, nodeConfigurati 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.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { - throw new Error('this.client.apiVersion 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.'); } @@ -83,12 +79,12 @@ 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)); let queryParameters = []; - queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); if (queryParameters.length > 0) { requestUrl += '?' + queryParameters.join('&'); } @@ -157,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. @@ -181,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') { @@ -191,15 +185,16 @@ function _get(resourceGroupName, automationAccountName, nodeConfigurationName, o 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 (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') { @@ -211,9 +206,6 @@ function _get(resourceGroupName, automationAccountName, nodeConfigurationName, 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 (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { - throw new Error('this.client.apiVersion 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.'); } @@ -224,12 +216,12 @@ 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)); let queryParameters = []; - queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); if (queryParameters.length > 0) { requestUrl += '?' + queryParameters.join('&'); } @@ -315,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 @@ -352,6 +342,9 @@ function _get(resourceGroupName, automationAccountName, nodeConfigurationName, o * @param {string} [parameters.configuration.name] Gets or sets the name of the * Dsc configuration. * + * @param {boolean} [parameters.newNodeConfigurationBuildVersionRequired] If a + * new build version of NodeConfiguration is required. + * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -370,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') { @@ -380,15 +373,16 @@ function _createOrUpdate(resourceGroupName, automationAccountName, nodeConfigura 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 (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') { @@ -403,9 +397,6 @@ function _createOrUpdate(resourceGroupName, automationAccountName, nodeConfigura 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.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { - throw new Error('this.client.apiVersion 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.'); } @@ -416,12 +407,12 @@ 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)); let queryParameters = []; - queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); if (queryParameters.length > 0) { requestUrl += '?' + queryParameters.join('&'); } @@ -467,7 +458,7 @@ function _createOrUpdate(resourceGroupName, automationAccountName, nodeConfigura return callback(err); } let statusCode = response.statusCode; - if (statusCode !== 200 && statusCode !== 201) { + if (statusCode !== 200) { let error = new Error(responseBody); error.statusCode = response.statusCode; error.request = msRest.stripRequest(httpRequest); @@ -513,23 +504,6 @@ function _createOrUpdate(resourceGroupName, automationAccountName, nodeConfigura return callback(deserializationError); } } - // Deserialize Response - if (statusCode === 201) { - let parsedResponse = null; - try { - parsedResponse = JSON.parse(responseBody); - result = JSON.parse(responseBody); - if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['DscNodeConfiguration']().mapper(); - result = client.deserialize(resultMapper, parsedResponse, 'result'); - } - } catch (error) { - let deserializationError1 = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); - deserializationError1.request = msRest.stripRequest(httpRequest); - deserializationError1.response = msRest.stripResponse(response); - return callback(deserializationError1); - } - } return callback(null, result, httpRequest, response); }); @@ -538,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. @@ -563,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') { @@ -574,15 +546,16 @@ function _listByAutomationAccount(resourceGroupName, automationAccountName, opti throw new Error('callback cannot be null.'); } let filter = (options && options.filter !== undefined) ? options.filter : undefined; + 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') { @@ -594,9 +567,6 @@ 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 (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { - throw new Error('this.client.apiVersion 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.'); } @@ -607,14 +577,14 @@ 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 = []; if (filter !== null && filter !== undefined) { queryParameters.push('$filter=' + encodeURIComponent(filter)); } - queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); if (queryParameters.length > 0) { requestUrl += '?' + queryParameters.join('&'); } @@ -844,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. @@ -861,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); } @@ -878,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. @@ -910,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') { @@ -919,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. @@ -950,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); } @@ -967,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. @@ -1000,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') { @@ -1009,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 @@ -1060,6 +1020,9 @@ class DscNodeConfigurationOperations { * @param {string} [parameters.configuration.name] Gets or sets the name of the * Dsc configuration. * + * @param {boolean} [parameters.newNodeConfigurationBuildVersionRequired] If a + * new build version of NodeConfiguration is required. + * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -1071,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); } @@ -1088,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 @@ -1125,6 +1086,9 @@ class DscNodeConfigurationOperations { * @param {string} [parameters.configuration.name] Gets or sets the name of the * Dsc configuration. * + * @param {boolean} [parameters.newNodeConfigurationBuildVersionRequired] If a + * new build version of NodeConfiguration is required. + * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -1152,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') { @@ -1161,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. @@ -1192,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); } @@ -1209,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. @@ -1243,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') { @@ -1252,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 a33bfd96bb..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') { @@ -51,15 +49,16 @@ function _deleteMethod(resourceGroupName, automationAccountName, nodeId, options 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 (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') { @@ -71,9 +70,6 @@ function _deleteMethod(resourceGroupName, automationAccountName, nodeId, options if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); } - if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { - throw new Error('this.client.apiVersion 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.'); } @@ -84,12 +80,12 @@ 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)); let queryParameters = []; - queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); if (queryParameters.length > 0) { requestUrl += '?' + queryParameters.join('&'); } @@ -175,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. @@ -199,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') { @@ -209,15 +203,16 @@ function _get(resourceGroupName, automationAccountName, nodeId, options, callbac 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 (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') { @@ -229,9 +224,6 @@ function _get(resourceGroupName, automationAccountName, nodeId, options, callbac 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.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { - throw new Error('this.client.apiVersion 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.'); } @@ -242,12 +234,12 @@ 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)); let queryParameters = []; - queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); if (queryParameters.length > 0) { requestUrl += '?' + queryParameters.join('&'); } @@ -333,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. @@ -367,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') { @@ -377,15 +367,16 @@ function _update(resourceGroupName, automationAccountName, nodeId, parameters, o 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 (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') { @@ -400,9 +391,6 @@ function _update(resourceGroupName, automationAccountName, nodeId, parameters, 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 (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { - throw new Error('this.client.apiVersion 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.'); } @@ -413,12 +401,12 @@ 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)); let queryParameters = []; - queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); if (queryParameters.length > 0) { requestUrl += '?' + queryParameters.join('&'); } @@ -518,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. @@ -542,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') { @@ -553,15 +539,16 @@ function _listByAutomationAccount(resourceGroupName, automationAccountName, opti throw new Error('callback cannot be null.'); } let filter = (options && options.filter !== undefined) ? options.filter : undefined; + 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') { @@ -573,9 +560,6 @@ 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 (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { - throw new Error('this.client.apiVersion 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.'); } @@ -586,14 +570,14 @@ 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 = []; if (filter !== null && filter !== undefined) { queryParameters.push('$filter=' + encodeURIComponent(filter)); } - queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); if (queryParameters.length > 0) { requestUrl += '?' + queryParameters.join('&'); } @@ -822,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. @@ -839,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); } @@ -856,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. @@ -889,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') { @@ -898,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. @@ -929,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); } @@ -946,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. @@ -979,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') { @@ -988,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. @@ -1029,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); } @@ -1046,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. @@ -1089,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') { @@ -1098,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. @@ -1129,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); } @@ -1146,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. @@ -1179,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') { @@ -1188,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 916be3573e..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') { @@ -53,15 +51,16 @@ function _listByType(resourceGroupName, automationAccountName, moduleName, typeN 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 (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,9 +75,6 @@ function _listByType(resourceGroupName, automationAccountName, moduleName, typeN 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.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { - throw new Error('this.client.apiVersion 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.'); } @@ -89,13 +85,13 @@ 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)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; - queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); if (queryParameters.length > 0) { requestUrl += '?' + queryParameters.join('&'); } @@ -192,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. @@ -211,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); } @@ -228,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. @@ -263,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') { @@ -272,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 70335296c0..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') { @@ -51,15 +49,16 @@ function _deleteMethod(resourceGroupName, automationAccountName, hybridRunbookWo 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 (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') { @@ -71,9 +70,6 @@ function _deleteMethod(resourceGroupName, automationAccountName, hybridRunbookWo 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.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { - throw new Error('this.client.apiVersion 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.'); } @@ -84,12 +80,12 @@ 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)); let queryParameters = []; - queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); if (queryParameters.length > 0) { requestUrl += '?' + queryParameters.join('&'); } @@ -158,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 @@ -184,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') { @@ -194,15 +188,16 @@ function _get(resourceGroupName, automationAccountName, hybridRunbookWorkerGroup 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 (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') { @@ -214,9 +209,6 @@ function _get(resourceGroupName, automationAccountName, hybridRunbookWorkerGroup 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.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { - throw new Error('this.client.apiVersion 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.'); } @@ -227,12 +219,12 @@ 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)); let queryParameters = []; - queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); if (queryParameters.length > 0) { requestUrl += '?' + queryParameters.join('&'); } @@ -318,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 @@ -352,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') { @@ -362,15 +352,16 @@ function _update(resourceGroupName, automationAccountName, hybridRunbookWorkerGr 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 (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') { @@ -385,9 +376,6 @@ function _update(resourceGroupName, automationAccountName, hybridRunbookWorkerGr 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.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { - throw new Error('this.client.apiVersion 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.'); } @@ -398,12 +386,12 @@ 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)); let queryParameters = []; - queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); if (queryParameters.length > 0) { requestUrl += '?' + queryParameters.join('&'); } @@ -503,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. @@ -526,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') { @@ -536,15 +522,16 @@ function _listByAutomationAccount(resourceGroupName, automationAccountName, opti 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 (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') { @@ -553,9 +540,6 @@ 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 (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { - throw new Error('this.client.apiVersion 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.'); } @@ -566,11 +550,11 @@ 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 = []; - queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); if (queryParameters.length > 0) { requestUrl += '?' + queryParameters.join('&'); } @@ -800,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 @@ -818,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); } @@ -835,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 @@ -868,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') { @@ -877,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 @@ -909,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); } @@ -926,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 @@ -961,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') { @@ -970,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 @@ -1010,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); } @@ -1027,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 @@ -1070,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') { @@ -1079,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. @@ -1108,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); } @@ -1125,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. @@ -1157,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') { @@ -1166,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 8c78318a2d..2041f688c2 100644 --- a/lib/services/automationManagement/lib/operations/index.d.ts +++ b/lib/services/automationManagement/lib/operations/index.d.ts @@ -9,7 +9,6 @@ */ import { ServiceClientOptions, RequestOptions, ServiceCallback, HttpOperationResponse } from 'ms-rest'; -import * as stream from 'stream'; import * as models from '../models'; @@ -783,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. @@ -800,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. @@ -837,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. @@ -862,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. @@ -900,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 @@ -943,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 @@ -999,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 @@ -1017,7 +1002,7 @@ export interface CertificateOperations { * @param {object} parameters The parameters supplied to the update certificate * operation. * - * @param {string} parameters.name Gets or sets the name of the certificate. + * @param {string} [parameters.name] Gets or sets the name of the certificate. * * @param {string} [parameters.description] Gets or sets the description of the * certificate. @@ -1033,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 @@ -1048,7 +1031,7 @@ export interface CertificateOperations { * @param {object} parameters The parameters supplied to the update certificate * operation. * - * @param {string} parameters.name Gets or sets the name of the certificate. + * @param {string} [parameters.name] Gets or sets the name of the certificate. * * @param {string} [parameters.description] Gets or sets the description of the * certificate. @@ -1080,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. @@ -1103,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. @@ -1139,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; /** @@ -1213,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. @@ -1230,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. @@ -1268,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. @@ -1293,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. @@ -1331,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 @@ -1374,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 @@ -1430,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 @@ -1467,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 @@ -1517,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. @@ -1540,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. @@ -1576,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; /** @@ -1650,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. @@ -1667,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. @@ -1704,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. @@ -1729,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. @@ -1767,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 @@ -1805,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 @@ -1856,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. @@ -1879,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. @@ -1916,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; /** @@ -1991,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. @@ -2008,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. @@ -2045,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. @@ -2070,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. @@ -2108,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 @@ -2148,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 @@ -2201,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 @@ -2219,7 +2148,7 @@ export interface CredentialOperations { * @param {object} parameters The parameters supplied to the Update credential * operation. * - * @param {string} parameters.name Gets or sets the name of the credential. + * @param {string} [parameters.name] Gets or sets the name of the credential. * * @param {string} [parameters.userName] Gets or sets the user name of the * credential. @@ -2241,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 @@ -2256,7 +2183,7 @@ export interface CredentialOperations { * @param {object} parameters The parameters supplied to the Update credential * operation. * - * @param {string} parameters.name Gets or sets the name of the credential. + * @param {string} [parameters.name] Gets or sets the name of the credential. * * @param {string} [parameters.userName] Gets or sets the user name of the * credential. @@ -2294,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. @@ -2317,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. @@ -2353,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; /** @@ -2427,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. @@ -2444,6 +2365,9 @@ export interface DscCompilationJobOperations { * @param {object} [parameters.parameters] Gets or sets the parameters of the * job. * + * @param {boolean} [parameters.newNodeConfigurationBuildVersionRequired] If a + * new build version of NodeConfiguration is required. + * * @param {string} [parameters.name] Gets or sets name of the resource. * * @param {string} [parameters.location] Gets or sets the location of the @@ -2463,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. @@ -2485,6 +2407,9 @@ export interface DscCompilationJobOperations { * @param {object} [parameters.parameters] Gets or sets the parameters of the * job. * + * @param {boolean} [parameters.newNodeConfigurationBuildVersionRequired] If a + * new build version of NodeConfiguration is required. + * * @param {string} [parameters.name] Gets or sets name of the resource. * * @param {string} [parameters.location] Gets or sets the location of the @@ -2520,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. @@ -2545,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. @@ -2583,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. @@ -2608,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. @@ -2647,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. @@ -2674,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. @@ -2714,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; /** @@ -2777,6 +2690,74 @@ export interface DscCompilationJobOperations { listByAutomationAccountNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; } +/** + * @class + * DscCompilationJobStream + * __NOTE__: An instance of this class is automatically created for an + * instance of the AutomationClient. + */ +export interface DscCompilationJobStream { + + + /** + * Retrieve all the job streams for the compilation Job. + * + * @param {string} automationAccountName The automation account name. + * + * @param {uuid} jobId The job id. + * + * @param {object} [options] Optional Parameters. + * + * @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. + */ + listByJobWithHttpOperationResponse(automationAccountName: string, jobId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Retrieve all the job streams for the compilation Job. + * + * @param {string} automationAccountName The automation account name. + * + * @param {uuid} jobId The job id. + * + * @param {object} [options] Optional Parameters. + * + * @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 {JobStreamListResult} - 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. + * + * {JobStreamListResult} [result] - The deserialized result object if an error did not occur. + * See {@link JobStreamListResult} 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. + */ + 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; +} + /** * @class * DscConfigurationOperations @@ -2789,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. @@ -2806,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. @@ -2843,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. @@ -2868,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. @@ -2906,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 @@ -2972,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 @@ -3051,16 +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; + 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. @@ -3072,17 +3039,15 @@ export interface DscConfigurationOperations { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @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. @@ -3099,7 +3064,7 @@ export interface DscConfigurationOperations { * * {Promise} A promise is returned. * - * @resolve {Object} - The deserialized result object. + * @resolve {String} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -3107,22 +3072,20 @@ export interface DscConfigurationOperations { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {Object} [result] - The deserialized result object if an error did not occur. + * {String} [result] - The deserialized result object if an error did not occur. * * {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. */ - 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. @@ -3136,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. @@ -3173,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; /** @@ -3248,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. @@ -3263,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. @@ -3299,23 +3256,21 @@ 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 * regenerated * * @param {string} parameters.keyName Gets or sets the agent registration key - * name - Primary or Secondary. Possible values include: 'Primary', 'Secondary' + * name - primary or secondary. Possible values include: 'primary', 'secondary' * * @param {string} [parameters.name] Gets or sets the name of the resource. * @@ -3336,20 +3291,18 @@ 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 * regenerated * * @param {string} parameters.keyName Gets or sets the agent registration key - * name - Primary or Secondary. Possible values include: 'Primary', 'Secondary' + * name - primary or secondary. Possible values include: 'primary', 'secondary' * * @param {string} [parameters.name] Gets or sets the name of the resource. * @@ -3386,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; } /** @@ -3403,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. @@ -3420,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. @@ -3458,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. @@ -3483,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. @@ -3521,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. @@ -3556,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. @@ -3604,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. @@ -3629,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. @@ -3667,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; /** @@ -3741,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. @@ -3760,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. @@ -3801,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. @@ -3828,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. @@ -3868,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. @@ -3895,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. @@ -3934,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; /** @@ -4009,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. @@ -4026,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. @@ -4063,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. @@ -4088,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. @@ -4126,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 @@ -4171,6 +4086,9 @@ export interface DscNodeConfigurationOperations { * @param {string} [parameters.configuration.name] Gets or sets the name of the * Dsc configuration. * + * @param {boolean} [parameters.newNodeConfigurationBuildVersionRequired] If a + * new build version of NodeConfiguration is required. + * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -4182,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 @@ -4224,6 +4140,9 @@ export interface DscNodeConfigurationOperations { * @param {string} [parameters.configuration.name] Gets or sets the name of the * Dsc configuration. * + * @param {boolean} [parameters.newNodeConfigurationBuildVersionRequired] If a + * new build version of NodeConfiguration is required. + * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -4251,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. @@ -4276,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. @@ -4315,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; /** @@ -4390,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 @@ -4408,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 @@ -4446,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 @@ -4472,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 @@ -4512,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 @@ -4546,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 @@ -4594,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. @@ -4617,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. @@ -4654,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; /** @@ -4719,21 +4618,19 @@ export interface HybridRunbookWorkerGroupOperations { /** * @class - * JobOperations + * JobScheduleOperations * __NOTE__: An instance of this class is automatically created for an * instance of the AutomationClient. */ -export interface JobOperations { +export interface JobScheduleOperations { /** - * Retrieve the job output identified by job id. - * - * @param {string} resourceGroupName The resource group name. + * Delete the job schedule identified by job schedule name. * * @param {string} automationAccountName The automation account name. * - * @param {string} jobId The job id. + * @param {uuid} jobScheduleId The job schedule name. * * @param {object} [options] Optional Parameters. * @@ -4742,20 +4639,18 @@ export interface JobOperations { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - getOutputWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, jobId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + deleteMethodWithHttpOperationResponse(automationAccountName: string, jobScheduleId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Retrieve the job output identified by job id. - * - * @param {string} resourceGroupName The resource group name. + * Delete the job schedule identified by job schedule name. * * @param {string} automationAccountName The automation account name. * - * @param {string} jobId The job id. + * @param {uuid} jobScheduleId The job schedule name. * * @param {object} [options] Optional Parameters. * @@ -4769,7 +4664,7 @@ export interface JobOperations { * * {Promise} A promise is returned. * - * @resolve {Object} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -4777,25 +4672,23 @@ export interface JobOperations { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {Object} [result] - The deserialized result object if an error did not occur. + * {null} [result] - The deserialized result object if an error did not occur. * * {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. */ - getOutput(resourceGroupName: string, automationAccountName: string, jobId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - getOutput(resourceGroupName: string, automationAccountName: string, jobId: string, callback: ServiceCallback): void; - getOutput(resourceGroupName: string, automationAccountName: string, jobId: 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 runbook content of the job identified by job id. - * - * @param {string} resourceGroupName The resource group name. + * Retrieve the job schedule identified by job schedule name. * * @param {string} automationAccountName The automation account name. * - * @param {string} jobId The job id. + * @param {uuid} jobScheduleId The job schedule name. * * @param {object} [options] Optional Parameters. * @@ -4804,20 +4697,18 @@ export interface JobOperations { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - getRunbookContentWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, jobId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(automationAccountName: string, jobScheduleId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Retrieve the runbook content of the job identified by job id. - * - * @param {string} resourceGroupName The resource group name. + * Retrieve the job schedule identified by job schedule name. * * @param {string} automationAccountName The automation account name. * - * @param {string} jobId The job id. + * @param {uuid} jobScheduleId The job schedule name. * * @param {object} [options] Optional Parameters. * @@ -4831,7 +4722,7 @@ export interface JobOperations { * * {Promise} A promise is returned. * - * @resolve {Object} - The deserialized result object. + * @resolve {JobSchedule} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -4839,25 +4730,43 @@ export interface JobOperations { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {Object} [result] - The deserialized result object if an error did not occur. + * {JobSchedule} [result] - The deserialized result object if an error did not occur. + * See {@link JobSchedule} 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. */ - getRunbookContent(resourceGroupName: string, automationAccountName: string, jobId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - getRunbookContent(resourceGroupName: string, automationAccountName: string, jobId: string, callback: ServiceCallback): void; - getRunbookContent(resourceGroupName: string, automationAccountName: string, jobId: 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; /** - * Suspend the job identified by jobId. - * - * @param {string} resourceGroupName The resource group name. + * Create a job schedule. * * @param {string} automationAccountName The automation account name. * - * @param {uuid} jobId The job id. + * @param {uuid} jobScheduleId The job schedule name. + * + * @param {object} parameters The parameters supplied to the create job + * schedule operation. + * + * @param {object} parameters.schedule Gets or sets the schedule. + * + * @param {string} [parameters.schedule.name] Gets or sets the name of the + * schedule. + * + * @param {object} parameters.runbook Gets or sets the runbook. + * + * @param {string} [parameters.runbook.name] Gets or sets the name of the + * runbook. + * + * @param {string} [parameters.runOn] Gets or sets the hybrid worker group that + * the scheduled job should run on. + * + * @param {object} [parameters.parameters] Gets or sets a list of job + * properties. * * @param {object} [options] Optional Parameters. * @@ -4866,20 +4775,37 @@ export interface JobOperations { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - suspendWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, jobId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + createWithHttpOperationResponse(automationAccountName: string, jobScheduleId: string, parameters: models.JobScheduleCreateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Suspend the job identified by jobId. - * - * @param {string} resourceGroupName The resource group name. + * Create a job schedule. * * @param {string} automationAccountName The automation account name. * - * @param {uuid} jobId The job id. + * @param {uuid} jobScheduleId The job schedule name. + * + * @param {object} parameters The parameters supplied to the create job + * schedule operation. + * + * @param {object} parameters.schedule Gets or sets the schedule. + * + * @param {string} [parameters.schedule.name] Gets or sets the name of the + * schedule. + * + * @param {object} parameters.runbook Gets or sets the runbook. + * + * @param {string} [parameters.runbook.name] Gets or sets the name of the + * runbook. + * + * @param {string} [parameters.runOn] Gets or sets the hybrid worker group that + * the scheduled job should run on. + * + * @param {object} [parameters.parameters] Gets or sets a list of job + * properties. * * @param {object} [options] Optional Parameters. * @@ -4893,7 +4819,7 @@ export interface JobOperations { * * {Promise} A promise is returned. * - * @resolve {null} - The deserialized result object. + * @resolve {JobSchedule} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -4901,26 +4827,23 @@ export interface JobOperations { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {JobSchedule} [result] - The deserialized result object if an error did not occur. + * See {@link JobSchedule} 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. */ - suspend(resourceGroupName: string, automationAccountName: string, jobId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - suspend(resourceGroupName: string, automationAccountName: string, jobId: string, callback: ServiceCallback): void; - suspend(resourceGroupName: string, automationAccountName: string, jobId: string, 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; /** - * Stop the job identified by jobId. - * - * @param {string} resourceGroupName The resource group name. + * Retrieve a list of job schedules. * * @param {string} automationAccountName The automation account name. * - * @param {uuid} jobId The job id. - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -4928,21 +4851,17 @@ export interface JobOperations { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - stopWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, jobId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listByAutomationAccountWithHttpOperationResponse(automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Stop the job identified by jobId. - * - * @param {string} resourceGroupName The resource group name. + * Retrieve a list of job schedules. * * @param {string} automationAccountName The automation account name. * - * @param {uuid} jobId The job id. - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -4955,7 +4874,7 @@ export interface JobOperations { * * {Promise} A promise is returned. * - * @resolve {null} - The deserialized result object. + * @resolve {JobScheduleListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -4963,25 +4882,23 @@ export interface JobOperations { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {JobScheduleListResult} [result] - The deserialized result object if an error did not occur. + * See {@link JobScheduleListResult} 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. */ - stop(resourceGroupName: string, automationAccountName: string, jobId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - stop(resourceGroupName: string, automationAccountName: string, jobId: string, callback: ServiceCallback): void; - stop(resourceGroupName: string, automationAccountName: string, jobId: 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; /** - * Retrieve the job identified by job id. - * - * @param {string} resourceGroupName The resource group name. - * - * @param {string} automationAccountName The automation account name. + * Retrieve a list of job schedules. * - * @param {uuid} jobId The job id. + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. * * @param {object} [options] Optional Parameters. * @@ -4990,20 +4907,17 @@ export interface JobOperations { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - getWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, jobId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listByAutomationAccountNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Retrieve the job identified by job id. - * - * @param {string} resourceGroupName The resource group name. - * - * @param {string} automationAccountName The automation account name. + * Retrieve a list of job schedules. * - * @param {uuid} jobId The job id. + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. * * @param {object} [options] Optional Parameters. * @@ -5017,7 +4931,7 @@ export interface JobOperations { * * {Promise} A promise is returned. * - * @resolve {Job} - The deserialized result object. + * @resolve {JobScheduleListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -5025,49 +4939,32 @@ export interface JobOperations { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {Job} [result] - The deserialized result object if an error did not occur. - * See {@link Job} for more information. + * {JobScheduleListResult} [result] - The deserialized result object if an error did not occur. + * See {@link JobScheduleListResult} 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. */ - get(resourceGroupName: string, automationAccountName: string, jobId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - get(resourceGroupName: string, automationAccountName: string, jobId: string, callback: ServiceCallback): void; - get(resourceGroupName: string, automationAccountName: string, jobId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listByAutomationAccountNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listByAutomationAccountNext(nextPageLink: string, callback: ServiceCallback): void; + listByAutomationAccountNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; +} + +/** + * @class + * LinkedWorkspaceOperations + * __NOTE__: An instance of this class is automatically created for an + * instance of the AutomationClient. + */ +export interface LinkedWorkspaceOperations { /** - * Create a job of the runbook. - * - * @param {string} resourceGroupName The resource group name. + * Retrieve the linked workspace for the account id. * * @param {string} automationAccountName The automation account name. * - * @param {uuid} jobId The job id. - * - * @param {object} parameters The parameters supplied to the create job - * operation. - * - * @param {object} parameters.runbook Gets or sets the runbook. - * - * @param {string} [parameters.runbook.name] Gets or sets the name of the - * runbook. - * - * @param {object} [parameters.parameters] Gets or sets the parameters of the - * job. - * - * @param {string} [parameters.runOn] Gets or sets the runOn which specifies - * the group name where the job is to be executed. - * - * @param {string} [parameters.name] Gets or sets name of the resource. - * - * @param {string} [parameters.location] Gets or sets the location of the - * resource. - * - * @param {object} [parameters.tags] Gets or sets the tags attached to the - * resource. - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -5075,43 +4972,17 @@ export interface JobOperations { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - createWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, jobId: string, parameters: models.JobCreateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Create a job of the runbook. - * - * @param {string} resourceGroupName The resource group name. + * Retrieve the linked workspace for the account id. * * @param {string} automationAccountName The automation account name. * - * @param {uuid} jobId The job id. - * - * @param {object} parameters The parameters supplied to the create job - * operation. - * - * @param {object} parameters.runbook Gets or sets the runbook. - * - * @param {string} [parameters.runbook.name] Gets or sets the name of the - * runbook. - * - * @param {object} [parameters.parameters] Gets or sets the parameters of the - * job. - * - * @param {string} [parameters.runOn] Gets or sets the runOn which specifies - * the group name where the job is to be executed. - * - * @param {string} [parameters.name] Gets or sets name of the resource. - * - * @param {string} [parameters.location] Gets or sets the location of the - * resource. - * - * @param {object} [parameters.tags] Gets or sets the tags attached to the - * resource. - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -5124,7 +4995,7 @@ export interface JobOperations { * * {Promise} A promise is returned. * - * @resolve {Job} - The deserialized result object. + * @resolve {LinkedWorkspace} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -5132,50 +5003,61 @@ export interface JobOperations { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {Job} [result] - The deserialized result object if an error did not occur. - * See {@link Job} for more information. + * {LinkedWorkspace} [result] - The deserialized result object if an error did not occur. + * See {@link LinkedWorkspace} 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. */ - create(resourceGroupName: string, automationAccountName: string, jobId: string, parameters: models.JobCreateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - create(resourceGroupName: string, automationAccountName: string, jobId: string, parameters: models.JobCreateParameters, callback: ServiceCallback): void; - create(resourceGroupName: string, automationAccountName: string, jobId: string, parameters: models.JobCreateParameters, 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; +} + +/** + * @class + * ActivityOperations + * __NOTE__: An instance of this class is automatically created for an + * instance of the AutomationClient. + */ +export interface ActivityOperations { /** - * Retrieve a list of jobs. - * - * @param {string} resourceGroupName The resource group name. + * Retrieve the activity in the module identified by module name and activity + * name. * * @param {string} automationAccountName The automation account name. * - * @param {object} [options] Optional Parameters. + * @param {string} moduleName The name of module. * - * @param {string} [options.filter] The filter to apply on the operation. + * @param {string} activityName The name of activity. + * + * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listByAutomationAccountWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, options?: { filter? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(automationAccountName: string, moduleName: string, activityName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Retrieve a list of jobs. - * - * @param {string} resourceGroupName The resource group name. + * Retrieve the activity in the module identified by module name and activity + * name. * * @param {string} automationAccountName The automation account name. * - * @param {object} [options] Optional Parameters. + * @param {string} moduleName The name of module. * - * @param {string} [options.filter] The filter to apply on the operation. + * @param {string} activityName The name of activity. + * + * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -5187,7 +5069,7 @@ export interface JobOperations { * * {Promise} A promise is returned. * - * @resolve {JobListResult} - The deserialized result object. + * @resolve {Activity} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -5195,26 +5077,24 @@ export interface JobOperations { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {JobListResult} [result] - The deserialized result object if an error did not occur. - * See {@link JobListResult} for more information. + * {Activity} [result] - The deserialized result object if an error did not occur. + * See {@link Activity} 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. */ - 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; + 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; /** - * Resume the job identified by jobId. - * - * @param {string} resourceGroupName The resource group name. + * Retrieve a list of activities in the module identified by module name. * * @param {string} automationAccountName The automation account name. * - * @param {uuid} jobId The job id. + * @param {string} moduleName The name of module. * * @param {object} [options] Optional Parameters. * @@ -5223,20 +5103,18 @@ export interface JobOperations { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - resumeWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, jobId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listByModuleWithHttpOperationResponse(automationAccountName: string, moduleName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Resume the job identified by jobId. - * - * @param {string} resourceGroupName The resource group name. + * Retrieve a list of activities in the module identified by module name. * * @param {string} automationAccountName The automation account name. * - * @param {uuid} jobId The job id. + * @param {string} moduleName The name of module. * * @param {object} [options] Optional Parameters. * @@ -5250,7 +5128,7 @@ export interface JobOperations { * * {Promise} A promise is returned. * - * @resolve {null} - The deserialized result object. + * @resolve {ActivityListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -5258,19 +5136,20 @@ export interface JobOperations { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {ActivityListResult} [result] - The deserialized result object if an error did not occur. + * See {@link ActivityListResult} 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. */ - resume(resourceGroupName: string, automationAccountName: string, jobId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - resume(resourceGroupName: string, automationAccountName: string, jobId: string, callback: ServiceCallback): void; - resume(resourceGroupName: string, automationAccountName: string, jobId: 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; /** - * Retrieve a list of jobs. + * Retrieve a list of activities in the module identified by module name. * * @param {string} nextPageLink The NextLink from the previous successful call * to List operation. @@ -5282,14 +5161,14 @@ export interface JobOperations { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listByAutomationAccountNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listByModuleNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Retrieve a list of jobs. + * Retrieve a list of activities in the module identified by module name. * * @param {string} nextPageLink The NextLink from the previous successful call * to List operation. @@ -5306,7 +5185,7 @@ export interface JobOperations { * * {Promise} A promise is returned. * - * @resolve {JobListResult} - The deserialized result object. + * @resolve {ActivityListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -5314,37 +5193,33 @@ export interface JobOperations { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {JobListResult} [result] - The deserialized result object if an error did not occur. - * See {@link JobListResult} for more information. - * + * {ActivityListResult} [result] - The deserialized result object if an error did not occur. + * See {@link ActivityListResult} 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. */ - listByAutomationAccountNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listByAutomationAccountNext(nextPageLink: string, callback: ServiceCallback): void; - listByAutomationAccountNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listByModuleNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listByModuleNext(nextPageLink: string, callback: ServiceCallback): void; + listByModuleNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; } /** * @class - * JobStreamOperations + * ModuleOperations * __NOTE__: An instance of this class is automatically created for an * instance of the AutomationClient. */ -export interface JobStreamOperations { +export interface ModuleOperations { /** - * Retrieve the job stream identified by job stream id. - * - * @param {string} resourceGroupName The resource group name. + * Delete the module by name. * * @param {string} automationAccountName The automation account name. * - * @param {string} jobId The job id. - * - * @param {string} jobStreamId The job stream id. + * @param {string} moduleName The module name. * * @param {object} [options] Optional Parameters. * @@ -5353,22 +5228,18 @@ export interface JobStreamOperations { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - getWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, jobId: string, jobStreamId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + deleteMethodWithHttpOperationResponse(automationAccountName: string, moduleName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Retrieve the job stream identified by job stream id. - * - * @param {string} resourceGroupName The resource group name. + * Delete the module by name. * * @param {string} automationAccountName The automation account name. * - * @param {string} jobId The job id. - * - * @param {string} jobStreamId The job stream id. + * @param {string} moduleName The module name. * * @param {object} [options] Optional Parameters. * @@ -5382,7 +5253,7 @@ export interface JobStreamOperations { * * {Promise} A promise is returned. * - * @resolve {JobStream} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -5390,55 +5261,46 @@ export interface JobStreamOperations { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {JobStream} [result] - The deserialized result object if an error did not occur. - * See {@link JobStream} for more information. + * {null} [result] - The deserialized result object if an error did not occur. * * {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. */ - get(resourceGroupName: string, automationAccountName: string, jobId: string, jobStreamId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - get(resourceGroupName: string, automationAccountName: string, jobId: string, jobStreamId: string, callback: ServiceCallback): void; - get(resourceGroupName: string, automationAccountName: string, jobId: string, jobStreamId: 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 a list of jobs streams identified by job id. - * - * @param {string} resourceGroupName The resource group name. + * Retrieve the module identified by module name. * * @param {string} automationAccountName The automation account name. * - * @param {string} jobId The job Id. + * @param {string} moduleName The module name. * * @param {object} [options] Optional Parameters. * - * @param {string} [options.filter] The filter to apply on the operation. - * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listByJobWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, jobId: string, options?: { filter? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(automationAccountName: string, moduleName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Retrieve a list of jobs streams identified by job id. - * - * @param {string} resourceGroupName The resource group name. + * Retrieve the module identified by module name. * * @param {string} automationAccountName The automation account name. * - * @param {string} jobId The job Id. + * @param {string} moduleName The module name. * * @param {object} [options] Optional Parameters. * - * @param {string} [options.filter] The filter to apply on the operation. - * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -5449,7 +5311,7 @@ export interface JobStreamOperations { * * {Promise} A promise is returned. * - * @resolve {JobStreamListResult} - The deserialized result object. + * @resolve {Module} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -5457,23 +5319,50 @@ export interface JobStreamOperations { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {JobStreamListResult} [result] - The deserialized result object if an error did not occur. - * See {@link JobStreamListResult} for more information. + * {Module} [result] - The deserialized result object if an error did not occur. + * See {@link Module} 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. */ - listByJob(resourceGroupName: string, automationAccountName: string, jobId: string, options?: { filter? : string, customHeaders? : { [headerName: string]: string; } }): Promise; - listByJob(resourceGroupName: string, automationAccountName: string, jobId: string, callback: ServiceCallback): void; - listByJob(resourceGroupName: string, automationAccountName: string, jobId: string, options: { filter? : string, 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; /** - * Retrieve a list of jobs streams identified by job id. + * Create or Update the module identified by module name. * - * @param {string} nextPageLink The NextLink from the previous successful call - * to List operation. + * @param {string} automationAccountName The automation account name. + * + * @param {string} moduleName The name of module. + * + * @param {object} parameters The create or update parameters for module. + * + * @param {object} parameters.contentLink Gets or sets the module content link. + * + * @param {string} [parameters.contentLink.uri] Gets or sets the uri of the + * runbook content. + * + * @param {object} [parameters.contentLink.contentHash] Gets or sets the hash. + * + * @param {string} parameters.contentLink.contentHash.algorithm Gets or sets + * the content hash algorithm used to hash the content. + * + * @param {string} parameters.contentLink.contentHash.value Gets or sets + * expected hash value of the content. + * + * @param {string} [parameters.contentLink.version] Gets or sets the version of + * the content. + * + * @param {string} [parameters.name] Gets or sets name of the resource. + * + * @param {string} [parameters.location] Gets or sets the location of the + * resource. + * + * @param {object} [parameters.tags] Gets or sets the tags attached to the + * resource. * * @param {object} [options] Optional Parameters. * @@ -5482,17 +5371,44 @@ export interface JobStreamOperations { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listByJobNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + createOrUpdateWithHttpOperationResponse(automationAccountName: string, moduleName: string, parameters: models.ModuleCreateOrUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Retrieve a list of jobs streams identified by job id. + * Create or Update the module identified by module name. * - * @param {string} nextPageLink The NextLink from the previous successful call - * to List operation. + * @param {string} automationAccountName The automation account name. + * + * @param {string} moduleName The name of module. + * + * @param {object} parameters The create or update parameters for module. + * + * @param {object} parameters.contentLink Gets or sets the module content link. + * + * @param {string} [parameters.contentLink.uri] Gets or sets the uri of the + * runbook content. + * + * @param {object} [parameters.contentLink.contentHash] Gets or sets the hash. + * + * @param {string} parameters.contentLink.contentHash.algorithm Gets or sets + * the content hash algorithm used to hash the content. + * + * @param {string} parameters.contentLink.contentHash.value Gets or sets + * expected hash value of the content. + * + * @param {string} [parameters.contentLink.version] Gets or sets the version of + * the content. + * + * @param {string} [parameters.name] Gets or sets name of the resource. + * + * @param {string} [parameters.location] Gets or sets the location of the + * resource. + * + * @param {object} [parameters.tags] Gets or sets the tags attached to the + * resource. * * @param {object} [options] Optional Parameters. * @@ -5506,7 +5422,7 @@ export interface JobStreamOperations { * * {Promise} A promise is returned. * - * @resolve {JobStreamListResult} - The deserialized result object. + * @resolve {Module} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -5514,35 +5430,51 @@ export interface JobStreamOperations { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {JobStreamListResult} [result] - The deserialized result object if an error did not occur. - * See {@link JobStreamListResult} for more information. + * {Module} [result] - The deserialized result object if an error did not occur. + * See {@link Module} 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. */ - listByJobNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listByJobNext(nextPageLink: string, callback: ServiceCallback): void; - listByJobNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; -} - -/** - * @class - * JobScheduleOperations - * __NOTE__: An instance of this class is automatically created for an - * instance of the AutomationClient. - */ -export interface JobScheduleOperations { + 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; /** - * Delete the job schedule identified by job schedule name. - * - * @param {string} resourceGroupName The resource group name. + * Update the module identified by module name. * * @param {string} automationAccountName The automation account name. * - * @param {uuid} jobScheduleId The job schedule name. + * @param {string} moduleName The name of module. + * + * @param {object} parameters The update parameters for module. + * + * @param {object} [parameters.contentLink] Gets or sets the module content + * link. + * + * @param {string} [parameters.contentLink.uri] Gets or sets the uri of the + * runbook content. + * + * @param {object} [parameters.contentLink.contentHash] Gets or sets the hash. + * + * @param {string} parameters.contentLink.contentHash.algorithm Gets or sets + * the content hash algorithm used to hash the content. + * + * @param {string} parameters.contentLink.contentHash.value Gets or sets + * expected hash value of the content. + * + * @param {string} [parameters.contentLink.version] Gets or sets the version of + * the content. + * + * @param {string} [parameters.name] Gets or sets name of the resource. + * + * @param {string} [parameters.location] Gets or sets the location of the + * resource. + * + * @param {object} [parameters.tags] Gets or sets the tags attached to the + * resource. * * @param {object} [options] Optional Parameters. * @@ -5551,20 +5483,45 @@ export interface JobScheduleOperations { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - deleteMethodWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, jobScheduleId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + updateWithHttpOperationResponse(automationAccountName: string, moduleName: string, parameters: models.ModuleUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Delete the job schedule identified by job schedule name. - * - * @param {string} resourceGroupName The resource group name. + * Update the module identified by module name. * * @param {string} automationAccountName The automation account name. * - * @param {uuid} jobScheduleId The job schedule name. + * @param {string} moduleName The name of module. + * + * @param {object} parameters The update parameters for module. + * + * @param {object} [parameters.contentLink] Gets or sets the module content + * link. + * + * @param {string} [parameters.contentLink.uri] Gets or sets the uri of the + * runbook content. + * + * @param {object} [parameters.contentLink.contentHash] Gets or sets the hash. + * + * @param {string} parameters.contentLink.contentHash.algorithm Gets or sets + * the content hash algorithm used to hash the content. + * + * @param {string} parameters.contentLink.contentHash.value Gets or sets + * expected hash value of the content. + * + * @param {string} [parameters.contentLink.version] Gets or sets the version of + * the content. + * + * @param {string} [parameters.name] Gets or sets name of the resource. + * + * @param {string} [parameters.location] Gets or sets the location of the + * resource. + * + * @param {object} [parameters.tags] Gets or sets the tags attached to the + * resource. * * @param {object} [options] Optional Parameters. * @@ -5578,7 +5535,7 @@ export interface JobScheduleOperations { * * {Promise} A promise is returned. * - * @resolve {null} - The deserialized result object. + * @resolve {Module} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -5586,26 +5543,23 @@ export interface JobScheduleOperations { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {Module} [result] - The deserialized result object if an error did not occur. + * See {@link Module} 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. */ - 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; + 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 the job schedule identified by job schedule name. - * - * @param {string} resourceGroupName The resource group name. + * Retrieve a list of modules. * * @param {string} automationAccountName The automation account name. * - * @param {uuid} jobScheduleId The job schedule name. - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -5613,21 +5567,17 @@ export interface JobScheduleOperations { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - getWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, jobScheduleId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listByAutomationAccountWithHttpOperationResponse(automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Retrieve the job schedule identified by job schedule name. - * - * @param {string} resourceGroupName The resource group name. + * Retrieve a list of modules. * * @param {string} automationAccountName The automation account name. * - * @param {uuid} jobScheduleId The job schedule name. - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -5640,7 +5590,7 @@ export interface JobScheduleOperations { * * {Promise} A promise is returned. * - * @resolve {JobSchedule} - The deserialized result object. + * @resolve {ModuleListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -5648,86 +5598,114 @@ export interface JobScheduleOperations { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {JobSchedule} [result] - The deserialized result object if an error did not occur. - * See {@link JobSchedule} for more information. + * {ModuleListResult} [result] - The deserialized result object if an error did not occur. + * See {@link ModuleListResult} 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. */ - 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; + 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; /** - * Create a job schedule. + * Retrieve a list of modules. * - * @param {string} resourceGroupName The resource group name. + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. * - * @param {string} automationAccountName The automation account name. + * @param {object} [options] Optional Parameters. * - * @param {uuid} jobScheduleId The job schedule name. + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * @param {object} parameters The parameters supplied to the create job - * schedule operation. + * @returns {Promise} A promise is returned * - * @param {object} parameters.schedule Gets or sets the schedule. + * @resolve {HttpOperationResponse} - The deserialized result object. * - * @param {string} [parameters.schedule.name] Gets or sets the name of the - * schedule. + * @reject {Error|ServiceError} - The error object. + */ + listByAutomationAccountNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Retrieve a list of modules. * - * @param {object} parameters.runbook Gets or sets the runbook. - * - * @param {string} [parameters.runbook.name] Gets or sets the name of the - * runbook. - * - * @param {string} [parameters.runOn] Gets or sets the hybrid worker group that - * the scheduled job should run on. - * - * @param {object} [parameters.parameters] Gets or sets a list of job - * properties. + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request * - * @returns {Promise} A promise is returned + * @param {ServiceCallback} [optionalCallback] - The optional callback. * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. * - * @reject {Error|ServiceError} - The error object. + * {Promise} A promise is returned. + * + * @resolve {ModuleListResult} - 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. + * + * {ModuleListResult} [result] - The deserialized result object if an error did not occur. + * See {@link ModuleListResult} 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. */ - createWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, jobScheduleId: string, parameters: models.JobScheduleCreateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listByAutomationAccountNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listByAutomationAccountNext(nextPageLink: string, callback: ServiceCallback): void; + listByAutomationAccountNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; +} + +/** + * @class + * ObjectDataTypes + * __NOTE__: An instance of this class is automatically created for an + * instance of the AutomationClient. + */ +export interface ObjectDataTypes { + /** - * Create a job schedule. - * - * @param {string} resourceGroupName The resource group name. + * Retrieve a list of fields of a given type identified by module name. * * @param {string} automationAccountName The automation account name. * - * @param {uuid} jobScheduleId The job schedule name. + * @param {string} moduleName The name of module. * - * @param {object} parameters The parameters supplied to the create job - * schedule operation. + * @param {string} typeName The name of type. * - * @param {object} parameters.schedule Gets or sets the schedule. + * @param {object} [options] Optional Parameters. * - * @param {string} [parameters.schedule.name] Gets or sets the name of the - * schedule. + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * @param {object} parameters.runbook Gets or sets the runbook. + * @returns {Promise} A promise is returned * - * @param {string} [parameters.runbook.name] Gets or sets the name of the - * runbook. + * @resolve {HttpOperationResponse} - The deserialized result object. * - * @param {string} [parameters.runOn] Gets or sets the hybrid worker group that - * the scheduled job should run on. + * @reject {Error|ServiceError} - The error object. + */ + 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 {object} [parameters.parameters] Gets or sets a list of job - * properties. + * @param {string} automationAccountName The automation account name. + * + * @param {string} moduleName The name of module. + * + * @param {string} typeName The name of type. * * @param {object} [options] Optional Parameters. * @@ -5741,7 +5719,7 @@ export interface JobScheduleOperations { * * {Promise} A promise is returned. * - * @resolve {JobSchedule} - The deserialized result object. + * @resolve {TypeFieldListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -5749,25 +5727,25 @@ export interface JobScheduleOperations { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {JobSchedule} [result] - The deserialized result object if an error did not occur. - * See {@link JobSchedule} for more information. + * {TypeFieldListResult} [result] - The deserialized result object if an error did not occur. + * See {@link TypeFieldListResult} 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. */ - 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; + 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 job schedules. - * - * @param {string} resourceGroupName The resource group name. + * Retrieve a list of fields of a given type across all accessible modules. * * @param {string} automationAccountName The automation account name. * + * @param {string} typeName The name of type. + * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -5775,19 +5753,19 @@ export interface JobScheduleOperations { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listByAutomationAccountWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listFieldsByTypeWithHttpOperationResponse(automationAccountName: string, typeName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Retrieve a list of job schedules. - * - * @param {string} resourceGroupName The resource group name. + * Retrieve a list of fields of a given type across all accessible modules. * * @param {string} automationAccountName The automation account name. * + * @param {string} typeName The name of type. + * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -5800,7 +5778,7 @@ export interface JobScheduleOperations { * * {Promise} A promise is returned. * - * @resolve {JobScheduleListResult} - The deserialized result object. + * @resolve {TypeFieldListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -5808,23 +5786,35 @@ export interface JobScheduleOperations { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {JobScheduleListResult} [result] - The deserialized result object if an error did not occur. - * See {@link JobScheduleListResult} for more information. + * {TypeFieldListResult} [result] - The deserialized result object if an error did not occur. + * See {@link TypeFieldListResult} 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. */ - 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; + 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; +} + +/** + * @class + * Fields + * __NOTE__: An instance of this class is automatically created for an + * instance of the AutomationClient. + */ +export interface Fields { /** - * Retrieve a list of job schedules. + * Retrieve a list of fields of a given type identified by module name. * - * @param {string} nextPageLink The NextLink from the previous successful call - * to List operation. + * @param {string} automationAccountName The automation account name. + * + * @param {string} moduleName The name of module. + * + * @param {string} typeName The name of type. * * @param {object} [options] Optional Parameters. * @@ -5833,17 +5823,20 @@ export interface JobScheduleOperations { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listByAutomationAccountNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listByTypeWithHttpOperationResponse(automationAccountName: string, moduleName: string, typeName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Retrieve a list of job schedules. + * Retrieve a list of fields of a given type identified by module name. * - * @param {string} nextPageLink The NextLink from the previous successful call - * to List operation. + * @param {string} automationAccountName The automation account name. + * + * @param {string} moduleName The name of module. + * + * @param {string} typeName The name of type. * * @param {object} [options] Optional Parameters. * @@ -5857,7 +5850,7 @@ export interface JobScheduleOperations { * * {Promise} A promise is returned. * - * @resolve {JobScheduleListResult} - The deserialized result object. + * @resolve {TypeFieldListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -5865,38 +5858,33 @@ export interface JobScheduleOperations { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {JobScheduleListResult} [result] - The deserialized result object if an error did not occur. - * See {@link JobScheduleListResult} for more information. + * {TypeFieldListResult} [result] - The deserialized result object if an error did not occur. + * See {@link TypeFieldListResult} 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. */ - listByAutomationAccountNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listByAutomationAccountNext(nextPageLink: string, callback: ServiceCallback): void; - listByAutomationAccountNext(nextPageLink: 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; } /** * @class - * ActivityOperations + * RunbookDraftOperations * __NOTE__: An instance of this class is automatically created for an * instance of the AutomationClient. */ -export interface ActivityOperations { +export interface RunbookDraftOperations { /** - * Retrieve the activity in the module identified by module name and activity - * name. - * - * @param {string} resourceGroupName The resource group name. + * Retrieve the content of runbook draft identified by runbook name. * * @param {string} automationAccountName The automation account name. * - * @param {string} moduleName The name of module. - * - * @param {string} activityName The name of activity. + * @param {string} runbookName The runbook name. * * @param {object} [options] Optional Parameters. * @@ -5905,23 +5893,18 @@ export interface ActivityOperations { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - getWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, moduleName: string, activityName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getContentWithHttpOperationResponse(automationAccountName: string, runbookName: 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. + * Retrieve the content of runbook draft identified by runbook name. * * @param {string} automationAccountName The automation account name. * - * @param {string} moduleName The name of module. - * - * @param {string} activityName The name of activity. + * @param {string} runbookName The runbook name. * * @param {object} [options] Optional Parameters. * @@ -5935,7 +5918,7 @@ export interface ActivityOperations { * * {Promise} A promise is returned. * - * @resolve {Activity} - The deserialized result object. + * @resolve {String} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -5943,26 +5926,25 @@ export interface ActivityOperations { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {Activity} [result] - The deserialized result object if an error did not occur. - * See {@link Activity} for more information. + * {String} [result] - The deserialized result object if an error did not occur. * * {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. */ - 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; + 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 a list of activities in the module identified by module name. - * - * @param {string} resourceGroupName The resource group name. + * Replaces the runbook draft content. * * @param {string} automationAccountName The automation account name. * - * @param {string} moduleName The name of module. + * @param {string} runbookName The runbook name. + * + * @param {string} runbookContent The runbook draft content. * * @param {object} [options] Optional Parameters. * @@ -5971,20 +5953,20 @@ export interface ActivityOperations { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listByModuleWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, moduleName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + replaceContentWithHttpOperationResponse(automationAccountName: string, runbookName: string, runbookContent: 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. + * Replaces the runbook draft content. * * @param {string} automationAccountName The automation account name. * - * @param {string} moduleName The name of module. + * @param {string} runbookName The runbook name. + * + * @param {string} runbookContent The runbook draft content. * * @param {object} [options] Optional Parameters. * @@ -5998,7 +5980,7 @@ export interface ActivityOperations { * * {Promise} A promise is returned. * - * @resolve {ActivityListResult} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -6006,23 +5988,23 @@ export interface ActivityOperations { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {ActivityListResult} [result] - The deserialized result object if an error did not occur. - * See {@link ActivityListResult} for more information. + * {null} [result] - The deserialized result object if an error did not occur. * * {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. */ - 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; + 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 a list of activities in the module identified by module name. + * Retrieve the runbook draft identified by runbook name. * - * @param {string} nextPageLink The NextLink from the previous successful call - * to List operation. + * @param {string} automationAccountName The automation account name. + * + * @param {string} runbookName The runbook name. * * @param {object} [options] Optional Parameters. * @@ -6031,17 +6013,18 @@ export interface ActivityOperations { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listByModuleNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(automationAccountName: string, runbookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Retrieve a list of activities in the module identified by module name. + * Retrieve the runbook draft identified by runbook name. * - * @param {string} nextPageLink The NextLink from the previous successful call - * to List operation. + * @param {string} automationAccountName The automation account name. + * + * @param {string} runbookName The runbook name. * * @param {object} [options] Optional Parameters. * @@ -6055,7 +6038,7 @@ export interface ActivityOperations { * * {Promise} A promise is returned. * - * @resolve {ActivityListResult} - The deserialized result object. + * @resolve {RunbookDraft} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -6063,35 +6046,25 @@ export interface ActivityOperations { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {ActivityListResult} [result] - The deserialized result object if an error did not occur. - * See {@link ActivityListResult} for more information. + * {RunbookDraft} [result] - The deserialized result object if an error did not occur. + * See {@link RunbookDraft} 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. */ - listByModuleNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listByModuleNext(nextPageLink: string, callback: ServiceCallback): void; - listByModuleNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; -} - -/** - * @class - * ModuleOperations - * __NOTE__: An instance of this class is automatically created for an - * instance of the AutomationClient. - */ -export interface ModuleOperations { + 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; /** - * Delete the module by name. - * - * @param {string} resourceGroupName The resource group name. + * Publish runbook draft. * * @param {string} automationAccountName The automation account name. * - * @param {string} moduleName The module name. + * @param {string} runbookName The parameters supplied to the publish runbook + * operation. * * @param {object} [options] Optional Parameters. * @@ -6104,16 +6077,15 @@ export interface ModuleOperations { * * @reject {Error|ServiceError} - The error object. */ - deleteMethodWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, moduleName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + publishWithHttpOperationResponse(automationAccountName: string, runbookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Delete the module by name. - * - * @param {string} resourceGroupName The resource group name. + * Publish runbook draft. * * @param {string} automationAccountName The automation account name. * - * @param {string} moduleName The module name. + * @param {string} runbookName The parameters supplied to the publish runbook + * operation. * * @param {object} [options] Optional Parameters. * @@ -6141,19 +6113,17 @@ 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; + 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; /** - * Retrieve the module identified by module name. - * - * @param {string} resourceGroupName The resource group name. + * Undo draft edit to last known published state identified by runbook name. * * @param {string} automationAccountName The automation account name. * - * @param {string} moduleName The module name. + * @param {string} runbookName The runbook name. * * @param {object} [options] Optional Parameters. * @@ -6162,20 +6132,18 @@ export interface ModuleOperations { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - getWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, moduleName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + undoEditWithHttpOperationResponse(automationAccountName: string, runbookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Retrieve the module identified by module name. - * - * @param {string} resourceGroupName The resource group name. + * Undo draft edit to last known published state identified by runbook name. * * @param {string} automationAccountName The automation account name. * - * @param {string} moduleName The module name. + * @param {string} runbookName The runbook name. * * @param {object} [options] Optional Parameters. * @@ -6189,7 +6157,7 @@ export interface ModuleOperations { * * {Promise} A promise is returned. * - * @resolve {Module} - The deserialized result object. + * @resolve {RunbookDraftUndoEditResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -6197,52 +6165,27 @@ export interface ModuleOperations { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {Module} [result] - The deserialized result object if an error did not occur. - * See {@link Module} for more information. - * + * {RunbookDraftUndoEditResult} [result] - The deserialized result object if an error did not occur. + * See {@link RunbookDraftUndoEditResult} 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. */ - 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; + 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; /** - * Create or Update the module identified by module name. - * - * @param {string} resourceGroupName The resource group name. + * Replaces the runbook draft content. * * @param {string} automationAccountName The automation account name. * - * @param {string} moduleName The name of module. - * - * @param {object} parameters The create or update parameters for module. - * - * @param {object} parameters.contentLink Gets or sets the module content link. - * - * @param {string} [parameters.contentLink.uri] Gets or sets the uri of the - * runbook content. - * - * @param {object} [parameters.contentLink.contentHash] Gets or sets the hash. - * - * @param {string} parameters.contentLink.contentHash.algorithm Gets or sets - * the content hash algorithm used to hash the content. - * - * @param {string} parameters.contentLink.contentHash.value Gets or sets - * expected hash value of the content. - * - * @param {string} [parameters.contentLink.version] Gets or sets the version of - * the content. - * - * @param {string} [parameters.name] Gets or sets name of the resource. - * - * @param {string} [parameters.location] Gets or sets the location of the - * resource. + * @param {string} runbookName The runbook name. * - * @param {object} [parameters.tags] Gets or sets the tags attached to the - * resource. + * @param {string} runbookContent The runbook draft content. * * @param {object} [options] Optional Parameters. * @@ -6251,46 +6194,20 @@ export interface ModuleOperations { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - createOrUpdateWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, moduleName: string, parameters: models.ModuleCreateOrUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginReplaceContentWithHttpOperationResponse(automationAccountName: string, runbookName: string, runbookContent: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Create or Update the module identified by module name. - * - * @param {string} resourceGroupName The resource group name. + * Replaces the runbook draft content. * * @param {string} automationAccountName The automation account name. * - * @param {string} moduleName The name of module. - * - * @param {object} parameters The create or update parameters for module. - * - * @param {object} parameters.contentLink Gets or sets the module content link. - * - * @param {string} [parameters.contentLink.uri] Gets or sets the uri of the - * runbook content. - * - * @param {object} [parameters.contentLink.contentHash] Gets or sets the hash. - * - * @param {string} parameters.contentLink.contentHash.algorithm Gets or sets - * the content hash algorithm used to hash the content. - * - * @param {string} parameters.contentLink.contentHash.value Gets or sets - * expected hash value of the content. - * - * @param {string} [parameters.contentLink.version] Gets or sets the version of - * the content. - * - * @param {string} [parameters.name] Gets or sets name of the resource. - * - * @param {string} [parameters.location] Gets or sets the location of the - * resource. + * @param {string} runbookName The runbook name. * - * @param {object} [parameters.tags] Gets or sets the tags attached to the - * resource. + * @param {string} runbookContent The runbook draft content. * * @param {object} [options] Optional Parameters. * @@ -6304,7 +6221,7 @@ export interface ModuleOperations { * * {Promise} A promise is returned. * - * @resolve {Module} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -6312,53 +6229,24 @@ export interface ModuleOperations { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {Module} [result] - The deserialized result object if an error did not occur. - * See {@link Module} for more information. + * {null} [result] - The deserialized result object if an error did not occur. * * {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. */ - 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; + 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; /** - * Update the module identified by module name. - * - * @param {string} resourceGroupName The resource group name. + * Publish runbook draft. * * @param {string} automationAccountName The automation account name. * - * @param {string} moduleName The name of module. - * - * @param {object} parameters The update parameters for module. - * - * @param {object} [parameters.contentLink] Gets or sets the module content - * link. - * - * @param {string} [parameters.contentLink.uri] Gets or sets the uri of the - * runbook content. - * - * @param {object} [parameters.contentLink.contentHash] Gets or sets the hash. - * - * @param {string} parameters.contentLink.contentHash.algorithm Gets or sets - * the content hash algorithm used to hash the content. - * - * @param {string} parameters.contentLink.contentHash.value Gets or sets - * expected hash value of the content. - * - * @param {string} [parameters.contentLink.version] Gets or sets the version of - * the content. - * - * @param {string} [parameters.name] Gets or sets name of the resource. - * - * @param {string} [parameters.location] Gets or sets the location of the - * resource. - * - * @param {object} [parameters.tags] Gets or sets the tags attached to the - * resource. + * @param {string} runbookName The parameters supplied to the publish runbook + * operation. * * @param {object} [options] Optional Parameters. * @@ -6367,47 +6255,19 @@ export interface ModuleOperations { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - updateWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, moduleName: string, parameters: models.ModuleUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginPublishWithHttpOperationResponse(automationAccountName: string, runbookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Update the module identified by module name. - * - * @param {string} resourceGroupName The resource group name. + * Publish runbook draft. * * @param {string} automationAccountName The automation account name. * - * @param {string} moduleName The name of module. - * - * @param {object} parameters The update parameters for module. - * - * @param {object} [parameters.contentLink] Gets or sets the module content - * link. - * - * @param {string} [parameters.contentLink.uri] Gets or sets the uri of the - * runbook content. - * - * @param {object} [parameters.contentLink.contentHash] Gets or sets the hash. - * - * @param {string} parameters.contentLink.contentHash.algorithm Gets or sets - * the content hash algorithm used to hash the content. - * - * @param {string} parameters.contentLink.contentHash.value Gets or sets - * expected hash value of the content. - * - * @param {string} [parameters.contentLink.version] Gets or sets the version of - * the content. - * - * @param {string} [parameters.name] Gets or sets name of the resource. - * - * @param {string} [parameters.location] Gets or sets the location of the - * resource. - * - * @param {object} [parameters.tags] Gets or sets the tags attached to the - * resource. + * @param {string} runbookName The parameters supplied to the publish runbook + * operation. * * @param {object} [options] Optional Parameters. * @@ -6421,7 +6281,7 @@ export interface ModuleOperations { * * {Promise} A promise is returned. * - * @resolve {Module} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -6429,25 +6289,33 @@ export interface ModuleOperations { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {Module} [result] - The deserialized result object if an error did not occur. - * See {@link Module} for more information. + * {null} [result] - The deserialized result object if an error did not occur. * * {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(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; + 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; +} + +/** + * @class + * RunbookOperations + * __NOTE__: An instance of this class is automatically created for an + * instance of the AutomationClient. + */ +export interface RunbookOperations { /** - * Retrieve a list of modules. - * - * @param {string} resourceGroupName The resource group name. + * Retrieve the content of runbook identified by runbook name. * * @param {string} automationAccountName The automation account name. * + * @param {string} runbookName The runbook name. + * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -6455,19 +6323,19 @@ export interface ModuleOperations { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listByAutomationAccountWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getContentWithHttpOperationResponse(automationAccountName: string, runbookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Retrieve a list of modules. - * - * @param {string} resourceGroupName The resource group name. + * Retrieve the content of runbook identified by runbook name. * * @param {string} automationAccountName The automation account name. * + * @param {string} runbookName The runbook name. + * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -6480,7 +6348,7 @@ export interface ModuleOperations { * * {Promise} A promise is returned. * - * @resolve {ModuleListResult} - The deserialized result object. + * @resolve {String} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -6488,23 +6356,23 @@ export interface ModuleOperations { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {ModuleListResult} [result] - The deserialized result object if an error did not occur. - * See {@link ModuleListResult} for more information. + * {String} [result] - The deserialized result object if an error did not occur. * * {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. */ - 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; + 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 a list of modules. + * Retrieve the runbook identified by runbook name. * - * @param {string} nextPageLink The NextLink from the previous successful call - * to List operation. + * @param {string} automationAccountName The automation account name. + * + * @param {string} runbookName The runbook name. * * @param {object} [options] Optional Parameters. * @@ -6513,17 +6381,18 @@ export interface ModuleOperations { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listByAutomationAccountNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(automationAccountName: string, runbookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Retrieve a list of modules. + * Retrieve the runbook identified by runbook name. * - * @param {string} nextPageLink The NextLink from the previous successful call - * to List operation. + * @param {string} automationAccountName The automation account name. + * + * @param {string} runbookName The runbook name. * * @param {object} [options] Optional Parameters. * @@ -6537,7 +6406,7 @@ export interface ModuleOperations { * * {Promise} A promise is returned. * - * @resolve {ModuleListResult} - The deserialized result object. + * @resolve {Runbook} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -6545,102 +6414,88 @@ export interface ModuleOperations { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {ModuleListResult} [result] - The deserialized result object if an error did not occur. - * See {@link ModuleListResult} for more information. + * {Runbook} [result] - The deserialized result object if an error did not occur. + * See {@link Runbook} 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. */ - listByAutomationAccountNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listByAutomationAccountNext(nextPageLink: string, callback: ServiceCallback): void; - listByAutomationAccountNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; -} - -/** - * @class - * ObjectDataTypes - * __NOTE__: An instance of this class is automatically created for an - * instance of the AutomationClient. - */ -export interface ObjectDataTypes { + 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; /** - * Retrieve a list of fields of a given type identified by module name. - * - * @param {string} resourceGroupName The resource group name. + * Create the runbook identified by runbook name. * * @param {string} automationAccountName The automation account name. * - * @param {string} moduleName The name of module. + * @param {string} runbookName The runbook name. * - * @param {string} typeName The name of type. + * @param {object} parameters The create or update parameters for runbook. + * Provide either content link for a published runbook or draft, not both. * - * @param {object} [options] Optional Parameters. + * @param {boolean} [parameters.logVerbose] Gets or sets verbose log option. * - * @param {object} [options.customHeaders] Headers that will be added to the - * request + * @param {boolean} [parameters.logProgress] Gets or sets progress log option. * - * @returns {Promise} A promise is returned + * @param {string} parameters.runbookType Gets or sets the type of the runbook. + * Possible values include: 'Script', 'Graph', 'PowerShellWorkflow', + * 'PowerShell', 'GraphPowerShellWorkflow', 'GraphPowerShell' * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @param {object} [parameters.draft] Gets or sets the draft runbook + * properties. * - * @reject {Error|ServiceError} - The error object. - */ - listFieldsByModuleAndTypeWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, moduleName: string, typeName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; - - /** - * Retrieve a list of fields of a given type identified by module name. + * @param {boolean} [parameters.draft.inEdit] Gets or sets whether runbook is + * in edit mode. * - * @param {string} resourceGroupName The resource group name. + * @param {object} [parameters.draft.draftContentLink] Gets or sets the draft + * runbook content link. * - * @param {string} automationAccountName The automation account name. + * @param {date} [parameters.draft.creationTime] Gets or sets the creation time + * of the runbook draft. * - * @param {string} moduleName The name of module. + * @param {date} [parameters.draft.lastModifiedTime] Gets or sets the last + * modified time of the runbook draft. * - * @param {string} typeName The name of type. + * @param {object} [parameters.draft.parameters] Gets or sets the runbook draft + * parameters. * - * @param {object} [options] Optional Parameters. + * @param {array} [parameters.draft.outputTypes] Gets or sets the runbook + * output types. * - * @param {object} [options.customHeaders] Headers that will be added to the - * request + * @param {object} [parameters.publishContentLink] Gets or sets the published + * runbook content link. * - * @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 {TypeFieldListResult} - The deserialized result object. + * @param {string} [parameters.publishContentLink.uri] Gets or sets the uri of + * the runbook content. * - * @reject {Error|ServiceError} - The error object. + * @param {object} [parameters.publishContentLink.contentHash] Gets or sets the + * hash. * - * {ServiceCallback} optionalCallback(err, result, request, response) + * @param {string} parameters.publishContentLink.contentHash.algorithm Gets or + * sets the content hash algorithm used to hash the content. * - * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * @param {string} parameters.publishContentLink.contentHash.value Gets or sets + * expected hash value of the content. * - * {TypeFieldListResult} [result] - The deserialized result object if an error did not occur. - * See {@link TypeFieldListResult} for more information. + * @param {string} [parameters.publishContentLink.version] Gets or sets the + * version of the content. * - * {WebResource} [request] - The HTTP Request object if an error did not occur. + * @param {string} [parameters.description] Gets or sets the description of the + * runbook. * - * {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; - - - /** - * Retrieve a list of fields of a given type across all accessible modules. + * @param {number} [parameters.logActivityTrace] Gets or sets the + * activity-level tracing options of the runbook. * - * @param {string} resourceGroupName The resource group name. + * @param {string} [parameters.name] Gets or sets the name of the resource. * - * @param {string} automationAccountName The automation account name. + * @param {string} [parameters.location] Gets or sets the location of the + * resource. * - * @param {string} typeName The name of type. + * @param {object} [parameters.tags] Gets or sets the tags attached to the + * resource. * * @param {object} [options] Optional Parameters. * @@ -6649,96 +6504,82 @@ export interface ObjectDataTypes { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listFieldsByTypeWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, typeName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + createOrUpdateWithHttpOperationResponse(automationAccountName: string, runbookName: string, parameters: models.RunbookCreateOrUpdateParameters, 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. + * Create the runbook identified by runbook name. * * @param {string} automationAccountName The automation account name. * - * @param {string} typeName The name of type. - * - * @param {object} [options] Optional Parameters. - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @param {ServiceCallback} [optionalCallback] - The optional callback. + * @param {string} runbookName The runbook name. * - * @returns {ServiceCallback|Promise} If a callback was passed as the last - * parameter then it returns the callback else returns a Promise. + * @param {object} parameters The create or update parameters for runbook. + * Provide either content link for a published runbook or draft, not both. * - * {Promise} A promise is returned. + * @param {boolean} [parameters.logVerbose] Gets or sets verbose log option. * - * @resolve {TypeFieldListResult} - The deserialized result object. + * @param {boolean} [parameters.logProgress] Gets or sets progress log option. * - * @reject {Error|ServiceError} - The error object. + * @param {string} parameters.runbookType Gets or sets the type of the runbook. + * Possible values include: 'Script', 'Graph', 'PowerShellWorkflow', + * 'PowerShell', 'GraphPowerShellWorkflow', 'GraphPowerShell' * - * {ServiceCallback} optionalCallback(err, result, request, response) + * @param {object} [parameters.draft] Gets or sets the draft runbook + * properties. * - * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * @param {boolean} [parameters.draft.inEdit] Gets or sets whether runbook is + * in edit mode. * - * {TypeFieldListResult} [result] - The deserialized result object if an error did not occur. - * See {@link TypeFieldListResult} for more information. + * @param {object} [parameters.draft.draftContentLink] Gets or sets the draft + * runbook content link. * - * {WebResource} [request] - The HTTP Request object if an error did not occur. + * @param {date} [parameters.draft.creationTime] Gets or sets the creation time + * of the runbook draft. * - * {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; -} - -/** - * @class - * Fields - * __NOTE__: An instance of this class is automatically created for an - * instance of the AutomationClient. - */ -export interface Fields { - - - /** - * Retrieve a list of fields of a given type identified by module name. + * @param {date} [parameters.draft.lastModifiedTime] Gets or sets the last + * modified time of the runbook draft. * - * @param {string} resourceGroupName The resource group name. + * @param {object} [parameters.draft.parameters] Gets or sets the runbook draft + * parameters. * - * @param {string} automationAccountName The automation account name. + * @param {array} [parameters.draft.outputTypes] Gets or sets the runbook + * output types. * - * @param {string} moduleName The name of module. + * @param {object} [parameters.publishContentLink] Gets or sets the published + * runbook content link. * - * @param {string} typeName The name of type. + * @param {string} [parameters.publishContentLink.uri] Gets or sets the uri of + * the runbook content. * - * @param {object} [options] Optional Parameters. + * @param {object} [parameters.publishContentLink.contentHash] Gets or sets the + * hash. * - * @param {object} [options.customHeaders] Headers that will be added to the - * request + * @param {string} parameters.publishContentLink.contentHash.algorithm Gets or + * sets the content hash algorithm used to hash the content. * - * @returns {Promise} A promise is returned + * @param {string} parameters.publishContentLink.contentHash.value Gets or sets + * expected hash value of the content. * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @param {string} [parameters.publishContentLink.version] Gets or sets the + * version of the content. * - * @reject {Error|ServiceError} - The error object. - */ - listByTypeWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, moduleName: string, typeName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; - - /** - * Retrieve a list of fields of a given type identified by module name. + * @param {string} [parameters.description] Gets or sets the description of the + * runbook. * - * @param {string} resourceGroupName The resource group name. + * @param {number} [parameters.logActivityTrace] Gets or sets the + * activity-level tracing options of the runbook. * - * @param {string} automationAccountName The automation account name. + * @param {string} [parameters.name] Gets or sets the name of the resource. * - * @param {string} moduleName The name of module. + * @param {string} [parameters.location] Gets or sets the location of the + * resource. * - * @param {string} typeName The name of type. + * @param {object} [parameters.tags] Gets or sets the tags attached to the + * resource. * * @param {object} [options] Optional Parameters. * @@ -6752,7 +6593,7 @@ export interface Fields { * * {Promise} A promise is returned. * - * @resolve {TypeFieldListResult} - The deserialized result object. + * @resolve {Runbook} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -6760,36 +6601,45 @@ export interface Fields { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {TypeFieldListResult} [result] - The deserialized result object if an error did not occur. - * See {@link TypeFieldListResult} for more information. + * {Runbook} [result] - The deserialized result object if an error did not occur. + * See {@link Runbook} 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. */ - 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; -} - -/** - * @class - * RunbookDraftOperations - * __NOTE__: An instance of this class is automatically created for an - * instance of the AutomationClient. - */ -export interface RunbookDraftOperations { + 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; /** - * Retrieve the content of runbook draft identified by runbook name. - * - * @param {string} resourceGroupName The resource group name. + * Update the runbook identified by runbook name. * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. * + * @param {object} parameters The update parameters for runbook. + * + * @param {string} [parameters.description] Gets or sets the description of the + * runbook. + * + * @param {boolean} [parameters.logVerbose] Gets or sets verbose log option. + * + * @param {boolean} [parameters.logProgress] Gets or sets progress log option. + * + * @param {number} [parameters.logActivityTrace] Gets or sets the + * activity-level tracing options of the runbook. + * + * @param {string} [parameters.name] Gets or sets the name of the resource. + * + * @param {string} [parameters.location] Gets or sets the location of the + * resource. + * + * @param {object} [parameters.tags] Gets or sets the tags attached to the + * resource. + * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -6797,21 +6647,39 @@ export interface RunbookDraftOperations { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - getContentWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, runbookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + updateWithHttpOperationResponse(automationAccountName: string, runbookName: string, parameters: models.RunbookUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Retrieve the content of runbook draft identified by runbook name. - * - * @param {string} resourceGroupName The resource group name. + * Update the runbook identified by runbook name. * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. * + * @param {object} parameters The update parameters for runbook. + * + * @param {string} [parameters.description] Gets or sets the description of the + * runbook. + * + * @param {boolean} [parameters.logVerbose] Gets or sets verbose log option. + * + * @param {boolean} [parameters.logProgress] Gets or sets progress log option. + * + * @param {number} [parameters.logActivityTrace] Gets or sets the + * activity-level tracing options of the runbook. + * + * @param {string} [parameters.name] Gets or sets the name of the resource. + * + * @param {string} [parameters.location] Gets or sets the location of the + * resource. + * + * @param {object} [parameters.tags] Gets or sets the tags attached to the + * resource. + * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -6824,7 +6692,7 @@ export interface RunbookDraftOperations { * * {Promise} A promise is returned. * - * @resolve {Object} - The deserialized result object. + * @resolve {Runbook} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -6832,28 +6700,25 @@ export interface RunbookDraftOperations { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {Object} [result] - The deserialized result object if an error did not occur. + * {Runbook} [result] - The deserialized result object if an error did not occur. + * See {@link Runbook} 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. */ - 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; + 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; /** - * Updates the runbook draft with runbookStream as its content. - * - * @param {string} resourceGroupName The resource group name. + * Delete the runbook by name. * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. * - * @param {object} runbookContent The runbook draft content. - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -6865,19 +6730,15 @@ export interface RunbookDraftOperations { * * @reject {Error|ServiceError} - The error object. */ - createOrUpdateWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, runbookName: string, runbookContent: stream.Readable, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + deleteMethodWithHttpOperationResponse(automationAccountName: string, runbookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Updates the runbook draft with runbookStream as its content. - * - * @param {string} resourceGroupName The resource group name. + * Delete the runbook by name. * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. * - * @param {object} runbookContent The runbook draft content. - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -6904,20 +6765,16 @@ export interface RunbookDraftOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - createOrUpdate(resourceGroupName: string, automationAccountName: string, runbookName: string, runbookContent: stream.Readable, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - createOrUpdate(resourceGroupName: string, automationAccountName: string, runbookName: string, runbookContent: stream.Readable, callback: ServiceCallback): void; - createOrUpdate(resourceGroupName: string, automationAccountName: string, runbookName: string, runbookContent: stream.Readable, 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 the runbook draft identified by runbook name. - * - * @param {string} resourceGroupName The resource group name. + * Retrieve a list of runbooks. * * @param {string} automationAccountName The automation account name. * - * @param {string} runbookName The runbook name. - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -6925,21 +6782,17 @@ export interface RunbookDraftOperations { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - getWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, runbookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listByAutomationAccountWithHttpOperationResponse(automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Retrieve the runbook draft identified by runbook name. - * - * @param {string} resourceGroupName The resource group name. + * Retrieve a list of runbooks. * * @param {string} automationAccountName The automation account name. * - * @param {string} runbookName The runbook name. - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -6952,7 +6805,7 @@ export interface RunbookDraftOperations { * * {Promise} A promise is returned. * - * @resolve {RunbookDraft} - The deserialized result object. + * @resolve {RunbookListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -6960,27 +6813,23 @@ export interface RunbookDraftOperations { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {RunbookDraft} [result] - The deserialized result object if an error did not occur. - * See {@link RunbookDraft} for more information. + * {RunbookListResult} [result] - The deserialized result object if an error did not occur. + * See {@link RunbookListResult} 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. */ - 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; + 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; /** - * Publish runbook draft. - * - * @param {string} resourceGroupName The resource group name. - * - * @param {string} automationAccountName The automation account name. + * Retrieve a list of runbooks. * - * @param {string} runbookName The parameters supplied to the publish runbook - * operation. + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. * * @param {object} [options] Optional Parameters. * @@ -6989,21 +6838,17 @@ export interface RunbookDraftOperations { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - publishWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, runbookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listByAutomationAccountNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Publish runbook draft. + * Retrieve a list of runbooks. * - * @param {string} resourceGroupName The resource group name. - * - * @param {string} automationAccountName The automation account name. - * - * @param {string} runbookName The parameters supplied to the publish runbook - * operation. + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. * * @param {object} [options] Optional Parameters. * @@ -7017,7 +6862,7 @@ export interface RunbookDraftOperations { * * {Promise} A promise is returned. * - * @resolve {Runbook} - The deserialized result object. + * @resolve {RunbookListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -7025,27 +6870,37 @@ export interface RunbookDraftOperations { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {Runbook} [result] - The deserialized result object if an error did not occur. - * See {@link Runbook} for more information. + * {RunbookListResult} [result] - The deserialized result object if an error did not occur. + * See {@link RunbookListResult} 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. */ - 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; + listByAutomationAccountNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listByAutomationAccountNext(nextPageLink: string, callback: ServiceCallback): void; + listByAutomationAccountNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; +} + +/** + * @class + * TestJobStreams + * __NOTE__: An instance of this class is automatically created for an + * instance of the AutomationClient. + */ +export interface TestJobStreams { /** - * Retrieve the runbook identified by runbook name. - * - * @param {string} resourceGroupName The resource group name. + * Retrieve a test job stream of the test job identified by runbook name and + * stream id. * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. * + * @param {string} jobStreamId The job stream id. + * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -7053,21 +6908,22 @@ export interface RunbookDraftOperations { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - undoEditWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, runbookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(automationAccountName: string, runbookName: string, jobStreamId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Retrieve the runbook identified by runbook name. - * - * @param {string} resourceGroupName The resource group name. + * Retrieve a test job stream of the test job identified by runbook name and + * stream id. * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. * + * @param {string} jobStreamId The job stream id. + * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -7080,7 +6936,7 @@ export interface RunbookDraftOperations { * * {Promise} A promise is returned. * - * @resolve {RunbookDraftUndoEditResult} - The deserialized result object. + * @resolve {JobStream} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -7088,56 +6944,51 @@ export interface RunbookDraftOperations { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {RunbookDraftUndoEditResult} [result] - The deserialized result object if an error did not occur. - * See {@link RunbookDraftUndoEditResult} for more - * information. + * {JobStream} [result] - The deserialized result object if an error did not occur. + * See {@link JobStream} 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. */ - 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; + 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; /** - * Updates the runbook draft with runbookStream as its content. - * - * @param {string} resourceGroupName The resource group name. + * Retrieve a list of test job streams identified by runbook name. * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. * - * @param {object} runbookContent The runbook draft content. - * * @param {object} [options] Optional Parameters. * + * @param {string} [options.filter] The filter to apply on the operation. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - beginCreateOrUpdateWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, runbookName: string, runbookContent: stream.Readable, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listByTestJobWithHttpOperationResponse(automationAccountName: string, runbookName: string, options?: { filter? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Updates the runbook draft with runbookStream as its content. - * - * @param {string} resourceGroupName The resource group name. + * Retrieve a list of test job streams identified by runbook name. * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. * - * @param {object} runbookContent The runbook draft content. - * * @param {object} [options] Optional Parameters. * + * @param {string} [options.filter] The filter to apply on the operation. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -7148,7 +6999,7 @@ export interface RunbookDraftOperations { * * {Promise} A promise is returned. * - * @resolve {null} - The deserialized result object. + * @resolve {JobStreamListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -7156,26 +7007,23 @@ export interface RunbookDraftOperations { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {JobStreamListResult} [result] - The deserialized result object if an error did not occur. + * See {@link JobStreamListResult} 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. */ - beginCreateOrUpdate(resourceGroupName: string, automationAccountName: string, runbookName: string, runbookContent: stream.Readable, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginCreateOrUpdate(resourceGroupName: string, automationAccountName: string, runbookName: string, runbookContent: stream.Readable, callback: ServiceCallback): void; - beginCreateOrUpdate(resourceGroupName: string, automationAccountName: string, runbookName: string, runbookContent: stream.Readable, options: { 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; /** - * Publish runbook draft. - * - * @param {string} resourceGroupName The resource group name. - * - * @param {string} automationAccountName The automation account name. + * Retrieve a list of test job streams identified by runbook name. * - * @param {string} runbookName The parameters supplied to the publish runbook - * operation. + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. * * @param {object} [options] Optional Parameters. * @@ -7184,21 +7032,17 @@ export interface RunbookDraftOperations { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - beginPublishWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, runbookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listByTestJobNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Publish runbook draft. - * - * @param {string} resourceGroupName The resource group name. - * - * @param {string} automationAccountName The automation account name. + * Retrieve a list of test job streams identified by runbook name. * - * @param {string} runbookName The parameters supplied to the publish runbook - * operation. + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. * * @param {object} [options] Optional Parameters. * @@ -7212,7 +7056,7 @@ export interface RunbookDraftOperations { * * {Promise} A promise is returned. * - * @resolve {Runbook} - The deserialized result object. + * @resolve {JobStreamListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -7220,35 +7064,43 @@ export interface RunbookDraftOperations { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {Runbook} [result] - The deserialized result object if an error did not occur. - * See {@link Runbook} for more information. + * {JobStreamListResult} [result] - The deserialized result object if an error did not occur. + * See {@link JobStreamListResult} 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. */ - 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; + listByTestJobNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listByTestJobNext(nextPageLink: string, callback: ServiceCallback): void; + listByTestJobNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; } /** * @class - * RunbookOperations + * TestJobOperations * __NOTE__: An instance of this class is automatically created for an * instance of the AutomationClient. */ -export interface RunbookOperations { +export interface TestJobOperations { /** - * Retrieve the content of runbook identified by runbook name. - * - * @param {string} resourceGroupName The resource group name. + * Create a test job of the runbook. * * @param {string} automationAccountName The automation account name. * - * @param {string} runbookName The runbook name. + * @param {string} runbookName The parameters supplied to the create test job + * operation. + * + * @param {object} parameters The parameters supplied to the create test job + * operation. + * + * @param {object} [parameters.parameters] Gets or sets the parameters of the + * test job. + * + * @param {string} [parameters.runOn] Gets or sets the runOn which specifies + * the group name where the job is to be executed. * * @param {object} [options] Optional Parameters. * @@ -7257,20 +7109,28 @@ export interface RunbookOperations { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - getContentWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, runbookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + createWithHttpOperationResponse(automationAccountName: string, runbookName: string, parameters: models.TestJobCreateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Retrieve the content of runbook identified by runbook name. - * - * @param {string} resourceGroupName The resource group name. + * Create a test job of the runbook. * * @param {string} automationAccountName The automation account name. * - * @param {string} runbookName The runbook name. + * @param {string} runbookName The parameters supplied to the create test job + * operation. + * + * @param {object} parameters The parameters supplied to the create test job + * operation. + * + * @param {object} [parameters.parameters] Gets or sets the parameters of the + * test job. + * + * @param {string} [parameters.runOn] Gets or sets the runOn which specifies + * the group name where the job is to be executed. * * @param {object} [options] Optional Parameters. * @@ -7284,7 +7144,7 @@ export interface RunbookOperations { * * {Promise} A promise is returned. * - * @resolve {Object} - The deserialized result object. + * @resolve {TestJob} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -7292,21 +7152,20 @@ export interface RunbookOperations { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {Object} [result] - The deserialized result object if an error did not occur. + * {TestJob} [result] - The deserialized result object if an error did not occur. + * See {@link TestJob} 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. */ - 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; + 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 runbook identified by runbook name. - * - * @param {string} resourceGroupName The resource group name. + * Retrieve the test job for the specified runbook. * * @param {string} automationAccountName The automation account name. * @@ -7319,16 +7178,14 @@ export interface RunbookOperations { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @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. + * Retrieve the test job for the specified runbook. * * @param {string} automationAccountName The automation account name. * @@ -7346,7 +7203,7 @@ export interface RunbookOperations { * * {Promise} A promise is returned. * - * @resolve {Runbook} - The deserialized result object. + * @resolve {TestJob} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -7354,90 +7211,82 @@ export interface RunbookOperations { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {Runbook} [result] - The deserialized result object if an error did not occur. - * See {@link Runbook} for more information. + * {TestJob} [result] - The deserialized result object if an error did not occur. + * See {@link TestJob} 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. */ - 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. + * Resume the test job. * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. * - * @param {object} parameters The create or update parameters for runbook. - * Provide either content link for a published runbook or draft, not both. - * - * @param {boolean} [parameters.logVerbose] Gets or sets verbose log option. + * @param {object} [options] Optional Parameters. * - * @param {boolean} [parameters.logProgress] Gets or sets progress log option. + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * @param {string} parameters.runbookType Gets or sets the type of the runbook. - * Possible values include: 'Script', 'Graph', 'PowerShellWorkflow', - * 'PowerShell', 'GraphPowerShellWorkflow', 'GraphPowerShell' + * @returns {Promise} A promise is returned * - * @param {object} [parameters.draft] Gets or sets the draft runbook - * properties. + * @resolve {HttpOperationResponse} - The deserialized result object. * - * @param {boolean} [parameters.draft.inEdit] Gets or sets whether runbook is - * in edit mode. + * @reject {Error|ServiceError} - The error object. + */ + resumeWithHttpOperationResponse(automationAccountName: string, runbookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Resume the test job. * - * @param {object} [parameters.draft.draftContentLink] Gets or sets the draft - * runbook content link. + * @param {string} automationAccountName The automation account name. * - * @param {date} [parameters.draft.creationTime] Gets or sets the creation time - * of the runbook draft. + * @param {string} runbookName The runbook name. * - * @param {date} [parameters.draft.lastModifiedTime] Gets or sets the last - * modified time of the runbook draft. + * @param {object} [options] Optional Parameters. * - * @param {object} [parameters.draft.parameters] Gets or sets the runbook draft - * parameters. + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * @param {array} [parameters.draft.outputTypes] Gets or sets the runbook - * output types. + * @param {ServiceCallback} [optionalCallback] - The optional callback. * - * @param {object} [parameters.publishContentLink] Gets or sets the published - * runbook content link. + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. * - * @param {string} [parameters.publishContentLink.uri] Gets or sets the uri of - * the runbook content. + * {Promise} A promise is returned. * - * @param {object} [parameters.publishContentLink.contentHash] Gets or sets the - * hash. + * @resolve {null} - The deserialized result object. * - * @param {string} parameters.publishContentLink.contentHash.algorithm Gets or - * sets the content hash algorithm used to hash the content. + * @reject {Error|ServiceError} - The error object. * - * @param {string} parameters.publishContentLink.contentHash.value Gets or sets - * expected hash value of the content. + * {ServiceCallback} optionalCallback(err, result, request, response) * - * @param {string} [parameters.publishContentLink.version] Gets or sets the - * version of the content. + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * @param {string} [parameters.description] Gets or sets the description of the - * runbook. + * {null} [result] - The deserialized result object if an error did not occur. * - * @param {number} [parameters.logActivityTrace] Gets or sets the - * activity-level tracing options of the runbook. + * {WebResource} [request] - The HTTP Request object if an error did not occur. * - * @param {string} [parameters.name] Gets or sets the name of the resource. + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + resume(automationAccountName: string, runbookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + resume(automationAccountName: string, runbookName: string, callback: ServiceCallback): void; + resume(automationAccountName: string, runbookName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Stop the test job. * - * @param {string} [parameters.location] Gets or sets the location of the - * resource. + * @param {string} automationAccountName The automation account name. * - * @param {object} [parameters.tags] Gets or sets the tags attached to the - * resource. + * @param {string} runbookName The runbook name. * * @param {object} [options] Optional Parameters. * @@ -7450,80 +7299,1411 @@ 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>; + stopWithHttpOperationResponse(automationAccountName: string, runbookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Create the runbook identified by runbook name. - * - * @param {string} resourceGroupName The resource group name. + * Stop the test job. * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. * - * @param {object} parameters The create or update parameters for runbook. - * Provide either content link for a published runbook or draft, not both. + * @param {object} [options] Optional Parameters. * - * @param {boolean} [parameters.logVerbose] Gets or sets verbose log option. + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * @param {boolean} [parameters.logProgress] Gets or sets progress log option. + * @param {ServiceCallback} [optionalCallback] - The optional callback. * - * @param {string} parameters.runbookType Gets or sets the type of the runbook. - * Possible values include: 'Script', 'Graph', 'PowerShellWorkflow', - * 'PowerShell', 'GraphPowerShellWorkflow', 'GraphPowerShell' + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. * - * @param {object} [parameters.draft] Gets or sets the draft runbook - * properties. + * {Promise} A promise is returned. * - * @param {boolean} [parameters.draft.inEdit] Gets or sets whether runbook is - * in edit mode. + * @resolve {null} - The deserialized result object. * - * @param {object} [parameters.draft.draftContentLink] Gets or sets the draft - * runbook content link. + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {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. + */ + 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} automationAccountName The automation account name. + * + * @param {string} runbookName The runbook name. + * + * @param {object} [options] Optional Parameters. + * + * @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. + */ + suspendWithHttpOperationResponse(automationAccountName: string, runbookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Suspend the test job. + * + * @param {string} automationAccountName The automation account name. + * + * @param {string} runbookName The runbook name. + * + * @param {object} [options] Optional Parameters. + * + * @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 {null} - 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. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {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. + */ + 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; +} + +/** + * @class + * ScheduleOperations + * __NOTE__: An instance of this class is automatically created for an + * instance of the AutomationClient. + */ +export interface ScheduleOperations { + + + /** + * Create a schedule. + * + * @param {string} automationAccountName The automation account name. + * + * @param {string} scheduleName The schedule name. + * + * @param {object} parameters The parameters supplied to the create or update + * schedule operation. + * + * @param {string} parameters.name Gets or sets the name of the schedule. + * + * @param {string} [parameters.description] Gets or sets the description of the + * schedule. + * + * @param {date} parameters.startTime Gets or sets the start time of the + * schedule. + * + * @param {date} [parameters.expiryTime] Gets or sets the end time of the + * schedule. + * + * @param {object} [parameters.interval] Gets or sets the interval of the + * schedule. + * + * @param {string} parameters.frequency Possible values include: 'OneTime', + * 'Day', 'Hour', 'Week', 'Month' + * + * @param {string} [parameters.timeZone] Gets or sets the time zone of the + * schedule. + * + * @param {object} [parameters.advancedSchedule] Gets or sets the + * AdvancedSchedule. + * + * @param {array} [parameters.advancedSchedule.weekDays] Days of the week that + * the job should execute on. + * + * @param {array} [parameters.advancedSchedule.monthDays] Days of the month + * that the job should execute on. Must be between 1 and 31. + * + * @param {array} [parameters.advancedSchedule.monthlyOccurrences] Occurrences + * of days within a month. + * + * @param {object} [options] Optional Parameters. + * + * @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. + */ + createOrUpdateWithHttpOperationResponse(automationAccountName: string, scheduleName: string, parameters: models.ScheduleCreateOrUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Create a schedule. + * + * @param {string} automationAccountName The automation account name. + * + * @param {string} scheduleName The schedule name. + * + * @param {object} parameters The parameters supplied to the create or update + * schedule operation. + * + * @param {string} parameters.name Gets or sets the name of the schedule. + * + * @param {string} [parameters.description] Gets or sets the description of the + * schedule. + * + * @param {date} parameters.startTime Gets or sets the start time of the + * schedule. + * + * @param {date} [parameters.expiryTime] Gets or sets the end time of the + * schedule. + * + * @param {object} [parameters.interval] Gets or sets the interval of the + * schedule. + * + * @param {string} parameters.frequency Possible values include: 'OneTime', + * 'Day', 'Hour', 'Week', 'Month' + * + * @param {string} [parameters.timeZone] Gets or sets the time zone of the + * schedule. + * + * @param {object} [parameters.advancedSchedule] Gets or sets the + * AdvancedSchedule. + * + * @param {array} [parameters.advancedSchedule.weekDays] Days of the week that + * the job should execute on. + * + * @param {array} [parameters.advancedSchedule.monthDays] Days of the month + * that the job should execute on. Must be between 1 and 31. + * + * @param {array} [parameters.advancedSchedule.monthlyOccurrences] Occurrences + * of days within a month. + * + * @param {object} [options] Optional Parameters. + * + * @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 {Schedule} - 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. + * + * {Schedule} [result] - The deserialized result object if an error did not occur. + * See {@link Schedule} 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. + */ + 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} automationAccountName The automation account name. + * + * @param {string} scheduleName The schedule name. + * + * @param {object} parameters The parameters supplied to the update schedule + * operation. + * + * @param {string} [parameters.name] Gets or sets the name of the schedule. + * + * @param {string} [parameters.description] Gets or sets the description of the + * schedule. + * + * @param {boolean} [parameters.isEnabled] Gets or sets a value indicating + * whether this schedule is enabled. + * + * @param {object} [options] Optional Parameters. + * + * @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, scheduleName: string, parameters: models.ScheduleUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Update the schedule identified by schedule name. + * + * @param {string} automationAccountName The automation account name. + * + * @param {string} scheduleName The schedule name. + * + * @param {object} parameters The parameters supplied to the update schedule + * operation. + * + * @param {string} [parameters.name] Gets or sets the name of the schedule. + * + * @param {string} [parameters.description] Gets or sets the description of the + * schedule. + * + * @param {boolean} [parameters.isEnabled] Gets or sets a value indicating + * whether this schedule is enabled. + * + * @param {object} [options] Optional Parameters. + * + * @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 {Schedule} - 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. + * + * {Schedule} [result] - The deserialized result object if an error did not occur. + * See {@link Schedule} 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, 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} automationAccountName The automation account name. + * + * @param {string} scheduleName The schedule name. + * + * @param {object} [options] Optional Parameters. + * + * @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. + */ + getWithHttpOperationResponse(automationAccountName: string, scheduleName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Retrieve the schedule identified by schedule name. + * + * @param {string} automationAccountName The automation account name. + * + * @param {string} scheduleName The schedule name. + * + * @param {object} [options] Optional Parameters. + * + * @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 {Schedule} - 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. + * + * {Schedule} [result] - The deserialized result object if an error did not occur. + * See {@link Schedule} 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. + */ + 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} automationAccountName The automation account name. + * + * @param {string} scheduleName The schedule name. + * + * @param {object} [options] Optional Parameters. + * + * @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. + */ + deleteMethodWithHttpOperationResponse(automationAccountName: string, scheduleName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Delete the schedule identified by schedule name. + * + * @param {string} automationAccountName The automation account name. + * + * @param {string} scheduleName The schedule name. + * + * @param {object} [options] Optional Parameters. + * + * @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 {null} - 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. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {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. + */ + 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} automationAccountName The automation account name. + * + * @param {object} [options] Optional Parameters. + * + * @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. + */ + listByAutomationAccountWithHttpOperationResponse(automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Retrieve a list of schedules. + * + * @param {string} automationAccountName The automation account name. + * + * @param {object} [options] Optional Parameters. + * + * @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 {ScheduleListResult} - 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. + * + * {ScheduleListResult} [result] - The deserialized result object if an error did not occur. + * See {@link ScheduleListResult} 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. + */ + 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; + + + /** + * Retrieve a list of schedules. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @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. + */ + listByAutomationAccountNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Retrieve a list of schedules. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @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 {ScheduleListResult} - 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. + * + * {ScheduleListResult} [result] - The deserialized result object if an error did not occur. + * See {@link ScheduleListResult} 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. + */ + listByAutomationAccountNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listByAutomationAccountNext(nextPageLink: string, callback: ServiceCallback): void; + listByAutomationAccountNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; +} + +/** + * @class + * VariableOperations + * __NOTE__: An instance of this class is automatically created for an + * instance of the AutomationClient. + */ +export interface VariableOperations { + + + /** + * Create a variable. + * + * @param {string} automationAccountName The automation account name. + * + * @param {string} variableName The variable name. + * + * @param {object} parameters The parameters supplied to the create or update + * variable operation. + * + * @param {string} parameters.name Gets or sets the name of the variable. + * + * @param {string} [parameters.value] Gets or sets the value of the variable. + * + * @param {string} [parameters.description] Gets or sets the description of the + * variable. + * + * @param {boolean} [parameters.isEncrypted] Gets or sets the encrypted flag of + * the variable. + * + * @param {object} [options] Optional Parameters. + * + * @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. + */ + createOrUpdateWithHttpOperationResponse(automationAccountName: string, variableName: string, parameters: models.VariableCreateOrUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Create a variable. + * + * @param {string} automationAccountName The automation account name. + * + * @param {string} variableName The variable name. + * + * @param {object} parameters The parameters supplied to the create or update + * variable operation. + * + * @param {string} parameters.name Gets or sets the name of the variable. + * + * @param {string} [parameters.value] Gets or sets the value of the variable. + * + * @param {string} [parameters.description] Gets or sets the description of the + * variable. + * + * @param {boolean} [parameters.isEncrypted] Gets or sets the encrypted flag of + * the variable. + * + * @param {object} [options] Optional Parameters. + * + * @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 {Variable} - 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. + * + * {Variable} [result] - The deserialized result object if an error did not occur. + * See {@link Variable} 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. + */ + 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} automationAccountName The automation account name. + * + * @param {string} variableName The variable name. + * + * @param {object} parameters The parameters supplied to the update variable + * operation. + * + * @param {string} [parameters.name] Gets or sets the name of the variable. + * + * @param {string} [parameters.value] Gets or sets the value of the variable. + * + * @param {string} [parameters.description] Gets or sets the description of the + * variable. + * + * @param {object} [options] Optional Parameters. + * + * @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, variableName: string, parameters: models.VariableUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Update a variable. + * + * @param {string} automationAccountName The automation account name. + * + * @param {string} variableName The variable name. + * + * @param {object} parameters The parameters supplied to the update variable + * operation. + * + * @param {string} [parameters.name] Gets or sets the name of the variable. + * + * @param {string} [parameters.value] Gets or sets the value of the variable. + * + * @param {string} [parameters.description] Gets or sets the description of the + * variable. + * + * @param {object} [options] Optional Parameters. + * + * @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 {Variable} - 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. + * + * {Variable} [result] - The deserialized result object if an error did not occur. + * See {@link Variable} 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, 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} automationAccountName The automation account name. + * + * @param {string} variableName The name of variable. + * + * @param {object} [options] Optional Parameters. + * + * @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. + */ + deleteMethodWithHttpOperationResponse(automationAccountName: string, variableName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Delete the variable. + * + * @param {string} automationAccountName The automation account name. + * + * @param {string} variableName The name of variable. + * + * @param {object} [options] Optional Parameters. + * + * @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 {null} - 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. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {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. + */ + 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} automationAccountName The automation account name. + * + * @param {string} variableName The name of variable. + * + * @param {object} [options] Optional Parameters. + * + * @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. + */ + getWithHttpOperationResponse(automationAccountName: string, variableName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Retrieve the variable identified by variable name. + * + * @param {string} automationAccountName The automation account name. + * + * @param {string} variableName The name of variable. + * + * @param {object} [options] Optional Parameters. + * + * @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 {Variable} - 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. + * + * {Variable} [result] - The deserialized result object if an error did not occur. + * See {@link Variable} 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. + */ + 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} automationAccountName The automation account name. + * + * @param {object} [options] Optional Parameters. + * + * @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. + */ + listByAutomationAccountWithHttpOperationResponse(automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Retrieve a list of variables. + * + * @param {string} automationAccountName The automation account name. + * + * @param {object} [options] Optional Parameters. + * + * @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 {VariableListResult} - 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. + * + * {VariableListResult} [result] - The deserialized result object if an error did not occur. + * See {@link VariableListResult} 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. + */ + 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; + + + /** + * Retrieve a list of variables. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @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. + */ + listByAutomationAccountNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Retrieve a list of variables. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @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 {VariableListResult} - 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. + * + * {VariableListResult} [result] - The deserialized result object if an error did not occur. + * See {@link VariableListResult} 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. + */ + listByAutomationAccountNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listByAutomationAccountNext(nextPageLink: string, callback: ServiceCallback): void; + listByAutomationAccountNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; +} + +/** + * @class + * WebhookOperations + * __NOTE__: An instance of this class is automatically created for an + * instance of the AutomationClient. + */ +export interface WebhookOperations { + + + /** + * Generates a Uri for use in creating a webhook. + * + * @param {string} automationAccountName The automation account name. + * + * @param {object} [options] Optional Parameters. + * + * @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. + */ + generateUriWithHttpOperationResponse(automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Generates a Uri for use in creating a webhook. + * + * @param {string} automationAccountName The automation account name. + * + * @param {object} [options] Optional Parameters. + * + * @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 {String} - 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. + * + * {String} [result] - The deserialized result object if an error did not occur. + * + * {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. + */ + 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} automationAccountName The automation account name. + * + * @param {string} webhookName The webhook name. + * + * @param {object} [options] Optional Parameters. + * + * @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. + */ + deleteMethodWithHttpOperationResponse(automationAccountName: string, webhookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Delete the webhook by name. + * + * @param {string} automationAccountName The automation account name. + * + * @param {string} webhookName The webhook name. + * + * @param {object} [options] Optional Parameters. + * + * @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 {null} - 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. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {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. + */ + 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} automationAccountName The automation account name. + * + * @param {string} webhookName The webhook name. + * + * @param {object} [options] Optional Parameters. + * + * @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. + */ + getWithHttpOperationResponse(automationAccountName: string, webhookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Retrieve the webhook identified by webhook name. + * + * @param {string} automationAccountName The automation account name. + * + * @param {string} webhookName The webhook name. + * + * @param {object} [options] Optional Parameters. + * + * @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 {Webhook} - 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. + * + * {Webhook} [result] - The deserialized result object if an error did not occur. + * See {@link Webhook} 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. + */ + 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} automationAccountName The automation account name. + * + * @param {string} webhookName The webhook name. * - * @param {date} [parameters.draft.creationTime] Gets or sets the creation time - * of the runbook draft. + * @param {object} parameters The create or update parameters for webhook. * - * @param {date} [parameters.draft.lastModifiedTime] Gets or sets the last - * modified time of the runbook draft. + * @param {string} parameters.name Gets or sets the name of the webhook. * - * @param {object} [parameters.draft.parameters] Gets or sets the runbook draft - * parameters. + * @param {boolean} [parameters.isEnabled] Gets or sets the value of the + * enabled flag of webhook. * - * @param {array} [parameters.draft.outputTypes] Gets or sets the runbook - * output types. + * @param {string} [parameters.uri] Gets or sets the uri. * - * @param {object} [parameters.publishContentLink] Gets or sets the published - * runbook content link. + * @param {date} [parameters.expiryTime] Gets or sets the expiry time. * - * @param {string} [parameters.publishContentLink.uri] Gets or sets the uri of - * the runbook content. + * @param {object} [parameters.parameters] Gets or sets the parameters of the + * job. * - * @param {object} [parameters.publishContentLink.contentHash] Gets or sets the - * hash. + * @param {object} [parameters.runbook] Gets or sets the runbook. * - * @param {string} parameters.publishContentLink.contentHash.algorithm Gets or - * sets the content hash algorithm used to hash the content. + * @param {string} [parameters.runbook.name] Gets or sets the name of the + * runbook. * - * @param {string} parameters.publishContentLink.contentHash.value Gets or sets - * expected hash value of the content. + * @param {string} [parameters.runOn] Gets or sets the name of the hybrid + * worker group the webhook job will run on. * - * @param {string} [parameters.publishContentLink.version] Gets or sets the - * version of the content. + * @param {object} [options] Optional Parameters. * - * @param {string} [parameters.description] Gets or sets the description of the + * @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. + */ + createOrUpdateWithHttpOperationResponse(automationAccountName: string, webhookName: string, parameters: models.WebhookCreateOrUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Create the webhook identified by webhook name. + * + * @param {string} automationAccountName The automation account name. + * + * @param {string} webhookName The webhook name. + * + * @param {object} parameters The create or update parameters for webhook. + * + * @param {string} parameters.name Gets or sets the name of the webhook. + * + * @param {boolean} [parameters.isEnabled] Gets or sets the value of the + * enabled flag of webhook. + * + * @param {string} [parameters.uri] Gets or sets the uri. + * + * @param {date} [parameters.expiryTime] Gets or sets the expiry time. + * + * @param {object} [parameters.parameters] Gets or sets the parameters of the + * job. + * + * @param {object} [parameters.runbook] Gets or sets the runbook. + * + * @param {string} [parameters.runbook.name] Gets or sets the name of the * runbook. * - * @param {number} [parameters.logActivityTrace] Gets or sets the - * activity-level tracing options of the runbook. + * @param {string} [parameters.runOn] Gets or sets the name of the hybrid + * worker group the webhook job will run on. * - * @param {string} [parameters.name] Gets or sets the name of the resource. + * @param {object} [options] Optional Parameters. + * + * @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 {Webhook} - 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. + * + * {Webhook} [result] - The deserialized result object if an error did not occur. + * See {@link Webhook} 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. + */ + 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} automationAccountName The automation account name. + * + * @param {string} webhookName The webhook name. + * + * @param {object} parameters The update parameters for webhook. + * + * @param {string} [parameters.name] Gets or sets the name of the webhook. + * + * @param {boolean} [parameters.isEnabled] Gets or sets the value of the + * enabled flag of webhook. + * + * @param {string} [parameters.runOn] Gets or sets the name of the hybrid + * worker group the webhook job will run on. + * + * @param {object} [parameters.parameters] Gets or sets the parameters of the + * job. + * + * @param {string} [parameters.description] Gets or sets the description of the + * webhook. + * + * @param {object} [options] Optional Parameters. + * + * @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, webhookName: string, parameters: models.WebhookUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Update the webhook identified by webhook name. + * + * @param {string} automationAccountName The automation account name. + * + * @param {string} webhookName The webhook name. + * + * @param {object} parameters The update parameters for webhook. + * + * @param {string} [parameters.name] Gets or sets the name of the webhook. + * + * @param {boolean} [parameters.isEnabled] Gets or sets the value of the + * enabled flag of webhook. + * + * @param {string} [parameters.runOn] Gets or sets the name of the hybrid + * worker group the webhook job will run on. + * + * @param {object} [parameters.parameters] Gets or sets the parameters of the + * job. + * + * @param {string} [parameters.description] Gets or sets the description of the + * webhook. + * + * @param {object} [options] Optional Parameters. + * + * @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 {Webhook} - 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. + * + * {Webhook} [result] - The deserialized result object if an error did not occur. + * See {@link Webhook} 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, 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} automationAccountName The automation account name. + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.filter] The filter to apply on the operation. + * + * @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. + */ + listByAutomationAccountWithHttpOperationResponse(automationAccountName: string, options?: { filter? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Retrieve a list of webhooks. + * + * @param {string} automationAccountName The automation account name. + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.filter] The filter to apply on the operation. + * + * @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 {WebhookListResult} - 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. + * + * {WebhookListResult} [result] - The deserialized result object if an error did not occur. + * See {@link WebhookListResult} 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. + */ + 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 a list of webhooks. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. * - * @param {string} [parameters.location] Gets or sets the location of the - * resource. + * @reject {Error|ServiceError} - The error object. + */ + listByAutomationAccountNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Retrieve a list of webhooks. * - * @param {object} [parameters.tags] Gets or sets the tags attached to the - * resource. + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. * * @param {object} [options] Optional Parameters. * @@ -7537,7 +8717,7 @@ export interface RunbookOperations { * * {Promise} A promise is returned. * - * @resolve {null} - The deserialized result object. + * @resolve {WebhookListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -7545,45 +8725,136 @@ export interface RunbookOperations { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {WebhookListResult} [result] - The deserialized result object if an error did not occur. + * See {@link WebhookListResult} 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. */ - 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; + listByAutomationAccountNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listByAutomationAccountNext(nextPageLink: string, callback: ServiceCallback): void; + listByAutomationAccountNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; +} + +/** + * @class + * SoftwareUpdateConfigurations + * __NOTE__: An instance of this class is automatically created for an + * instance of the AutomationClient. + */ +export interface SoftwareUpdateConfigurations { /** - * Update the runbook identified by runbook name. + * Create a new software update configuration with the name given in the URI. * - * @param {string} resourceGroupName The resource group name. + * @param {string} softwareUpdateConfigurationName The name of the software + * update configuration to be created. * - * @param {string} automationAccountName The automation account name. + * @param {object} parameters Request body. * - * @param {string} runbookName The runbook name. + * @param {object} parameters.updateConfiguration update specific properties + * for the Software update configuration * - * @param {object} parameters The update parameters for runbook. + * @param {string} parameters.updateConfiguration.operatingSystem operating + * system of target machines. Possible values include: 'Windows', 'Linux' * - * @param {string} [parameters.description] Gets or sets the description of the - * runbook. + * @param {object} [parameters.updateConfiguration.windows] Windows specific + * update configuration. * - * @param {boolean} [parameters.logVerbose] Gets or sets verbose log option. + * @param {string} + * [parameters.updateConfiguration.windows.includedUpdateClassifications] + * Update classification included in the software update configuration. A comma + * separated string with required values. Possible values include: + * 'Unclassified', 'Critical', 'Security', 'UpdateRollup', 'FeaturePack', + * 'ServicePack', 'Definition', 'Tools', 'Updates' * - * @param {boolean} [parameters.logProgress] Gets or sets progress log option. + * @param {array} [parameters.updateConfiguration.windows.excludedKbNumbers] KB + * numbers excluded from the software update configuration. * - * @param {number} [parameters.logActivityTrace] Gets or sets the - * activity-level tracing options of the runbook. + * @param {object} [parameters.updateConfiguration.linux] Linux specific update + * configuration. * - * @param {string} [parameters.name] Gets or sets the name of the resource. + * @param {string} + * [parameters.updateConfiguration.linux.includedPackageClassifications] Update + * classifications included in the software update configuration. Possible + * values include: 'Unclassified', 'Critical', 'Security', 'Other' * - * @param {string} [parameters.location] Gets or sets the location of the - * resource. + * @param {array} + * [parameters.updateConfiguration.linux.excludedPackageNameMasks] packages + * excluded from the software update configuration. * - * @param {object} [parameters.tags] Gets or sets the tags attached to the - * resource. + * @param {moment.duration} [parameters.updateConfiguration.duration] Maximum + * time allowed for the software update configuration run. Duration needs to be + * specified using the format PT[n]H[n]M[n]S as per ISO8601 + * + * @param {array} [parameters.updateConfiguration.azureVirtualMachines] List of + * azure resource Ids for azure virtual machines targeted by the software + * update configuration. + * + * @param {array} [parameters.updateConfiguration.nonAzureComputerNames] List + * of names of non-azure machines targeted by the software update + * configuration. + * + * @param {object} parameters.scheduleInfo Schedule information for the + * Software update configuration + * + * @param {date} [parameters.scheduleInfo.startTime] Gets or sets the start + * time of the schedule. + * + * @param {date} [parameters.scheduleInfo.expiryTime] Gets or sets the end time + * of the schedule. + * + * @param {number} [parameters.scheduleInfo.expiryTimeOffsetMinutes] Gets or + * sets the expiry time's offset in minutes. + * + * @param {boolean} [parameters.scheduleInfo.isEnabled] Gets or sets a value + * indicating whether this schedule is enabled. + * + * @param {date} [parameters.scheduleInfo.nextRun] Gets or sets the next run + * time of the schedule. + * + * @param {number} [parameters.scheduleInfo.nextRunOffsetMinutes] Gets or sets + * the next run time's offset in minutes. + * + * @param {object} [parameters.scheduleInfo.interval] Gets or sets the interval + * of the schedule. + * + * @param {string} [parameters.scheduleInfo.frequency] Gets or sets the + * frequency of the schedule. Possible values include: 'OneTime', 'Day', + * 'Hour', 'Week', 'Month' + * + * @param {string} [parameters.scheduleInfo.timeZone] Gets or sets the time + * zone of the schedule. + * + * @param {object} [parameters.scheduleInfo.advancedSchedule] Gets or sets the + * advanced schedule. + * + * @param {array} [parameters.scheduleInfo.advancedSchedule.weekDays] Days of + * the week that the job should execute on. + * + * @param {array} [parameters.scheduleInfo.advancedSchedule.monthDays] Days of + * the month that the job should execute on. Must be between 1 and 31. + * + * @param {array} [parameters.scheduleInfo.advancedSchedule.monthlyOccurrences] + * Occurrences of days within a month. + * + * @param {date} [parameters.scheduleInfo.creationTime] Gets or sets the + * creation time. + * + * @param {date} [parameters.scheduleInfo.lastModifiedTime] Gets or sets the + * last modified time. + * + * @param {string} [parameters.scheduleInfo.description] Gets or sets the + * description. + * + * @param {object} [parameters.error] detailes of provisioning error + * + * @param {string} [parameters.error.code] Error code + * + * @param {string} [parameters.error.message] Error message indicating why the + * operation failed. * * @param {object} [options] Optional Parameters. * @@ -7592,103 +8863,121 @@ export interface RunbookOperations { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - updateWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, runbookName: string, parameters: models.RunbookUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + createWithHttpOperationResponse(softwareUpdateConfigurationName: string, parameters: models.SoftwareUpdateConfiguration, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Update the runbook identified by runbook name. - * - * @param {string} resourceGroupName The resource group name. + * Create a new software update configuration with the name given in the URI. * - * @param {string} automationAccountName The automation account name. + * @param {string} softwareUpdateConfigurationName The name of the software + * update configuration to be created. * - * @param {string} runbookName The runbook name. + * @param {object} parameters Request body. * - * @param {object} parameters The update parameters for runbook. + * @param {object} parameters.updateConfiguration update specific properties + * for the Software update configuration * - * @param {string} [parameters.description] Gets or sets the description of the - * runbook. + * @param {string} parameters.updateConfiguration.operatingSystem operating + * system of target machines. Possible values include: 'Windows', 'Linux' * - * @param {boolean} [parameters.logVerbose] Gets or sets verbose log option. + * @param {object} [parameters.updateConfiguration.windows] Windows specific + * update configuration. * - * @param {boolean} [parameters.logProgress] Gets or sets progress log option. + * @param {string} + * [parameters.updateConfiguration.windows.includedUpdateClassifications] + * Update classification included in the software update configuration. A comma + * separated string with required values. Possible values include: + * 'Unclassified', 'Critical', 'Security', 'UpdateRollup', 'FeaturePack', + * 'ServicePack', 'Definition', 'Tools', 'Updates' * - * @param {number} [parameters.logActivityTrace] Gets or sets the - * activity-level tracing options of the runbook. + * @param {array} [parameters.updateConfiguration.windows.excludedKbNumbers] KB + * numbers excluded from the software update configuration. * - * @param {string} [parameters.name] Gets or sets the name of the resource. + * @param {object} [parameters.updateConfiguration.linux] Linux specific update + * configuration. * - * @param {string} [parameters.location] Gets or sets the location of the - * resource. + * @param {string} + * [parameters.updateConfiguration.linux.includedPackageClassifications] Update + * classifications included in the software update configuration. Possible + * values include: 'Unclassified', 'Critical', 'Security', 'Other' * - * @param {object} [parameters.tags] Gets or sets the tags attached to the - * resource. + * @param {array} + * [parameters.updateConfiguration.linux.excludedPackageNameMasks] packages + * excluded from the software update configuration. * - * @param {object} [options] Optional Parameters. + * @param {moment.duration} [parameters.updateConfiguration.duration] Maximum + * time allowed for the software update configuration run. Duration needs to be + * specified using the format PT[n]H[n]M[n]S as per ISO8601 * - * @param {object} [options.customHeaders] Headers that will be added to the - * request + * @param {array} [parameters.updateConfiguration.azureVirtualMachines] List of + * azure resource Ids for azure virtual machines targeted by the software + * update configuration. * - * @param {ServiceCallback} [optionalCallback] - The optional callback. + * @param {array} [parameters.updateConfiguration.nonAzureComputerNames] List + * of names of non-azure machines targeted by the software update + * configuration. * - * @returns {ServiceCallback|Promise} If a callback was passed as the last - * parameter then it returns the callback else returns a Promise. + * @param {object} parameters.scheduleInfo Schedule information for the + * Software update configuration * - * {Promise} A promise is returned. + * @param {date} [parameters.scheduleInfo.startTime] Gets or sets the start + * time of the schedule. * - * @resolve {Runbook} - The deserialized result object. + * @param {date} [parameters.scheduleInfo.expiryTime] Gets or sets the end time + * of the schedule. * - * @reject {Error|ServiceError} - The error object. + * @param {number} [parameters.scheduleInfo.expiryTimeOffsetMinutes] Gets or + * sets the expiry time's offset in minutes. * - * {ServiceCallback} optionalCallback(err, result, request, response) + * @param {boolean} [parameters.scheduleInfo.isEnabled] Gets or sets a value + * indicating whether this schedule is enabled. * - * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * @param {date} [parameters.scheduleInfo.nextRun] Gets or sets the next run + * time of the schedule. * - * {Runbook} [result] - The deserialized result object if an error did not occur. - * See {@link Runbook} for more information. + * @param {number} [parameters.scheduleInfo.nextRunOffsetMinutes] Gets or sets + * the next run time's offset in minutes. * - * {WebResource} [request] - The HTTP Request object if an error did not occur. + * @param {object} [parameters.scheduleInfo.interval] Gets or sets the interval + * of the schedule. * - * {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; - - - /** - * Delete the runbook by name. + * @param {string} [parameters.scheduleInfo.frequency] Gets or sets the + * frequency of the schedule. Possible values include: 'OneTime', 'Day', + * 'Hour', 'Week', 'Month' * - * @param {string} resourceGroupName The resource group name. + * @param {string} [parameters.scheduleInfo.timeZone] Gets or sets the time + * zone of the schedule. * - * @param {string} automationAccountName The automation account name. + * @param {object} [parameters.scheduleInfo.advancedSchedule] Gets or sets the + * advanced schedule. * - * @param {string} runbookName The runbook name. + * @param {array} [parameters.scheduleInfo.advancedSchedule.weekDays] Days of + * the week that the job should execute on. * - * @param {object} [options] Optional Parameters. + * @param {array} [parameters.scheduleInfo.advancedSchedule.monthDays] Days of + * the month that the job should execute on. Must be between 1 and 31. * - * @param {object} [options.customHeaders] Headers that will be added to the - * request + * @param {array} [parameters.scheduleInfo.advancedSchedule.monthlyOccurrences] + * Occurrences of days within a month. * - * @returns {Promise} A promise is returned + * @param {date} [parameters.scheduleInfo.creationTime] Gets or sets the + * creation time. * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @param {date} [parameters.scheduleInfo.lastModifiedTime] Gets or sets the + * last modified time. * - * @reject {Error|ServiceError} - The error object. - */ - deleteMethodWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, runbookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; - - /** - * Delete the runbook by name. + * @param {string} [parameters.scheduleInfo.description] Gets or sets the + * description. * - * @param {string} resourceGroupName The resource group name. + * @param {object} [parameters.error] detailes of provisioning error * - * @param {string} automationAccountName The automation account name. + * @param {string} [parameters.error.code] Error code * - * @param {string} runbookName The runbook name. + * @param {string} [parameters.error.message] Error message indicating why the + * operation failed. * * @param {object} [options] Optional Parameters. * @@ -7702,7 +8991,7 @@ export interface RunbookOperations { * * {Promise} A promise is returned. * - * @resolve {null} - The deserialized result object. + * @resolve {SoftwareUpdateConfiguration} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -7710,23 +8999,24 @@ export interface RunbookOperations { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {SoftwareUpdateConfiguration} [result] - The deserialized result object if an error did not occur. + * See {@link SoftwareUpdateConfiguration} 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. */ - 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; + 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; /** - * Retrieve a list of runbooks. + * Get a single software update configuration by name. * - * @param {string} resourceGroupName The resource group name. - * - * @param {string} automationAccountName The automation account name. + * @param {string} softwareUpdateConfigurationName The name of the software + * update configuration to be created. * * @param {object} [options] Optional Parameters. * @@ -7735,18 +9025,17 @@ export interface RunbookOperations { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listByAutomationAccountWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getByNameWithHttpOperationResponse(softwareUpdateConfigurationName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Retrieve a list of runbooks. - * - * @param {string} resourceGroupName The resource group name. + * Get a single software update configuration by name. * - * @param {string} automationAccountName The automation account name. + * @param {string} softwareUpdateConfigurationName The name of the software + * update configuration to be created. * * @param {object} [options] Optional Parameters. * @@ -7760,7 +9049,7 @@ export interface RunbookOperations { * * {Promise} A promise is returned. * - * @resolve {RunbookListResult} - The deserialized result object. + * @resolve {SoftwareUpdateConfiguration} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -7768,23 +9057,24 @@ export interface RunbookOperations { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {RunbookListResult} [result] - The deserialized result object if an error did not occur. - * See {@link RunbookListResult} for more information. + * {SoftwareUpdateConfiguration} [result] - The deserialized result object if an error did not occur. + * See {@link SoftwareUpdateConfiguration} 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. */ - 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; + 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; /** - * Retrieve a list of runbooks. + * delete a specific software update configuration. * - * @param {string} nextPageLink The NextLink from the previous successful call - * to List operation. + * @param {string} softwareUpdateConfigurationName The name of the software + * update configuration to be created. * * @param {object} [options] Optional Parameters. * @@ -7793,17 +9083,17 @@ export interface RunbookOperations { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listByAutomationAccountNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + deleteMethodWithHttpOperationResponse(softwareUpdateConfigurationName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Retrieve a list of runbooks. + * delete a specific software update configuration. * - * @param {string} nextPageLink The NextLink from the previous successful call - * to List operation. + * @param {string} softwareUpdateConfigurationName The name of the software + * update configuration to be created. * * @param {object} [options] Optional Parameters. * @@ -7817,7 +9107,7 @@ export interface RunbookOperations { * * {Promise} A promise is returned. * - * @resolve {RunbookListResult} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -7825,64 +9115,42 @@ export interface RunbookOperations { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {RunbookListResult} [result] - The deserialized result object if an error did not occur. - * See {@link RunbookListResult} for more information. + * {null} [result] - The deserialized result object if an error did not occur. * * {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. */ - listByAutomationAccountNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listByAutomationAccountNext(nextPageLink: string, callback: ServiceCallback): void; - listByAutomationAccountNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; -} - -/** - * @class - * TestJobStreams - * __NOTE__: An instance of this class is automatically created for an - * instance of the AutomationClient. - */ -export interface TestJobStreams { + 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; /** - * Retrieve a test job streams 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. - * - * @param {string} jobStreamId The job stream id. + * Get all software update configurations for the account. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.filter] The filter to apply on the operation. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - getWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, runbookName: string, jobStreamId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listWithHttpOperationResponse(options?: { filter? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Retrieve a test job streams 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. - * - * @param {string} jobStreamId The job stream id. + * Get all software update configurations for the account. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.filter] The filter to apply on the operation. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -7893,7 +9161,7 @@ export interface TestJobStreams { * * {Promise} A promise is returned. * - * @resolve {JobStream} - The deserialized result object. + * @resolve {SoftwareUpdateConfigurationListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -7901,55 +9169,55 @@ export interface TestJobStreams { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {JobStream} [result] - The deserialized result object if an error did not occur. - * See {@link JobStream} for more information. + * {SoftwareUpdateConfigurationListResult} [result] - The deserialized result object if an error did not occur. + * See {@link SoftwareUpdateConfigurationListResult} 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. */ - 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; + list(options?: { filter? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + list(callback: ServiceCallback): void; + list(options: { filter? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; +} + +/** + * @class + * SoftwareUpdateConfigurationRuns + * __NOTE__: An instance of this class is automatically created for an + * instance of the AutomationClient. + */ +export interface SoftwareUpdateConfigurationRuns { /** - * 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. + * Get a single software update configuration Run by Id. * - * @param {string} runbookName The runbook name. + * @param {uuid} softwareUpdateConfigurationRunId The Id of the software update + * configuration run. * * @param {object} [options] Optional Parameters. * - * @param {string} [options.filter] The filter to apply on the operation. - * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listByTestJobWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, runbookName: string, options?: { filter? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; + getByIdWithHttpOperationResponse(softwareUpdateConfigurationRunId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Retrieve a list of test job streams identified by runbook name. + * Get a single software update configuration Run by Id. * - * @param {string} resourceGroupName The resource group name. - * - * @param {string} automationAccountName The automation account name. - * - * @param {string} runbookName The runbook name. + * @param {uuid} softwareUpdateConfigurationRunId The Id of the software update + * configuration run. * * @param {object} [options] Optional Parameters. * - * @param {string} [options.filter] The filter to apply on the operation. - * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -7960,7 +9228,7 @@ export interface TestJobStreams { * * {Promise} A promise is returned. * - * @resolve {JobStreamListResult} - The deserialized result object. + * @resolve {SoftwareUpdateConfigurationRun} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -7968,45 +9236,60 @@ export interface TestJobStreams { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {JobStreamListResult} [result] - The deserialized result object if an error did not occur. - * See {@link JobStreamListResult} for more information. + * {SoftwareUpdateConfigurationRun} [result] - The deserialized result object if an error did not occur. + * See {@link SoftwareUpdateConfigurationRun} 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. */ - 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; + 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; /** - * Retrieve a list of test job streams identified by runbook name. - * - * @param {string} nextPageLink The NextLink from the previous successful call - * to List operation. + * Return list of software update configuration runs * * @param {object} [options] Optional Parameters. * + * @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' + * + * @param {string} [options.skip] number of entries you skip before returning + * results + * + * @param {string} [options.top] Maximum number of entries returned in the + * results collection + * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listByTestJobNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listWithHttpOperationResponse(options?: { filter? : string, skip? : string, top? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Retrieve a list of test job streams identified by runbook name. - * - * @param {string} nextPageLink The NextLink from the previous successful call - * to List operation. + * Return list of software update configuration runs * * @param {object} [options] Optional Parameters. * + * @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' + * + * @param {string} [options.skip] number of entries you skip before returning + * results + * + * @param {string} [options.top] Maximum number of entries returned in the + * results collection + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -8017,7 +9300,7 @@ export interface TestJobStreams { * * {Promise} A promise is returned. * - * @resolve {JobStreamListResult} - The deserialized result object. + * @resolve {SoftwareUpdateConfigurationRunListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -8025,47 +9308,33 @@ export interface TestJobStreams { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {JobStreamListResult} [result] - The deserialized result object if an error did not occur. - * See {@link JobStreamListResult} for more information. + * {SoftwareUpdateConfigurationRunListResult} [result] - The deserialized result object if an error did not occur. + * See {@link SoftwareUpdateConfigurationRunListResult} + * 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. */ - listByTestJobNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listByTestJobNext(nextPageLink: string, callback: ServiceCallback): void; - listByTestJobNext(nextPageLink: string, options: { 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; } /** * @class - * TestJobs + * SoftwareUpdateConfigurationMachineRuns * __NOTE__: An instance of this class is automatically created for an * instance of the AutomationClient. */ -export interface TestJobs { +export interface SoftwareUpdateConfigurationMachineRuns { /** - * 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 - * operation. - * - * @param {object} parameters The parameters supplied to the create test job - * operation. - * - * @param {string} parameters.runbookName Gets or sets the runbook name. - * - * @param {object} [parameters.parameters] Gets or sets the parameters of the - * test job. + * Get a single software update configuration machine run by Id. * - * @param {string} [parameters.runOn] Gets or sets the runOn which specifies - * the group name where the job is to be executed. + * @param {uuid} softwareUpdateConfigurationMachineRunId The Id of the software + * update configuration machine run. * * @param {object} [options] Optional Parameters. * @@ -8074,32 +9343,17 @@ export interface TestJobs { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - createWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, runbookName: string, parameters: models.TestJobCreateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getByIdWithHttpOperationResponse(softwareUpdateConfigurationMachineRunId: string, 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 - * operation. - * - * @param {object} parameters The parameters supplied to the create test job - * operation. - * - * @param {string} parameters.runbookName Gets or sets the runbook name. - * - * @param {object} [parameters.parameters] Gets or sets the parameters of the - * test job. + * Get a single software update configuration machine run by Id. * - * @param {string} [parameters.runOn] Gets or sets the runOn which specifies - * the group name where the job is to be executed. + * @param {uuid} softwareUpdateConfigurationMachineRunId The Id of the software + * update configuration machine run. * * @param {object} [options] Optional Parameters. * @@ -8113,7 +9367,7 @@ export interface TestJobs { * * {Promise} A promise is returned. * - * @resolve {TestJob} - The deserialized result object. + * @resolve {SoftwareUpdateConfigurationMachineRun} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -8121,50 +9375,59 @@ export interface TestJobs { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {TestJob} [result] - The deserialized result object if an error did not occur. - * See {@link TestJob} for more information. + * {SoftwareUpdateConfigurationMachineRun} [result] - The deserialized result object if an error did not occur. + * See {@link SoftwareUpdateConfigurationMachineRun} 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. */ - 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; + 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; /** - * Retrieve the test job for the specified runbook. + * Return list of software update configuration machine runs * - * @param {string} resourceGroupName The resource group name. + * @param {object} [options] Optional Parameters. * - * @param {string} automationAccountName The automation account name. + * @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' * - * @param {string} runbookName The runbook name. + * @param {string} [options.skip] number of entries you skip before returning + * results * - * @param {object} [options] Optional Parameters. + * @param {string} [options.top] Maximum number of entries returned in the + * results collection * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - getWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, runbookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listWithHttpOperationResponse(options?: { filter? : string, skip? : string, top? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Retrieve the test job for the specified runbook. + * Return list of software update configuration machine runs * - * @param {string} resourceGroupName The resource group name. + * @param {object} [options] Optional Parameters. * - * @param {string} automationAccountName The automation account name. + * @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' * - * @param {string} runbookName The runbook name. + * @param {string} [options.skip] number of entries you skip before returning + * results * - * @param {object} [options] Optional Parameters. + * @param {string} [options.top] Maximum number of entries returned in the + * results collection * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -8176,7 +9439,7 @@ export interface TestJobs { * * {Promise} A promise is returned. * - * @resolve {TestJob} - The deserialized result object. + * @resolve {SoftwareUpdateConfigurationMachineRunListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -8184,26 +9447,63 @@ export interface TestJobs { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {TestJob} [result] - The deserialized result object if an error did not occur. - * See {@link TestJob} for more information. + * {SoftwareUpdateConfigurationMachineRunListResult} [result] - The deserialized result object if an error did not occur. + * See {@link + * SoftwareUpdateConfigurationMachineRunListResult} 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. */ - 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; + 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; +} + +/** + * @class + * SourceControlOperations + * __NOTE__: An instance of this class is automatically created for an + * instance of the AutomationClient. + */ +export interface SourceControlOperations { /** - * Resume the test job. - * - * @param {string} resourceGroupName The resource group name. + * Create a source control. * * @param {string} automationAccountName The automation account name. * - * @param {string} runbookName The runbook name. + * @param {string} sourceControlName The source control name. + * + * @param {object} parameters The parameters supplied to the create or update + * source control operation. + * + * @param {string} [parameters.repoUrl] Gets or sets the repo url of the source + * control. + * + * @param {string} [parameters.branch] Gets or sets the repo branch of the + * source control. Include branch as empty string for VsoTfvc. + * + * @param {string} [parameters.folderPath] Gets or sets the folder path of the + * source control. Path must be relative. + * + * @param {boolean} [parameters.autoSync] Gets or sets auto async of the source + * control. Default is false. + * + * @param {boolean} [parameters.publishRunbook] Gets or sets the auto publish + * of the source control. Default is true. + * + * @param {string} [parameters.sourceType] The source type. Must be one of + * VsoGit, VsoTfvc, GitHub, case sensitive. Possible values include: 'VsoGit', + * 'VsoTfvc', 'GitHub' + * + * @param {string} [parameters.securityToken] Gets or sets the authorization + * token for the repo of the source control. + * + * @param {string} [parameters.description] Gets or sets the user description + * of the source control. * * @param {object} [options] Optional Parameters. * @@ -8212,20 +9512,46 @@ export interface TestJobs { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - resumeWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, runbookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + createOrUpdateWithHttpOperationResponse(automationAccountName: string, sourceControlName: string, parameters: models.SourceControlCreateOrUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Resume the test job. - * - * @param {string} resourceGroupName The resource group name. + * Create a source control. * * @param {string} automationAccountName The automation account name. * - * @param {string} runbookName The runbook name. + * @param {string} sourceControlName The source control name. + * + * @param {object} parameters The parameters supplied to the create or update + * source control operation. + * + * @param {string} [parameters.repoUrl] Gets or sets the repo url of the source + * control. + * + * @param {string} [parameters.branch] Gets or sets the repo branch of the + * source control. Include branch as empty string for VsoTfvc. + * + * @param {string} [parameters.folderPath] Gets or sets the folder path of the + * source control. Path must be relative. + * + * @param {boolean} [parameters.autoSync] Gets or sets auto async of the source + * control. Default is false. + * + * @param {boolean} [parameters.publishRunbook] Gets or sets the auto publish + * of the source control. Default is true. + * + * @param {string} [parameters.sourceType] The source type. Must be one of + * VsoGit, VsoTfvc, GitHub, case sensitive. Possible values include: 'VsoGit', + * 'VsoTfvc', 'GitHub' + * + * @param {string} [parameters.securityToken] Gets or sets the authorization + * token for the repo of the source control. + * + * @param {string} [parameters.description] Gets or sets the user description + * of the source control. * * @param {object} [options] Optional Parameters. * @@ -8239,7 +9565,7 @@ export interface TestJobs { * * {Promise} A promise is returned. * - * @resolve {null} - The deserialized result object. + * @resolve {SourceControl} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -8247,25 +9573,45 @@ export interface TestJobs { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {SourceControl} [result] - The deserialized result object if an error did not occur. + * See {@link SourceControl} 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. */ - 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; + 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; /** - * Stop the test job. - * - * @param {string} resourceGroupName The resource group name. + * Update a source control. * * @param {string} automationAccountName The automation account name. * - * @param {string} runbookName The runbook name. + * @param {string} sourceControlName The source control name. + * + * @param {object} parameters The parameters supplied to the update source + * control operation. + * + * @param {string} [parameters.branch] Gets or sets the repo branch of the + * source control. + * + * @param {string} [parameters.folderPath] Gets or sets the folder path of the + * source control. Path must be relative. + * + * @param {boolean} [parameters.autoSync] Gets or sets auto async of the source + * control. Default is false. + * + * @param {boolean} [parameters.publishRunbook] Gets or sets the auto publish + * of the source control. Default is true. + * + * @param {string} [parameters.securityToken] Gets or sets the authorization + * token for the repo of the source control. + * + * @param {string} [parameters.description] Gets or sets the user description + * of the source control. * * @param {object} [options] Optional Parameters. * @@ -8274,20 +9620,39 @@ export interface TestJobs { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - stopWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, runbookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + updateWithHttpOperationResponse(automationAccountName: string, sourceControlName: string, parameters: models.SourceControlUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Stop the test job. - * - * @param {string} resourceGroupName The resource group name. + * Update a source control. * * @param {string} automationAccountName The automation account name. * - * @param {string} runbookName The runbook name. + * @param {string} sourceControlName The source control name. + * + * @param {object} parameters The parameters supplied to the update source + * control operation. + * + * @param {string} [parameters.branch] Gets or sets the repo branch of the + * source control. + * + * @param {string} [parameters.folderPath] Gets or sets the folder path of the + * source control. Path must be relative. + * + * @param {boolean} [parameters.autoSync] Gets or sets auto async of the source + * control. Default is false. + * + * @param {boolean} [parameters.publishRunbook] Gets or sets the auto publish + * of the source control. Default is true. + * + * @param {string} [parameters.securityToken] Gets or sets the authorization + * token for the repo of the source control. + * + * @param {string} [parameters.description] Gets or sets the user description + * of the source control. * * @param {object} [options] Optional Parameters. * @@ -8301,7 +9666,7 @@ export interface TestJobs { * * {Promise} A promise is returned. * - * @resolve {null} - The deserialized result object. + * @resolve {SourceControl} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -8309,25 +9674,24 @@ export interface TestJobs { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {SourceControl} [result] - The deserialized result object if an error did not occur. + * See {@link SourceControl} 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. */ - 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; + 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; /** - * Suspend the test job. - * - * @param {string} resourceGroupName The resource group name. + * Delete the source control. * * @param {string} automationAccountName The automation account name. * - * @param {string} runbookName The runbook name. + * @param {string} sourceControlName The name of source control. * * @param {object} [options] Optional Parameters. * @@ -8340,16 +9704,14 @@ export interface TestJobs { * * @reject {Error|ServiceError} - The error object. */ - suspendWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, runbookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + deleteMethodWithHttpOperationResponse(automationAccountName: string, sourceControlName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Suspend the test job. - * - * @param {string} resourceGroupName The resource group name. + * Delete the source control. * * @param {string} automationAccountName The automation account name. * - * @param {string} runbookName The runbook name. + * @param {string} sourceControlName The name of source control. * * @param {object} [options] Optional Parameters. * @@ -8377,63 +9739,17 @@ export interface TestJobs { * * {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; -} - -/** - * @class - * ScheduleOperations - * __NOTE__: An instance of this class is automatically created for an - * instance of the AutomationClient. - */ -export interface ScheduleOperations { + 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; /** - * Create a schedule. - * - * @param {string} resourceGroupName The resource group name. + * Retrieve the source control identified by source control name. * * @param {string} automationAccountName The automation account name. * - * @param {string} scheduleName The schedule name. - * - * @param {object} parameters The parameters supplied to the create or update - * schedule operation. - * - * @param {string} parameters.name Gets or sets the name of the schedule. - * - * @param {string} [parameters.description] Gets or sets the description of the - * schedule. - * - * @param {date} parameters.startTime Gets or sets the start time of the - * schedule. - * - * @param {date} [parameters.expiryTime] Gets or sets the end time of the - * schedule. - * - * @param {object} [parameters.interval] Gets or sets the interval of the - * schedule. - * - * @param {string} parameters.frequency Gets or sets the frequency of the - * schedule. Possible values include: 'OneTime', 'Day', 'Hour', 'Week', 'Month' - * - * @param {string} [parameters.timeZone] Gets or sets the time zone of the - * schedule. - * - * @param {object} [parameters.advancedSchedule] Gets or sets the - * AdvancedSchedule. - * - * @param {array} [parameters.advancedSchedule.weekDays] Days of the week that - * the job should execute on. - * - * @param {array} [parameters.advancedSchedule.monthDays] Days of the month - * that the job should execute on. Must be between 1 and 31. - * - * @param {array} [parameters.advancedSchedule.monthlyOccurrences] Occurrences - * of days within a month. + * @param {string} sourceControlName The name of source control. * * @param {object} [options] Optional Parameters. * @@ -8442,55 +9758,18 @@ export interface ScheduleOperations { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - createOrUpdateWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, scheduleName: string, parameters: models.ScheduleCreateOrUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(automationAccountName: string, sourceControlName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Create a schedule. - * - * @param {string} resourceGroupName The resource group name. + * Retrieve the source control identified by source control name. * * @param {string} automationAccountName The automation account name. * - * @param {string} scheduleName The schedule name. - * - * @param {object} parameters The parameters supplied to the create or update - * schedule operation. - * - * @param {string} parameters.name Gets or sets the name of the schedule. - * - * @param {string} [parameters.description] Gets or sets the description of the - * schedule. - * - * @param {date} parameters.startTime Gets or sets the start time of the - * schedule. - * - * @param {date} [parameters.expiryTime] Gets or sets the end time of the - * schedule. - * - * @param {object} [parameters.interval] Gets or sets the interval of the - * schedule. - * - * @param {string} parameters.frequency Gets or sets the frequency of the - * schedule. Possible values include: 'OneTime', 'Day', 'Hour', 'Week', 'Month' - * - * @param {string} [parameters.timeZone] Gets or sets the time zone of the - * schedule. - * - * @param {object} [parameters.advancedSchedule] Gets or sets the - * AdvancedSchedule. - * - * @param {array} [parameters.advancedSchedule.weekDays] Days of the week that - * the job should execute on. - * - * @param {array} [parameters.advancedSchedule.monthDays] Days of the month - * that the job should execute on. Must be between 1 and 31. - * - * @param {array} [parameters.advancedSchedule.monthlyOccurrences] Occurrences - * of days within a month. + * @param {string} sourceControlName The name of source control. * * @param {object} [options] Optional Parameters. * @@ -8504,7 +9783,7 @@ export interface ScheduleOperations { * * {Promise} A promise is returned. * - * @resolve {Schedule} - The deserialized result object. + * @resolve {SourceControl} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -8512,73 +9791,47 @@ export interface ScheduleOperations { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {Schedule} [result] - The deserialized result object if an error did not occur. - * See {@link Schedule} for more information. + * {SourceControl} [result] - The deserialized result object if an error did not occur. + * See {@link SourceControl} 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. */ - 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; + 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; /** - * Update the schedule identified by schedule name. - * - * @param {string} resourceGroupName The resource group name. + * Retrieve a list of source controls. * * @param {string} automationAccountName The automation account name. * - * @param {string} scheduleName The schedule name. - * - * @param {object} parameters The parameters supplied to the update schedule - * operation. - * - * @param {string} parameters.name Gets or sets the name of the schedule. - * - * @param {string} [parameters.description] Gets or sets the description of the - * schedule. - * - * @param {boolean} [parameters.isEnabled] Gets or sets a value indicating - * whether this schedule is enabled. - * * @param {object} [options] Optional Parameters. * + * @param {string} [options.filter] The filter to apply on the operation. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - updateWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, scheduleName: string, parameters: models.ScheduleUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listByAutomationAccountWithHttpOperationResponse(automationAccountName: string, options?: { filter? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Update the schedule identified by schedule name. - * - * @param {string} resourceGroupName The resource group name. + * Retrieve a list of source controls. * * @param {string} automationAccountName The automation account name. * - * @param {string} scheduleName The schedule name. - * - * @param {object} parameters The parameters supplied to the update schedule - * operation. - * - * @param {string} parameters.name Gets or sets the name of the schedule. - * - * @param {string} [parameters.description] Gets or sets the description of the - * schedule. - * - * @param {boolean} [parameters.isEnabled] Gets or sets a value indicating - * whether this schedule is enabled. - * * @param {object} [options] Optional Parameters. * + * @param {string} [options.filter] The filter to apply on the operation. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -8589,7 +9842,7 @@ export interface ScheduleOperations { * * {Promise} A promise is returned. * - * @resolve {Schedule} - The deserialized result object. + * @resolve {SourceControlListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -8597,26 +9850,24 @@ export interface ScheduleOperations { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {Schedule} [result] - The deserialized result object if an error did not occur. - * See {@link Schedule} for more information. + * {SourceControlListResult} [result] - The deserialized result object if an error did not occur. + * See {@link SourceControlListResult} 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(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; + 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 schedule identified by schedule name. - * - * @param {string} resourceGroupName The resource group name. - * - * @param {string} automationAccountName The automation account name. + * Retrieve a list of source controls. * - * @param {string} scheduleName The schedule name. + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. * * @param {object} [options] Optional Parameters. * @@ -8625,20 +9876,17 @@ export interface ScheduleOperations { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - getWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, scheduleName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; - - /** - * Retrieve the schedule identified by schedule name. - * - * @param {string} resourceGroupName The resource group name. - * - * @param {string} automationAccountName The automation account name. + listByAutomationAccountNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Retrieve a list of source controls. * - * @param {string} scheduleName The schedule name. + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. * * @param {object} [options] Optional Parameters. * @@ -8652,7 +9900,7 @@ export interface ScheduleOperations { * * {Promise} A promise is returned. * - * @resolve {Schedule} - The deserialized result object. + * @resolve {SourceControlListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -8660,26 +9908,36 @@ export interface ScheduleOperations { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {Schedule} [result] - The deserialized result object if an error did not occur. - * See {@link Schedule} for more information. + * {SourceControlListResult} [result] - The deserialized result object if an error did not occur. + * See {@link SourceControlListResult} 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. */ - 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; + listByAutomationAccountNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listByAutomationAccountNext(nextPageLink: string, callback: ServiceCallback): void; + listByAutomationAccountNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; +} + +/** + * @class + * SourceControlSyncJobOperations + * __NOTE__: An instance of this class is automatically created for an + * instance of the AutomationClient. + */ +export interface SourceControlSyncJobOperations { /** - * Delete the schedule identified by schedule name. - * - * @param {string} resourceGroupName The resource group name. + * Creates the sync job for a source control. * * @param {string} automationAccountName The automation account name. * - * @param {string} scheduleName The schedule name. + * @param {string} sourceControlName The source control name. + * + * @param {uuid} sourceControlSyncJobId The source control sync job id. * * @param {object} [options] Optional Parameters. * @@ -8688,20 +9946,20 @@ export interface ScheduleOperations { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - deleteMethodWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, scheduleName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + createWithHttpOperationResponse(automationAccountName: string, sourceControlName: string, sourceControlSyncJobId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Delete the schedule identified by schedule name. - * - * @param {string} resourceGroupName The resource group name. + * Creates the sync job for a source control. * * @param {string} automationAccountName The automation account name. * - * @param {string} scheduleName The schedule name. + * @param {string} sourceControlName The source control name. + * + * @param {uuid} sourceControlSyncJobId The source control sync job id. * * @param {object} [options] Optional Parameters. * @@ -8715,7 +9973,7 @@ export interface ScheduleOperations { * * {Promise} A promise is returned. * - * @resolve {null} - The deserialized result object. + * @resolve {SourceControlSyncJob} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -8723,24 +9981,27 @@ export interface ScheduleOperations { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {SourceControlSyncJob} [result] - The deserialized result object if an error did not occur. + * See {@link SourceControlSyncJob} 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. */ - 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; + 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 a list of schedules. - * - * @param {string} resourceGroupName The resource group name. + * Retrieve the source control sync job identified by job id. * * @param {string} automationAccountName The automation account name. * + * @param {string} sourceControlName The source control name. + * + * @param {uuid} sourceControlSyncJobId The source control sync job id. + * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -8748,19 +10009,21 @@ export interface ScheduleOperations { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listByAutomationAccountWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(automationAccountName: string, sourceControlName: string, sourceControlSyncJobId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Retrieve a list of schedules. - * - * @param {string} resourceGroupName The resource group name. + * Retrieve the source control sync job identified by job id. * * @param {string} automationAccountName The automation account name. * + * @param {string} sourceControlName The source control name. + * + * @param {uuid} sourceControlSyncJobId The source control sync job id. + * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -8773,7 +10036,7 @@ export interface ScheduleOperations { * * {Promise} A promise is returned. * - * @resolve {ScheduleListResult} - The deserialized result object. + * @resolve {SourceControlSyncJobById} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -8781,45 +10044,52 @@ export interface ScheduleOperations { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {ScheduleListResult} [result] - The deserialized result object if an error did not occur. - * See {@link ScheduleListResult} for more information. + * {SourceControlSyncJobById} [result] - The deserialized result object if an error did not occur. + * See {@link SourceControlSyncJobById} 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. */ - 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; + 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 schedules. + * Retrieve a list of source control sync jobs. * - * @param {string} nextPageLink The NextLink from the previous successful call - * to List operation. + * @param {string} automationAccountName The automation account name. + * + * @param {string} sourceControlName The source control name. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.filter] The filter to apply on the operation. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listByAutomationAccountNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listByAutomationAccountWithHttpOperationResponse(automationAccountName: string, sourceControlName: string, options?: { filter? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Retrieve a list of schedules. + * Retrieve a list of source control sync jobs. * - * @param {string} nextPageLink The NextLink from the previous successful call - * to List operation. + * @param {string} automationAccountName The automation account name. + * + * @param {string} sourceControlName The source control name. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.filter] The filter to apply on the operation. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -8830,7 +10100,7 @@ export interface ScheduleOperations { * * {Promise} A promise is returned. * - * @resolve {ScheduleListResult} - The deserialized result object. + * @resolve {SourceControlSyncJobListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -8838,48 +10108,24 @@ export interface ScheduleOperations { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {ScheduleListResult} [result] - The deserialized result object if an error did not occur. - * See {@link ScheduleListResult} for more information. + * {SourceControlSyncJobListResult} [result] - The deserialized result object if an error did not occur. + * See {@link SourceControlSyncJobListResult} 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. */ - listByAutomationAccountNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listByAutomationAccountNext(nextPageLink: string, callback: ServiceCallback): void; - listByAutomationAccountNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; -} - -/** - * @class - * VariableOperations - * __NOTE__: An instance of this class is automatically created for an - * instance of the AutomationClient. - */ -export interface VariableOperations { + 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; /** - * Create a variable. - * - * @param {string} resourceGroupName The resource group name. - * - * @param {string} automationAccountName The automation account name. - * - * @param {string} variableName The variable name. - * - * @param {object} parameters The parameters supplied to the create or update - * variable operation. - * - * @param {string} parameters.name Gets or sets the name of the variable. + * Retrieve a list of source control sync jobs. * - * @param {string} [parameters.value] Gets or sets the value of the variable. - * - * @param {string} [parameters.description] Gets or sets the description of the - * variable. - * - * @param {boolean} [parameters.isEncrypted] Gets or sets the encrypted flag of - * the variable. + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. * * @param {object} [options] Optional Parameters. * @@ -8888,33 +10134,17 @@ export interface VariableOperations { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - createOrUpdateWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, variableName: string, parameters: models.VariableCreateOrUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listByAutomationAccountNextWithHttpOperationResponse(nextPageLink: string, 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. - * - * @param {object} parameters The parameters supplied to the create or update - * variable operation. - * - * @param {string} parameters.name Gets or sets the name of the variable. - * - * @param {string} [parameters.value] Gets or sets the value of the variable. + * Retrieve a list of source control sync jobs. * - * @param {string} [parameters.description] Gets or sets the description of the - * variable. - * - * @param {boolean} [parameters.isEncrypted] Gets or sets the encrypted flag of - * the variable. + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. * * @param {object} [options] Optional Parameters. * @@ -8928,7 +10158,7 @@ export interface VariableOperations { * * {Promise} A promise is returned. * - * @resolve {Variable} - The deserialized result object. + * @resolve {SourceControlSyncJobListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -8936,36 +10166,32 @@ export interface VariableOperations { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {Variable} [result] - The deserialized result object if an error did not occur. - * See {@link Variable} for more information. + * {SourceControlSyncJobListResult} [result] - The deserialized result object if an error did not occur. + * See {@link SourceControlSyncJobListResult} 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. */ - 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; + listByAutomationAccountNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listByAutomationAccountNext(nextPageLink: string, callback: ServiceCallback): void; + listByAutomationAccountNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; +} + +/** + * @class + * JobOperations + * __NOTE__: An instance of this class is automatically created for an + * instance of the AutomationClient. + */ +export interface JobOperations { /** - * Update a variable. - * - * @param {string} resourceGroupName The resource group name. - * - * @param {string} automationAccountName The automation account name. - * - * @param {string} variableName The variable name. - * - * @param {object} parameters The parameters supplied to the update variable - * operation. - * - * @param {string} parameters.name Gets or sets the name of the variable. + * Retrieve the job output identified by job name. * - * @param {string} [parameters.value] Gets or sets the value of the variable. - * - * @param {string} [parameters.description] Gets or sets the description of the - * variable. + * @param {string} jobName The name of the job to be created. * * @param {object} [options] Optional Parameters. * @@ -8974,30 +10200,16 @@ export interface VariableOperations { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - updateWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, variableName: string, parameters: models.VariableUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getOutputWithHttpOperationResponse(jobName: string, 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. - * - * @param {object} parameters The parameters supplied to the update variable - * operation. + * Retrieve the job output identified by job name. * - * @param {string} parameters.name Gets or sets the name of the variable. - * - * @param {string} [parameters.value] Gets or sets the value of the variable. - * - * @param {string} [parameters.description] Gets or sets the description of the - * variable. + * @param {string} jobName The name of the job to be created. * * @param {object} [options] Optional Parameters. * @@ -9011,7 +10223,7 @@ export interface VariableOperations { * * {Promise} A promise is returned. * - * @resolve {Variable} - The deserialized result object. + * @resolve {String} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -9019,26 +10231,21 @@ export interface VariableOperations { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {Variable} [result] - The deserialized result object if an error did not occur. - * See {@link Variable} for more information. + * {String} [result] - The deserialized result object if an error did not occur. * * {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(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; + 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; /** - * Delete the variable. - * - * @param {string} resourceGroupName The resource group name. - * - * @param {string} automationAccountName The automation account name. + * Retrieve the runbook content of the job identified by job name. * - * @param {string} variableName The name of variable. + * @param {string} jobName The job name. * * @param {object} [options] Optional Parameters. * @@ -9047,20 +10254,16 @@ export interface VariableOperations { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - deleteMethodWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, variableName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getRunbookContentWithHttpOperationResponse(jobName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Delete the variable. - * - * @param {string} resourceGroupName The resource group name. - * - * @param {string} automationAccountName The automation account name. + * Retrieve the runbook content of the job identified by job name. * - * @param {string} variableName The name of variable. + * @param {string} jobName The job name. * * @param {object} [options] Optional Parameters. * @@ -9074,7 +10277,7 @@ export interface VariableOperations { * * {Promise} A promise is returned. * - * @resolve {null} - The deserialized result object. + * @resolve {String} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -9082,25 +10285,21 @@ export interface VariableOperations { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {String} [result] - The deserialized result object if an error did not occur. * * {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. */ - 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; + 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; /** - * Retrieve the variable identified by variable name. - * - * @param {string} resourceGroupName The resource group name. + * Suspend the job identified by job name. * - * @param {string} automationAccountName The automation account name. - * - * @param {string} variableName The name of variable. + * @param {string} jobName The job name. * * @param {object} [options] Optional Parameters. * @@ -9109,20 +10308,16 @@ export interface VariableOperations { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - getWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, variableName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + suspendWithHttpOperationResponse(jobName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Retrieve the variable identified by variable name. - * - * @param {string} resourceGroupName The resource group name. + * Suspend the job identified by job name. * - * @param {string} automationAccountName The automation account name. - * - * @param {string} variableName The name of variable. + * @param {string} jobName The job name. * * @param {object} [options] Optional Parameters. * @@ -9136,7 +10331,7 @@ export interface VariableOperations { * * {Promise} A promise is returned. * - * @resolve {Variable} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -9144,24 +10339,21 @@ export interface VariableOperations { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {Variable} [result] - The deserialized result object if an error did not occur. - * See {@link Variable} for more information. + * {null} [result] - The deserialized result object if an error did not occur. * * {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. */ - 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; + 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; /** - * Retrieve a list of variables. - * - * @param {string} resourceGroupName The resource group name. + * Stop the job identified by jobName. * - * @param {string} automationAccountName The automation account name. + * @param {string} jobName The job name. * * @param {object} [options] Optional Parameters. * @@ -9170,18 +10362,16 @@ export interface VariableOperations { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listByAutomationAccountWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + stopWithHttpOperationResponse(jobName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Retrieve a list of variables. - * - * @param {string} resourceGroupName The resource group name. + * Stop the job identified by jobName. * - * @param {string} automationAccountName The automation account name. + * @param {string} jobName The job name. * * @param {object} [options] Optional Parameters. * @@ -9195,7 +10385,7 @@ export interface VariableOperations { * * {Promise} A promise is returned. * - * @resolve {VariableListResult} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -9203,23 +10393,21 @@ export interface VariableOperations { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {VariableListResult} [result] - The deserialized result object if an error did not occur. - * See {@link VariableListResult} for more information. + * {null} [result] - The deserialized result object if an error did not occur. * * {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. */ - 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; + 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 a list of variables. + * Retrieve the job identified by job name. * - * @param {string} nextPageLink The NextLink from the previous successful call - * to List operation. + * @param {string} jobName The job name. * * @param {object} [options] Optional Parameters. * @@ -9228,17 +10416,16 @@ export interface VariableOperations { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listByAutomationAccountNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(jobName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Retrieve a list of variables. + * Retrieve the job identified by job name. * - * @param {string} nextPageLink The NextLink from the previous successful call - * to List operation. + * @param {string} jobName The job name. * * @param {object} [options] Optional Parameters. * @@ -9252,41 +10439,44 @@ export interface VariableOperations { * * {Promise} A promise is returned. * - * @resolve {VariableListResult} - The deserialized result object. + * @resolve {Job} - 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. - * - * {VariableListResult} [result] - The deserialized result object if an error did not occur. - * See {@link VariableListResult} 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. - */ - listByAutomationAccountNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listByAutomationAccountNext(nextPageLink: string, callback: ServiceCallback): void; - listByAutomationAccountNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; -} - -/** - * @class - * WebhookOperations - * __NOTE__: An instance of this class is automatically created for an - * instance of the AutomationClient. - */ -export interface WebhookOperations { + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {Job} [result] - The deserialized result object if an error did not occur. + * See {@link Job} 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. + */ + 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; /** - * Generates a Uri for use in creating a webhook. + * Create a job of the runbook. * - * @param {string} resourceGroupName The resource group name. + * @param {string} jobName The job name. * - * @param {string} automationAccountName The automation account name. + * @param {object} parameters The parameters supplied to the create job + * operation. + * + * @param {object} parameters.runbook Gets or sets the runbook. + * + * @param {string} [parameters.runbook.name] Gets or sets the name of the + * runbook. + * + * @param {object} [parameters.parameters] Gets or sets the parameters of the + * job. + * + * @param {string} [parameters.runOn] Gets or sets the runOn which specifies + * the group name where the job is to be executed. * * @param {object} [options] Optional Parameters. * @@ -9295,18 +10485,30 @@ export interface WebhookOperations { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - generateUriWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + createWithHttpOperationResponse(jobName: string, parameters: models.JobCreateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Generates a Uri for use in creating a webhook. + * Create a job of the runbook. * - * @param {string} resourceGroupName The resource group name. + * @param {string} jobName The job name. * - * @param {string} automationAccountName The automation account name. + * @param {object} parameters The parameters supplied to the create job + * operation. + * + * @param {object} parameters.runbook Gets or sets the runbook. + * + * @param {string} [parameters.runbook.name] Gets or sets the name of the + * runbook. + * + * @param {object} [parameters.parameters] Gets or sets the parameters of the + * job. + * + * @param {string} [parameters.runOn] Gets or sets the runOn which specifies + * the group name where the job is to be executed. * * @param {object} [options] Optional Parameters. * @@ -9320,7 +10522,7 @@ export interface WebhookOperations { * * {Promise} A promise is returned. * - * @resolve {String} - The deserialized result object. + * @resolve {Job} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -9328,50 +10530,43 @@ export interface WebhookOperations { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {String} [result] - The deserialized result object if an error did not occur. + * {Job} [result] - The deserialized result object if an error did not occur. + * See {@link Job} 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. */ - 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; + 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; /** - * 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. + * Retrieve a list of jobs. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.filter] The filter to apply on the operation. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - deleteMethodWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, webhookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listByAutomationAccountWithHttpOperationResponse(options?: { filter? : string, 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. + * Retrieve a list of jobs. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.filter] The filter to apply on the operation. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -9382,7 +10577,7 @@ export interface WebhookOperations { * * {Promise} A promise is returned. * - * @resolve {null} - The deserialized result object. + * @resolve {JobListResultV2} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -9390,25 +10585,22 @@ export interface WebhookOperations { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {JobListResultV2} [result] - The deserialized result object if an error did not occur. + * See {@link JobListResultV2} 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. */ - 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; + listByAutomationAccount(options?: { filter? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + listByAutomationAccount(callback: ServiceCallback): void; + listByAutomationAccount(options: { filter? : string, 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. + * Resume the job identified by jobName. * - * @param {string} webhookName The webhook name. + * @param {string} jobName The job name. * * @param {object} [options] Optional Parameters. * @@ -9417,20 +10609,16 @@ export interface WebhookOperations { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - getWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, webhookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + resumeWithHttpOperationResponse(jobName: 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. + * Resume the job identified by jobName. * - * @param {string} webhookName The webhook name. + * @param {string} jobName The job name. * * @param {object} [options] Optional Parameters. * @@ -9444,7 +10632,7 @@ export interface WebhookOperations { * * {Promise} A promise is returned. * - * @resolve {Webhook} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -9452,48 +10640,22 @@ export interface WebhookOperations { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {Webhook} [result] - The deserialized result object if an error did not occur. - * See {@link Webhook} for more information. + * {null} [result] - The deserialized result object if an error did not occur. * * {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. */ - 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; + 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; /** - * 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. - * - * @param {object} parameters The create or update parameters for webhook. - * - * @param {string} parameters.name Gets or sets the name of the webhook. - * - * @param {boolean} [parameters.isEnabled] Gets or sets the value of the - * enabled flag of webhook. - * - * @param {string} [parameters.uri] Gets or sets the uri. - * - * @param {date} [parameters.expiryTime] Gets or sets the expiry time. - * - * @param {object} [parameters.parameters] Gets or sets the parameters of the - * job. - * - * @param {object} [parameters.runbook] Gets or sets the runbook. - * - * @param {string} [parameters.runbook.name] Gets or sets the name of the - * runbook. + * Retrieve a list of jobs. * - * @param {string} [parameters.runOn] Gets or sets the name of the hybrid - * worker group the webhook job will run on. + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. * * @param {object} [options] Optional Parameters. * @@ -9502,42 +10664,17 @@ export interface WebhookOperations { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - createOrUpdateWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, webhookName: string, parameters: models.WebhookCreateOrUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listByAutomationAccountNextWithHttpOperationResponse(nextPageLink: string, 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. - * - * @param {object} parameters The create or update parameters for webhook. - * - * @param {string} parameters.name Gets or sets the name of the webhook. - * - * @param {boolean} [parameters.isEnabled] Gets or sets the value of the - * enabled flag of webhook. - * - * @param {string} [parameters.uri] Gets or sets the uri. - * - * @param {date} [parameters.expiryTime] Gets or sets the expiry time. - * - * @param {object} [parameters.parameters] Gets or sets the parameters of the - * job. - * - * @param {object} [parameters.runbook] Gets or sets the runbook. - * - * @param {string} [parameters.runbook.name] Gets or sets the name of the - * runbook. + * Retrieve a list of jobs. * - * @param {string} [parameters.runOn] Gets or sets the name of the hybrid - * worker group the webhook job will run on. + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. * * @param {object} [options] Optional Parameters. * @@ -9551,7 +10688,7 @@ export interface WebhookOperations { * * {Promise} A promise is returned. * - * @resolve {Webhook} - The deserialized result object. + * @resolve {JobListResultV2} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -9559,42 +10696,33 @@ export interface WebhookOperations { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {Webhook} [result] - The deserialized result object if an error did not occur. - * See {@link Webhook} for more information. + * {JobListResultV2} [result] - The deserialized result object if an error did not occur. + * See {@link JobListResultV2} 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. */ - 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; + listByAutomationAccountNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listByAutomationAccountNext(nextPageLink: string, callback: ServiceCallback): void; + listByAutomationAccountNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; +} + +/** + * @class + * JobStreamOperations + * __NOTE__: An instance of this class is automatically created for an + * instance of the AutomationClient. + */ +export interface JobStreamOperations { /** - * 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. - * - * @param {object} parameters The update parameters for webhook. - * - * @param {string} parameters.name Gets or sets the name of the webhook. - * - * @param {boolean} [parameters.isEnabled] Gets or sets the value of the - * enabled flag of webhook. - * - * @param {string} [parameters.runOn] Gets or sets the name of the hybrid - * worker group the webhook job will run on. + * Retrieve the job stream identified by job stream id. * - * @param {object} [parameters.parameters] Gets or sets the parameters of the - * job. + * @param {string} jobName The job name. * - * @param {string} [parameters.description] Gets or sets the description of the - * webhook. + * @param {string} jobStreamId The job stream id. * * @param {object} [options] Optional Parameters. * @@ -9603,36 +10731,18 @@ export interface WebhookOperations { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - updateWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, webhookName: string, parameters: models.WebhookUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(jobName: string, jobStreamId: string, 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. - * - * @param {object} parameters The update parameters for webhook. - * - * @param {string} parameters.name Gets or sets the name of the webhook. - * - * @param {boolean} [parameters.isEnabled] Gets or sets the value of the - * enabled flag of webhook. - * - * @param {string} [parameters.runOn] Gets or sets the name of the hybrid - * worker group the webhook job will run on. + * Retrieve the job stream identified by job stream id. * - * @param {object} [parameters.parameters] Gets or sets the parameters of the - * job. + * @param {string} jobName The job name. * - * @param {string} [parameters.description] Gets or sets the description of the - * webhook. + * @param {string} jobStreamId The job stream id. * * @param {object} [options] Optional Parameters. * @@ -9646,7 +10756,7 @@ export interface WebhookOperations { * * {Promise} A promise is returned. * - * @resolve {Webhook} - The deserialized result object. + * @resolve {JobStream} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -9654,24 +10764,22 @@ export interface WebhookOperations { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {Webhook} [result] - The deserialized result object if an error did not occur. - * See {@link Webhook} for more information. + * {JobStream} [result] - The deserialized result object if an error did not occur. + * See {@link JobStream} 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(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; + 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 webhooks. - * - * @param {string} resourceGroupName The resource group name. + * Retrieve a list of jobs streams identified by job name. * - * @param {string} automationAccountName The automation account name. + * @param {string} jobName The job name. * * @param {object} [options] Optional Parameters. * @@ -9682,18 +10790,16 @@ export interface WebhookOperations { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listByAutomationAccountWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, options?: { filter? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; + listByJobWithHttpOperationResponse(jobName: string, options?: { filter? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Retrieve a list of webhooks. - * - * @param {string} resourceGroupName The resource group name. + * Retrieve a list of jobs streams identified by job name. * - * @param {string} automationAccountName The automation account name. + * @param {string} jobName The job name. * * @param {object} [options] Optional Parameters. * @@ -9709,7 +10815,7 @@ export interface WebhookOperations { * * {Promise} A promise is returned. * - * @resolve {WebhookListResult} - The deserialized result object. + * @resolve {JobStreamListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -9717,20 +10823,20 @@ export interface WebhookOperations { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {WebhookListResult} [result] - The deserialized result object if an error did not occur. - * See {@link WebhookListResult} for more information. + * {JobStreamListResult} [result] - The deserialized result object if an error did not occur. + * See {@link JobStreamListResult} 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. */ - 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; + 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; /** - * Retrieve a list of webhooks. + * Retrieve a list of jobs streams identified by job name. * * @param {string} nextPageLink The NextLink from the previous successful call * to List operation. @@ -9742,14 +10848,14 @@ export interface WebhookOperations { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listByAutomationAccountNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listByJobNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Retrieve a list of webhooks. + * Retrieve a list of jobs streams identified by job name. * * @param {string} nextPageLink The NextLink from the previous successful call * to List operation. @@ -9766,7 +10872,7 @@ export interface WebhookOperations { * * {Promise} A promise is returned. * - * @resolve {WebhookListResult} - The deserialized result object. + * @resolve {JobStreamListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -9774,14 +10880,14 @@ export interface WebhookOperations { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {WebhookListResult} [result] - The deserialized result object if an error did not occur. - * See {@link WebhookListResult} for more information. + * {JobStreamListResult} [result] - The deserialized result object if an error did not occur. + * See {@link JobStreamListResult} 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. */ - listByAutomationAccountNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listByAutomationAccountNext(nextPageLink: string, callback: ServiceCallback): void; - listByAutomationAccountNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listByJobNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listByJobNext(nextPageLink: string, callback: ServiceCallback): void; + listByJobNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; } diff --git a/lib/services/automationManagement/lib/operations/index.js b/lib/services/automationManagement/lib/operations/index.js index b644c547af..0d74e3cdb1 100644 --- a/lib/services/automationManagement/lib/operations/index.js +++ b/lib/services/automationManagement/lib/operations/index.js @@ -23,15 +23,15 @@ exports.ConnectionOperations = require('./connectionOperations'); exports.ConnectionTypeOperations = require('./connectionTypeOperations'); exports.CredentialOperations = require('./credentialOperations'); exports.DscCompilationJobOperations = require('./dscCompilationJobOperations'); +exports.DscCompilationJobStream = require('./dscCompilationJobStream'); exports.DscConfigurationOperations = require('./dscConfigurationOperations'); exports.AgentRegistrationInformation = require('./agentRegistrationInformation'); exports.DscNodeOperations = require('./dscNodeOperations'); exports.NodeReports = require('./nodeReports'); exports.DscNodeConfigurationOperations = require('./dscNodeConfigurationOperations'); exports.HybridRunbookWorkerGroupOperations = require('./hybridRunbookWorkerGroupOperations'); -exports.JobOperations = require('./jobOperations'); -exports.JobStreamOperations = require('./jobStreamOperations'); exports.JobScheduleOperations = require('./jobScheduleOperations'); +exports.LinkedWorkspaceOperations = require('./linkedWorkspaceOperations'); exports.ActivityOperations = require('./activityOperations'); exports.ModuleOperations = require('./moduleOperations'); exports.ObjectDataTypes = require('./objectDataTypes'); @@ -39,7 +39,14 @@ exports.Fields = require('./fields'); exports.RunbookDraftOperations = require('./runbookDraftOperations'); exports.RunbookOperations = require('./runbookOperations'); exports.TestJobStreams = require('./testJobStreams'); -exports.TestJobs = require('./testJobs'); +exports.TestJobOperations = require('./testJobOperations'); exports.ScheduleOperations = require('./scheduleOperations'); exports.VariableOperations = require('./variableOperations'); exports.WebhookOperations = require('./webhookOperations'); +exports.SoftwareUpdateConfigurations = require('./softwareUpdateConfigurations'); +exports.SoftwareUpdateConfigurationRuns = require('./softwareUpdateConfigurationRuns'); +exports.SoftwareUpdateConfigurationMachineRuns = require('./softwareUpdateConfigurationMachineRuns'); +exports.SourceControlOperations = require('./sourceControlOperations'); +exports.SourceControlSyncJobOperations = require('./sourceControlSyncJobOperations'); +exports.JobOperations = require('./jobOperations'); +exports.JobStreamOperations = require('./jobStreamOperations'); diff --git a/lib/services/automationManagement/lib/operations/jobOperations.js b/lib/services/automationManagement/lib/operations/jobOperations.js index adea536863..05c64386ee 100644 --- a/lib/services/automationManagement/lib/operations/jobOperations.js +++ b/lib/services/automationManagement/lib/operations/jobOperations.js @@ -15,13 +15,9 @@ const msRestAzure = require('ms-rest-azure'); const WebResource = msRest.WebResource; /** - * Retrieve the job output identified by job id. + * Retrieve the job output identified by job name. * - * @param {string} resourceGroupName The resource group name. - * - * @param {string} automationAccountName The automation account name. - * - * @param {string} jobId The job id. + * @param {string} jobName The name of the job to be created. * * @param {object} [options] Optional Parameters. * @@ -34,13 +30,13 @@ const WebResource = msRest.WebResource; * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. + * {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 _getOutput(resourceGroupName, automationAccountName, jobId, options, callback) { +function _getOutput(jobName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -50,28 +46,29 @@ function _getOutput(resourceGroupName, automationAccountName, jobId, options, ca if (!callback) { throw new Error('callback cannot be null.'); } + 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.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) { - if (resourceGroupName.match(/^[-\w\._]+$/) === null) + 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 (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 (jobId === null || jobId === undefined || typeof jobId.valueOf() !== 'string') { - throw new Error('jobId cannot be null or undefined and it must be of type string.'); + if (jobName === null || jobName === undefined || typeof jobName.valueOf() !== 'string') { + throw new Error('jobName cannot be null or undefined and it must be of type string.'); } - if (this.client.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.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { - throw new Error('this.client.apiVersion cannot be null or undefined and it must be of type string.'); + if (this.client.clientRequestId !== null && this.client.clientRequestId !== undefined && typeof this.client.clientRequestId.valueOf() !== 'string') { + throw new Error('this.client.clientRequestId must be of type string.'); } if (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.'); @@ -82,13 +79,13 @@ function _getOutput(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}/jobs/{jobId}/output'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); - requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); - requestUrl = requestUrl.replace('{jobId}', encodeURIComponent(jobId)); + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/jobs/{jobName}/output'; requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(this.client.automationAccountName)); + requestUrl = requestUrl.replace('{jobName}', encodeURIComponent(jobName)); let queryParameters = []; - queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); if (queryParameters.length > 0) { requestUrl += '?' + queryParameters.join('&'); } @@ -103,6 +100,9 @@ function _getOutput(resourceGroupName, automationAccountName, jobId, options, ca if (this.client.generateClientRequestId) { httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); } + if (this.client.clientRequestId !== undefined && this.client.clientRequestId !== null) { + httpRequest.headers['clientRequestId'] = this.client.clientRequestId; + } if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { httpRequest.headers['accept-language'] = this.client.acceptLanguage; } @@ -115,30 +115,27 @@ function _getOutput(resourceGroupName, automationAccountName, jobId, options, ca } httpRequest.body = null; // Send Request - httpRequest.streamedResponse = true; return client.pipeline(httpRequest, (err, response, responseBody) => { if (err) { return callback(err); } - let statusCode = response.statusCode; if (statusCode !== 200) { - let error = new Error(`Unexpected status code: ${statusCode}`); + 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 { - if (responseBody !== undefined) parsedErrorResponse = JSON.parse(responseBody); + 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.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; } if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { - let resultMapper = new client.models['ErrorResponse']().mapper(); + let resultMapper = new client.models['CloudError']().mapper(); error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); } } catch (defaultError) { @@ -148,21 +145,41 @@ function _getOutput(resourceGroupName, automationAccountName, jobId, options, ca } return callback(error); } - // Create Result - let result = response; + 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 = { + required: false, + serializedName: 'parsedResponse', + type: { + name: 'String' + } + }; + 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 runbook content of the job identified by job id. - * - * @param {string} resourceGroupName The resource group name. - * - * @param {string} automationAccountName The automation account name. + * Retrieve the runbook content of the job identified by job name. * - * @param {string} jobId The job id. + * @param {string} jobName The job name. * * @param {object} [options] Optional Parameters. * @@ -175,13 +192,13 @@ function _getOutput(resourceGroupName, automationAccountName, jobId, options, ca * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. + * {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 _getRunbookContent(resourceGroupName, automationAccountName, jobId, options, callback) { +function _getRunbookContent(jobName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -191,28 +208,29 @@ function _getRunbookContent(resourceGroupName, automationAccountName, jobId, opt if (!callback) { throw new Error('callback cannot be null.'); } + 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.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) { - if (resourceGroupName.match(/^[-\w\._]+$/) === null) + 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 (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 (jobId === null || jobId === undefined || typeof jobId.valueOf() !== 'string') { - throw new Error('jobId 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 (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 (jobName === null || jobName === undefined || typeof jobName.valueOf() !== 'string') { + throw new Error('jobName cannot be null or undefined and it must be of type string.'); } - if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { - throw new Error('this.client.apiVersion cannot be null or undefined and it must be of type string.'); + if (this.client.clientRequestId !== null && this.client.clientRequestId !== undefined && typeof this.client.clientRequestId.valueOf() !== 'string') { + throw new Error('this.client.clientRequestId must be of type string.'); } if (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.'); @@ -223,13 +241,13 @@ function _getRunbookContent(resourceGroupName, automationAccountName, jobId, opt // Construct URL let baseUrl = this.client.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/jobs/{jobId}/runbookContent'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); - requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); - requestUrl = requestUrl.replace('{jobId}', encodeURIComponent(jobId)); + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/jobs/{jobName}/runbookContent'; requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(this.client.automationAccountName)); + requestUrl = requestUrl.replace('{jobName}', encodeURIComponent(jobName)); let queryParameters = []; - queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); if (queryParameters.length > 0) { requestUrl += '?' + queryParameters.join('&'); } @@ -244,6 +262,9 @@ function _getRunbookContent(resourceGroupName, automationAccountName, jobId, opt if (this.client.generateClientRequestId) { httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); } + if (this.client.clientRequestId !== undefined && this.client.clientRequestId !== null) { + httpRequest.headers['clientRequestId'] = this.client.clientRequestId; + } if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { httpRequest.headers['accept-language'] = this.client.acceptLanguage; } @@ -256,30 +277,27 @@ function _getRunbookContent(resourceGroupName, automationAccountName, jobId, opt } httpRequest.body = null; // Send Request - httpRequest.streamedResponse = true; return client.pipeline(httpRequest, (err, response, responseBody) => { if (err) { return callback(err); } - let statusCode = response.statusCode; if (statusCode !== 200) { - let error = new Error(`Unexpected status code: ${statusCode}`); + 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 { - if (responseBody !== undefined) parsedErrorResponse = JSON.parse(responseBody); + 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.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; } if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { - let resultMapper = new client.models['ErrorResponse']().mapper(); + let resultMapper = new client.models['CloudError']().mapper(); error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); } } catch (defaultError) { @@ -289,21 +307,41 @@ function _getRunbookContent(resourceGroupName, automationAccountName, jobId, opt } return callback(error); } - // Create Result - let result = response; + 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 = { + required: false, + serializedName: 'parsedResponse', + type: { + name: 'String' + } + }; + 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); }); } /** - * Suspend the job identified by jobId. - * - * @param {string} resourceGroupName The resource group name. + * Suspend the job identified by job name. * - * @param {string} automationAccountName The automation account name. - * - * @param {uuid} jobId The job id. + * @param {string} jobName The job name. * * @param {object} [options] Optional Parameters. * @@ -322,7 +360,7 @@ function _getRunbookContent(resourceGroupName, automationAccountName, jobId, opt * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _suspend(resourceGroupName, automationAccountName, jobId, options, callback) { +function _suspend(jobName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -332,28 +370,29 @@ function _suspend(resourceGroupName, automationAccountName, jobId, options, call if (!callback) { throw new Error('callback cannot be null.'); } + 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.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { + throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (resourceGroupName !== null && resourceGroupName !== undefined) { - 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 (jobId === null || jobId === undefined || typeof jobId.valueOf() !== 'string' || !msRest.isValidUuid(jobId)) { - throw new Error('jobId cannot be null or undefined and it must be of type string and must be a valid uuid.'); + 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 (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 (jobName === null || jobName === undefined || typeof jobName.valueOf() !== 'string') { + throw new Error('jobName cannot be null or undefined and it must be of type string.'); } - if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { - throw new Error('this.client.apiVersion cannot be null or undefined and it must be of type string.'); + if (this.client.clientRequestId !== null && this.client.clientRequestId !== undefined && typeof this.client.clientRequestId.valueOf() !== 'string') { + throw new Error('this.client.clientRequestId must be of type string.'); } if (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.'); @@ -364,13 +403,13 @@ function _suspend(resourceGroupName, automationAccountName, jobId, options, call // Construct URL let baseUrl = this.client.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/jobs/{jobId}/suspend'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); - requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); - requestUrl = requestUrl.replace('{jobId}', encodeURIComponent(jobId.toString())); + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/jobs/{jobName}/suspend'; requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(this.client.automationAccountName)); + requestUrl = requestUrl.replace('{jobName}', encodeURIComponent(jobName)); let queryParameters = []; - queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); if (queryParameters.length > 0) { requestUrl += '?' + queryParameters.join('&'); } @@ -385,6 +424,9 @@ function _suspend(resourceGroupName, automationAccountName, jobId, options, call if (this.client.generateClientRequestId) { httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); } + if (this.client.clientRequestId !== undefined && this.client.clientRequestId !== null) { + httpRequest.headers['clientRequestId'] = this.client.clientRequestId; + } if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { httpRequest.headers['accept-language'] = this.client.acceptLanguage; } @@ -437,13 +479,9 @@ function _suspend(resourceGroupName, automationAccountName, jobId, options, call } /** - * Stop the job identified by jobId. - * - * @param {string} resourceGroupName The resource group name. - * - * @param {string} automationAccountName The automation account name. + * Stop the job identified by jobName. * - * @param {uuid} jobId The job id. + * @param {string} jobName The job name. * * @param {object} [options] Optional Parameters. * @@ -462,7 +500,7 @@ function _suspend(resourceGroupName, automationAccountName, jobId, options, call * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _stop(resourceGroupName, automationAccountName, jobId, options, callback) { +function _stop(jobName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -472,28 +510,29 @@ function _stop(resourceGroupName, automationAccountName, jobId, options, callbac if (!callback) { throw new Error('callback cannot be null.'); } + 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 (jobId === null || jobId === undefined || typeof jobId.valueOf() !== 'string' || !msRest.isValidUuid(jobId)) { - throw new Error('jobId cannot be null or undefined and it must be of type string and must be a valid uuid.'); + if (jobName === null || jobName === undefined || typeof jobName.valueOf() !== 'string') { + throw new Error('jobName cannot be null or undefined and it must be of type string.'); } if (this.client.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.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { - throw new Error('this.client.apiVersion cannot be null or undefined and it must be of type string.'); + if (this.client.clientRequestId !== null && this.client.clientRequestId !== undefined && typeof this.client.clientRequestId.valueOf() !== 'string') { + throw new Error('this.client.clientRequestId must be of type string.'); } if (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.'); @@ -504,13 +543,13 @@ function _stop(resourceGroupName, automationAccountName, jobId, options, callbac // Construct URL let baseUrl = this.client.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/jobs/{jobId}/stop'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); - requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); - requestUrl = requestUrl.replace('{jobId}', encodeURIComponent(jobId.toString())); + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/jobs/{jobName}/stop'; + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(this.client.automationAccountName)); + requestUrl = requestUrl.replace('{jobName}', encodeURIComponent(jobName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; - queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); if (queryParameters.length > 0) { requestUrl += '?' + queryParameters.join('&'); } @@ -525,6 +564,9 @@ function _stop(resourceGroupName, automationAccountName, jobId, options, callbac if (this.client.generateClientRequestId) { httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); } + if (this.client.clientRequestId !== undefined && this.client.clientRequestId !== null) { + httpRequest.headers['clientRequestId'] = this.client.clientRequestId; + } if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { httpRequest.headers['accept-language'] = this.client.acceptLanguage; } @@ -577,13 +619,9 @@ function _stop(resourceGroupName, automationAccountName, jobId, options, callbac } /** - * Retrieve the job identified by job id. - * - * @param {string} resourceGroupName The resource group name. + * Retrieve the job identified by job name. * - * @param {string} automationAccountName The automation account name. - * - * @param {uuid} jobId The job id. + * @param {string} jobName The job name. * * @param {object} [options] Optional Parameters. * @@ -603,7 +641,7 @@ function _stop(resourceGroupName, automationAccountName, jobId, options, callbac * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _get(resourceGroupName, automationAccountName, jobId, options, callback) { +function _get(jobName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -613,28 +651,29 @@ function _get(resourceGroupName, automationAccountName, jobId, options, callback if (!callback) { throw new Error('callback cannot be null.'); } + 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.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) { - if (resourceGroupName.match(/^[-\w\._]+$/) === null) + 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 (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 (jobId === null || jobId === undefined || typeof jobId.valueOf() !== 'string' || !msRest.isValidUuid(jobId)) { - throw new Error('jobId cannot be null or undefined and it must be of type string and must be a valid uuid.'); + 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 (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 (jobName === null || jobName === undefined || typeof jobName.valueOf() !== 'string') { + throw new Error('jobName cannot be null or undefined and it must be of type string.'); } - if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { - throw new Error('this.client.apiVersion cannot be null or undefined and it must be of type string.'); + if (this.client.clientRequestId !== null && this.client.clientRequestId !== undefined && typeof this.client.clientRequestId.valueOf() !== 'string') { + throw new Error('this.client.clientRequestId must be of type string.'); } if (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.'); @@ -645,13 +684,13 @@ function _get(resourceGroupName, automationAccountName, jobId, options, callback // Construct URL let baseUrl = this.client.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/jobs/{jobId}'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); - requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); - requestUrl = requestUrl.replace('{jobId}', encodeURIComponent(jobId.toString())); + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/jobs/{jobName}'; requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(this.client.automationAccountName)); + requestUrl = requestUrl.replace('{jobName}', encodeURIComponent(jobName)); let queryParameters = []; - queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); if (queryParameters.length > 0) { requestUrl += '?' + queryParameters.join('&'); } @@ -666,6 +705,9 @@ function _get(resourceGroupName, automationAccountName, jobId, options, callback if (this.client.generateClientRequestId) { httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); } + if (this.client.clientRequestId !== undefined && this.client.clientRequestId !== null) { + httpRequest.headers['clientRequestId'] = this.client.clientRequestId; + } if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { httpRequest.headers['accept-language'] = this.client.acceptLanguage; } @@ -737,11 +779,7 @@ function _get(resourceGroupName, automationAccountName, jobId, options, callback /** * Create a job of the runbook. * - * @param {string} resourceGroupName The resource group name. - * - * @param {string} automationAccountName The automation account name. - * - * @param {uuid} jobId The job id. + * @param {string} jobName The job name. * * @param {object} parameters The parameters supplied to the create job * operation. @@ -757,14 +795,6 @@ function _get(resourceGroupName, automationAccountName, jobId, options, callback * @param {string} [parameters.runOn] Gets or sets the runOn which specifies * the group name where the job is to be executed. * - * @param {string} [parameters.name] Gets or sets name of the resource. - * - * @param {string} [parameters.location] Gets or sets the location of the - * resource. - * - * @param {object} [parameters.tags] Gets or sets the tags attached to the - * resource. - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -783,7 +813,7 @@ function _get(resourceGroupName, automationAccountName, jobId, options, callback * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _create(resourceGroupName, automationAccountName, jobId, parameters, options, callback) { +function _create(jobName, parameters, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -793,31 +823,32 @@ function _create(resourceGroupName, automationAccountName, jobId, parameters, op if (!callback) { throw new Error('callback cannot be null.'); } + 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.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) { - if (resourceGroupName.match(/^[-\w\._]+$/) === null) + 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 (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 (jobId === null || jobId === undefined || typeof jobId.valueOf() !== 'string' || !msRest.isValidUuid(jobId)) { - throw new Error('jobId cannot be null or undefined and it must be of type string and must be a valid uuid.'); + 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 (parameters === null || parameters === undefined) { throw new Error('parameters cannot be null or undefined.'); } - 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.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { - throw new Error('this.client.apiVersion cannot be null or undefined and it must be of type string.'); + if (this.client.clientRequestId !== null && this.client.clientRequestId !== undefined && typeof this.client.clientRequestId.valueOf() !== 'string') { + throw new Error('this.client.clientRequestId must be of type string.'); } if (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.'); @@ -828,13 +859,13 @@ function _create(resourceGroupName, automationAccountName, jobId, parameters, op // Construct URL let baseUrl = this.client.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/jobs/{jobId}'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); - requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); - requestUrl = requestUrl.replace('{jobId}', encodeURIComponent(jobId.toString())); + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/jobs/{jobName}'; requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(this.client.automationAccountName)); + requestUrl = requestUrl.replace('{jobName}', encodeURIComponent(jobName)); let queryParameters = []; - queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); if (queryParameters.length > 0) { requestUrl += '?' + queryParameters.join('&'); } @@ -849,6 +880,9 @@ function _create(resourceGroupName, automationAccountName, jobId, parameters, op if (this.client.generateClientRequestId) { httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); } + if (this.client.clientRequestId !== undefined && this.client.clientRequestId !== null) { + httpRequest.headers['clientRequestId'] = this.client.clientRequestId; + } if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { httpRequest.headers['accept-language'] = this.client.acceptLanguage; } @@ -934,10 +968,6 @@ function _create(resourceGroupName, automationAccountName, jobId, parameters, op /** * Retrieve a list of jobs. * - * @param {string} resourceGroupName The resource group name. - * - * @param {string} automationAccountName The automation account name. - * * @param {object} [options] Optional Parameters. * * @param {string} [options.filter] The filter to apply on the operation. @@ -952,13 +982,13 @@ function _create(resourceGroupName, automationAccountName, jobId, parameters, op * {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 JobListResult} for more information. + * See {@link JobListResultV2} 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. */ -function _listByAutomationAccount(resourceGroupName, automationAccountName, options, callback) { +function _listByAutomationAccount(options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -969,19 +999,20 @@ function _listByAutomationAccount(resourceGroupName, automationAccountName, opti throw new Error('callback cannot be null.'); } let filter = (options && options.filter !== undefined) ? options.filter : 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.'); @@ -989,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 (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { - throw new Error('this.client.apiVersion cannot be null or undefined and it must be of type string.'); + if (this.client.clientRequestId !== null && this.client.clientRequestId !== undefined && typeof this.client.clientRequestId.valueOf() !== 'string') { + throw new Error('this.client.clientRequestId must be of type string.'); } if (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.'); @@ -1002,14 +1033,14 @@ 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) { queryParameters.push('$filter=' + encodeURIComponent(filter)); } - queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); if (queryParameters.length > 0) { requestUrl += '?' + queryParameters.join('&'); } @@ -1024,6 +1055,9 @@ function _listByAutomationAccount(resourceGroupName, automationAccountName, opti if (this.client.generateClientRequestId) { httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); } + if (this.client.clientRequestId !== undefined && this.client.clientRequestId !== null) { + httpRequest.headers['clientRequestId'] = this.client.clientRequestId; + } if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { httpRequest.headers['accept-language'] = this.client.acceptLanguage; } @@ -1077,7 +1111,7 @@ function _listByAutomationAccount(resourceGroupName, automationAccountName, opti parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['JobListResult']().mapper(); + let resultMapper = new client.models['JobListResultV2']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -1093,13 +1127,9 @@ function _listByAutomationAccount(resourceGroupName, automationAccountName, opti } /** - * Resume the job identified by jobId. - * - * @param {string} resourceGroupName The resource group name. - * - * @param {string} automationAccountName The automation account name. + * Resume the job identified by jobName. * - * @param {uuid} jobId The job id. + * @param {string} jobName The job name. * * @param {object} [options] Optional Parameters. * @@ -1118,7 +1148,7 @@ function _listByAutomationAccount(resourceGroupName, automationAccountName, opti * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _resume(resourceGroupName, automationAccountName, jobId, options, callback) { +function _resume(jobName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -1128,28 +1158,29 @@ function _resume(resourceGroupName, automationAccountName, jobId, options, callb if (!callback) { throw new Error('callback cannot be null.'); } + 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 (jobId === null || jobId === undefined || typeof jobId.valueOf() !== 'string' || !msRest.isValidUuid(jobId)) { - throw new Error('jobId cannot be null or undefined and it must be of type string and must be a valid uuid.'); + if (jobName === null || jobName === undefined || typeof jobName.valueOf() !== 'string') { + throw new Error('jobName cannot be null or undefined and it must be of type string.'); } if (this.client.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.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { - throw new Error('this.client.apiVersion cannot be null or undefined and it must be of type string.'); + if (this.client.clientRequestId !== null && this.client.clientRequestId !== undefined && typeof this.client.clientRequestId.valueOf() !== 'string') { + throw new Error('this.client.clientRequestId must be of type string.'); } if (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.'); @@ -1160,13 +1191,13 @@ function _resume(resourceGroupName, automationAccountName, jobId, options, callb // Construct URL let baseUrl = this.client.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/jobs/{jobId}/resume'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); - requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); - requestUrl = requestUrl.replace('{jobId}', encodeURIComponent(jobId.toString())); + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/jobs/{jobName}/resume'; + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(this.client.automationAccountName)); + requestUrl = requestUrl.replace('{jobName}', encodeURIComponent(jobName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; - queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); if (queryParameters.length > 0) { requestUrl += '?' + queryParameters.join('&'); } @@ -1181,6 +1212,9 @@ function _resume(resourceGroupName, automationAccountName, jobId, options, callb if (this.client.generateClientRequestId) { httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); } + if (this.client.clientRequestId !== undefined && this.client.clientRequestId !== null) { + httpRequest.headers['clientRequestId'] = this.client.clientRequestId; + } if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { httpRequest.headers['accept-language'] = this.client.acceptLanguage; } @@ -1250,7 +1284,7 @@ function _resume(resourceGroupName, automationAccountName, jobId, options, callb * {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 JobListResult} for more information. + * See {@link JobListResultV2} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -1271,6 +1305,9 @@ function _listByAutomationAccountNext(nextPageLink, options, callback) { if (nextPageLink === null || nextPageLink === undefined || typeof nextPageLink.valueOf() !== 'string') { throw new Error('nextPageLink cannot be null or undefined and it must be of type string.'); } + if (this.client.clientRequestId !== null && this.client.clientRequestId !== undefined && typeof this.client.clientRequestId.valueOf() !== 'string') { + throw new Error('this.client.clientRequestId must be of type string.'); + } if (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.'); } @@ -1292,6 +1329,9 @@ function _listByAutomationAccountNext(nextPageLink, options, callback) { if (this.client.generateClientRequestId) { httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); } + if (this.client.clientRequestId !== undefined && this.client.clientRequestId !== null) { + httpRequest.headers['clientRequestId'] = this.client.clientRequestId; + } if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { httpRequest.headers['accept-language'] = this.client.acceptLanguage; } @@ -1345,7 +1385,7 @@ function _listByAutomationAccountNext(nextPageLink, options, callback) { parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['JobListResult']().mapper(); + let resultMapper = new client.models['JobListResultV2']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -1380,13 +1420,9 @@ class JobOperations { } /** - * Retrieve the job output identified by job id. - * - * @param {string} resourceGroupName The resource group name. + * Retrieve the job output identified by job name. * - * @param {string} automationAccountName The automation account name. - * - * @param {string} jobId The job id. + * @param {string} jobName The name of the job to be created. * * @param {object} [options] Optional Parameters. * @@ -1395,15 +1431,15 @@ class JobOperations { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getOutputWithHttpOperationResponse(resourceGroupName, automationAccountName, jobId, options) { + getOutputWithHttpOperationResponse(jobName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._getOutput(resourceGroupName, automationAccountName, jobId, 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); } @@ -1414,13 +1450,9 @@ class JobOperations { } /** - * Retrieve the job output identified by job id. - * - * @param {string} resourceGroupName The resource group name. - * - * @param {string} automationAccountName The automation account name. + * Retrieve the job output identified by job name. * - * @param {string} jobId The job id. + * @param {string} jobName The name of the job to be created. * * @param {object} [options] Optional Parameters. * @@ -1434,7 +1466,7 @@ class JobOperations { * * {Promise} A promise is returned * - * @resolve {Object} - The deserialized result object. + * @resolve {String} - The deserialized result object. * * @reject {Error} - The error object. * @@ -1442,13 +1474,13 @@ class JobOperations { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. + * {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. */ - getOutput(resourceGroupName, automationAccountName, jobId, options, optionalCallback) { + getOutput(jobName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1457,25 +1489,21 @@ class JobOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getOutput(resourceGroupName, automationAccountName, jobId, 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, jobId, options, optionalCallback); + return self._getOutput(jobName, options, optionalCallback); } } /** - * Retrieve the runbook content of the job identified by job id. - * - * @param {string} resourceGroupName The resource group name. + * Retrieve the runbook content of the job identified by job name. * - * @param {string} automationAccountName The automation account name. - * - * @param {string} jobId The job id. + * @param {string} jobName The job name. * * @param {object} [options] Optional Parameters. * @@ -1484,15 +1512,15 @@ class JobOperations { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getRunbookContentWithHttpOperationResponse(resourceGroupName, automationAccountName, jobId, options) { + getRunbookContentWithHttpOperationResponse(jobName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._getRunbookContent(resourceGroupName, automationAccountName, jobId, 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); } @@ -1503,13 +1531,9 @@ class JobOperations { } /** - * Retrieve the runbook content of the job identified by job id. - * - * @param {string} resourceGroupName The resource group name. - * - * @param {string} automationAccountName The automation account name. + * Retrieve the runbook content of the job identified by job name. * - * @param {string} jobId The job id. + * @param {string} jobName The job name. * * @param {object} [options] Optional Parameters. * @@ -1523,7 +1547,7 @@ class JobOperations { * * {Promise} A promise is returned * - * @resolve {Object} - The deserialized result object. + * @resolve {String} - The deserialized result object. * * @reject {Error} - The error object. * @@ -1531,13 +1555,13 @@ class JobOperations { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. + * {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. */ - getRunbookContent(resourceGroupName, automationAccountName, jobId, options, optionalCallback) { + getRunbookContent(jobName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1546,25 +1570,21 @@ class JobOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getRunbookContent(resourceGroupName, automationAccountName, jobId, 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, jobId, options, optionalCallback); + return self._getRunbookContent(jobName, options, optionalCallback); } } /** - * Suspend the job identified by jobId. - * - * @param {string} resourceGroupName The resource group name. + * Suspend the job identified by job name. * - * @param {string} automationAccountName The automation account name. - * - * @param {uuid} jobId The job id. + * @param {string} jobName The job name. * * @param {object} [options] Optional Parameters. * @@ -1577,11 +1597,11 @@ class JobOperations { * * @reject {Error} - The error object. */ - suspendWithHttpOperationResponse(resourceGroupName, automationAccountName, jobId, options) { + suspendWithHttpOperationResponse(jobName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._suspend(resourceGroupName, automationAccountName, jobId, 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); } @@ -1592,13 +1612,9 @@ class JobOperations { } /** - * Suspend the job identified by jobId. - * - * @param {string} resourceGroupName The resource group name. - * - * @param {string} automationAccountName The automation account name. + * Suspend the job identified by job name. * - * @param {uuid} jobId The job id. + * @param {string} jobName The job name. * * @param {object} [options] Optional Parameters. * @@ -1626,7 +1642,7 @@ class JobOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - suspend(resourceGroupName, automationAccountName, jobId, options, optionalCallback) { + suspend(jobName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1635,25 +1651,21 @@ class JobOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._suspend(resourceGroupName, automationAccountName, jobId, 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, jobId, options, optionalCallback); + return self._suspend(jobName, options, optionalCallback); } } /** - * Stop the job identified by jobId. - * - * @param {string} resourceGroupName The resource group name. - * - * @param {string} automationAccountName The automation account name. + * Stop the job identified by jobName. * - * @param {uuid} jobId The job id. + * @param {string} jobName The job name. * * @param {object} [options] Optional Parameters. * @@ -1666,11 +1678,11 @@ class JobOperations { * * @reject {Error} - The error object. */ - stopWithHttpOperationResponse(resourceGroupName, automationAccountName, jobId, options) { + stopWithHttpOperationResponse(jobName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._stop(resourceGroupName, automationAccountName, jobId, 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); } @@ -1681,13 +1693,9 @@ class JobOperations { } /** - * Stop the job identified by jobId. + * Stop the job identified by jobName. * - * @param {string} resourceGroupName The resource group name. - * - * @param {string} automationAccountName The automation account name. - * - * @param {uuid} jobId The job id. + * @param {string} jobName The job name. * * @param {object} [options] Optional Parameters. * @@ -1715,7 +1723,7 @@ class JobOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - stop(resourceGroupName, automationAccountName, jobId, options, optionalCallback) { + stop(jobName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1724,25 +1732,21 @@ class JobOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._stop(resourceGroupName, automationAccountName, jobId, 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, jobId, options, optionalCallback); + return self._stop(jobName, options, optionalCallback); } } /** - * Retrieve the job identified by job id. - * - * @param {string} resourceGroupName The resource group name. + * Retrieve the job identified by job name. * - * @param {string} automationAccountName The automation account name. - * - * @param {uuid} jobId The job id. + * @param {string} jobName The job name. * * @param {object} [options] Optional Parameters. * @@ -1755,11 +1759,11 @@ class JobOperations { * * @reject {Error} - The error object. */ - getWithHttpOperationResponse(resourceGroupName, automationAccountName, jobId, options) { + getWithHttpOperationResponse(jobName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._get(resourceGroupName, automationAccountName, jobId, 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); } @@ -1770,13 +1774,9 @@ class JobOperations { } /** - * Retrieve the job identified by job id. - * - * @param {string} resourceGroupName The resource group name. + * Retrieve the job identified by job name. * - * @param {string} automationAccountName The automation account name. - * - * @param {uuid} jobId The job id. + * @param {string} jobName The job name. * * @param {object} [options] Optional Parameters. * @@ -1805,7 +1805,7 @@ class JobOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - get(resourceGroupName, automationAccountName, jobId, options, optionalCallback) { + get(jobName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1814,25 +1814,21 @@ class JobOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._get(resourceGroupName, automationAccountName, jobId, 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, jobId, 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 automation account name. - * - * @param {uuid} jobId The job id. + * @param {string} jobName The job name. * * @param {object} parameters The parameters supplied to the create job * operation. @@ -1848,14 +1844,6 @@ class JobOperations { * @param {string} [parameters.runOn] Gets or sets the runOn which specifies * the group name where the job is to be executed. * - * @param {string} [parameters.name] Gets or sets name of the resource. - * - * @param {string} [parameters.location] Gets or sets the location of the - * resource. - * - * @param {object} [parameters.tags] Gets or sets the tags attached to the - * resource. - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -1867,11 +1855,11 @@ class JobOperations { * * @reject {Error} - The error object. */ - createWithHttpOperationResponse(resourceGroupName, automationAccountName, jobId, parameters, options) { + createWithHttpOperationResponse(jobName, parameters, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._create(resourceGroupName, automationAccountName, jobId, 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); } @@ -1884,11 +1872,7 @@ class JobOperations { /** * Create a job of the runbook. * - * @param {string} resourceGroupName The resource group name. - * - * @param {string} automationAccountName The automation account name. - * - * @param {uuid} jobId The job id. + * @param {string} jobName The job name. * * @param {object} parameters The parameters supplied to the create job * operation. @@ -1904,14 +1888,6 @@ class JobOperations { * @param {string} [parameters.runOn] Gets or sets the runOn which specifies * the group name where the job is to be executed. * - * @param {string} [parameters.name] Gets or sets name of the resource. - * - * @param {string} [parameters.location] Gets or sets the location of the - * resource. - * - * @param {object} [parameters.tags] Gets or sets the tags attached to the - * resource. - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -1939,7 +1915,7 @@ class JobOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - create(resourceGroupName, automationAccountName, jobId, parameters, options, optionalCallback) { + create(jobName, parameters, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1948,24 +1924,20 @@ class JobOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._create(resourceGroupName, automationAccountName, jobId, 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, jobId, 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 automation account name. - * * @param {object} [options] Optional Parameters. * * @param {string} [options.filter] The filter to apply on the operation. @@ -1975,15 +1947,15 @@ class JobOperations { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @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); } @@ -1996,10 +1968,6 @@ class JobOperations { /** * Retrieve a list of jobs. * - * @param {string} resourceGroupName The resource group name. - * - * @param {string} automationAccountName The automation account name. - * * @param {object} [options] Optional Parameters. * * @param {string} [options.filter] The filter to apply on the operation. @@ -2014,7 +1982,7 @@ class JobOperations { * * {Promise} A promise is returned * - * @resolve {JobListResult} - The deserialized result object. + * @resolve {JobListResultV2} - The deserialized result object. * * @reject {Error} - The error object. * @@ -2023,13 +1991,13 @@ class JobOperations { * {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 JobListResult} for more information. + * See {@link JobListResultV2} 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. */ - listByAutomationAccount(resourceGroupName, automationAccountName, options, optionalCallback) { + listByAutomationAccount(options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -2038,25 +2006,21 @@ 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 jobId. + * Resume the job identified by jobName. * - * @param {string} resourceGroupName The resource group name. - * - * @param {string} automationAccountName The automation account name. - * - * @param {uuid} jobId The job id. + * @param {string} jobName The job name. * * @param {object} [options] Optional Parameters. * @@ -2069,11 +2033,11 @@ class JobOperations { * * @reject {Error} - The error object. */ - resumeWithHttpOperationResponse(resourceGroupName, automationAccountName, jobId, options) { + resumeWithHttpOperationResponse(jobName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._resume(resourceGroupName, automationAccountName, jobId, 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); } @@ -2084,13 +2048,9 @@ class JobOperations { } /** - * Resume the job identified by jobId. - * - * @param {string} resourceGroupName The resource group name. - * - * @param {string} automationAccountName The automation account name. + * Resume the job identified by jobName. * - * @param {uuid} jobId The job id. + * @param {string} jobName The job name. * * @param {object} [options] Optional Parameters. * @@ -2118,7 +2078,7 @@ class JobOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - resume(resourceGroupName, automationAccountName, jobId, options, optionalCallback) { + resume(jobName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -2127,14 +2087,14 @@ class JobOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._resume(resourceGroupName, automationAccountName, jobId, 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, jobId, options, optionalCallback); + return self._resume(jobName, options, optionalCallback); } } @@ -2151,7 +2111,7 @@ class JobOperations { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -2187,7 +2147,7 @@ class JobOperations { * * {Promise} A promise is returned * - * @resolve {JobListResult} - The deserialized result object. + * @resolve {JobListResultV2} - The deserialized result object. * * @reject {Error} - The error object. * @@ -2196,7 +2156,7 @@ class JobOperations { * {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 JobListResult} for more information. + * See {@link JobListResultV2} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * diff --git a/lib/services/automationManagement/lib/operations/jobScheduleOperations.js b/lib/services/automationManagement/lib/operations/jobScheduleOperations.js index 580185b3ab..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') { @@ -50,15 +48,16 @@ function _deleteMethod(resourceGroupName, automationAccountName, jobScheduleId, 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 (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') { @@ -70,9 +69,6 @@ function _deleteMethod(resourceGroupName, automationAccountName, jobScheduleId, 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.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { - throw new Error('this.client.apiVersion 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.'); } @@ -83,12 +79,12 @@ 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)); let queryParameters = []; - queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); if (queryParameters.length > 0) { requestUrl += '?' + queryParameters.join('&'); } @@ -157,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. @@ -181,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') { @@ -191,15 +185,16 @@ function _get(resourceGroupName, automationAccountName, jobScheduleId, options, 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 (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') { @@ -211,9 +206,6 @@ function _get(resourceGroupName, automationAccountName, jobScheduleId, options, if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); } - if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { - throw new Error('this.client.apiVersion 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.'); } @@ -224,12 +216,12 @@ 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)); let queryParameters = []; - queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); if (queryParameters.length > 0) { requestUrl += '?' + queryParameters.join('&'); } @@ -315,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. @@ -358,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') { @@ -368,15 +358,16 @@ function _create(resourceGroupName, automationAccountName, jobScheduleId, parame 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 (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') { @@ -391,9 +382,6 @@ function _create(resourceGroupName, automationAccountName, jobScheduleId, parame 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.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { - throw new Error('this.client.apiVersion 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.'); } @@ -404,12 +392,12 @@ 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)); let queryParameters = []; - queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); if (queryParameters.length > 0) { requestUrl += '?' + queryParameters.join('&'); } @@ -509,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. @@ -531,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') { @@ -541,15 +527,16 @@ function _listByAutomationAccount(resourceGroupName, automationAccountName, opti 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 (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,9 +545,6 @@ 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 (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { - throw new Error('this.client.apiVersion 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.'); } @@ -571,11 +555,11 @@ 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 = []; - queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); if (queryParameters.length > 0) { requestUrl += '?' + queryParameters.join('&'); } @@ -804,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. @@ -821,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); } @@ -838,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. @@ -870,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') { @@ -879,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. @@ -910,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); } @@ -927,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. @@ -960,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') { @@ -969,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. @@ -1019,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); } @@ -1036,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. @@ -1088,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') { @@ -1097,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. @@ -1126,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); } @@ -1143,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. @@ -1174,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') { @@ -1183,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 44e5c0dbfd..75db40543f 100644 --- a/lib/services/automationManagement/lib/operations/jobStreamOperations.js +++ b/lib/services/automationManagement/lib/operations/jobStreamOperations.js @@ -17,11 +17,7 @@ const WebResource = msRest.WebResource; /** * Retrieve the job stream identified by job stream id. * - * @param {string} resourceGroupName The resource group name. - * - * @param {string} automationAccountName The automation account name. - * - * @param {string} jobId The job id. + * @param {string} jobName The job name. * * @param {string} jobStreamId The job stream id. * @@ -43,7 +39,7 @@ const WebResource = msRest.WebResource; * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _get(resourceGroupName, automationAccountName, jobId, jobStreamId, options, callback) { +function _get(jobName, jobStreamId, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -53,31 +49,32 @@ function _get(resourceGroupName, automationAccountName, jobId, jobStreamId, opti if (!callback) { throw new Error('callback cannot be null.'); } + 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.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { + throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (resourceGroupName !== null && resourceGroupName !== undefined) { - 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 (jobId === null || jobId === undefined || typeof jobId.valueOf() !== 'string') { - throw new Error('jobId 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 (jobStreamId === null || jobStreamId === undefined || typeof jobStreamId.valueOf() !== 'string') { throw new Error('jobStreamId cannot be null or undefined and it must be of type string.'); } - if (this.client.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.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { - throw new Error('this.client.apiVersion cannot be null or undefined and it must be of type string.'); + if (this.client.clientRequestId !== null && this.client.clientRequestId !== undefined && typeof this.client.clientRequestId.valueOf() !== 'string') { + throw new Error('this.client.clientRequestId must be of type string.'); } if (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.'); @@ -88,14 +85,14 @@ function _get(resourceGroupName, automationAccountName, jobId, jobStreamId, opti // Construct URL let baseUrl = this.client.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/jobs/{jobId}/streams/{jobStreamId}'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); - requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); - requestUrl = requestUrl.replace('{jobId}', encodeURIComponent(jobId)); - requestUrl = requestUrl.replace('{jobStreamId}', encodeURIComponent(jobStreamId)); + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/jobs/{jobName}/streams/{jobStreamId}'; requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(this.client.automationAccountName)); + requestUrl = requestUrl.replace('{jobName}', encodeURIComponent(jobName)); + requestUrl = requestUrl.replace('{jobStreamId}', encodeURIComponent(jobStreamId)); let queryParameters = []; - queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); if (queryParameters.length > 0) { requestUrl += '?' + queryParameters.join('&'); } @@ -110,6 +107,9 @@ function _get(resourceGroupName, automationAccountName, jobId, jobStreamId, opti if (this.client.generateClientRequestId) { httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); } + if (this.client.clientRequestId !== undefined && this.client.clientRequestId !== null) { + httpRequest.headers['clientRequestId'] = this.client.clientRequestId; + } if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { httpRequest.headers['accept-language'] = this.client.acceptLanguage; } @@ -179,13 +179,9 @@ function _get(resourceGroupName, automationAccountName, jobId, jobStreamId, opti } /** - * Retrieve a list of jobs streams identified by job id. - * - * @param {string} resourceGroupName The resource group name. + * Retrieve a list of jobs streams identified by job name. * - * @param {string} automationAccountName The automation account name. - * - * @param {string} jobId The job Id. + * @param {string} jobName The job name. * * @param {object} [options] Optional Parameters. * @@ -207,7 +203,7 @@ function _get(resourceGroupName, automationAccountName, jobId, jobStreamId, opti * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _listByJob(resourceGroupName, automationAccountName, jobId, options, callback) { +function _listByJob(jobName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -218,22 +214,23 @@ function _listByJob(resourceGroupName, automationAccountName, jobId, options, ca throw new Error('callback cannot be null.'); } let filter = (options && options.filter !== undefined) ? options.filter : 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 (jobId === null || jobId === undefined || typeof jobId.valueOf() !== 'string') { - throw new Error('jobId 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 (filter !== null && filter !== undefined && typeof filter.valueOf() !== 'string') { throw new Error('filter must be of type string.'); @@ -241,8 +238,8 @@ function _listByJob(resourceGroupName, automationAccountName, jobId, 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 (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { - throw new Error('this.client.apiVersion cannot be null or undefined and it must be of type string.'); + if (this.client.clientRequestId !== null && this.client.clientRequestId !== undefined && typeof this.client.clientRequestId.valueOf() !== 'string') { + throw new Error('this.client.clientRequestId must be of type string.'); } if (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.'); @@ -253,16 +250,16 @@ 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}/jobs/{jobId}/streams'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); - requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); - requestUrl = requestUrl.replace('{jobId}', encodeURIComponent(jobId)); + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/jobs/{jobName}/streams'; + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(this.client.automationAccountName)); + requestUrl = requestUrl.replace('{jobName}', encodeURIComponent(jobName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; if (filter !== null && filter !== undefined) { queryParameters.push('$filter=' + encodeURIComponent(filter)); } - queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); if (queryParameters.length > 0) { requestUrl += '?' + queryParameters.join('&'); } @@ -277,6 +274,9 @@ function _listByJob(resourceGroupName, automationAccountName, jobId, options, ca if (this.client.generateClientRequestId) { httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); } + if (this.client.clientRequestId !== undefined && this.client.clientRequestId !== null) { + httpRequest.headers['clientRequestId'] = this.client.clientRequestId; + } if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { httpRequest.headers['accept-language'] = this.client.acceptLanguage; } @@ -346,7 +346,7 @@ function _listByJob(resourceGroupName, automationAccountName, jobId, options, ca } /** - * Retrieve a list of jobs streams identified by job id. + * Retrieve a list of jobs streams identified by job name. * * @param {string} nextPageLink The NextLink from the previous successful call * to List operation. @@ -384,6 +384,9 @@ function _listByJobNext(nextPageLink, options, callback) { if (nextPageLink === null || nextPageLink === undefined || typeof nextPageLink.valueOf() !== 'string') { throw new Error('nextPageLink cannot be null or undefined and it must be of type string.'); } + if (this.client.clientRequestId !== null && this.client.clientRequestId !== undefined && typeof this.client.clientRequestId.valueOf() !== 'string') { + throw new Error('this.client.clientRequestId must be of type string.'); + } if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { throw new Error('this.client.acceptLanguage must be of type string.'); } @@ -405,6 +408,9 @@ function _listByJobNext(nextPageLink, options, callback) { if (this.client.generateClientRequestId) { httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); } + if (this.client.clientRequestId !== undefined && this.client.clientRequestId !== null) { + httpRequest.headers['clientRequestId'] = this.client.clientRequestId; + } if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { httpRequest.headers['accept-language'] = this.client.acceptLanguage; } @@ -489,11 +495,7 @@ class JobStreamOperations { /** * Retrieve the job stream identified by job stream id. * - * @param {string} resourceGroupName The resource group name. - * - * @param {string} automationAccountName The automation account name. - * - * @param {string} jobId The job id. + * @param {string} jobName The job name. * * @param {string} jobStreamId The job stream id. * @@ -508,11 +510,11 @@ class JobStreamOperations { * * @reject {Error} - The error object. */ - getWithHttpOperationResponse(resourceGroupName, automationAccountName, jobId, jobStreamId, options) { + getWithHttpOperationResponse(jobName, jobStreamId, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._get(resourceGroupName, automationAccountName, jobId, 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); } @@ -525,11 +527,7 @@ class JobStreamOperations { /** * Retrieve the job stream identified by job stream id. * - * @param {string} resourceGroupName The resource group name. - * - * @param {string} automationAccountName The automation account name. - * - * @param {string} jobId The job id. + * @param {string} jobName The job name. * * @param {string} jobStreamId The job stream id. * @@ -560,7 +558,7 @@ class JobStreamOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - get(resourceGroupName, automationAccountName, jobId, jobStreamId, options, optionalCallback) { + get(jobName, jobStreamId, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -569,25 +567,21 @@ class JobStreamOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._get(resourceGroupName, automationAccountName, jobId, 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, jobId, jobStreamId, options, optionalCallback); + return self._get(jobName, jobStreamId, options, optionalCallback); } } /** - * Retrieve a list of jobs streams identified by job id. - * - * @param {string} resourceGroupName The resource group name. + * Retrieve a list of jobs streams identified by job name. * - * @param {string} automationAccountName The automation account name. - * - * @param {string} jobId The job Id. + * @param {string} jobName The job name. * * @param {object} [options] Optional Parameters. * @@ -602,11 +596,11 @@ class JobStreamOperations { * * @reject {Error} - The error object. */ - listByJobWithHttpOperationResponse(resourceGroupName, automationAccountName, jobId, options) { + listByJobWithHttpOperationResponse(jobName, 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(jobName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -617,13 +611,9 @@ class JobStreamOperations { } /** - * Retrieve a list of jobs streams identified by job id. - * - * @param {string} resourceGroupName The resource group name. - * - * @param {string} automationAccountName The automation account name. + * Retrieve a list of jobs streams identified by job name. * - * @param {string} jobId The job Id. + * @param {string} jobName The job name. * * @param {object} [options] Optional Parameters. * @@ -654,7 +644,7 @@ class JobStreamOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - listByJob(resourceGroupName, automationAccountName, jobId, options, optionalCallback) { + listByJob(jobName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -663,19 +653,19 @@ class JobStreamOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._listByJob(resourceGroupName, automationAccountName, jobId, 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, jobId, options, optionalCallback); + return self._listByJob(jobName, options, optionalCallback); } } /** - * Retrieve a list of jobs streams identified by job id. + * Retrieve a list of jobs streams identified by job name. * * @param {string} nextPageLink The NextLink from the previous successful call * to List operation. @@ -706,7 +696,7 @@ class JobStreamOperations { } /** - * Retrieve a list of jobs streams identified by job id. + * Retrieve a list of jobs streams identified by job name. * * @param {string} nextPageLink The NextLink from the previous successful call * to List operation. diff --git a/lib/services/automationManagement/lib/operations/linkedWorkspaceOperations.js b/lib/services/automationManagement/lib/operations/linkedWorkspaceOperations.js new file mode 100644 index 0000000000..1853bbf687 --- /dev/null +++ b/lib/services/automationManagement/lib/operations/linkedWorkspaceOperations.js @@ -0,0 +1,260 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const msRest = require('ms-rest'); +const msRestAzure = require('ms-rest-azure'); +const WebResource = msRest.WebResource; + +/** + * Retrieve the linked workspace for the account id. + * + * @param {string} automationAccountName The automation account 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. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link LinkedWorkspace} 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. + */ +function _get(automationAccountName, 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 (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 (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { + if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + { + 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.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}/linkedWorkspace'; + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); + 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 = 'GET'; + 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]; + } + } + } + httpRequest.body = null; + // 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['LinkedWorkspace']().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); + }); +} + +/** Class representing a LinkedWorkspaceOperations. */ +class LinkedWorkspaceOperations { + /** + * Create a LinkedWorkspaceOperations. + * @param {AutomationClient} client Reference to the service client. + */ + constructor(client) { + this.client = client; + this._get = _get; + } + + /** + * Retrieve the linked workspace for the account id. + * + * @param {string} automationAccountName The automation account name. + * + * @param {object} [options] Optional Parameters. + * + * @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. + */ + getWithHttpOperationResponse(automationAccountName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._get(automationAccountName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Retrieve the linked workspace for the account id. + * + * @param {string} automationAccountName The automation account name. + * + * @param {object} [options] Optional Parameters. + * + * @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 {LinkedWorkspace} - 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 LinkedWorkspace} 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. + */ + get(automationAccountName, 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._get(automationAccountName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._get(automationAccountName, options, optionalCallback); + } + } + +} + +module.exports = LinkedWorkspaceOperations; diff --git a/lib/services/automationManagement/lib/operations/moduleOperations.js b/lib/services/automationManagement/lib/operations/moduleOperations.js index 99ee8c08be..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') { @@ -50,15 +48,16 @@ function _deleteMethod(resourceGroupName, automationAccountName, moduleName, opt 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 (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') { @@ -70,9 +69,6 @@ function _deleteMethod(resourceGroupName, automationAccountName, moduleName, opt 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.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { - throw new Error('this.client.apiVersion 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.'); } @@ -83,12 +79,12 @@ 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)); let queryParameters = []; - queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); if (queryParameters.length > 0) { requestUrl += '?' + queryParameters.join('&'); } @@ -157,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. @@ -181,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') { @@ -191,15 +185,16 @@ function _get(resourceGroupName, automationAccountName, moduleName, options, cal 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 (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') { @@ -211,9 +206,6 @@ function _get(resourceGroupName, automationAccountName, moduleName, 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 (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { - throw new Error('this.client.apiVersion 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.'); } @@ -224,12 +216,12 @@ 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)); let queryParameters = []; - queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); if (queryParameters.length > 0) { requestUrl += '?' + queryParameters.join('&'); } @@ -315,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. @@ -365,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') { @@ -375,15 +365,16 @@ function _createOrUpdate(resourceGroupName, automationAccountName, moduleName, p 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 (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,9 +389,6 @@ function _createOrUpdate(resourceGroupName, automationAccountName, moduleName, p 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.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { - throw new Error('this.client.apiVersion 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.'); } @@ -411,12 +399,12 @@ 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)); let queryParameters = []; - queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); if (queryParameters.length > 0) { requestUrl += '?' + queryParameters.join('&'); } @@ -462,7 +450,7 @@ function _createOrUpdate(resourceGroupName, automationAccountName, moduleName, p return callback(err); } let statusCode = response.statusCode; - if (statusCode !== 201 && statusCode !== 200) { + if (statusCode !== 200 && statusCode !== 201) { let error = new Error(responseBody); error.statusCode = response.statusCode; error.request = msRest.stripRequest(httpRequest); @@ -492,7 +480,7 @@ function _createOrUpdate(resourceGroupName, automationAccountName, moduleName, p let result = null; if (responseBody === '') responseBody = null; // Deserialize Response - if (statusCode === 201) { + if (statusCode === 200) { let parsedResponse = null; try { parsedResponse = JSON.parse(responseBody); @@ -509,7 +497,7 @@ function _createOrUpdate(resourceGroupName, automationAccountName, moduleName, p } } // Deserialize Response - if (statusCode === 200) { + if (statusCode === 201) { let parsedResponse = null; try { parsedResponse = JSON.parse(responseBody); @@ -533,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. @@ -584,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') { @@ -594,15 +580,16 @@ function _update(resourceGroupName, automationAccountName, moduleName, parameter 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 (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,9 +604,6 @@ function _update(resourceGroupName, automationAccountName, moduleName, parameter 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.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { - throw new Error('this.client.apiVersion 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.'); } @@ -630,12 +614,12 @@ 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)); let queryParameters = []; - queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); if (queryParameters.length > 0) { requestUrl += '?' + queryParameters.join('&'); } @@ -735,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. @@ -757,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') { @@ -767,15 +749,16 @@ function _listByAutomationAccount(resourceGroupName, automationAccountName, opti 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 (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') { @@ -784,9 +767,6 @@ 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 (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { - throw new Error('this.client.apiVersion 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.'); } @@ -797,11 +777,11 @@ 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 = []; - queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); if (queryParameters.length > 0) { requestUrl += '?' + queryParameters.join('&'); } @@ -1031,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. @@ -1048,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); } @@ -1065,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. @@ -1097,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') { @@ -1106,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. @@ -1137,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); } @@ -1154,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. @@ -1187,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') { @@ -1196,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. @@ -1253,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); } @@ -1270,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. @@ -1329,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') { @@ -1338,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. @@ -1396,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); } @@ -1413,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. @@ -1473,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') { @@ -1482,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. @@ -1511,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); } @@ -1528,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. @@ -1559,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') { @@ -1568,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 1a33c45841..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') { @@ -55,15 +53,16 @@ function _listByNode(resourceGroupName, automationAccountName, nodeId, options, throw new Error('callback cannot be null.'); } let filter = (options && options.filter !== undefined) ? options.filter : undefined; + 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') { @@ -78,9 +77,6 @@ function _listByNode(resourceGroupName, automationAccountName, nodeId, options, if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); } - if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { - throw new Error('this.client.apiVersion 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.'); } @@ -91,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)); @@ -99,7 +95,7 @@ function _listByNode(resourceGroupName, automationAccountName, nodeId, options, if (filter !== null && filter !== undefined) { queryParameters.push('$filter=' + encodeURIComponent(filter)); } - queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); if (queryParameters.length > 0) { requestUrl += '?' + queryParameters.join('&'); } @@ -185,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. @@ -211,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') { @@ -221,15 +215,16 @@ function _get(resourceGroupName, automationAccountName, nodeId, reportId, option 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 (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,9 +239,6 @@ function _get(resourceGroupName, automationAccountName, nodeId, reportId, 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 (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { - throw new Error('this.client.apiVersion 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.'); } @@ -257,13 +249,13 @@ 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)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; - queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); if (queryParameters.length > 0) { requestUrl += '?' + queryParameters.join('&'); } @@ -349,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. @@ -374,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') { @@ -384,15 +374,16 @@ function _getContent(resourceGroupName, automationAccountName, nodeId, reportId, 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 (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,9 +398,6 @@ function _getContent(resourceGroupName, automationAccountName, nodeId, reportId, 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.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { - throw new Error('this.client.apiVersion 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.'); } @@ -420,13 +408,13 @@ 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)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; - queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); if (queryParameters.length > 0) { requestUrl += '?' + queryParameters.join('&'); } @@ -453,22 +441,20 @@ function _getContent(resourceGroupName, automationAccountName, nodeId, reportId, } httpRequest.body = null; // Send Request - httpRequest.streamedResponse = true; return client.pipeline(httpRequest, (err, response, responseBody) => { if (err) { return callback(err); } - let statusCode = response.statusCode; if (statusCode !== 200) { - let error = new Error(`Unexpected status code: ${statusCode}`); + 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 { - if (responseBody !== undefined) parsedErrorResponse = JSON.parse(responseBody); + parsedErrorResponse = JSON.parse(responseBody); if (parsedErrorResponse) { let internalError = null; if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; @@ -486,9 +472,33 @@ function _getContent(resourceGroupName, automationAccountName, nodeId, reportId, } return callback(error); } - // Create Result - let result = response; + 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 = { + required: false, + serializedName: 'parsedResponse', + type: { + name: 'Object' + } + }; + 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); }); } @@ -639,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. @@ -658,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); } @@ -675,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. @@ -711,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') { @@ -720,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. @@ -753,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); } @@ -770,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. @@ -805,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') { @@ -814,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. @@ -847,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); } @@ -864,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. @@ -898,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') { @@ -907,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 0155911b8c..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') { @@ -53,15 +51,16 @@ function _listFieldsByModuleAndType(resourceGroupName, automationAccountName, mo 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 (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,9 +75,6 @@ function _listFieldsByModuleAndType(resourceGroupName, automationAccountName, mo 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.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { - throw new Error('this.client.apiVersion 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.'); } @@ -89,13 +85,13 @@ 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)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; - queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); if (queryParameters.length > 0) { requestUrl += '?' + queryParameters.join('&'); } @@ -181,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. @@ -205,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') { @@ -215,15 +209,16 @@ function _listFieldsByType(resourceGroupName, automationAccountName, typeName, o 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 (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') { @@ -235,9 +230,6 @@ function _listFieldsByType(resourceGroupName, automationAccountName, typeName, 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 (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { - throw new Error('this.client.apiVersion 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.'); } @@ -248,12 +240,12 @@ 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)); let queryParameters = []; - queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); if (queryParameters.length > 0) { requestUrl += '?' + queryParameters.join('&'); } @@ -351,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. @@ -370,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); } @@ -387,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. @@ -422,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') { @@ -431,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. @@ -462,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); } @@ -479,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. @@ -512,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') { @@ -521,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/operations.js b/lib/services/automationManagement/lib/operations/operations.js index 413be0f936..f7b6c1a8fb 100644 --- a/lib/services/automationManagement/lib/operations/operations.js +++ b/lib/services/automationManagement/lib/operations/operations.js @@ -45,11 +45,9 @@ function _list(options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } + let apiVersion = '2015-10-31'; // Validate try { - if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { - throw new Error('this.client.apiVersion 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.'); } @@ -61,7 +59,7 @@ function _list(options, callback) { let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'providers/Microsoft.Automation/operations'; let queryParameters = []; - queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); if (queryParameters.length > 0) { requestUrl += '?' + queryParameters.join('&'); } diff --git a/lib/services/automationManagement/lib/operations/runbookDraftOperations.js b/lib/services/automationManagement/lib/operations/runbookDraftOperations.js index 314add164e..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. @@ -34,13 +32,13 @@ const WebResource = msRest.WebResource; * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. + * {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, runbookName, options, callback) { +function _getContent(automationAccountName, runbookName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -50,15 +48,19 @@ function _getContent(resourceGroupName, automationAccountName, runbookName, opti 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 (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { + throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (resourceGroupName !== null && resourceGroupName !== undefined) { - 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') { @@ -67,12 +69,6 @@ function _getContent(resourceGroupName, automationAccountName, runbookName, opti if (runbookName === null || runbookName === undefined || typeof runbookName.valueOf() !== 'string') { throw new Error('runbookName 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.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { - throw new Error('this.client.apiVersion 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.'); } @@ -83,12 +79,12 @@ function _getContent(resourceGroupName, automationAccountName, runbookName, opti // Construct URL 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('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{runbookName}', encodeURIComponent(runbookName)); - requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; - queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); if (queryParameters.length > 0) { requestUrl += '?' + queryParameters.join('&'); } @@ -115,30 +111,27 @@ function _getContent(resourceGroupName, automationAccountName, runbookName, opti } httpRequest.body = null; // Send Request - httpRequest.streamedResponse = true; return client.pipeline(httpRequest, (err, response, responseBody) => { if (err) { return callback(err); } - let statusCode = response.statusCode; if (statusCode !== 200) { - let error = new Error(`Unexpected status code: ${statusCode}`); + 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 { - if (responseBody !== undefined) parsedErrorResponse = JSON.parse(responseBody); + 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.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; } if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { - let resultMapper = new client.models['ErrorResponse']().mapper(); + let resultMapper = new client.models['CloudError']().mapper(); error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); } } catch (defaultError) { @@ -148,24 +141,46 @@ function _getContent(resourceGroupName, automationAccountName, runbookName, opti } return callback(error); } - // Create Result - let result = response; + 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 = { + required: false, + serializedName: 'parsedResponse', + type: { + name: 'String' + } + }; + 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); }); } /** - * Updates the runbook draft with runbookStream as its content. - * - * @param {string} resourceGroupName The resource group name. + * Replaces the runbook draft content. * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. * - * @param {object} runbookContent The runbook draft content. + * @param {string} runbookContent The runbook draft content. * * @param {object} [options] Optional Parameters. * @@ -184,7 +199,7 @@ function _getContent(resourceGroupName, automationAccountName, runbookName, opti * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _createOrUpdate(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') { @@ -197,7 +212,7 @@ function _createOrUpdate(resourceGroupName, automationAccountName, runbookName, } // Send request - this.beginCreateOrUpdate(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(); @@ -225,8 +240,6 @@ function _createOrUpdate(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. @@ -249,7 +262,7 @@ function _createOrUpdate(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') { @@ -259,15 +272,19 @@ function _get(resourceGroupName, automationAccountName, runbookName, options, ca 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 (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) { - if (resourceGroupName.match(/^[-\w\._]+$/) === null) + 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 (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') { @@ -276,12 +293,6 @@ function _get(resourceGroupName, automationAccountName, runbookName, options, ca if (runbookName === null || runbookName === undefined || typeof runbookName.valueOf() !== 'string') { throw new Error('runbookName 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.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { - throw new Error('this.client.apiVersion 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.'); } @@ -292,12 +303,12 @@ function _get(resourceGroupName, automationAccountName, runbookName, options, ca // Construct URL 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('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{runbookName}', encodeURIComponent(runbookName)); - requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; - queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); if (queryParameters.length > 0) { requestUrl += '?' + queryParameters.join('&'); } @@ -384,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 @@ -402,14 +411,13 @@ function _get(resourceGroupName, automationAccountName, runbookName, options, ca * * {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 Runbook} for more information. + * {null} [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 _publish(resourceGroupName, automationAccountName, runbookName, options, callback) { +function _publish(automationAccountName, runbookName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -422,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(); @@ -441,20 +449,6 @@ function _publish(resourceGroupName, automationAccountName, runbookName, options if (responseBody === '') responseBody = null; // Deserialize Response - let parsedResponse = null; - try { - parsedResponse = JSON.parse(responseBody); - result = JSON.parse(responseBody); - if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['Runbook']().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); }); @@ -462,9 +456,7 @@ function _publish(resourceGroupName, automationAccountName, runbookName, options } /** - * Retrieve the runbook identified by runbook name. - * - * @param {string} resourceGroupName The resource group name. + * Undo draft edit to last known published state identified by runbook name. * * @param {string} automationAccountName The automation account name. * @@ -489,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') { @@ -499,15 +491,19 @@ function _undoEdit(resourceGroupName, automationAccountName, runbookName, option 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 (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { + throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (resourceGroupName !== null && resourceGroupName !== undefined) { - 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') { @@ -516,12 +512,6 @@ function _undoEdit(resourceGroupName, automationAccountName, runbookName, option if (runbookName === null || runbookName === undefined || typeof runbookName.valueOf() !== 'string') { throw new Error('runbookName 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.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { - throw new Error('this.client.apiVersion 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.'); } @@ -532,12 +522,12 @@ function _undoEdit(resourceGroupName, automationAccountName, runbookName, option // Construct URL 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('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{runbookName}', encodeURIComponent(runbookName)); - requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; - queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); if (queryParameters.length > 0) { requestUrl += '?' + queryParameters.join('&'); } @@ -621,15 +611,13 @@ function _undoEdit(resourceGroupName, automationAccountName, runbookName, option } /** - * Updates the runbook draft with runbookStream as its content. - * - * @param {string} resourceGroupName The resource group name. + * Replaces the runbook draft content. * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. * - * @param {object} runbookContent The runbook draft content. + * @param {string} runbookContent The runbook draft content. * * @param {object} [options] Optional Parameters. * @@ -648,7 +636,7 @@ function _undoEdit(resourceGroupName, automationAccountName, runbookName, option * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _beginCreateOrUpdate(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') { @@ -658,15 +646,19 @@ function _beginCreateOrUpdate(resourceGroupName, automationAccountName, runbookN 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 (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) { - if (resourceGroupName.match(/^[-\w\._]+$/) === null) + 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 (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') { @@ -675,14 +667,8 @@ function _beginCreateOrUpdate(resourceGroupName, automationAccountName, runbookN if (runbookName === null || runbookName === undefined || typeof runbookName.valueOf() !== 'string') { throw new Error('runbookName cannot be null or undefined and it must be of type string.'); } - if (runbookContent === null || runbookContent === undefined) { - throw new Error('runbookContent cannot be null or undefined and it must be of type object.'); - } - 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.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { - throw new Error('this.client.apiVersion cannot be null or undefined and it must be of type string.'); + if (runbookContent === null || runbookContent === undefined || typeof runbookContent.valueOf() !== 'string') { + throw new Error('runbookContent 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.'); @@ -694,12 +680,12 @@ function _beginCreateOrUpdate(resourceGroupName, automationAccountName, runbookN // Construct URL 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('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{runbookName}', encodeURIComponent(runbookName)); - requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; - queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); if (queryParameters.length > 0) { requestUrl += '?' + queryParameters.join('&'); } @@ -710,7 +696,7 @@ function _beginCreateOrUpdate(resourceGroupName, automationAccountName, runbookN httpRequest.url = requestUrl; httpRequest.headers = {}; // Set Headers - httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + httpRequest.headers['Content-Type'] = 'text/powershell'; if (this.client.generateClientRequestId) { httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); } @@ -725,7 +711,25 @@ function _beginCreateOrUpdate(resourceGroupName, automationAccountName, runbookN } } // Serialize Request - let requestContent = runbookContent; + let requestContent = null; + let requestModel = null; + try { + if (runbookContent !== null && runbookContent !== undefined) { + let requestModelMapper = { + required: true, + serializedName: 'runbookContent', + type: { + name: 'String' + } + }; + requestModel = client.serialize(requestModelMapper, runbookContent, 'runbookContent'); + requestContent = JSON.stringify(requestModel); + } + } catch (error) { + let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + + `payload - ${JSON.stringify(runbookContent, null, 2)}.`); + return callback(serializationError); + } httpRequest.body = requestContent; // Send Request return client.pipeline(httpRequest, (err, response, responseBody) => { @@ -733,7 +737,7 @@ function _beginCreateOrUpdate(resourceGroupName, automationAccountName, runbookN return callback(err); } let statusCode = response.statusCode; - if (statusCode !== 202 && statusCode !== 200) { + if (statusCode !== 202) { let error = new Error(responseBody); error.statusCode = response.statusCode; error.request = msRest.stripRequest(httpRequest); @@ -770,8 +774,6 @@ function _beginCreateOrUpdate(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 @@ -788,14 +790,13 @@ function _beginCreateOrUpdate(resourceGroupName, automationAccountName, runbookN * * {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 Runbook} for more information. + * {null} [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 _beginPublish(resourceGroupName, automationAccountName, runbookName, options, callback) { +function _beginPublish(automationAccountName, runbookName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -805,15 +806,19 @@ function _beginPublish(resourceGroupName, automationAccountName, runbookName, op 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 (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) { - if (resourceGroupName.match(/^[-\w\._]+$/) === null) + 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 (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') { @@ -822,12 +827,6 @@ function _beginPublish(resourceGroupName, automationAccountName, runbookName, op if (runbookName === null || runbookName === undefined || typeof runbookName.valueOf() !== 'string') { throw new Error('runbookName 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.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { - throw new Error('this.client.apiVersion 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.'); } @@ -838,12 +837,12 @@ function _beginPublish(resourceGroupName, automationAccountName, runbookName, op // Construct URL 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('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{runbookName}', encodeURIComponent(runbookName)); - requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; - queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); if (queryParameters.length > 0) { requestUrl += '?' + queryParameters.join('&'); } @@ -875,7 +874,7 @@ function _beginPublish(resourceGroupName, automationAccountName, runbookName, op return callback(err); } let statusCode = response.statusCode; - if (statusCode !== 202 && statusCode !== 200) { + if (statusCode !== 202) { let error = new Error(responseBody); error.statusCode = response.statusCode; error.request = msRest.stripRequest(httpRequest); @@ -904,23 +903,6 @@ function _beginPublish(resourceGroupName, automationAccountName, runbookName, op // 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['Runbook']().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); }); @@ -935,19 +917,17 @@ class RunbookDraftOperations { constructor(client) { this.client = client; this._getContent = _getContent; - this._createOrUpdate = _createOrUpdate; + this._replaceContent = _replaceContent; this._get = _get; this._publish = _publish; this._undoEdit = _undoEdit; - this._beginCreateOrUpdate = _beginCreateOrUpdate; + this._beginReplaceContent = _beginReplaceContent; this._beginPublish = _beginPublish; } /** * 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,15 +939,15 @@ class RunbookDraftOperations { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @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); } @@ -980,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. @@ -998,7 +976,7 @@ class RunbookDraftOperations { * * {Promise} A promise is returned * - * @resolve {Object} - The deserialized result object. + * @resolve {String} - The deserialized result object. * * @reject {Error} - The error object. * @@ -1006,13 +984,13 @@ class RunbookDraftOperations { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. + * {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. */ - getContent(resourceGroupName, automationAccountName, runbookName, options, optionalCallback) { + getContent(automationAccountName, runbookName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1021,27 +999,25 @@ 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); } } /** - * Updates the runbook draft with runbookStream as its content. - * - * @param {string} resourceGroupName The resource group name. + * Replaces the runbook draft content. * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. * - * @param {object} runbookContent The runbook draft content. + * @param {string} runbookContent The runbook draft content. * * @param {object} [options] Optional Parameters. * @@ -1054,11 +1030,11 @@ class RunbookDraftOperations { * * @reject {Error} - The error object. */ - createOrUpdateWithHttpOperationResponse(resourceGroupName, automationAccountName, runbookName, runbookContent, options) { + replaceContentWithHttpOperationResponse(automationAccountName, runbookName, runbookContent, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._createOrUpdate(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); } @@ -1069,15 +1045,13 @@ class RunbookDraftOperations { } /** - * Updates the runbook draft with runbookStream as its content. - * - * @param {string} resourceGroupName The resource group name. + * Replaces the runbook draft content. * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. * - * @param {object} runbookContent The runbook draft content. + * @param {string} runbookContent The runbook draft content. * * @param {object} [options] Optional Parameters. * @@ -1105,7 +1079,7 @@ class RunbookDraftOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - createOrUpdate(resourceGroupName, automationAccountName, runbookName, runbookContent, options, optionalCallback) { + replaceContent(automationAccountName, runbookName, runbookContent, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1114,22 +1088,20 @@ class RunbookDraftOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._createOrUpdate(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._createOrUpdate(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. @@ -1145,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); } @@ -1162,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. @@ -1195,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') { @@ -1204,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,15 +1200,15 @@ class RunbookDraftOperations { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @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); } @@ -1253,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 @@ -1272,7 +1238,7 @@ class RunbookDraftOperations { * * {Promise} A promise is returned * - * @resolve {Runbook} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -1280,14 +1246,13 @@ class RunbookDraftOperations { * * {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 Runbook} for more information. + * {null} [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. */ - publish(resourceGroupName, automationAccountName, runbookName, options, optionalCallback) { + publish(automationAccountName, runbookName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1296,21 +1261,19 @@ 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); } } /** - * Retrieve the runbook identified by runbook name. - * - * @param {string} resourceGroupName The resource group name. + * Undo draft edit to last known published state identified by runbook name. * * @param {string} automationAccountName The automation account name. * @@ -1327,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); } @@ -1342,9 +1305,7 @@ class RunbookDraftOperations { } /** - * Retrieve the runbook identified by runbook name. - * - * @param {string} resourceGroupName The resource group name. + * Undo draft edit to last known published state identified by runbook name. * * @param {string} automationAccountName The automation account name. * @@ -1378,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') { @@ -1387,27 +1348,25 @@ 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); } } /** - * Updates the runbook draft with runbookStream as its content. - * - * @param {string} resourceGroupName The resource group name. + * Replaces the runbook draft content. * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. * - * @param {object} runbookContent The runbook draft content. + * @param {string} runbookContent The runbook draft content. * * @param {object} [options] Optional Parameters. * @@ -1420,11 +1379,11 @@ class RunbookDraftOperations { * * @reject {Error} - The error object. */ - beginCreateOrUpdateWithHttpOperationResponse(resourceGroupName, automationAccountName, runbookName, runbookContent, options) { + beginReplaceContentWithHttpOperationResponse(automationAccountName, runbookName, runbookContent, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._beginCreateOrUpdate(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); } @@ -1435,15 +1394,13 @@ class RunbookDraftOperations { } /** - * Updates the runbook draft with runbookStream as its content. - * - * @param {string} resourceGroupName The resource group name. + * Replaces the runbook draft content. * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. * - * @param {object} runbookContent The runbook draft content. + * @param {string} runbookContent The runbook draft content. * * @param {object} [options] Optional Parameters. * @@ -1471,7 +1428,7 @@ class RunbookDraftOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - beginCreateOrUpdate(resourceGroupName, automationAccountName, runbookName, runbookContent, options, optionalCallback) { + beginReplaceContent(automationAccountName, runbookName, runbookContent, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1480,22 +1437,20 @@ class RunbookDraftOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._beginCreateOrUpdate(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._beginCreateOrUpdate(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 @@ -1508,15 +1463,15 @@ class RunbookDraftOperations { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @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); } @@ -1529,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 @@ -1548,7 +1501,7 @@ class RunbookDraftOperations { * * {Promise} A promise is returned * - * @resolve {Runbook} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -1556,14 +1509,13 @@ class RunbookDraftOperations { * * {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 Runbook} for more information. + * {null} [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. */ - beginPublish(resourceGroupName, automationAccountName, runbookName, options, optionalCallback) { + beginPublish(automationAccountName, runbookName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1572,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 337773ce4f..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. @@ -34,13 +32,13 @@ const WebResource = msRest.WebResource; * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. + * {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, runbookName, options, callback) { +function _getContent(automationAccountName, runbookName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -50,15 +48,19 @@ function _getContent(resourceGroupName, automationAccountName, runbookName, opti 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 (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { + throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (resourceGroupName !== null && resourceGroupName !== undefined) { - 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') { @@ -67,12 +69,6 @@ function _getContent(resourceGroupName, automationAccountName, runbookName, opti if (runbookName === null || runbookName === undefined || typeof runbookName.valueOf() !== 'string') { throw new Error('runbookName 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.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { - throw new Error('this.client.apiVersion 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.'); } @@ -83,12 +79,12 @@ function _getContent(resourceGroupName, automationAccountName, runbookName, opti // Construct URL 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('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{runbookName}', encodeURIComponent(runbookName)); - requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; - queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); if (queryParameters.length > 0) { requestUrl += '?' + queryParameters.join('&'); } @@ -115,30 +111,27 @@ function _getContent(resourceGroupName, automationAccountName, runbookName, opti } httpRequest.body = null; // Send Request - httpRequest.streamedResponse = true; return client.pipeline(httpRequest, (err, response, responseBody) => { if (err) { return callback(err); } - let statusCode = response.statusCode; if (statusCode !== 200) { - let error = new Error(`Unexpected status code: ${statusCode}`); + 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 { - if (responseBody !== undefined) parsedErrorResponse = JSON.parse(responseBody); + 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.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; } if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { - let resultMapper = new client.models['ErrorResponse']().mapper(); + let resultMapper = new client.models['CloudError']().mapper(); error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); } } catch (defaultError) { @@ -148,9 +141,33 @@ function _getContent(resourceGroupName, automationAccountName, runbookName, opti } return callback(error); } - // Create Result - let result = response; + 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 = { + required: false, + serializedName: 'parsedResponse', + type: { + name: 'String' + } + }; + 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); }); } @@ -158,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. @@ -182,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') { @@ -192,15 +207,19 @@ function _get(resourceGroupName, automationAccountName, runbookName, options, ca 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 (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { + throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (resourceGroupName !== null && resourceGroupName !== undefined) { - 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') { @@ -209,12 +228,6 @@ function _get(resourceGroupName, automationAccountName, runbookName, options, ca if (runbookName === null || runbookName === undefined || typeof runbookName.valueOf() !== 'string') { throw new Error('runbookName 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.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { - throw new Error('this.client.apiVersion 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.'); } @@ -225,12 +238,12 @@ function _get(resourceGroupName, automationAccountName, runbookName, options, ca // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/runbooks/{runbookName}'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{runbookName}', encodeURIComponent(runbookName)); - requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; - queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); if (queryParameters.length > 0) { requestUrl += '?' + queryParameters.join('&'); } @@ -316,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. @@ -397,13 +408,14 @@ function _get(resourceGroupName, automationAccountName, runbookName, options, ca * * {Error} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link Runbook} 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. */ -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') { @@ -413,15 +425,19 @@ function _createOrUpdate(resourceGroupName, automationAccountName, runbookName, 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 (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { + throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (resourceGroupName !== null && resourceGroupName !== undefined) { - 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') { @@ -433,12 +449,6 @@ function _createOrUpdate(resourceGroupName, automationAccountName, runbookName, if (parameters === null || parameters === undefined) { throw new Error('parameters cannot be null or undefined.'); } - 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.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { - throw new Error('this.client.apiVersion 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.'); } @@ -449,12 +459,12 @@ function _createOrUpdate(resourceGroupName, automationAccountName, runbookName, // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/runbooks/{runbookName}'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{runbookName}', encodeURIComponent(runbookName)); - requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; - queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); if (queryParameters.length > 0) { requestUrl += '?' + queryParameters.join('&'); } @@ -529,6 +539,40 @@ function _createOrUpdate(resourceGroupName, automationAccountName, runbookName, // 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['Runbook']().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); + } + } + // Deserialize Response + if (statusCode === 201) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['Runbook']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError1 = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError1.request = msRest.stripRequest(httpRequest); + deserializationError1.response = msRest.stripResponse(response); + return callback(deserializationError1); + } + } return callback(null, result, httpRequest, response); }); @@ -537,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. @@ -581,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') { @@ -591,15 +633,19 @@ function _update(resourceGroupName, automationAccountName, runbookName, paramete 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 (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) { - if (resourceGroupName.match(/^[-\w\._]+$/) === null) + 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 (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') { @@ -611,12 +657,6 @@ function _update(resourceGroupName, automationAccountName, runbookName, paramete if (parameters === null || parameters === undefined) { throw new Error('parameters cannot be null or undefined.'); } - 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.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { - throw new Error('this.client.apiVersion 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.'); } @@ -627,12 +667,12 @@ function _update(resourceGroupName, automationAccountName, runbookName, paramete // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/runbooks/{runbookName}'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{runbookName}', encodeURIComponent(runbookName)); - requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; - queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); if (queryParameters.length > 0) { requestUrl += '?' + queryParameters.join('&'); } @@ -732,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. @@ -755,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') { @@ -765,15 +803,19 @@ function _deleteMethod(resourceGroupName, automationAccountName, runbookName, op 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 (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { + throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (resourceGroupName !== null && resourceGroupName !== undefined) { - 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,12 +824,6 @@ function _deleteMethod(resourceGroupName, automationAccountName, runbookName, op if (runbookName === null || runbookName === undefined || typeof runbookName.valueOf() !== 'string') { throw new Error('runbookName 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.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { - throw new Error('this.client.apiVersion 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.'); } @@ -798,12 +834,12 @@ function _deleteMethod(resourceGroupName, automationAccountName, runbookName, op // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/runbooks/{runbookName}'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{runbookName}', encodeURIComponent(runbookName)); - requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; - queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); if (queryParameters.length > 0) { requestUrl += '?' + queryParameters.join('&'); } @@ -835,7 +871,7 @@ function _deleteMethod(resourceGroupName, automationAccountName, runbookName, op return callback(err); } let statusCode = response.statusCode; - if (statusCode !== 200) { + if (statusCode !== 200 && statusCode !== 204) { let error = new Error(responseBody); error.statusCode = response.statusCode; error.request = msRest.stripRequest(httpRequest); @@ -872,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. @@ -894,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') { @@ -904,26 +938,24 @@ function _listByAutomationAccount(resourceGroupName, automationAccountName, opti 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 (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { + throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (resourceGroupName !== null && resourceGroupName !== undefined) { - 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.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.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { - throw new Error('this.client.apiVersion 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.'); } @@ -934,11 +966,11 @@ 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}/runbooks'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); - requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); let queryParameters = []; - queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); if (queryParameters.length > 0) { requestUrl += '?' + queryParameters.join('&'); } @@ -1169,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. @@ -1182,15 +1212,15 @@ class RunbookOperations { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @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); } @@ -1203,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. @@ -1221,7 +1249,7 @@ class RunbookOperations { * * {Promise} A promise is returned * - * @resolve {Object} - The deserialized result object. + * @resolve {String} - The deserialized result object. * * @reject {Error} - The error object. * @@ -1229,13 +1257,13 @@ class RunbookOperations { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. + * {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. */ - getContent(resourceGroupName, automationAccountName, runbookName, options, optionalCallback) { + getContent(automationAccountName, runbookName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1244,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. @@ -1275,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); } @@ -1292,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. @@ -1325,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') { @@ -1334,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. @@ -1425,15 +1447,15 @@ class RunbookOperations { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @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); } @@ -1446,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. @@ -1528,7 +1548,7 @@ class RunbookOperations { * * {Promise} A promise is returned * - * @resolve {null} - The deserialized result object. + * @resolve {Runbook} - The deserialized result object. * * @reject {Error} - The error object. * @@ -1536,13 +1556,14 @@ class RunbookOperations { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link Runbook} 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. */ - 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') { @@ -1551,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. @@ -1602,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); } @@ -1619,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. @@ -1672,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') { @@ -1681,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. @@ -1712,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); } @@ -1729,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. @@ -1761,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') { @@ -1770,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. @@ -1799,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); } @@ -1816,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. @@ -1847,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') { @@ -1856,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 fed9372728..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. @@ -40,8 +38,8 @@ const WebResource = msRest.WebResource; * @param {object} [parameters.interval] Gets or sets the interval of the * schedule. * - * @param {string} parameters.frequency Gets or sets the frequency of the - * schedule. Possible values include: 'OneTime', 'Day', 'Hour', 'Week', 'Month' + * @param {string} parameters.frequency Possible values include: 'OneTime', + * 'Day', 'Hour', 'Week', 'Month' * * @param {string} [parameters.timeZone] Gets or sets the time zone of the * schedule. @@ -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') { @@ -86,15 +84,16 @@ function _createOrUpdate(resourceGroupName, automationAccountName, scheduleName, 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 (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') { @@ -109,9 +108,6 @@ function _createOrUpdate(resourceGroupName, automationAccountName, scheduleName, 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.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { - throw new Error('this.client.apiVersion 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.'); } @@ -122,12 +118,12 @@ 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)); let queryParameters = []; - queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); if (queryParameters.length > 0) { requestUrl += '?' + queryParameters.join('&'); } @@ -227,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. @@ -236,7 +230,7 @@ function _createOrUpdate(resourceGroupName, automationAccountName, scheduleName, * @param {object} parameters The parameters supplied to the update schedule * operation. * - * @param {string} parameters.name Gets or sets the name of the schedule. + * @param {string} [parameters.name] Gets or sets the name of the schedule. * * @param {string} [parameters.description] Gets or sets the description of the * schedule. @@ -262,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') { @@ -272,15 +266,16 @@ function _update(resourceGroupName, automationAccountName, scheduleName, paramet 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 (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') { @@ -295,9 +290,6 @@ function _update(resourceGroupName, automationAccountName, scheduleName, paramet 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.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { - throw new Error('this.client.apiVersion 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.'); } @@ -308,12 +300,12 @@ 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)); let queryParameters = []; - queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); if (queryParameters.length > 0) { requestUrl += '?' + queryParameters.join('&'); } @@ -413,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. @@ -437,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') { @@ -447,15 +437,16 @@ function _get(resourceGroupName, automationAccountName, scheduleName, options, c 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 (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,9 +458,6 @@ function _get(resourceGroupName, automationAccountName, scheduleName, 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 (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { - throw new Error('this.client.apiVersion 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.'); } @@ -480,12 +468,12 @@ 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)); let queryParameters = []; - queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); if (queryParameters.length > 0) { requestUrl += '?' + queryParameters.join('&'); } @@ -571,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. @@ -594,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') { @@ -604,15 +590,16 @@ function _deleteMethod(resourceGroupName, automationAccountName, scheduleName, o 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 (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') { @@ -624,9 +611,6 @@ function _deleteMethod(resourceGroupName, automationAccountName, scheduleName, 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 (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { - throw new Error('this.client.apiVersion 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.'); } @@ -637,12 +621,12 @@ 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)); let queryParameters = []; - queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); if (queryParameters.length > 0) { requestUrl += '?' + queryParameters.join('&'); } @@ -711,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. @@ -733,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') { @@ -743,15 +725,16 @@ function _listByAutomationAccount(resourceGroupName, automationAccountName, opti 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 (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') { @@ -760,9 +743,6 @@ 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 (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { - throw new Error('this.client.apiVersion 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.'); } @@ -773,11 +753,11 @@ 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 = []; - queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); if (queryParameters.length > 0) { requestUrl += '?' + queryParameters.join('&'); } @@ -1007,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. @@ -1030,8 +1008,8 @@ class ScheduleOperations { * @param {object} [parameters.interval] Gets or sets the interval of the * schedule. * - * @param {string} parameters.frequency Gets or sets the frequency of the - * schedule. Possible values include: 'OneTime', 'Day', 'Hour', 'Week', 'Month' + * @param {string} parameters.frequency Possible values include: 'OneTime', + * 'Day', 'Hour', 'Week', 'Month' * * @param {string} [parameters.timeZone] Gets or sets the time zone of the * schedule. @@ -1059,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); } @@ -1076,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. @@ -1099,8 +1075,8 @@ class ScheduleOperations { * @param {object} [parameters.interval] Gets or sets the interval of the * schedule. * - * @param {string} parameters.frequency Gets or sets the frequency of the - * schedule. Possible values include: 'OneTime', 'Day', 'Hour', 'Week', 'Month' + * @param {string} parameters.frequency Possible values include: 'OneTime', + * 'Day', 'Hour', 'Week', 'Month' * * @param {string} [parameters.timeZone] Gets or sets the time zone of the * schedule. @@ -1144,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') { @@ -1153,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. @@ -1176,7 +1150,7 @@ class ScheduleOperations { * @param {object} parameters The parameters supplied to the update schedule * operation. * - * @param {string} parameters.name Gets or sets the name of the schedule. + * @param {string} [parameters.name] Gets or sets the name of the schedule. * * @param {string} [parameters.description] Gets or sets the description of the * schedule. @@ -1195,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); } @@ -1212,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. @@ -1221,7 +1193,7 @@ class ScheduleOperations { * @param {object} parameters The parameters supplied to the update schedule * operation. * - * @param {string} parameters.name Gets or sets the name of the schedule. + * @param {string} [parameters.name] Gets or sets the name of the schedule. * * @param {string} [parameters.description] Gets or sets the description of the * schedule. @@ -1256,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') { @@ -1265,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. @@ -1296,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); } @@ -1313,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. @@ -1346,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') { @@ -1355,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. @@ -1386,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); } @@ -1403,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. @@ -1435,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') { @@ -1444,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. @@ -1473,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); } @@ -1490,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. @@ -1521,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') { @@ -1530,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 new file mode 100644 index 0000000000..0e7ecad27e --- /dev/null +++ b/lib/services/automationManagement/lib/operations/softwareUpdateConfigurationMachineRuns.js @@ -0,0 +1,559 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const msRest = require('ms-rest'); +const msRestAzure = require('ms-rest-azure'); +const WebResource = msRest.WebResource; + +/** + * Get a single software update configuration machine run by Id. + * + * @param {uuid} softwareUpdateConfigurationMachineRunId The Id of the software + * update configuration machine run. + * + * @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. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link SoftwareUpdateConfigurationMachineRun} 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. + */ +function _getById(softwareUpdateConfigurationMachineRunId, 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 = '2017-05-15-preview'; + // Validate + try { + if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { + throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + } + if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { + if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + { + throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + } + } + if (this.client.automationAccountName === null || this.client.automationAccountName === undefined || typeof this.client.automationAccountName.valueOf() !== 'string') { + throw new Error('this.client.automationAccountName cannot be null or undefined and it must be of type string.'); + } + if (softwareUpdateConfigurationMachineRunId === null || softwareUpdateConfigurationMachineRunId === undefined || typeof softwareUpdateConfigurationMachineRunId.valueOf() !== 'string' || !msRest.isValidUuid(softwareUpdateConfigurationMachineRunId)) { + throw new Error('softwareUpdateConfigurationMachineRunId cannot be null or undefined and it must be of type string and must be a valid uuid.'); + } + if (this.client.clientRequestId !== null && this.client.clientRequestId !== undefined && typeof this.client.clientRequestId.valueOf() !== 'string') { + throw new Error('this.client.clientRequestId must be of type string.'); + } + if (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}/softwareUpdateConfigurationMachineRuns/{softwareUpdateConfigurationMachineRunId}'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(this.client.automationAccountName)); + requestUrl = requestUrl.replace('{softwareUpdateConfigurationMachineRunId}', encodeURIComponent(softwareUpdateConfigurationMachineRunId.toString())); + 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 = 'GET'; + 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.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; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200 && statusCode !== 404) { + 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) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().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['SoftwareUpdateConfigurationMachineRun']().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); + }); +} + +/** + * Return list of software update configuration machine runs + * + * @param {object} [options] Optional Parameters. + * + * @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' + * + * @param {string} [options.skip] number of entries you skip before returning + * results + * + * @param {string} [options.top] Maximum number of entries returned in the + * results collection + * + * @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. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link + * SoftwareUpdateConfigurationMachineRunListResult} 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. + */ +function _list(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 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; + let apiVersion = '2017-05-15-preview'; + // Validate + try { + if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { + throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + } + if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { + if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + { + throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + } + } + if (this.client.automationAccountName === null || this.client.automationAccountName === undefined || typeof this.client.automationAccountName.valueOf() !== 'string') { + throw new Error('this.client.automationAccountName cannot be null or undefined and it must be of type string.'); + } + if (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.'); + } + if (skip !== null && skip !== undefined && typeof skip.valueOf() !== 'string') { + throw new Error('skip must be of type string.'); + } + if (top !== null && top !== undefined && typeof top.valueOf() !== 'string') { + throw new Error('top 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}/softwareUpdateConfigurationMachineRuns'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(this.client.automationAccountName)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (filter !== null && filter !== undefined) { + queryParameters.push('$filter=' + encodeURIComponent(filter)); + } + if (skip !== null && skip !== undefined) { + queryParameters.push('$skip=' + encodeURIComponent(skip)); + } + if (top !== null && top !== undefined) { + queryParameters.push('$top=' + encodeURIComponent(top)); + } + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + 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.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; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200 && statusCode !== 404) { + 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) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().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['SoftwareUpdateConfigurationMachineRunListResult']().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); + }); +} + +/** Class representing a SoftwareUpdateConfigurationMachineRuns. */ +class SoftwareUpdateConfigurationMachineRuns { + /** + * Create a SoftwareUpdateConfigurationMachineRuns. + * @param {AutomationClient} client Reference to the service client. + */ + constructor(client) { + this.client = client; + this._getById = _getById; + this._list = _list; + } + + /** + * Get a single software update configuration machine run by Id. + * + * @param {uuid} softwareUpdateConfigurationMachineRunId The Id of the software + * update configuration machine run. + * + * @param {object} [options] Optional Parameters. + * + * @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. + */ + getByIdWithHttpOperationResponse(softwareUpdateConfigurationMachineRunId, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._getById(softwareUpdateConfigurationMachineRunId, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Get a single software update configuration machine run by Id. + * + * @param {uuid} softwareUpdateConfigurationMachineRunId The Id of the software + * update configuration machine run. + * + * @param {object} [options] Optional Parameters. + * + * @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 {SoftwareUpdateConfigurationMachineRun} - 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 SoftwareUpdateConfigurationMachineRun} 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. + */ + getById(softwareUpdateConfigurationMachineRunId, 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._getById(softwareUpdateConfigurationMachineRunId, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._getById(softwareUpdateConfigurationMachineRunId, options, optionalCallback); + } + } + + /** + * Return list of software update configuration machine runs + * + * @param {object} [options] Optional Parameters. + * + * @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' + * + * @param {string} [options.skip] number of entries you skip before returning + * results + * + * @param {string} [options.top] Maximum number of entries returned in the + * results collection + * + * @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. + */ + listWithHttpOperationResponse(options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._list(options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Return list of software update configuration machine runs + * + * @param {object} [options] Optional Parameters. + * + * @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' + * + * @param {string} [options.skip] number of entries you skip before returning + * results + * + * @param {string} [options.top] Maximum number of entries returned in the + * results collection + * + * @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 {SoftwareUpdateConfigurationMachineRunListResult} - 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 + * SoftwareUpdateConfigurationMachineRunListResult} 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. + */ + list(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._list(options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._list(options, optionalCallback); + } + } + +} + +module.exports = SoftwareUpdateConfigurationMachineRuns; diff --git a/lib/services/automationManagement/lib/operations/softwareUpdateConfigurationRuns.js b/lib/services/automationManagement/lib/operations/softwareUpdateConfigurationRuns.js new file mode 100644 index 0000000000..ed70966f40 --- /dev/null +++ b/lib/services/automationManagement/lib/operations/softwareUpdateConfigurationRuns.js @@ -0,0 +1,557 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const msRest = require('ms-rest'); +const msRestAzure = require('ms-rest-azure'); +const WebResource = msRest.WebResource; + +/** + * Get a single software update configuration Run by Id. + * + * @param {uuid} softwareUpdateConfigurationRunId The Id of the software update + * configuration run. + * + * @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. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link SoftwareUpdateConfigurationRun} 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. + */ +function _getById(softwareUpdateConfigurationRunId, 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 = '2017-05-15-preview'; + // Validate + try { + if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { + throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + } + if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { + if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + { + throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + } + } + if (this.client.automationAccountName === null || this.client.automationAccountName === undefined || typeof this.client.automationAccountName.valueOf() !== 'string') { + throw new Error('this.client.automationAccountName cannot be null or undefined and it must be of type string.'); + } + if (softwareUpdateConfigurationRunId === null || softwareUpdateConfigurationRunId === undefined || typeof softwareUpdateConfigurationRunId.valueOf() !== 'string' || !msRest.isValidUuid(softwareUpdateConfigurationRunId)) { + throw new Error('softwareUpdateConfigurationRunId cannot be null or undefined and it must be of type string and must be a valid uuid.'); + } + if (this.client.clientRequestId !== null && this.client.clientRequestId !== undefined && typeof this.client.clientRequestId.valueOf() !== 'string') { + throw new Error('this.client.clientRequestId must be of type string.'); + } + if (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}/softwareUpdateConfigurationRuns/{softwareUpdateConfigurationRunId}'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(this.client.automationAccountName)); + requestUrl = requestUrl.replace('{softwareUpdateConfigurationRunId}', encodeURIComponent(softwareUpdateConfigurationRunId.toString())); + 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 = 'GET'; + 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.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; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200 && statusCode !== 404) { + 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) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().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['SoftwareUpdateConfigurationRun']().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); + }); +} + +/** + * Return list of software update configuration runs + * + * @param {object} [options] Optional Parameters. + * + * @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' + * + * @param {string} [options.skip] number of entries you skip before returning + * results + * + * @param {string} [options.top] Maximum number of entries returned in the + * results collection + * + * @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. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link SoftwareUpdateConfigurationRunListResult} + * 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. + */ +function _list(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 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; + let apiVersion = '2017-05-15-preview'; + // Validate + try { + if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { + throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + } + if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { + if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + { + throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + } + } + if (this.client.automationAccountName === null || this.client.automationAccountName === undefined || typeof this.client.automationAccountName.valueOf() !== 'string') { + throw new Error('this.client.automationAccountName cannot be null or undefined and it must be of type string.'); + } + if (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.'); + } + if (skip !== null && skip !== undefined && typeof skip.valueOf() !== 'string') { + throw new Error('skip must be of type string.'); + } + if (top !== null && top !== undefined && typeof top.valueOf() !== 'string') { + throw new Error('top 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}/softwareUpdateConfigurationRuns'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(this.client.automationAccountName)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (filter !== null && filter !== undefined) { + queryParameters.push('$filter=' + encodeURIComponent(filter)); + } + if (skip !== null && skip !== undefined) { + queryParameters.push('$skip=' + encodeURIComponent(skip)); + } + if (top !== null && top !== undefined) { + queryParameters.push('$top=' + encodeURIComponent(top)); + } + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + 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.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; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200 && statusCode !== 404) { + 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) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().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['SoftwareUpdateConfigurationRunListResult']().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); + }); +} + +/** Class representing a SoftwareUpdateConfigurationRuns. */ +class SoftwareUpdateConfigurationRuns { + /** + * Create a SoftwareUpdateConfigurationRuns. + * @param {AutomationClient} client Reference to the service client. + */ + constructor(client) { + this.client = client; + this._getById = _getById; + this._list = _list; + } + + /** + * Get a single software update configuration Run by Id. + * + * @param {uuid} softwareUpdateConfigurationRunId The Id of the software update + * configuration run. + * + * @param {object} [options] Optional Parameters. + * + * @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. + */ + getByIdWithHttpOperationResponse(softwareUpdateConfigurationRunId, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._getById(softwareUpdateConfigurationRunId, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Get a single software update configuration Run by Id. + * + * @param {uuid} softwareUpdateConfigurationRunId The Id of the software update + * configuration run. + * + * @param {object} [options] Optional Parameters. + * + * @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 {SoftwareUpdateConfigurationRun} - 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 SoftwareUpdateConfigurationRun} 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. + */ + getById(softwareUpdateConfigurationRunId, 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._getById(softwareUpdateConfigurationRunId, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._getById(softwareUpdateConfigurationRunId, options, optionalCallback); + } + } + + /** + * Return list of software update configuration runs + * + * @param {object} [options] Optional Parameters. + * + * @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' + * + * @param {string} [options.skip] number of entries you skip before returning + * results + * + * @param {string} [options.top] Maximum number of entries returned in the + * results collection + * + * @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. + */ + listWithHttpOperationResponse(options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._list(options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Return list of software update configuration runs + * + * @param {object} [options] Optional Parameters. + * + * @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' + * + * @param {string} [options.skip] number of entries you skip before returning + * results + * + * @param {string} [options.top] Maximum number of entries returned in the + * results collection + * + * @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 {SoftwareUpdateConfigurationRunListResult} - 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 SoftwareUpdateConfigurationRunListResult} + * 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. + */ + list(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._list(options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._list(options, optionalCallback); + } + } + +} + +module.exports = SoftwareUpdateConfigurationRuns; diff --git a/lib/services/automationManagement/lib/operations/softwareUpdateConfigurations.js b/lib/services/automationManagement/lib/operations/softwareUpdateConfigurations.js new file mode 100644 index 0000000000..2bac5ec8b4 --- /dev/null +++ b/lib/services/automationManagement/lib/operations/softwareUpdateConfigurations.js @@ -0,0 +1,1334 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const msRest = require('ms-rest'); +const msRestAzure = require('ms-rest-azure'); +const WebResource = msRest.WebResource; + +/** + * Create a new software update configuration with the name given in the URI. + * + * @param {string} softwareUpdateConfigurationName The name of the software + * update configuration to be created. + * + * @param {object} parameters Request body. + * + * @param {object} parameters.updateConfiguration update specific properties + * for the Software update configuration + * + * @param {string} parameters.updateConfiguration.operatingSystem operating + * system of target machines. Possible values include: 'Windows', 'Linux' + * + * @param {object} [parameters.updateConfiguration.windows] Windows specific + * update configuration. + * + * @param {string} + * [parameters.updateConfiguration.windows.includedUpdateClassifications] + * Update classification included in the software update configuration. A comma + * separated string with required values. Possible values include: + * 'Unclassified', 'Critical', 'Security', 'UpdateRollup', 'FeaturePack', + * 'ServicePack', 'Definition', 'Tools', 'Updates' + * + * @param {array} [parameters.updateConfiguration.windows.excludedKbNumbers] KB + * numbers excluded from the software update configuration. + * + * @param {object} [parameters.updateConfiguration.linux] Linux specific update + * configuration. + * + * @param {string} + * [parameters.updateConfiguration.linux.includedPackageClassifications] Update + * classifications included in the software update configuration. Possible + * values include: 'Unclassified', 'Critical', 'Security', 'Other' + * + * @param {array} + * [parameters.updateConfiguration.linux.excludedPackageNameMasks] packages + * excluded from the software update configuration. + * + * @param {moment.duration} [parameters.updateConfiguration.duration] Maximum + * time allowed for the software update configuration run. Duration needs to be + * specified using the format PT[n]H[n]M[n]S as per ISO8601 + * + * @param {array} [parameters.updateConfiguration.azureVirtualMachines] List of + * azure resource Ids for azure virtual machines targeted by the software + * update configuration. + * + * @param {array} [parameters.updateConfiguration.nonAzureComputerNames] List + * of names of non-azure machines targeted by the software update + * configuration. + * + * @param {object} parameters.scheduleInfo Schedule information for the + * Software update configuration + * + * @param {date} [parameters.scheduleInfo.startTime] Gets or sets the start + * time of the schedule. + * + * @param {date} [parameters.scheduleInfo.expiryTime] Gets or sets the end time + * of the schedule. + * + * @param {number} [parameters.scheduleInfo.expiryTimeOffsetMinutes] Gets or + * sets the expiry time's offset in minutes. + * + * @param {boolean} [parameters.scheduleInfo.isEnabled] Gets or sets a value + * indicating whether this schedule is enabled. + * + * @param {date} [parameters.scheduleInfo.nextRun] Gets or sets the next run + * time of the schedule. + * + * @param {number} [parameters.scheduleInfo.nextRunOffsetMinutes] Gets or sets + * the next run time's offset in minutes. + * + * @param {object} [parameters.scheduleInfo.interval] Gets or sets the interval + * of the schedule. + * + * @param {string} [parameters.scheduleInfo.frequency] Gets or sets the + * frequency of the schedule. Possible values include: 'OneTime', 'Day', + * 'Hour', 'Week', 'Month' + * + * @param {string} [parameters.scheduleInfo.timeZone] Gets or sets the time + * zone of the schedule. + * + * @param {object} [parameters.scheduleInfo.advancedSchedule] Gets or sets the + * advanced schedule. + * + * @param {array} [parameters.scheduleInfo.advancedSchedule.weekDays] Days of + * the week that the job should execute on. + * + * @param {array} [parameters.scheduleInfo.advancedSchedule.monthDays] Days of + * the month that the job should execute on. Must be between 1 and 31. + * + * @param {array} [parameters.scheduleInfo.advancedSchedule.monthlyOccurrences] + * Occurrences of days within a month. + * + * @param {date} [parameters.scheduleInfo.creationTime] Gets or sets the + * creation time. + * + * @param {date} [parameters.scheduleInfo.lastModifiedTime] Gets or sets the + * last modified time. + * + * @param {string} [parameters.scheduleInfo.description] Gets or sets the + * description. + * + * @param {object} [parameters.error] detailes of provisioning error + * + * @param {string} [parameters.error.code] Error code + * + * @param {string} [parameters.error.message] Error message indicating why the + * operation failed. + * + * @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. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link SoftwareUpdateConfiguration} 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. + */ +function _create(softwareUpdateConfigurationName, parameters, 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 = '2017-05-15-preview'; + // Validate + try { + if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { + throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + } + if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { + if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + { + throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + } + } + if (this.client.automationAccountName === null || this.client.automationAccountName === undefined || typeof this.client.automationAccountName.valueOf() !== 'string') { + throw new Error('this.client.automationAccountName cannot be null or undefined and it must be of type string.'); + } + if (softwareUpdateConfigurationName === null || softwareUpdateConfigurationName === undefined || typeof softwareUpdateConfigurationName.valueOf() !== 'string') { + throw new Error('softwareUpdateConfigurationName cannot be null or undefined and it must be of type string.'); + } + if (this.client.clientRequestId !== null && this.client.clientRequestId !== undefined && typeof this.client.clientRequestId.valueOf() !== 'string') { + throw new Error('this.client.clientRequestId must be of type string.'); + } + if (parameters === null || parameters === undefined) { + throw new Error('parameters cannot be null or undefined.'); + } + 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}/softwareUpdateConfigurations/{softwareUpdateConfigurationName}'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(this.client.automationAccountName)); + requestUrl = requestUrl.replace('{softwareUpdateConfigurationName}', encodeURIComponent(softwareUpdateConfigurationName)); + 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 = 'PUT'; + 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.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; + } + 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['SoftwareUpdateConfiguration']().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 && statusCode !== 201 && statusCode !== 400 && statusCode !== 404 && statusCode !== 409) { + 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) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().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['SoftwareUpdateConfiguration']().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); + } + } + // Deserialize Response + if (statusCode === 201) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['SoftwareUpdateConfiguration']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError1 = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError1.request = msRest.stripRequest(httpRequest); + deserializationError1.response = msRest.stripResponse(response); + return callback(deserializationError1); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * Get a single software update configuration by name. + * + * @param {string} softwareUpdateConfigurationName The name of the software + * update configuration to be created. + * + * @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. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link SoftwareUpdateConfiguration} 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. + */ +function _getByName(softwareUpdateConfigurationName, 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 = '2017-05-15-preview'; + // Validate + try { + if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { + throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + } + if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { + if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + { + throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + } + } + if (this.client.automationAccountName === null || this.client.automationAccountName === undefined || typeof this.client.automationAccountName.valueOf() !== 'string') { + throw new Error('this.client.automationAccountName cannot be null or undefined and it must be of type string.'); + } + if (softwareUpdateConfigurationName === null || softwareUpdateConfigurationName === undefined || typeof softwareUpdateConfigurationName.valueOf() !== 'string') { + throw new Error('softwareUpdateConfigurationName cannot be null or undefined and it must be of type string.'); + } + if (this.client.clientRequestId !== null && this.client.clientRequestId !== undefined && typeof this.client.clientRequestId.valueOf() !== 'string') { + throw new Error('this.client.clientRequestId must be of type string.'); + } + if (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}/softwareUpdateConfigurations/{softwareUpdateConfigurationName}'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(this.client.automationAccountName)); + requestUrl = requestUrl.replace('{softwareUpdateConfigurationName}', encodeURIComponent(softwareUpdateConfigurationName)); + 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 = 'GET'; + 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.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; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200 && statusCode !== 404) { + 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) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().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['SoftwareUpdateConfiguration']().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); + }); +} + +/** + * delete a specific software update configuration. + * + * @param {string} softwareUpdateConfigurationName The name of the software + * update configuration to be created. + * + * @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. + * + * {null} [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 _deleteMethod(softwareUpdateConfigurationName, 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 = '2017-05-15-preview'; + // Validate + try { + if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { + throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + } + if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { + if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + { + throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + } + } + if (this.client.automationAccountName === null || this.client.automationAccountName === undefined || typeof this.client.automationAccountName.valueOf() !== 'string') { + throw new Error('this.client.automationAccountName cannot be null or undefined and it must be of type string.'); + } + if (softwareUpdateConfigurationName === null || softwareUpdateConfigurationName === undefined || typeof softwareUpdateConfigurationName.valueOf() !== 'string') { + throw new Error('softwareUpdateConfigurationName cannot be null or undefined and it must be of type string.'); + } + if (this.client.clientRequestId !== null && this.client.clientRequestId !== undefined && typeof this.client.clientRequestId.valueOf() !== 'string') { + throw new Error('this.client.clientRequestId must be of type string.'); + } + if (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}/softwareUpdateConfigurations/{softwareUpdateConfigurationName}'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(this.client.automationAccountName)); + requestUrl = requestUrl.replace('{softwareUpdateConfigurationName}', encodeURIComponent(softwareUpdateConfigurationName)); + 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 = 'DELETE'; + 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.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; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200 && statusCode !== 204 && statusCode !== 404) { + 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) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().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; + + return callback(null, result, httpRequest, response); + }); +} + +/** + * Get all software update configurations for the account. + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.filter] The filter to apply on the operation. + * + * @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. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link SoftwareUpdateConfigurationListResult} 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. + */ +function _list(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 filter = (options && options.filter !== undefined) ? options.filter : undefined; + let apiVersion = '2017-05-15-preview'; + // Validate + try { + if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { + throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + } + if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { + if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + { + throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + } + } + if (this.client.automationAccountName === null || this.client.automationAccountName === undefined || typeof this.client.automationAccountName.valueOf() !== 'string') { + throw new Error('this.client.automationAccountName cannot be null or undefined and it must be of type string.'); + } + if (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.'); + } + 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}/softwareUpdateConfigurations'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(this.client.automationAccountName)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (filter !== null && filter !== undefined) { + queryParameters.push('$filter=' + encodeURIComponent(filter)); + } + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + 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.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; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200 && statusCode !== 404) { + 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) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().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['SoftwareUpdateConfigurationListResult']().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); + }); +} + +/** Class representing a SoftwareUpdateConfigurations. */ +class SoftwareUpdateConfigurations { + /** + * Create a SoftwareUpdateConfigurations. + * @param {AutomationClient} client Reference to the service client. + */ + constructor(client) { + this.client = client; + this._create = _create; + this._getByName = _getByName; + this._deleteMethod = _deleteMethod; + this._list = _list; + } + + /** + * Create a new software update configuration with the name given in the URI. + * + * @param {string} softwareUpdateConfigurationName The name of the software + * update configuration to be created. + * + * @param {object} parameters Request body. + * + * @param {object} parameters.updateConfiguration update specific properties + * for the Software update configuration + * + * @param {string} parameters.updateConfiguration.operatingSystem operating + * system of target machines. Possible values include: 'Windows', 'Linux' + * + * @param {object} [parameters.updateConfiguration.windows] Windows specific + * update configuration. + * + * @param {string} + * [parameters.updateConfiguration.windows.includedUpdateClassifications] + * Update classification included in the software update configuration. A comma + * separated string with required values. Possible values include: + * 'Unclassified', 'Critical', 'Security', 'UpdateRollup', 'FeaturePack', + * 'ServicePack', 'Definition', 'Tools', 'Updates' + * + * @param {array} [parameters.updateConfiguration.windows.excludedKbNumbers] KB + * numbers excluded from the software update configuration. + * + * @param {object} [parameters.updateConfiguration.linux] Linux specific update + * configuration. + * + * @param {string} + * [parameters.updateConfiguration.linux.includedPackageClassifications] Update + * classifications included in the software update configuration. Possible + * values include: 'Unclassified', 'Critical', 'Security', 'Other' + * + * @param {array} + * [parameters.updateConfiguration.linux.excludedPackageNameMasks] packages + * excluded from the software update configuration. + * + * @param {moment.duration} [parameters.updateConfiguration.duration] Maximum + * time allowed for the software update configuration run. Duration needs to be + * specified using the format PT[n]H[n]M[n]S as per ISO8601 + * + * @param {array} [parameters.updateConfiguration.azureVirtualMachines] List of + * azure resource Ids for azure virtual machines targeted by the software + * update configuration. + * + * @param {array} [parameters.updateConfiguration.nonAzureComputerNames] List + * of names of non-azure machines targeted by the software update + * configuration. + * + * @param {object} parameters.scheduleInfo Schedule information for the + * Software update configuration + * + * @param {date} [parameters.scheduleInfo.startTime] Gets or sets the start + * time of the schedule. + * + * @param {date} [parameters.scheduleInfo.expiryTime] Gets or sets the end time + * of the schedule. + * + * @param {number} [parameters.scheduleInfo.expiryTimeOffsetMinutes] Gets or + * sets the expiry time's offset in minutes. + * + * @param {boolean} [parameters.scheduleInfo.isEnabled] Gets or sets a value + * indicating whether this schedule is enabled. + * + * @param {date} [parameters.scheduleInfo.nextRun] Gets or sets the next run + * time of the schedule. + * + * @param {number} [parameters.scheduleInfo.nextRunOffsetMinutes] Gets or sets + * the next run time's offset in minutes. + * + * @param {object} [parameters.scheduleInfo.interval] Gets or sets the interval + * of the schedule. + * + * @param {string} [parameters.scheduleInfo.frequency] Gets or sets the + * frequency of the schedule. Possible values include: 'OneTime', 'Day', + * 'Hour', 'Week', 'Month' + * + * @param {string} [parameters.scheduleInfo.timeZone] Gets or sets the time + * zone of the schedule. + * + * @param {object} [parameters.scheduleInfo.advancedSchedule] Gets or sets the + * advanced schedule. + * + * @param {array} [parameters.scheduleInfo.advancedSchedule.weekDays] Days of + * the week that the job should execute on. + * + * @param {array} [parameters.scheduleInfo.advancedSchedule.monthDays] Days of + * the month that the job should execute on. Must be between 1 and 31. + * + * @param {array} [parameters.scheduleInfo.advancedSchedule.monthlyOccurrences] + * Occurrences of days within a month. + * + * @param {date} [parameters.scheduleInfo.creationTime] Gets or sets the + * creation time. + * + * @param {date} [parameters.scheduleInfo.lastModifiedTime] Gets or sets the + * last modified time. + * + * @param {string} [parameters.scheduleInfo.description] Gets or sets the + * description. + * + * @param {object} [parameters.error] detailes of provisioning error + * + * @param {string} [parameters.error.code] Error code + * + * @param {string} [parameters.error.message] Error message indicating why the + * operation failed. + * + * @param {object} [options] Optional Parameters. + * + * @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. + */ + createWithHttpOperationResponse(softwareUpdateConfigurationName, parameters, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._create(softwareUpdateConfigurationName, parameters, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Create a new software update configuration with the name given in the URI. + * + * @param {string} softwareUpdateConfigurationName The name of the software + * update configuration to be created. + * + * @param {object} parameters Request body. + * + * @param {object} parameters.updateConfiguration update specific properties + * for the Software update configuration + * + * @param {string} parameters.updateConfiguration.operatingSystem operating + * system of target machines. Possible values include: 'Windows', 'Linux' + * + * @param {object} [parameters.updateConfiguration.windows] Windows specific + * update configuration. + * + * @param {string} + * [parameters.updateConfiguration.windows.includedUpdateClassifications] + * Update classification included in the software update configuration. A comma + * separated string with required values. Possible values include: + * 'Unclassified', 'Critical', 'Security', 'UpdateRollup', 'FeaturePack', + * 'ServicePack', 'Definition', 'Tools', 'Updates' + * + * @param {array} [parameters.updateConfiguration.windows.excludedKbNumbers] KB + * numbers excluded from the software update configuration. + * + * @param {object} [parameters.updateConfiguration.linux] Linux specific update + * configuration. + * + * @param {string} + * [parameters.updateConfiguration.linux.includedPackageClassifications] Update + * classifications included in the software update configuration. Possible + * values include: 'Unclassified', 'Critical', 'Security', 'Other' + * + * @param {array} + * [parameters.updateConfiguration.linux.excludedPackageNameMasks] packages + * excluded from the software update configuration. + * + * @param {moment.duration} [parameters.updateConfiguration.duration] Maximum + * time allowed for the software update configuration run. Duration needs to be + * specified using the format PT[n]H[n]M[n]S as per ISO8601 + * + * @param {array} [parameters.updateConfiguration.azureVirtualMachines] List of + * azure resource Ids for azure virtual machines targeted by the software + * update configuration. + * + * @param {array} [parameters.updateConfiguration.nonAzureComputerNames] List + * of names of non-azure machines targeted by the software update + * configuration. + * + * @param {object} parameters.scheduleInfo Schedule information for the + * Software update configuration + * + * @param {date} [parameters.scheduleInfo.startTime] Gets or sets the start + * time of the schedule. + * + * @param {date} [parameters.scheduleInfo.expiryTime] Gets or sets the end time + * of the schedule. + * + * @param {number} [parameters.scheduleInfo.expiryTimeOffsetMinutes] Gets or + * sets the expiry time's offset in minutes. + * + * @param {boolean} [parameters.scheduleInfo.isEnabled] Gets or sets a value + * indicating whether this schedule is enabled. + * + * @param {date} [parameters.scheduleInfo.nextRun] Gets or sets the next run + * time of the schedule. + * + * @param {number} [parameters.scheduleInfo.nextRunOffsetMinutes] Gets or sets + * the next run time's offset in minutes. + * + * @param {object} [parameters.scheduleInfo.interval] Gets or sets the interval + * of the schedule. + * + * @param {string} [parameters.scheduleInfo.frequency] Gets or sets the + * frequency of the schedule. Possible values include: 'OneTime', 'Day', + * 'Hour', 'Week', 'Month' + * + * @param {string} [parameters.scheduleInfo.timeZone] Gets or sets the time + * zone of the schedule. + * + * @param {object} [parameters.scheduleInfo.advancedSchedule] Gets or sets the + * advanced schedule. + * + * @param {array} [parameters.scheduleInfo.advancedSchedule.weekDays] Days of + * the week that the job should execute on. + * + * @param {array} [parameters.scheduleInfo.advancedSchedule.monthDays] Days of + * the month that the job should execute on. Must be between 1 and 31. + * + * @param {array} [parameters.scheduleInfo.advancedSchedule.monthlyOccurrences] + * Occurrences of days within a month. + * + * @param {date} [parameters.scheduleInfo.creationTime] Gets or sets the + * creation time. + * + * @param {date} [parameters.scheduleInfo.lastModifiedTime] Gets or sets the + * last modified time. + * + * @param {string} [parameters.scheduleInfo.description] Gets or sets the + * description. + * + * @param {object} [parameters.error] detailes of provisioning error + * + * @param {string} [parameters.error.code] Error code + * + * @param {string} [parameters.error.message] Error message indicating why the + * operation failed. + * + * @param {object} [options] Optional Parameters. + * + * @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 {SoftwareUpdateConfiguration} - 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 SoftwareUpdateConfiguration} 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. + */ + create(softwareUpdateConfigurationName, parameters, 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._create(softwareUpdateConfigurationName, parameters, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._create(softwareUpdateConfigurationName, parameters, options, optionalCallback); + } + } + + /** + * Get a single software update configuration by name. + * + * @param {string} softwareUpdateConfigurationName The name of the software + * update configuration to be created. + * + * @param {object} [options] Optional Parameters. + * + * @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. + */ + getByNameWithHttpOperationResponse(softwareUpdateConfigurationName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._getByName(softwareUpdateConfigurationName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Get a single software update configuration by name. + * + * @param {string} softwareUpdateConfigurationName The name of the software + * update configuration to be created. + * + * @param {object} [options] Optional Parameters. + * + * @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 {SoftwareUpdateConfiguration} - 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 SoftwareUpdateConfiguration} 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. + */ + getByName(softwareUpdateConfigurationName, 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._getByName(softwareUpdateConfigurationName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._getByName(softwareUpdateConfigurationName, options, optionalCallback); + } + } + + /** + * delete a specific software update configuration. + * + * @param {string} softwareUpdateConfigurationName The name of the software + * update configuration to be created. + * + * @param {object} [options] Optional Parameters. + * + * @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. + */ + deleteMethodWithHttpOperationResponse(softwareUpdateConfigurationName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._deleteMethod(softwareUpdateConfigurationName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * delete a specific software update configuration. + * + * @param {string} softwareUpdateConfigurationName The name of the software + * update configuration to be created. + * + * @param {object} [options] Optional Parameters. + * + * @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 {null} - 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. + * + * {null} [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. + */ + deleteMethod(softwareUpdateConfigurationName, 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._deleteMethod(softwareUpdateConfigurationName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._deleteMethod(softwareUpdateConfigurationName, options, optionalCallback); + } + } + + /** + * Get all software update configurations for the account. + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.filter] The filter to apply on the operation. + * + * @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. + */ + listWithHttpOperationResponse(options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._list(options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Get all software update configurations for the account. + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.filter] The filter to apply on the operation. + * + * @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 {SoftwareUpdateConfigurationListResult} - 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 SoftwareUpdateConfigurationListResult} 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. + */ + list(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._list(options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._list(options, optionalCallback); + } + } + +} + +module.exports = SoftwareUpdateConfigurations; diff --git a/lib/services/automationManagement/lib/operations/sourceControlOperations.js b/lib/services/automationManagement/lib/operations/sourceControlOperations.js new file mode 100644 index 0000000000..cc165f3f21 --- /dev/null +++ b/lib/services/automationManagement/lib/operations/sourceControlOperations.js @@ -0,0 +1,1633 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const msRest = require('ms-rest'); +const msRestAzure = require('ms-rest-azure'); +const WebResource = msRest.WebResource; + +/** + * Create a source control. + * + * @param {string} automationAccountName The automation account name. + * + * @param {string} sourceControlName The source control name. + * + * @param {object} parameters The parameters supplied to the create or update + * source control operation. + * + * @param {string} [parameters.repoUrl] Gets or sets the repo url of the source + * control. + * + * @param {string} [parameters.branch] Gets or sets the repo branch of the + * source control. Include branch as empty string for VsoTfvc. + * + * @param {string} [parameters.folderPath] Gets or sets the folder path of the + * source control. Path must be relative. + * + * @param {boolean} [parameters.autoSync] Gets or sets auto async of the source + * control. Default is false. + * + * @param {boolean} [parameters.publishRunbook] Gets or sets the auto publish + * of the source control. Default is true. + * + * @param {string} [parameters.sourceType] The source type. Must be one of + * VsoGit, VsoTfvc, GitHub, case sensitive. Possible values include: 'VsoGit', + * 'VsoTfvc', 'GitHub' + * + * @param {string} [parameters.securityToken] Gets or sets the authorization + * token for the repo of the source control. + * + * @param {string} [parameters.description] Gets or sets the user description + * of the source control. + * + * @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. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link SourceControl} 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. + */ +function _createOrUpdate(automationAccountName, sourceControlName, parameters, 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 = '2017-05-15-preview'; + // Validate + try { + if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { + throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + } + if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { + if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + { + 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 (sourceControlName === null || sourceControlName === undefined || typeof sourceControlName.valueOf() !== 'string') { + throw new Error('sourceControlName cannot be null or undefined and it must be of type string.'); + } + if (parameters === null || parameters === undefined) { + throw new Error('parameters cannot be null or undefined.'); + } + 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}/sourceControls/{sourceControlName}'; + 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)); + 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 = 'PUT'; + 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['SourceControlCreateOrUpdateParameters']().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 && statusCode !== 201) { + 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['SourceControl']().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); + } + } + // Deserialize Response + if (statusCode === 201) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['SourceControl']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError1 = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError1.request = msRest.stripRequest(httpRequest); + deserializationError1.response = msRest.stripResponse(response); + return callback(deserializationError1); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * Update a source control. + * + * @param {string} automationAccountName The automation account name. + * + * @param {string} sourceControlName The source control name. + * + * @param {object} parameters The parameters supplied to the update source + * control operation. + * + * @param {string} [parameters.branch] Gets or sets the repo branch of the + * source control. + * + * @param {string} [parameters.folderPath] Gets or sets the folder path of the + * source control. Path must be relative. + * + * @param {boolean} [parameters.autoSync] Gets or sets auto async of the source + * control. Default is false. + * + * @param {boolean} [parameters.publishRunbook] Gets or sets the auto publish + * of the source control. Default is true. + * + * @param {string} [parameters.securityToken] Gets or sets the authorization + * token for the repo of the source control. + * + * @param {string} [parameters.description] Gets or sets the user description + * of the source control. + * + * @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. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link SourceControl} 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. + */ +function _update(automationAccountName, sourceControlName, parameters, 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 = '2017-05-15-preview'; + // Validate + try { + if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { + throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + } + if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { + if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + { + 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 (sourceControlName === null || sourceControlName === undefined || typeof sourceControlName.valueOf() !== 'string') { + throw new Error('sourceControlName cannot be null or undefined and it must be of type string.'); + } + if (parameters === null || parameters === undefined) { + throw new Error('parameters cannot be null or undefined.'); + } + 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}/sourceControls/{sourceControlName}'; + 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)); + 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['SourceControlUpdateParameters']().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['SourceControl']().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); + }); +} + +/** + * Delete the source control. + * + * @param {string} automationAccountName The automation account name. + * + * @param {string} sourceControlName The name of source control. + * + * @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. + * + * {null} [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 _deleteMethod(automationAccountName, sourceControlName, 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 = '2017-05-15-preview'; + // Validate + try { + if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { + throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + } + if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { + if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + { + 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 (sourceControlName === null || sourceControlName === undefined || typeof sourceControlName.valueOf() !== 'string') { + throw new Error('sourceControlName 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}/sourceControls/{sourceControlName}'; + 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)); + 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 = 'DELETE'; + 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]; + } + } + } + httpRequest.body = null; + // 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; + + return callback(null, result, httpRequest, response); + }); +} + +/** + * Retrieve the source control identified by source control name. + * + * @param {string} automationAccountName The automation account name. + * + * @param {string} sourceControlName The name of source control. + * + * @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. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link SourceControl} 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. + */ +function _get(automationAccountName, sourceControlName, 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 = '2017-05-15-preview'; + // Validate + try { + if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { + throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + } + if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { + if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + { + 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 (sourceControlName === null || sourceControlName === undefined || typeof sourceControlName.valueOf() !== 'string') { + throw new Error('sourceControlName 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}/sourceControls/{sourceControlName}'; + 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)); + 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 = 'GET'; + 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]; + } + } + } + httpRequest.body = null; + // 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['SourceControl']().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 a list of source controls. + * + * @param {string} automationAccountName The automation account name. + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.filter] The filter to apply on the operation. + * + * @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. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link SourceControlListResult} 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. + */ +function _listByAutomationAccount(automationAccountName, 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 filter = (options && options.filter !== undefined) ? options.filter : undefined; + let apiVersion = '2017-05-15-preview'; + // Validate + try { + if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { + throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + } + if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { + if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + { + 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 (filter !== null && filter !== undefined && typeof filter.valueOf() !== 'string') { + throw new Error('filter 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}/sourceControls'; + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + let queryParameters = []; + if (filter !== null && filter !== undefined) { + queryParameters.push('$filter=' + encodeURIComponent(filter)); + } + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + 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]; + } + } + } + httpRequest.body = null; + // 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['SourceControlListResult']().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 a list of source controls. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @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. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link SourceControlListResult} 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. + */ +function _listByAutomationAccountNext(nextPageLink, 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.'); + } + // Validate + try { + if (nextPageLink === null || nextPageLink === undefined || typeof nextPageLink.valueOf() !== 'string') { + throw new Error('nextPageLink cannot be null or undefined and it must be of type string.'); + } + if (this.client.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 requestUrl = '{nextLink}'; + requestUrl = requestUrl.replace('{nextLink}', nextPageLink); + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + 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]; + } + } + } + httpRequest.body = null; + // 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['SourceControlListResult']().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); + }); +} + +/** Class representing a SourceControlOperations. */ +class SourceControlOperations { + /** + * Create a SourceControlOperations. + * @param {AutomationClient} client Reference to the service client. + */ + constructor(client) { + this.client = client; + this._createOrUpdate = _createOrUpdate; + this._update = _update; + this._deleteMethod = _deleteMethod; + this._get = _get; + this._listByAutomationAccount = _listByAutomationAccount; + this._listByAutomationAccountNext = _listByAutomationAccountNext; + } + + /** + * Create a source control. + * + * @param {string} automationAccountName The automation account name. + * + * @param {string} sourceControlName The source control name. + * + * @param {object} parameters The parameters supplied to the create or update + * source control operation. + * + * @param {string} [parameters.repoUrl] Gets or sets the repo url of the source + * control. + * + * @param {string} [parameters.branch] Gets or sets the repo branch of the + * source control. Include branch as empty string for VsoTfvc. + * + * @param {string} [parameters.folderPath] Gets or sets the folder path of the + * source control. Path must be relative. + * + * @param {boolean} [parameters.autoSync] Gets or sets auto async of the source + * control. Default is false. + * + * @param {boolean} [parameters.publishRunbook] Gets or sets the auto publish + * of the source control. Default is true. + * + * @param {string} [parameters.sourceType] The source type. Must be one of + * VsoGit, VsoTfvc, GitHub, case sensitive. Possible values include: 'VsoGit', + * 'VsoTfvc', 'GitHub' + * + * @param {string} [parameters.securityToken] Gets or sets the authorization + * token for the repo of the source control. + * + * @param {string} [parameters.description] Gets or sets the user description + * of the source control. + * + * @param {object} [options] Optional Parameters. + * + * @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. + */ + createOrUpdateWithHttpOperationResponse(automationAccountName, sourceControlName, parameters, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._createOrUpdate(automationAccountName, sourceControlName, parameters, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Create a source control. + * + * @param {string} automationAccountName The automation account name. + * + * @param {string} sourceControlName The source control name. + * + * @param {object} parameters The parameters supplied to the create or update + * source control operation. + * + * @param {string} [parameters.repoUrl] Gets or sets the repo url of the source + * control. + * + * @param {string} [parameters.branch] Gets or sets the repo branch of the + * source control. Include branch as empty string for VsoTfvc. + * + * @param {string} [parameters.folderPath] Gets or sets the folder path of the + * source control. Path must be relative. + * + * @param {boolean} [parameters.autoSync] Gets or sets auto async of the source + * control. Default is false. + * + * @param {boolean} [parameters.publishRunbook] Gets or sets the auto publish + * of the source control. Default is true. + * + * @param {string} [parameters.sourceType] The source type. Must be one of + * VsoGit, VsoTfvc, GitHub, case sensitive. Possible values include: 'VsoGit', + * 'VsoTfvc', 'GitHub' + * + * @param {string} [parameters.securityToken] Gets or sets the authorization + * token for the repo of the source control. + * + * @param {string} [parameters.description] Gets or sets the user description + * of the source control. + * + * @param {object} [options] Optional Parameters. + * + * @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 {SourceControl} - 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 SourceControl} 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. + */ + createOrUpdate(automationAccountName, sourceControlName, parameters, 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._createOrUpdate(automationAccountName, sourceControlName, parameters, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._createOrUpdate(automationAccountName, sourceControlName, parameters, options, optionalCallback); + } + } + + /** + * Update a source control. + * + * @param {string} automationAccountName The automation account name. + * + * @param {string} sourceControlName The source control name. + * + * @param {object} parameters The parameters supplied to the update source + * control operation. + * + * @param {string} [parameters.branch] Gets or sets the repo branch of the + * source control. + * + * @param {string} [parameters.folderPath] Gets or sets the folder path of the + * source control. Path must be relative. + * + * @param {boolean} [parameters.autoSync] Gets or sets auto async of the source + * control. Default is false. + * + * @param {boolean} [parameters.publishRunbook] Gets or sets the auto publish + * of the source control. Default is true. + * + * @param {string} [parameters.securityToken] Gets or sets the authorization + * token for the repo of the source control. + * + * @param {string} [parameters.description] Gets or sets the user description + * of the source control. + * + * @param {object} [options] Optional Parameters. + * + * @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, sourceControlName, parameters, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._update(automationAccountName, sourceControlName, parameters, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Update a source control. + * + * @param {string} automationAccountName The automation account name. + * + * @param {string} sourceControlName The source control name. + * + * @param {object} parameters The parameters supplied to the update source + * control operation. + * + * @param {string} [parameters.branch] Gets or sets the repo branch of the + * source control. + * + * @param {string} [parameters.folderPath] Gets or sets the folder path of the + * source control. Path must be relative. + * + * @param {boolean} [parameters.autoSync] Gets or sets auto async of the source + * control. Default is false. + * + * @param {boolean} [parameters.publishRunbook] Gets or sets the auto publish + * of the source control. Default is true. + * + * @param {string} [parameters.securityToken] Gets or sets the authorization + * token for the repo of the source control. + * + * @param {string} [parameters.description] Gets or sets the user description + * of the source control. + * + * @param {object} [options] Optional Parameters. + * + * @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 {SourceControl} - 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 SourceControl} 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, sourceControlName, parameters, 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, sourceControlName, parameters, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._update(automationAccountName, sourceControlName, parameters, options, optionalCallback); + } + } + + /** + * Delete the source control. + * + * @param {string} automationAccountName The automation account name. + * + * @param {string} sourceControlName The name of source control. + * + * @param {object} [options] Optional Parameters. + * + * @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. + */ + deleteMethodWithHttpOperationResponse(automationAccountName, sourceControlName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._deleteMethod(automationAccountName, sourceControlName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Delete the source control. + * + * @param {string} automationAccountName The automation account name. + * + * @param {string} sourceControlName The name of source control. + * + * @param {object} [options] Optional Parameters. + * + * @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 {null} - 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. + * + * {null} [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. + */ + deleteMethod(automationAccountName, sourceControlName, 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._deleteMethod(automationAccountName, sourceControlName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._deleteMethod(automationAccountName, sourceControlName, options, optionalCallback); + } + } + + /** + * Retrieve the source control identified by source control name. + * + * @param {string} automationAccountName The automation account name. + * + * @param {string} sourceControlName The name of source control. + * + * @param {object} [options] Optional Parameters. + * + * @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. + */ + getWithHttpOperationResponse(automationAccountName, sourceControlName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._get(automationAccountName, sourceControlName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Retrieve the source control identified by source control name. + * + * @param {string} automationAccountName The automation account name. + * + * @param {string} sourceControlName The name of source control. + * + * @param {object} [options] Optional Parameters. + * + * @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 {SourceControl} - 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 SourceControl} 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. + */ + get(automationAccountName, sourceControlName, 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._get(automationAccountName, sourceControlName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._get(automationAccountName, sourceControlName, options, optionalCallback); + } + } + + /** + * Retrieve a list of source controls. + * + * @param {string} automationAccountName The automation account name. + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.filter] The filter to apply on the operation. + * + * @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. + */ + listByAutomationAccountWithHttpOperationResponse(automationAccountName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._listByAutomationAccount(automationAccountName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Retrieve a list of source controls. + * + * @param {string} automationAccountName The automation account name. + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.filter] The filter to apply on the operation. + * + * @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 {SourceControlListResult} - 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 SourceControlListResult} 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. + */ + listByAutomationAccount(automationAccountName, 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._listByAutomationAccount(automationAccountName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._listByAutomationAccount(automationAccountName, options, optionalCallback); + } + } + + /** + * Retrieve a list of source controls. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @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. + */ + listByAutomationAccountNextWithHttpOperationResponse(nextPageLink, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._listByAutomationAccountNext(nextPageLink, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Retrieve a list of source controls. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @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 {SourceControlListResult} - 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 SourceControlListResult} 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. + */ + listByAutomationAccountNext(nextPageLink, 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._listByAutomationAccountNext(nextPageLink, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._listByAutomationAccountNext(nextPageLink, options, optionalCallback); + } + } + +} + +module.exports = SourceControlOperations; diff --git a/lib/services/automationManagement/lib/operations/sourceControlSyncJobOperations.js b/lib/services/automationManagement/lib/operations/sourceControlSyncJobOperations.js new file mode 100644 index 0000000000..9c083f2028 --- /dev/null +++ b/lib/services/automationManagement/lib/operations/sourceControlSyncJobOperations.js @@ -0,0 +1,1004 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const msRest = require('ms-rest'); +const msRestAzure = require('ms-rest-azure'); +const WebResource = msRest.WebResource; + +/** + * Creates the sync job for a source control. + * + * @param {string} automationAccountName The automation account name. + * + * @param {string} sourceControlName The source control name. + * + * @param {uuid} sourceControlSyncJobId The source control sync job id. + * + * @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. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link SourceControlSyncJob} 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. + */ +function _create(automationAccountName, sourceControlName, sourceControlSyncJobId, 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 = '2017-05-15-preview'; + // Validate + try { + if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { + throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + } + if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { + if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + { + 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 (sourceControlName === null || sourceControlName === undefined || typeof sourceControlName.valueOf() !== 'string') { + throw new Error('sourceControlName cannot be null or undefined and it must be of type string.'); + } + if (sourceControlSyncJobId === null || sourceControlSyncJobId === undefined || typeof sourceControlSyncJobId.valueOf() !== 'string' || !msRest.isValidUuid(sourceControlSyncJobId)) { + throw new Error('sourceControlSyncJobId cannot be null or undefined and it must be of type string and must be a valid uuid.'); + } + 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}/sourceControls/{sourceControlName}/sourceControlSyncJobs/{sourceControlSyncJobId}'; + 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())); + 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 = 'PUT'; + 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]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 201) { + 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 === 201) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['SourceControlSyncJob']().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 source control sync job identified by job id. + * + * @param {string} automationAccountName The automation account name. + * + * @param {string} sourceControlName The source control name. + * + * @param {uuid} sourceControlSyncJobId The source control sync job id. + * + * @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. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link SourceControlSyncJobById} 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. + */ +function _get(automationAccountName, sourceControlName, sourceControlSyncJobId, 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 = '2017-05-15-preview'; + // Validate + try { + if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { + throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + } + if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { + if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + { + 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 (sourceControlName === null || sourceControlName === undefined || typeof sourceControlName.valueOf() !== 'string') { + throw new Error('sourceControlName cannot be null or undefined and it must be of type string.'); + } + if (sourceControlSyncJobId === null || sourceControlSyncJobId === undefined || typeof sourceControlSyncJobId.valueOf() !== 'string' || !msRest.isValidUuid(sourceControlSyncJobId)) { + throw new Error('sourceControlSyncJobId cannot be null or undefined and it must be of type string and must be a valid uuid.'); + } + 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}/sourceControls/{sourceControlName}/sourceControlSyncJobs/{sourceControlSyncJobId}'; + 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())); + 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 = 'GET'; + 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]; + } + } + } + httpRequest.body = null; + // 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['SourceControlSyncJobById']().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 a list of source control sync jobs. + * + * @param {string} automationAccountName The automation account name. + * + * @param {string} sourceControlName The source control name. + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.filter] The filter to apply on the operation. + * + * @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. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link SourceControlSyncJobListResult} 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. + */ +function _listByAutomationAccount(automationAccountName, sourceControlName, 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 filter = (options && options.filter !== undefined) ? options.filter : undefined; + let apiVersion = '2017-05-15-preview'; + // Validate + try { + if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { + throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + } + if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { + if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + { + 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 (sourceControlName === null || sourceControlName === undefined || typeof sourceControlName.valueOf() !== 'string') { + throw new Error('sourceControlName 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.'); + } + 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}/sourceControls/{sourceControlName}/sourceControlSyncJobs'; + 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)); + let queryParameters = []; + if (filter !== null && filter !== undefined) { + queryParameters.push('$filter=' + encodeURIComponent(filter)); + } + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + 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]; + } + } + } + httpRequest.body = null; + // 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['SourceControlSyncJobListResult']().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 a list of source control sync jobs. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @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. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link SourceControlSyncJobListResult} 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. + */ +function _listByAutomationAccountNext(nextPageLink, 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.'); + } + // Validate + try { + if (nextPageLink === null || nextPageLink === undefined || typeof nextPageLink.valueOf() !== 'string') { + throw new Error('nextPageLink cannot be null or undefined and it must be of type string.'); + } + if (this.client.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 requestUrl = '{nextLink}'; + requestUrl = requestUrl.replace('{nextLink}', nextPageLink); + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + 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]; + } + } + } + httpRequest.body = null; + // 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['SourceControlSyncJobListResult']().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); + }); +} + +/** Class representing a SourceControlSyncJobOperations. */ +class SourceControlSyncJobOperations { + /** + * Create a SourceControlSyncJobOperations. + * @param {AutomationClient} client Reference to the service client. + */ + constructor(client) { + this.client = client; + this._create = _create; + this._get = _get; + this._listByAutomationAccount = _listByAutomationAccount; + this._listByAutomationAccountNext = _listByAutomationAccountNext; + } + + /** + * Creates the sync job for a source control. + * + * @param {string} automationAccountName The automation account name. + * + * @param {string} sourceControlName The source control name. + * + * @param {uuid} sourceControlSyncJobId The source control sync job id. + * + * @param {object} [options] Optional Parameters. + * + * @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. + */ + createWithHttpOperationResponse(automationAccountName, sourceControlName, sourceControlSyncJobId, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._create(automationAccountName, sourceControlName, sourceControlSyncJobId, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Creates the sync job for a source control. + * + * @param {string} automationAccountName The automation account name. + * + * @param {string} sourceControlName The source control name. + * + * @param {uuid} sourceControlSyncJobId The source control sync job id. + * + * @param {object} [options] Optional Parameters. + * + * @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 {SourceControlSyncJob} - 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 SourceControlSyncJob} 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. + */ + create(automationAccountName, sourceControlName, sourceControlSyncJobId, 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._create(automationAccountName, sourceControlName, sourceControlSyncJobId, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._create(automationAccountName, sourceControlName, sourceControlSyncJobId, options, optionalCallback); + } + } + + /** + * Retrieve the source control sync job identified by job id. + * + * @param {string} automationAccountName The automation account name. + * + * @param {string} sourceControlName The source control name. + * + * @param {uuid} sourceControlSyncJobId The source control sync job id. + * + * @param {object} [options] Optional Parameters. + * + * @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. + */ + getWithHttpOperationResponse(automationAccountName, sourceControlName, sourceControlSyncJobId, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._get(automationAccountName, sourceControlName, sourceControlSyncJobId, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Retrieve the source control sync job identified by job id. + * + * @param {string} automationAccountName The automation account name. + * + * @param {string} sourceControlName The source control name. + * + * @param {uuid} sourceControlSyncJobId The source control sync job id. + * + * @param {object} [options] Optional Parameters. + * + * @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 {SourceControlSyncJobById} - 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 SourceControlSyncJobById} 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. + */ + get(automationAccountName, sourceControlName, sourceControlSyncJobId, 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._get(automationAccountName, sourceControlName, sourceControlSyncJobId, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._get(automationAccountName, sourceControlName, sourceControlSyncJobId, options, optionalCallback); + } + } + + /** + * Retrieve a list of source control sync jobs. + * + * @param {string} automationAccountName The automation account name. + * + * @param {string} sourceControlName The source control name. + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.filter] The filter to apply on the operation. + * + * @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. + */ + listByAutomationAccountWithHttpOperationResponse(automationAccountName, sourceControlName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._listByAutomationAccount(automationAccountName, sourceControlName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Retrieve a list of source control sync jobs. + * + * @param {string} automationAccountName The automation account name. + * + * @param {string} sourceControlName The source control name. + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.filter] The filter to apply on the operation. + * + * @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 {SourceControlSyncJobListResult} - 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 SourceControlSyncJobListResult} 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. + */ + listByAutomationAccount(automationAccountName, sourceControlName, 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._listByAutomationAccount(automationAccountName, sourceControlName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._listByAutomationAccount(automationAccountName, sourceControlName, options, optionalCallback); + } + } + + /** + * Retrieve a list of source control sync jobs. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @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. + */ + listByAutomationAccountNextWithHttpOperationResponse(nextPageLink, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._listByAutomationAccountNext(nextPageLink, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Retrieve a list of source control sync jobs. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @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 {SourceControlSyncJobListResult} - 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 SourceControlSyncJobListResult} 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. + */ + listByAutomationAccountNext(nextPageLink, 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._listByAutomationAccountNext(nextPageLink, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._listByAutomationAccountNext(nextPageLink, options, optionalCallback); + } + } + +} + +module.exports = SourceControlSyncJobOperations; diff --git a/lib/services/automationManagement/lib/operations/statisticsOperations.js b/lib/services/automationManagement/lib/operations/statisticsOperations.js index 272e88b58b..2d55cd9c03 100644 --- a/lib/services/automationManagement/lib/operations/statisticsOperations.js +++ b/lib/services/automationManagement/lib/operations/statisticsOperations.js @@ -52,6 +52,7 @@ function _listByAutomationAccount(resourceGroupName, automationAccountName, opti throw new Error('callback cannot be null.'); } let filter = (options && options.filter !== undefined) ? options.filter : undefined; + let apiVersion = '2015-10-31'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -72,9 +73,6 @@ 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 (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { - throw new Error('this.client.apiVersion 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.'); } @@ -92,7 +90,7 @@ function _listByAutomationAccount(resourceGroupName, automationAccountName, opti if (filter !== null && filter !== undefined) { queryParameters.push('$filter=' + encodeURIComponent(filter)); } - queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); if (queryParameters.length > 0) { requestUrl += '?' + queryParameters.join('&'); } diff --git a/lib/services/automationManagement/lib/operations/testJobOperations.js b/lib/services/automationManagement/lib/operations/testJobOperations.js new file mode 100644 index 0000000000..fe584dc175 --- /dev/null +++ b/lib/services/automationManagement/lib/operations/testJobOperations.js @@ -0,0 +1,1224 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const msRest = require('ms-rest'); +const msRestAzure = require('ms-rest-azure'); +const WebResource = msRest.WebResource; + +/** + * Create a test job of the runbook. + * + * @param {string} automationAccountName The automation account name. + * + * @param {string} runbookName The parameters supplied to the create test job + * operation. + * + * @param {object} parameters The parameters supplied to the create test job + * operation. + * + * @param {object} [parameters.parameters] Gets or sets the parameters of the + * test job. + * + * @param {string} [parameters.runOn] Gets or sets the runOn which specifies + * the group name where the job is to be executed. + * + * @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. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link TestJob} 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. + */ +function _create(automationAccountName, runbookName, parameters, 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 (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { + throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + } + if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { + if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + { + 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 (runbookName === null || runbookName === undefined || typeof runbookName.valueOf() !== 'string') { + throw new Error('runbookName cannot be null or undefined and it must be of type string.'); + } + if (parameters === null || parameters === undefined) { + throw new Error('parameters cannot be null or undefined.'); + } + 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}/runbooks/{runbookName}/draft/testJob'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); + requestUrl = requestUrl.replace('{runbookName}', encodeURIComponent(runbookName)); + 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 = 'PUT'; + 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['TestJobCreateParameters']().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 !== 201) { + 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 === 201) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['TestJob']().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 test job for the specified runbook. + * + * @param {string} automationAccountName The automation account name. + * + * @param {string} runbookName The runbook 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. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link TestJob} 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. + */ +function _get(automationAccountName, runbookName, 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 (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { + throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + } + if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { + if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + { + 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 (runbookName === null || runbookName === undefined || typeof runbookName.valueOf() !== 'string') { + throw new Error('runbookName 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}/runbooks/{runbookName}/draft/testJob'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); + requestUrl = requestUrl.replace('{runbookName}', encodeURIComponent(runbookName)); + 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 = 'GET'; + 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]; + } + } + } + httpRequest.body = null; + // 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['TestJob']().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); + }); +} + +/** + * Resume the test job. + * + * @param {string} automationAccountName The automation account name. + * + * @param {string} runbookName The runbook 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. + * + * {null} [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 _resume(automationAccountName, runbookName, 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 (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { + throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + } + if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { + if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + { + 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 (runbookName === null || runbookName === undefined || typeof runbookName.valueOf() !== 'string') { + throw new Error('runbookName 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}/runbooks/{runbookName}/draft/testJob/resume'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); + requestUrl = requestUrl.replace('{runbookName}', encodeURIComponent(runbookName)); + 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 = 'POST'; + 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]; + } + } + } + httpRequest.body = null; + // 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; + + return callback(null, result, httpRequest, response); + }); +} + +/** + * Stop the test job. + * + * @param {string} automationAccountName The automation account name. + * + * @param {string} runbookName The runbook 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. + * + * {null} [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 _stop(automationAccountName, runbookName, 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 (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { + throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + } + if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { + if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + { + 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 (runbookName === null || runbookName === undefined || typeof runbookName.valueOf() !== 'string') { + throw new Error('runbookName 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}/runbooks/{runbookName}/draft/testJob/stop'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); + requestUrl = requestUrl.replace('{runbookName}', encodeURIComponent(runbookName)); + 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 = 'POST'; + 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]; + } + } + } + httpRequest.body = null; + // 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; + + return callback(null, result, httpRequest, response); + }); +} + +/** + * Suspend the test job. + * + * @param {string} automationAccountName The automation account name. + * + * @param {string} runbookName The runbook 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. + * + * {null} [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 _suspend(automationAccountName, runbookName, 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 (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { + throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + } + if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { + if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + { + 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 (runbookName === null || runbookName === undefined || typeof runbookName.valueOf() !== 'string') { + throw new Error('runbookName 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}/runbooks/{runbookName}/draft/testJob/suspend'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); + requestUrl = requestUrl.replace('{runbookName}', encodeURIComponent(runbookName)); + 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 = 'POST'; + 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]; + } + } + } + httpRequest.body = null; + // 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; + + return callback(null, result, httpRequest, response); + }); +} + +/** Class representing a TestJobOperations. */ +class TestJobOperations { + /** + * Create a TestJobOperations. + * @param {AutomationClient} client Reference to the service client. + */ + constructor(client) { + this.client = client; + this._create = _create; + this._get = _get; + this._resume = _resume; + this._stop = _stop; + this._suspend = _suspend; + } + + /** + * Create a test job of the runbook. + * + * @param {string} automationAccountName The automation account name. + * + * @param {string} runbookName The parameters supplied to the create test job + * operation. + * + * @param {object} parameters The parameters supplied to the create test job + * operation. + * + * @param {object} [parameters.parameters] Gets or sets the parameters of the + * test job. + * + * @param {string} [parameters.runOn] Gets or sets the runOn which specifies + * the group name where the job is to be executed. + * + * @param {object} [options] Optional Parameters. + * + * @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. + */ + createWithHttpOperationResponse(automationAccountName, runbookName, parameters, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._create(automationAccountName, runbookName, parameters, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Create a test job of the runbook. + * + * @param {string} automationAccountName The automation account name. + * + * @param {string} runbookName The parameters supplied to the create test job + * operation. + * + * @param {object} parameters The parameters supplied to the create test job + * operation. + * + * @param {object} [parameters.parameters] Gets or sets the parameters of the + * test job. + * + * @param {string} [parameters.runOn] Gets or sets the runOn which specifies + * the group name where the job is to be executed. + * + * @param {object} [options] Optional Parameters. + * + * @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 {TestJob} - 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 TestJob} 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. + */ + create(automationAccountName, runbookName, parameters, 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._create(automationAccountName, runbookName, parameters, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._create(automationAccountName, runbookName, parameters, options, optionalCallback); + } + } + + /** + * Retrieve the test job for the specified runbook. + * + * @param {string} automationAccountName The automation account name. + * + * @param {string} runbookName The runbook name. + * + * @param {object} [options] Optional Parameters. + * + * @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. + */ + getWithHttpOperationResponse(automationAccountName, runbookName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._get(automationAccountName, runbookName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Retrieve the test job for the specified runbook. + * + * @param {string} automationAccountName The automation account name. + * + * @param {string} runbookName The runbook name. + * + * @param {object} [options] Optional Parameters. + * + * @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 {TestJob} - 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 TestJob} 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. + */ + get(automationAccountName, runbookName, 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._get(automationAccountName, runbookName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._get(automationAccountName, runbookName, options, optionalCallback); + } + } + + /** + * Resume the test job. + * + * @param {string} automationAccountName The automation account name. + * + * @param {string} runbookName The runbook name. + * + * @param {object} [options] Optional Parameters. + * + * @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. + */ + resumeWithHttpOperationResponse(automationAccountName, runbookName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._resume(automationAccountName, runbookName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Resume the test job. + * + * @param {string} automationAccountName The automation account name. + * + * @param {string} runbookName The runbook name. + * + * @param {object} [options] Optional Parameters. + * + * @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 {null} - 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. + * + * {null} [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. + */ + resume(automationAccountName, runbookName, 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._resume(automationAccountName, runbookName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._resume(automationAccountName, runbookName, options, optionalCallback); + } + } + + /** + * Stop the test job. + * + * @param {string} automationAccountName The automation account name. + * + * @param {string} runbookName The runbook name. + * + * @param {object} [options] Optional Parameters. + * + * @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. + */ + stopWithHttpOperationResponse(automationAccountName, runbookName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._stop(automationAccountName, runbookName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Stop the test job. + * + * @param {string} automationAccountName The automation account name. + * + * @param {string} runbookName The runbook name. + * + * @param {object} [options] Optional Parameters. + * + * @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 {null} - 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. + * + * {null} [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. + */ + stop(automationAccountName, runbookName, 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._stop(automationAccountName, runbookName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._stop(automationAccountName, runbookName, options, optionalCallback); + } + } + + /** + * Suspend the test job. + * + * @param {string} automationAccountName The automation account name. + * + * @param {string} runbookName The runbook name. + * + * @param {object} [options] Optional Parameters. + * + * @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. + */ + suspendWithHttpOperationResponse(automationAccountName, runbookName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._suspend(automationAccountName, runbookName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Suspend the test job. + * + * @param {string} automationAccountName The automation account name. + * + * @param {string} runbookName The runbook name. + * + * @param {object} [options] Optional Parameters. + * + * @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 {null} - 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. + * + * {null} [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. + */ + suspend(automationAccountName, runbookName, 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._suspend(automationAccountName, runbookName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._suspend(automationAccountName, runbookName, options, optionalCallback); + } + } + +} + +module.exports = TestJobOperations; diff --git a/lib/services/automationManagement/lib/operations/testJobStreams.js b/lib/services/automationManagement/lib/operations/testJobStreams.js index a63bd58c06..028a130fda 100644 --- a/lib/services/automationManagement/lib/operations/testJobStreams.js +++ b/lib/services/automationManagement/lib/operations/testJobStreams.js @@ -15,9 +15,8 @@ const msRestAzure = require('ms-rest-azure'); const WebResource = msRest.WebResource; /** - * Retrieve a test job streams identified by runbook name and stream id. - * - * @param {string} resourceGroupName The resource group name. + * Retrieve a test job stream of the test job identified by runbook name and + * stream id. * * @param {string} automationAccountName The automation account name. * @@ -43,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') { @@ -53,15 +52,19 @@ function _get(resourceGroupName, automationAccountName, runbookName, jobStreamId 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 (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) { - if (resourceGroupName.match(/^[-\w\._]+$/) === null) + 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 (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') { @@ -73,12 +76,6 @@ function _get(resourceGroupName, automationAccountName, runbookName, jobStreamId if (jobStreamId === null || jobStreamId === undefined || typeof jobStreamId.valueOf() !== 'string') { throw new Error('jobStreamId cannot be null or undefined and it must be of type string.'); } - if (this.client.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.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { - throw new Error('this.client.apiVersion 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.'); } @@ -89,13 +86,13 @@ function _get(resourceGroupName, automationAccountName, runbookName, jobStreamId // Construct URL 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('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + 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)); - requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; - queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); if (queryParameters.length > 0) { requestUrl += '?' + queryParameters.join('&'); } @@ -181,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. @@ -207,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') { @@ -218,15 +213,19 @@ function _listByTestJob(resourceGroupName, automationAccountName, runbookName, o throw new Error('callback cannot be null.'); } let filter = (options && options.filter !== undefined) ? options.filter : undefined; + 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.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { + throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (resourceGroupName !== null && resourceGroupName !== undefined) { - 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,12 +237,6 @@ function _listByTestJob(resourceGroupName, automationAccountName, runbookName, o if (filter !== null && filter !== undefined && typeof filter.valueOf() !== 'string') { throw new Error('filter 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.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { - throw new Error('this.client.apiVersion 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.'); } @@ -254,15 +247,15 @@ function _listByTestJob(resourceGroupName, automationAccountName, runbookName, o // Construct URL 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('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{runbookName}', encodeURIComponent(runbookName)); - requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; if (filter !== null && filter !== undefined) { queryParameters.push('$filter=' + encodeURIComponent(filter)); } - queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); if (queryParameters.length > 0) { requestUrl += '?' + queryParameters.join('&'); } @@ -487,9 +480,8 @@ class TestJobStreams { } /** - * Retrieve a test job streams identified by runbook name and stream id. - * - * @param {string} resourceGroupName The resource group name. + * Retrieve a test job stream of the test job identified by runbook name and + * stream id. * * @param {string} automationAccountName The automation account name. * @@ -508,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); } @@ -523,9 +515,8 @@ class TestJobStreams { } /** - * Retrieve a test job streams identified by runbook name and stream id. - * - * @param {string} resourceGroupName The resource group name. + * Retrieve a test job stream of the test job identified by runbook name and + * stream id. * * @param {string} automationAccountName The automation account name. * @@ -560,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') { @@ -569,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. @@ -602,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); } @@ -619,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. @@ -654,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') { @@ -663,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/usages.js b/lib/services/automationManagement/lib/operations/usages.js index 8cde8acc71..b68cfaf78b 100644 --- a/lib/services/automationManagement/lib/operations/usages.js +++ b/lib/services/automationManagement/lib/operations/usages.js @@ -49,6 +49,7 @@ function _listByAutomationAccount(resourceGroupName, automationAccountName, opti 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') { @@ -66,9 +67,6 @@ 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 (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { - throw new Error('this.client.apiVersion 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.'); } @@ -83,7 +81,7 @@ function _listByAutomationAccount(resourceGroupName, automationAccountName, opti requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; - queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); if (queryParameters.length > 0) { requestUrl += '?' + queryParameters.join('&'); } diff --git a/lib/services/automationManagement/lib/operations/variableOperations.js b/lib/services/automationManagement/lib/operations/variableOperations.js index aae112202b..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') { @@ -64,15 +62,16 @@ function _createOrUpdate(resourceGroupName, automationAccountName, variableName, 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 (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,9 +86,6 @@ function _createOrUpdate(resourceGroupName, automationAccountName, variableName, 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.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { - throw new Error('this.client.apiVersion 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.'); } @@ -100,12 +96,12 @@ 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)); let queryParameters = []; - queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); if (queryParameters.length > 0) { requestUrl += '?' + queryParameters.join('&'); } @@ -222,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. @@ -231,7 +225,7 @@ function _createOrUpdate(resourceGroupName, automationAccountName, variableName, * @param {object} parameters The parameters supplied to the update variable * operation. * - * @param {string} parameters.name Gets or sets the name of the variable. + * @param {string} [parameters.name] Gets or sets the name of the variable. * * @param {string} [parameters.value] Gets or sets the value of the variable. * @@ -256,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') { @@ -266,15 +260,16 @@ function _update(resourceGroupName, automationAccountName, variableName, paramet 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 (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') { @@ -289,9 +284,6 @@ function _update(resourceGroupName, automationAccountName, variableName, paramet 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.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { - throw new Error('this.client.apiVersion 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.'); } @@ -302,12 +294,12 @@ 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)); let queryParameters = []; - queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); if (queryParameters.length > 0) { requestUrl += '?' + queryParameters.join('&'); } @@ -407,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. @@ -430,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') { @@ -440,15 +430,16 @@ function _deleteMethod(resourceGroupName, automationAccountName, variableName, o 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 (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') { @@ -460,9 +451,6 @@ function _deleteMethod(resourceGroupName, automationAccountName, variableName, 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 (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { - throw new Error('this.client.apiVersion 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.'); } @@ -473,12 +461,12 @@ 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)); let queryParameters = []; - queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); if (queryParameters.length > 0) { requestUrl += '?' + queryParameters.join('&'); } @@ -547,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. @@ -571,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') { @@ -581,15 +567,16 @@ function _get(resourceGroupName, automationAccountName, variableName, options, c 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 (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') { @@ -601,9 +588,6 @@ function _get(resourceGroupName, automationAccountName, variableName, 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 (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { - throw new Error('this.client.apiVersion 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.'); } @@ -614,12 +598,12 @@ 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)); let queryParameters = []; - queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); if (queryParameters.length > 0) { requestUrl += '?' + queryParameters.join('&'); } @@ -705,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. @@ -727,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') { @@ -737,15 +719,16 @@ function _listByAutomationAccount(resourceGroupName, automationAccountName, opti 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 (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') { @@ -754,9 +737,6 @@ 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 (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { - throw new Error('this.client.apiVersion 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.'); } @@ -767,11 +747,11 @@ 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 = []; - queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); if (queryParameters.length > 0) { requestUrl += '?' + queryParameters.join('&'); } @@ -1001,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. @@ -1031,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); } @@ -1048,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. @@ -1094,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') { @@ -1103,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. @@ -1126,7 +1100,7 @@ class VariableOperations { * @param {object} parameters The parameters supplied to the update variable * operation. * - * @param {string} parameters.name Gets or sets the name of the variable. + * @param {string} [parameters.name] Gets or sets the name of the variable. * * @param {string} [parameters.value] Gets or sets the value of the variable. * @@ -1144,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); } @@ -1161,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. @@ -1170,7 +1142,7 @@ class VariableOperations { * @param {object} parameters The parameters supplied to the update variable * operation. * - * @param {string} parameters.name Gets or sets the name of the variable. + * @param {string} [parameters.name] Gets or sets the name of the variable. * * @param {string} [parameters.value] Gets or sets the value of the variable. * @@ -1204,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') { @@ -1213,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. @@ -1244,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); } @@ -1261,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. @@ -1293,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') { @@ -1302,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. @@ -1333,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); } @@ -1350,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. @@ -1383,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') { @@ -1392,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. @@ -1421,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); } @@ -1438,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. @@ -1469,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') { @@ -1478,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 1de71658e3..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') { @@ -48,15 +46,16 @@ function _generateUri(resourceGroupName, automationAccountName, options, callbac 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 (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') { @@ -65,9 +64,6 @@ function _generateUri(resourceGroupName, automationAccountName, options, callbac 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.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { - throw new Error('this.client.apiVersion 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.'); } @@ -78,11 +74,11 @@ 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 = []; - queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); if (queryParameters.length > 0) { requestUrl += '?' + queryParameters.join('&'); } @@ -174,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. @@ -197,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') { @@ -207,15 +201,16 @@ function _deleteMethod(resourceGroupName, automationAccountName, webhookName, op 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 (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') { @@ -227,9 +222,6 @@ function _deleteMethod(resourceGroupName, automationAccountName, webhookName, 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 (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { - throw new Error('this.client.apiVersion 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.'); } @@ -240,12 +232,12 @@ 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)); let queryParameters = []; - queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); if (queryParameters.length > 0) { requestUrl += '?' + queryParameters.join('&'); } @@ -314,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. @@ -338,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') { @@ -348,15 +338,16 @@ function _get(resourceGroupName, automationAccountName, webhookName, options, ca 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 (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') { @@ -368,9 +359,6 @@ function _get(resourceGroupName, automationAccountName, webhookName, 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 (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { - throw new Error('this.client.apiVersion 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.'); } @@ -381,12 +369,12 @@ 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)); let queryParameters = []; - queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); if (queryParameters.length > 0) { requestUrl += '?' + queryParameters.join('&'); } @@ -472,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. @@ -518,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') { @@ -528,15 +514,16 @@ function _createOrUpdate(resourceGroupName, automationAccountName, webhookName, 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 (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') { @@ -551,9 +538,6 @@ function _createOrUpdate(resourceGroupName, automationAccountName, webhookName, 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.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { - throw new Error('this.client.apiVersion 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.'); } @@ -564,12 +548,12 @@ 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)); let queryParameters = []; - queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); if (queryParameters.length > 0) { requestUrl += '?' + queryParameters.join('&'); } @@ -686,15 +670,13 @@ 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. * * @param {object} parameters The update parameters for webhook. * - * @param {string} parameters.name Gets or sets the name of the webhook. + * @param {string} [parameters.name] Gets or sets the name of the webhook. * * @param {boolean} [parameters.isEnabled] Gets or sets the value of the * enabled flag of webhook. @@ -726,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') { @@ -736,15 +718,16 @@ function _update(resourceGroupName, automationAccountName, webhookName, paramete 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 (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') { @@ -759,9 +742,6 @@ function _update(resourceGroupName, automationAccountName, webhookName, 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 (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { - throw new Error('this.client.apiVersion 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.'); } @@ -772,12 +752,12 @@ 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)); let queryParameters = []; - queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); if (queryParameters.length > 0) { requestUrl += '?' + queryParameters.join('&'); } @@ -877,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. @@ -901,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') { @@ -912,15 +890,16 @@ function _listByAutomationAccount(resourceGroupName, automationAccountName, opti throw new Error('callback cannot be null.'); } let filter = (options && options.filter !== undefined) ? options.filter : undefined; + 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') { @@ -932,9 +911,6 @@ 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 (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { - throw new Error('this.client.apiVersion 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.'); } @@ -945,14 +921,14 @@ 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 = []; if (filter !== null && filter !== undefined) { queryParameters.push('$filter=' + encodeURIComponent(filter)); } - queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); if (queryParameters.length > 0) { requestUrl += '?' + queryParameters.join('&'); } @@ -1183,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. @@ -1198,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); } @@ -1215,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. @@ -1245,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') { @@ -1254,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. @@ -1285,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); } @@ -1302,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. @@ -1334,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') { @@ -1343,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. @@ -1374,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); } @@ -1391,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. @@ -1424,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') { @@ -1433,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. @@ -1486,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); } @@ -1503,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. @@ -1558,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') { @@ -1567,29 +1527,27 @@ 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. * * @param {object} parameters The update parameters for webhook. * - * @param {string} parameters.name Gets or sets the name of the webhook. + * @param {string} [parameters.name] Gets or sets the name of the webhook. * * @param {boolean} [parameters.isEnabled] Gets or sets the value of the * enabled flag of webhook. @@ -1614,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); } @@ -1631,15 +1589,13 @@ 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. * * @param {object} parameters The update parameters for webhook. * - * @param {string} parameters.name Gets or sets the name of the webhook. + * @param {string} [parameters.name] Gets or sets the name of the webhook. * * @param {boolean} [parameters.isEnabled] Gets or sets the value of the * enabled flag of webhook. @@ -1680,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') { @@ -1689,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. @@ -1720,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); } @@ -1737,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. @@ -1770,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') { @@ -1779,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); } } From 233f98ea64066ead9cb80a6023987476e7e5381d Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Fri, 23 Mar 2018 09:57:12 -0700 Subject: [PATCH 2/6] Generated from 39c2f9a4855320ed80fe45f847bf2c3d0c25f70e (#2535) Move automation parameters to method --- .../lib/automationClient.d.ts | 36 +- .../lib/automationClient.js | 16 +- .../lib/operations/activityOperations.js | 60 +- .../agentRegistrationInformation.js | 60 +- .../lib/operations/certificateOperations.js | 150 +- .../lib/operations/connectionOperations.js | 150 +- .../operations/connectionTypeOperations.js | 120 +- .../lib/operations/credentialOperations.js | 150 +- .../operations/dscCompilationJobOperations.js | 120 +- .../lib/operations/dscCompilationJobStream.js | 30 +- .../operations/dscConfigurationOperations.js | 150 +- .../dscNodeConfigurationOperations.js | 120 +- .../lib/operations/dscNodeOperations.js | 120 +- .../lib/operations/fields.js | 30 +- .../hybridRunbookWorkerGroupOperations.js | 120 +- .../lib/operations/index.d.ts | 1680 ++++++++++++----- .../lib/operations/jobOperations.js | 498 +++-- .../lib/operations/jobScheduleOperations.js | 120 +- .../lib/operations/jobStreamOperations.js | 138 +- .../operations/linkedWorkspaceOperations.js | 30 +- .../lib/operations/moduleOperations.js | 150 +- .../lib/operations/nodeReports.js | 90 +- .../lib/operations/objectDataTypes.js | 60 +- .../lib/operations/runbookDraftOperations.js | 190 +- .../lib/operations/runbookOperations.js | 180 +- .../lib/operations/scheduleOperations.js | 150 +- .../softwareUpdateConfigurationMachineRuns.js | 120 +- .../softwareUpdateConfigurationRuns.js | 120 +- .../softwareUpdateConfigurations.js | 240 ++- .../lib/operations/sourceControlOperations.js | 150 +- .../sourceControlSyncJobOperations.js | 90 +- .../lib/operations/testJobOperations.js | 150 +- .../lib/operations/testJobStreams.js | 60 +- .../lib/operations/variableOperations.js | 150 +- .../lib/operations/webhookOperations.js | 180 +- 35 files changed, 3830 insertions(+), 2148 deletions(-) diff --git a/lib/services/automationManagement/lib/automationClient.d.ts b/lib/services/automationManagement/lib/automationClient.d.ts index fc9ad09913..beb15e0986 100644 --- a/lib/services/automationManagement/lib/automationClient.d.ts +++ b/lib/services/automationManagement/lib/automationClient.d.ts @@ -13,28 +13,6 @@ import { AzureServiceClient, AzureServiceClientOptions } from 'ms-rest-azure'; import * as models from "./models"; import * as operations from "./operations"; -/** - * AutomationClientOptions for AutomationClient. - */ -declare interface AutomationClientOptions extends AzureServiceClientOptions { - /** - * @property {string} [clientRequestId] - Identifies this specific client request. - */ - clientRequestId?: string; - /** - * @property {string} [acceptLanguage] - Gets or sets the preferred language for the response. - */ - acceptLanguage?: string; - /** - * @property {number} [longRunningOperationRetryTimeout] - Gets or sets the retry timeout in seconds for Long Running Operations. Default value is 30. - */ - longRunningOperationRetryTimeout?: number; - /** - * @property {boolean} [generateClientRequestId] - When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. - */ - generateClientRequestId?: boolean; -} - export default class AutomationClient extends AzureServiceClient { /** * Initializes a new instance of the AutomationClient class. @@ -45,10 +23,6 @@ export default class AutomationClient extends AzureServiceClient { * * @param {string} subscriptionId - Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. * - * @param {string} resourceGroupName - The resource group name. - * - * @param {string} automationAccountName - The name of the automation account. - * * @param {string} [baseUri] - The base URI of the service. * * @param {object} [options] - The parameter options @@ -60,8 +34,6 @@ export default class AutomationClient extends AzureServiceClient { * * @param {boolean} [options.noRetryPolicy] - If set to true, turn off default retry policy * - * @param {string} [options.clientRequestId] - Identifies this specific client request. - * * @param {string} [options.acceptLanguage] - Gets or sets the preferred language for the response. * * @param {number} [options.longRunningOperationRetryTimeout] - Gets or sets the retry timeout in seconds for Long Running Operations. Default value is 30. @@ -69,18 +41,12 @@ export default class AutomationClient extends AzureServiceClient { * @param {boolean} [options.generateClientRequestId] - When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. * */ - constructor(credentials: ServiceClientCredentials, subscriptionId: string, resourceGroupName: string, automationAccountName: string, baseUri?: string, options?: AutomationClientOptions); + constructor(credentials: ServiceClientCredentials, subscriptionId: string, baseUri?: string, options?: AzureServiceClientOptions); credentials: ServiceClientCredentials; subscriptionId: string; - resourceGroupName: string; - - clientRequestId: string; - - automationAccountName: string; - acceptLanguage: string; longRunningOperationRetryTimeout: number; diff --git a/lib/services/automationManagement/lib/automationClient.js b/lib/services/automationManagement/lib/automationClient.js index 59eda98fcc..539adbc19f 100644 --- a/lib/services/automationManagement/lib/automationClient.js +++ b/lib/services/automationManagement/lib/automationClient.js @@ -28,32 +28,23 @@ class AutomationClient extends ServiceClient { * Create a AutomationClient. * @param {credentials} credentials - Credentials needed for the client to connect to Azure. * @param {string} subscriptionId - Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - * @param {string} resourceGroupName - The resource group name. - * @param {string} automationAccountName - The name of the automation account. * @param {string} [baseUri] - The base URI of the service. * @param {object} [options] - The parameter options * @param {Array} [options.filters] - Filters to be added to the request pipeline * @param {object} [options.requestOptions] - Options for the underlying request object * {@link https://github.com/request/request#requestoptions-callback Options doc} * @param {boolean} [options.noRetryPolicy] - If set to true, turn off default retry policy - * @param {string} [options.clientRequestId] - Identifies this specific client request. * @param {string} [options.acceptLanguage] - Gets or sets the preferred language for the response. * @param {number} [options.longRunningOperationRetryTimeout] - Gets or sets the retry timeout in seconds for Long Running Operations. Default value is 30. * @param {boolean} [options.generateClientRequestId] - When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. */ - constructor(credentials, subscriptionId, resourceGroupName, automationAccountName, baseUri, options) { + constructor(credentials, subscriptionId, baseUri, options) { if (credentials === null || credentials === undefined) { throw new Error('\'credentials\' cannot be null.'); } if (subscriptionId === null || subscriptionId === undefined) { throw new Error('\'subscriptionId\' cannot be null.'); } - if (resourceGroupName === null || resourceGroupName === undefined) { - throw new Error('\'resourceGroupName\' cannot be null.'); - } - if (automationAccountName === null || automationAccountName === undefined) { - throw new Error('\'automationAccountName\' cannot be null.'); - } if (!options) options = {}; @@ -68,14 +59,9 @@ class AutomationClient extends ServiceClient { } this.credentials = credentials; this.subscriptionId = subscriptionId; - this.resourceGroupName = resourceGroupName; - this.automationAccountName = automationAccountName; let packageInfo = this.getPackageJsonInfo(__dirname); this.addUserAgentInfo(`${packageInfo.name}/${packageInfo.version}`); - if(options.clientRequestId !== null && options.clientRequestId !== undefined) { - this.clientRequestId = options.clientRequestId; - } if(options.acceptLanguage !== null && options.acceptLanguage !== undefined) { this.acceptLanguage = options.acceptLanguage; } diff --git a/lib/services/automationManagement/lib/operations/activityOperations.js b/lib/services/automationManagement/lib/operations/activityOperations.js index 4a5bc93aa6..7a133d3778 100644 --- a/lib/services/automationManagement/lib/operations/activityOperations.js +++ b/lib/services/automationManagement/lib/operations/activityOperations.js @@ -18,6 +18,8 @@ const WebResource = msRest.WebResource; * Retrieve the activity in the module identified by module name and activity * name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} moduleName The name of module. @@ -42,7 +44,7 @@ const WebResource = msRest.WebResource; * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _get(automationAccountName, moduleName, activityName, options, callback) { +function _get(resourceGroupName, automationAccountName, moduleName, activityName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -55,13 +57,13 @@ function _get(automationAccountName, moduleName, activityName, options, callback let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -86,7 +88,7 @@ function _get(automationAccountName, moduleName, activityName, options, callback // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/modules/{moduleName}/activities/{activityName}'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{moduleName}', encodeURIComponent(moduleName)); requestUrl = requestUrl.replace('{activityName}', encodeURIComponent(activityName)); @@ -178,6 +180,8 @@ function _get(automationAccountName, moduleName, activityName, options, callback /** * Retrieve a list of activities in the module identified by module name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} moduleName The name of module. @@ -200,7 +204,7 @@ function _get(automationAccountName, moduleName, activityName, options, callback * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _listByModule(automationAccountName, moduleName, options, callback) { +function _listByModule(resourceGroupName, automationAccountName, moduleName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -213,13 +217,13 @@ function _listByModule(automationAccountName, moduleName, options, callback) { let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -241,7 +245,7 @@ function _listByModule(automationAccountName, moduleName, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/modules/{moduleName}/activities'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{moduleName}', encodeURIComponent(moduleName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -474,6 +478,8 @@ class ActivityOperations { * Retrieve the activity in the module identified by module name and activity * name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} moduleName The name of module. @@ -491,11 +497,11 @@ class ActivityOperations { * * @reject {Error} - The error object. */ - getWithHttpOperationResponse(automationAccountName, moduleName, activityName, options) { + getWithHttpOperationResponse(resourceGroupName, automationAccountName, moduleName, activityName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._get(automationAccountName, moduleName, activityName, options, (err, result, request, response) => { + self._get(resourceGroupName, automationAccountName, moduleName, activityName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -509,6 +515,8 @@ class ActivityOperations { * Retrieve the activity in the module identified by module name and activity * name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} moduleName The name of module. @@ -542,7 +550,7 @@ class ActivityOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - get(automationAccountName, moduleName, activityName, options, optionalCallback) { + get(resourceGroupName, automationAccountName, moduleName, activityName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -551,20 +559,22 @@ class ActivityOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._get(automationAccountName, moduleName, activityName, options, (err, result, request, response) => { + self._get(resourceGroupName, automationAccountName, moduleName, activityName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._get(automationAccountName, moduleName, activityName, options, optionalCallback); + return self._get(resourceGroupName, automationAccountName, moduleName, activityName, options, optionalCallback); } } /** * Retrieve a list of activities in the module identified by module name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} moduleName The name of module. @@ -580,11 +590,11 @@ class ActivityOperations { * * @reject {Error} - The error object. */ - listByModuleWithHttpOperationResponse(automationAccountName, moduleName, options) { + listByModuleWithHttpOperationResponse(resourceGroupName, automationAccountName, moduleName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._listByModule(automationAccountName, moduleName, options, (err, result, request, response) => { + self._listByModule(resourceGroupName, automationAccountName, moduleName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -597,6 +607,8 @@ class ActivityOperations { /** * Retrieve a list of activities in the module identified by module name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} moduleName The name of module. @@ -628,7 +640,7 @@ class ActivityOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - listByModule(automationAccountName, moduleName, options, optionalCallback) { + listByModule(resourceGroupName, automationAccountName, moduleName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -637,14 +649,14 @@ class ActivityOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._listByModule(automationAccountName, moduleName, options, (err, result, request, response) => { + self._listByModule(resourceGroupName, automationAccountName, moduleName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._listByModule(automationAccountName, moduleName, options, optionalCallback); + return self._listByModule(resourceGroupName, automationAccountName, moduleName, options, optionalCallback); } } diff --git a/lib/services/automationManagement/lib/operations/agentRegistrationInformation.js b/lib/services/automationManagement/lib/operations/agentRegistrationInformation.js index c16cca7b04..f5addd99d9 100644 --- a/lib/services/automationManagement/lib/operations/agentRegistrationInformation.js +++ b/lib/services/automationManagement/lib/operations/agentRegistrationInformation.js @@ -17,6 +17,8 @@ const WebResource = msRest.WebResource; /** * Retrieve the automation agent registration information. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -37,7 +39,7 @@ const WebResource = msRest.WebResource; * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _get(automationAccountName, options, callback) { +function _get(resourceGroupName, automationAccountName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -50,13 +52,13 @@ function _get(automationAccountName, options, callback) { let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -75,7 +77,7 @@ function _get(automationAccountName, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/agentRegistrationInformation'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; @@ -165,6 +167,8 @@ function _get(automationAccountName, options, callback) { /** * Regenerate a primary or secondary agent registration key * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} parameters The name of the agent registration key to be @@ -199,7 +203,7 @@ function _get(automationAccountName, options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _regenerateKey(automationAccountName, parameters, options, callback) { +function _regenerateKey(resourceGroupName, automationAccountName, parameters, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -212,13 +216,13 @@ function _regenerateKey(automationAccountName, parameters, options, callback) { let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -240,7 +244,7 @@ function _regenerateKey(automationAccountName, parameters, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/agentRegistrationInformation/regenerateKey'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; @@ -356,6 +360,8 @@ class AgentRegistrationInformation { /** * Retrieve the automation agent registration information. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -369,11 +375,11 @@ class AgentRegistrationInformation { * * @reject {Error} - The error object. */ - getWithHttpOperationResponse(automationAccountName, options) { + getWithHttpOperationResponse(resourceGroupName, automationAccountName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._get(automationAccountName, options, (err, result, request, response) => { + self._get(resourceGroupName, automationAccountName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -386,6 +392,8 @@ class AgentRegistrationInformation { /** * Retrieve the automation agent registration information. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -415,7 +423,7 @@ class AgentRegistrationInformation { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - get(automationAccountName, options, optionalCallback) { + get(resourceGroupName, automationAccountName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -424,20 +432,22 @@ class AgentRegistrationInformation { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._get(automationAccountName, options, (err, result, request, response) => { + self._get(resourceGroupName, automationAccountName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._get(automationAccountName, options, optionalCallback); + return self._get(resourceGroupName, automationAccountName, options, optionalCallback); } } /** * Regenerate a primary or secondary agent registration key * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} parameters The name of the agent registration key to be @@ -465,11 +475,11 @@ class AgentRegistrationInformation { * * @reject {Error} - The error object. */ - regenerateKeyWithHttpOperationResponse(automationAccountName, parameters, options) { + regenerateKeyWithHttpOperationResponse(resourceGroupName, automationAccountName, parameters, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._regenerateKey(automationAccountName, parameters, options, (err, result, request, response) => { + self._regenerateKey(resourceGroupName, automationAccountName, parameters, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -482,6 +492,8 @@ class AgentRegistrationInformation { /** * Regenerate a primary or secondary agent registration key * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} parameters The name of the agent registration key to be @@ -525,7 +537,7 @@ class AgentRegistrationInformation { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - regenerateKey(automationAccountName, parameters, options, optionalCallback) { + regenerateKey(resourceGroupName, automationAccountName, parameters, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -534,14 +546,14 @@ class AgentRegistrationInformation { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._regenerateKey(automationAccountName, parameters, options, (err, result, request, response) => { + self._regenerateKey(resourceGroupName, automationAccountName, parameters, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._regenerateKey(automationAccountName, parameters, options, optionalCallback); + return self._regenerateKey(resourceGroupName, automationAccountName, parameters, options, optionalCallback); } } diff --git a/lib/services/automationManagement/lib/operations/certificateOperations.js b/lib/services/automationManagement/lib/operations/certificateOperations.js index 85dd4c0f19..9663038a97 100644 --- a/lib/services/automationManagement/lib/operations/certificateOperations.js +++ b/lib/services/automationManagement/lib/operations/certificateOperations.js @@ -17,6 +17,8 @@ const WebResource = msRest.WebResource; /** * Delete the certificate. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} certificateName The name of certificate. @@ -38,7 +40,7 @@ const WebResource = msRest.WebResource; * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _deleteMethod(automationAccountName, certificateName, options, callback) { +function _deleteMethod(resourceGroupName, automationAccountName, certificateName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -51,13 +53,13 @@ function _deleteMethod(automationAccountName, certificateName, options, callback let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -79,7 +81,7 @@ function _deleteMethod(automationAccountName, certificateName, options, callback // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/certificates/{certificateName}'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{certificateName}', encodeURIComponent(certificateName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -153,6 +155,8 @@ function _deleteMethod(automationAccountName, certificateName, options, callback /** * Retrieve the certificate identified by certificate name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} certificateName The name of certificate. @@ -175,7 +179,7 @@ function _deleteMethod(automationAccountName, certificateName, options, callback * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _get(automationAccountName, certificateName, options, callback) { +function _get(resourceGroupName, automationAccountName, certificateName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -188,13 +192,13 @@ function _get(automationAccountName, certificateName, options, callback) { let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -216,7 +220,7 @@ function _get(automationAccountName, certificateName, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/certificates/{certificateName}'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{certificateName}', encodeURIComponent(certificateName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -307,6 +311,8 @@ function _get(automationAccountName, certificateName, options, callback) { /** * Create a certificate. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} certificateName The parameters supplied to the create or @@ -347,7 +353,7 @@ function _get(automationAccountName, certificateName, options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _createOrUpdate(automationAccountName, certificateName, parameters, options, callback) { +function _createOrUpdate(resourceGroupName, automationAccountName, certificateName, parameters, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -360,13 +366,13 @@ function _createOrUpdate(automationAccountName, certificateName, parameters, opt let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -391,7 +397,7 @@ function _createOrUpdate(automationAccountName, certificateName, parameters, opt // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/certificates/{certificateName}'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{certificateName}', encodeURIComponent(certificateName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -513,6 +519,8 @@ function _createOrUpdate(automationAccountName, certificateName, parameters, opt /** * Update a certificate. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} certificateName The parameters supplied to the update @@ -544,7 +552,7 @@ function _createOrUpdate(automationAccountName, certificateName, parameters, opt * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _update(automationAccountName, certificateName, parameters, options, callback) { +function _update(resourceGroupName, automationAccountName, certificateName, parameters, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -557,13 +565,13 @@ function _update(automationAccountName, certificateName, parameters, options, ca let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -588,7 +596,7 @@ function _update(automationAccountName, certificateName, parameters, options, ca // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/certificates/{certificateName}'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{certificateName}', encodeURIComponent(certificateName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -693,6 +701,8 @@ function _update(automationAccountName, certificateName, parameters, options, ca /** * Retrieve a list of certificates. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -713,7 +723,7 @@ function _update(automationAccountName, certificateName, parameters, options, ca * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _listByAutomationAccount(automationAccountName, options, callback) { +function _listByAutomationAccount(resourceGroupName, automationAccountName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -726,13 +736,13 @@ function _listByAutomationAccount(automationAccountName, options, callback) { let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -751,7 +761,7 @@ function _listByAutomationAccount(automationAccountName, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/certificates'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; @@ -985,6 +995,8 @@ class CertificateOperations { /** * Delete the certificate. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} certificateName The name of certificate. @@ -1000,11 +1012,11 @@ class CertificateOperations { * * @reject {Error} - The error object. */ - deleteMethodWithHttpOperationResponse(automationAccountName, certificateName, options) { + deleteMethodWithHttpOperationResponse(resourceGroupName, automationAccountName, certificateName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._deleteMethod(automationAccountName, certificateName, options, (err, result, request, response) => { + self._deleteMethod(resourceGroupName, automationAccountName, certificateName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1017,6 +1029,8 @@ class CertificateOperations { /** * Delete the certificate. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} certificateName The name of certificate. @@ -1047,7 +1061,7 @@ class CertificateOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(automationAccountName, certificateName, options, optionalCallback) { + deleteMethod(resourceGroupName, automationAccountName, certificateName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1056,20 +1070,22 @@ class CertificateOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._deleteMethod(automationAccountName, certificateName, options, (err, result, request, response) => { + self._deleteMethod(resourceGroupName, automationAccountName, certificateName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._deleteMethod(automationAccountName, certificateName, options, optionalCallback); + return self._deleteMethod(resourceGroupName, automationAccountName, certificateName, options, optionalCallback); } } /** * Retrieve the certificate identified by certificate name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} certificateName The name of certificate. @@ -1085,11 +1101,11 @@ class CertificateOperations { * * @reject {Error} - The error object. */ - getWithHttpOperationResponse(automationAccountName, certificateName, options) { + getWithHttpOperationResponse(resourceGroupName, automationAccountName, certificateName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._get(automationAccountName, certificateName, options, (err, result, request, response) => { + self._get(resourceGroupName, automationAccountName, certificateName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1102,6 +1118,8 @@ class CertificateOperations { /** * Retrieve the certificate identified by certificate name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} certificateName The name of certificate. @@ -1133,7 +1151,7 @@ class CertificateOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - get(automationAccountName, certificateName, options, optionalCallback) { + get(resourceGroupName, automationAccountName, certificateName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1142,20 +1160,22 @@ class CertificateOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._get(automationAccountName, certificateName, options, (err, result, request, response) => { + self._get(resourceGroupName, automationAccountName, certificateName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._get(automationAccountName, certificateName, options, optionalCallback); + return self._get(resourceGroupName, automationAccountName, certificateName, options, optionalCallback); } } /** * Create a certificate. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} certificateName The parameters supplied to the create or @@ -1189,11 +1209,11 @@ class CertificateOperations { * * @reject {Error} - The error object. */ - createOrUpdateWithHttpOperationResponse(automationAccountName, certificateName, parameters, options) { + createOrUpdateWithHttpOperationResponse(resourceGroupName, automationAccountName, certificateName, parameters, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._createOrUpdate(automationAccountName, certificateName, parameters, options, (err, result, request, response) => { + self._createOrUpdate(resourceGroupName, automationAccountName, certificateName, parameters, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1206,6 +1226,8 @@ class CertificateOperations { /** * Create a certificate. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} certificateName The parameters supplied to the create or @@ -1255,7 +1277,7 @@ class CertificateOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - createOrUpdate(automationAccountName, certificateName, parameters, options, optionalCallback) { + createOrUpdate(resourceGroupName, automationAccountName, certificateName, parameters, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1264,20 +1286,22 @@ class CertificateOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._createOrUpdate(automationAccountName, certificateName, parameters, options, (err, result, request, response) => { + self._createOrUpdate(resourceGroupName, automationAccountName, certificateName, parameters, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._createOrUpdate(automationAccountName, certificateName, parameters, options, optionalCallback); + return self._createOrUpdate(resourceGroupName, automationAccountName, certificateName, parameters, options, optionalCallback); } } /** * Update a certificate. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} certificateName The parameters supplied to the update @@ -1302,11 +1326,11 @@ class CertificateOperations { * * @reject {Error} - The error object. */ - updateWithHttpOperationResponse(automationAccountName, certificateName, parameters, options) { + updateWithHttpOperationResponse(resourceGroupName, automationAccountName, certificateName, parameters, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._update(automationAccountName, certificateName, parameters, options, (err, result, request, response) => { + self._update(resourceGroupName, automationAccountName, certificateName, parameters, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1319,6 +1343,8 @@ class CertificateOperations { /** * Update a certificate. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} certificateName The parameters supplied to the update @@ -1359,7 +1385,7 @@ class CertificateOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - update(automationAccountName, certificateName, parameters, options, optionalCallback) { + update(resourceGroupName, automationAccountName, certificateName, parameters, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1368,20 +1394,22 @@ class CertificateOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._update(automationAccountName, certificateName, parameters, options, (err, result, request, response) => { + self._update(resourceGroupName, automationAccountName, certificateName, parameters, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._update(automationAccountName, certificateName, parameters, options, optionalCallback); + return self._update(resourceGroupName, automationAccountName, certificateName, parameters, options, optionalCallback); } } /** * Retrieve a list of certificates. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -1395,11 +1423,11 @@ class CertificateOperations { * * @reject {Error} - The error object. */ - listByAutomationAccountWithHttpOperationResponse(automationAccountName, options) { + listByAutomationAccountWithHttpOperationResponse(resourceGroupName, automationAccountName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._listByAutomationAccount(automationAccountName, options, (err, result, request, response) => { + self._listByAutomationAccount(resourceGroupName, automationAccountName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1412,6 +1440,8 @@ class CertificateOperations { /** * Retrieve a list of certificates. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -1441,7 +1471,7 @@ class CertificateOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - listByAutomationAccount(automationAccountName, options, optionalCallback) { + listByAutomationAccount(resourceGroupName, automationAccountName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1450,14 +1480,14 @@ class CertificateOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._listByAutomationAccount(automationAccountName, options, (err, result, request, response) => { + self._listByAutomationAccount(resourceGroupName, automationAccountName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._listByAutomationAccount(automationAccountName, options, optionalCallback); + return self._listByAutomationAccount(resourceGroupName, automationAccountName, options, optionalCallback); } } diff --git a/lib/services/automationManagement/lib/operations/connectionOperations.js b/lib/services/automationManagement/lib/operations/connectionOperations.js index 01927ca169..42da11809a 100644 --- a/lib/services/automationManagement/lib/operations/connectionOperations.js +++ b/lib/services/automationManagement/lib/operations/connectionOperations.js @@ -17,6 +17,8 @@ const WebResource = msRest.WebResource; /** * Delete the connection. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} connectionName The name of connection. @@ -39,7 +41,7 @@ const WebResource = msRest.WebResource; * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _deleteMethod(automationAccountName, connectionName, options, callback) { +function _deleteMethod(resourceGroupName, automationAccountName, connectionName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -52,13 +54,13 @@ function _deleteMethod(automationAccountName, connectionName, options, callback) let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -80,7 +82,7 @@ function _deleteMethod(automationAccountName, connectionName, options, callback) // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/connections/{connectionName}'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{connectionName}', encodeURIComponent(connectionName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -171,6 +173,8 @@ function _deleteMethod(automationAccountName, connectionName, options, callback) /** * Retrieve the connection identified by connection name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} connectionName The name of connection. @@ -193,7 +197,7 @@ function _deleteMethod(automationAccountName, connectionName, options, callback) * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _get(automationAccountName, connectionName, options, callback) { +function _get(resourceGroupName, automationAccountName, connectionName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -206,13 +210,13 @@ function _get(automationAccountName, connectionName, options, callback) { let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -234,7 +238,7 @@ function _get(automationAccountName, connectionName, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/connections/{connectionName}'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{connectionName}', encodeURIComponent(connectionName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -325,6 +329,8 @@ function _get(automationAccountName, connectionName, options, callback) { /** * Create or update a connection. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} connectionName The parameters supplied to the create or @@ -365,7 +371,7 @@ function _get(automationAccountName, connectionName, options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _createOrUpdate(automationAccountName, connectionName, parameters, options, callback) { +function _createOrUpdate(resourceGroupName, automationAccountName, connectionName, parameters, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -378,13 +384,13 @@ function _createOrUpdate(automationAccountName, connectionName, parameters, opti let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -409,7 +415,7 @@ function _createOrUpdate(automationAccountName, connectionName, parameters, opti // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/connections/{connectionName}'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{connectionName}', encodeURIComponent(connectionName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -531,6 +537,8 @@ function _createOrUpdate(automationAccountName, connectionName, parameters, opti /** * Update a connection. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} connectionName The parameters supplied to the update a @@ -565,7 +573,7 @@ function _createOrUpdate(automationAccountName, connectionName, parameters, opti * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _update(automationAccountName, connectionName, parameters, options, callback) { +function _update(resourceGroupName, automationAccountName, connectionName, parameters, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -578,13 +586,13 @@ function _update(automationAccountName, connectionName, parameters, options, cal let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -609,7 +617,7 @@ function _update(automationAccountName, connectionName, parameters, options, cal // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/connections/{connectionName}'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{connectionName}', encodeURIComponent(connectionName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -714,6 +722,8 @@ function _update(automationAccountName, connectionName, parameters, options, cal /** * Retrieve a list of connections. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -734,7 +744,7 @@ function _update(automationAccountName, connectionName, parameters, options, cal * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _listByAutomationAccount(automationAccountName, options, callback) { +function _listByAutomationAccount(resourceGroupName, automationAccountName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -747,13 +757,13 @@ function _listByAutomationAccount(automationAccountName, options, callback) { let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -772,7 +782,7 @@ function _listByAutomationAccount(automationAccountName, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/connections'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; @@ -1006,6 +1016,8 @@ class ConnectionOperations { /** * Delete the connection. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} connectionName The name of connection. @@ -1021,11 +1033,11 @@ class ConnectionOperations { * * @reject {Error} - The error object. */ - deleteMethodWithHttpOperationResponse(automationAccountName, connectionName, options) { + deleteMethodWithHttpOperationResponse(resourceGroupName, automationAccountName, connectionName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._deleteMethod(automationAccountName, connectionName, options, (err, result, request, response) => { + self._deleteMethod(resourceGroupName, automationAccountName, connectionName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1038,6 +1050,8 @@ class ConnectionOperations { /** * Delete the connection. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} connectionName The name of connection. @@ -1069,7 +1083,7 @@ class ConnectionOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(automationAccountName, connectionName, options, optionalCallback) { + deleteMethod(resourceGroupName, automationAccountName, connectionName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1078,20 +1092,22 @@ class ConnectionOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._deleteMethod(automationAccountName, connectionName, options, (err, result, request, response) => { + self._deleteMethod(resourceGroupName, automationAccountName, connectionName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._deleteMethod(automationAccountName, connectionName, options, optionalCallback); + return self._deleteMethod(resourceGroupName, automationAccountName, connectionName, options, optionalCallback); } } /** * Retrieve the connection identified by connection name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} connectionName The name of connection. @@ -1107,11 +1123,11 @@ class ConnectionOperations { * * @reject {Error} - The error object. */ - getWithHttpOperationResponse(automationAccountName, connectionName, options) { + getWithHttpOperationResponse(resourceGroupName, automationAccountName, connectionName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._get(automationAccountName, connectionName, options, (err, result, request, response) => { + self._get(resourceGroupName, automationAccountName, connectionName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1124,6 +1140,8 @@ class ConnectionOperations { /** * Retrieve the connection identified by connection name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} connectionName The name of connection. @@ -1155,7 +1173,7 @@ class ConnectionOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - get(automationAccountName, connectionName, options, optionalCallback) { + get(resourceGroupName, automationAccountName, connectionName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1164,20 +1182,22 @@ class ConnectionOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._get(automationAccountName, connectionName, options, (err, result, request, response) => { + self._get(resourceGroupName, automationAccountName, connectionName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._get(automationAccountName, connectionName, options, optionalCallback); + return self._get(resourceGroupName, automationAccountName, connectionName, options, optionalCallback); } } /** * Create or update a connection. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} connectionName The parameters supplied to the create or @@ -1211,11 +1231,11 @@ class ConnectionOperations { * * @reject {Error} - The error object. */ - createOrUpdateWithHttpOperationResponse(automationAccountName, connectionName, parameters, options) { + createOrUpdateWithHttpOperationResponse(resourceGroupName, automationAccountName, connectionName, parameters, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._createOrUpdate(automationAccountName, connectionName, parameters, options, (err, result, request, response) => { + self._createOrUpdate(resourceGroupName, automationAccountName, connectionName, parameters, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1228,6 +1248,8 @@ class ConnectionOperations { /** * Create or update a connection. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} connectionName The parameters supplied to the create or @@ -1277,7 +1299,7 @@ class ConnectionOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - createOrUpdate(automationAccountName, connectionName, parameters, options, optionalCallback) { + createOrUpdate(resourceGroupName, automationAccountName, connectionName, parameters, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1286,20 +1308,22 @@ class ConnectionOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._createOrUpdate(automationAccountName, connectionName, parameters, options, (err, result, request, response) => { + self._createOrUpdate(resourceGroupName, automationAccountName, connectionName, parameters, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._createOrUpdate(automationAccountName, connectionName, parameters, options, optionalCallback); + return self._createOrUpdate(resourceGroupName, automationAccountName, connectionName, parameters, options, optionalCallback); } } /** * Update a connection. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} connectionName The parameters supplied to the update a @@ -1327,11 +1351,11 @@ class ConnectionOperations { * * @reject {Error} - The error object. */ - updateWithHttpOperationResponse(automationAccountName, connectionName, parameters, options) { + updateWithHttpOperationResponse(resourceGroupName, automationAccountName, connectionName, parameters, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._update(automationAccountName, connectionName, parameters, options, (err, result, request, response) => { + self._update(resourceGroupName, automationAccountName, connectionName, parameters, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1344,6 +1368,8 @@ class ConnectionOperations { /** * Update a connection. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} connectionName The parameters supplied to the update a @@ -1387,7 +1413,7 @@ class ConnectionOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - update(automationAccountName, connectionName, parameters, options, optionalCallback) { + update(resourceGroupName, automationAccountName, connectionName, parameters, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1396,20 +1422,22 @@ class ConnectionOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._update(automationAccountName, connectionName, parameters, options, (err, result, request, response) => { + self._update(resourceGroupName, automationAccountName, connectionName, parameters, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._update(automationAccountName, connectionName, parameters, options, optionalCallback); + return self._update(resourceGroupName, automationAccountName, connectionName, parameters, options, optionalCallback); } } /** * Retrieve a list of connections. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -1423,11 +1451,11 @@ class ConnectionOperations { * * @reject {Error} - The error object. */ - listByAutomationAccountWithHttpOperationResponse(automationAccountName, options) { + listByAutomationAccountWithHttpOperationResponse(resourceGroupName, automationAccountName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._listByAutomationAccount(automationAccountName, options, (err, result, request, response) => { + self._listByAutomationAccount(resourceGroupName, automationAccountName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1440,6 +1468,8 @@ class ConnectionOperations { /** * Retrieve a list of connections. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -1469,7 +1499,7 @@ class ConnectionOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - listByAutomationAccount(automationAccountName, options, optionalCallback) { + listByAutomationAccount(resourceGroupName, automationAccountName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1478,14 +1508,14 @@ class ConnectionOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._listByAutomationAccount(automationAccountName, options, (err, result, request, response) => { + self._listByAutomationAccount(resourceGroupName, automationAccountName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._listByAutomationAccount(automationAccountName, options, optionalCallback); + return self._listByAutomationAccount(resourceGroupName, automationAccountName, options, optionalCallback); } } diff --git a/lib/services/automationManagement/lib/operations/connectionTypeOperations.js b/lib/services/automationManagement/lib/operations/connectionTypeOperations.js index fc53b8f316..5f99b02be3 100644 --- a/lib/services/automationManagement/lib/operations/connectionTypeOperations.js +++ b/lib/services/automationManagement/lib/operations/connectionTypeOperations.js @@ -17,6 +17,8 @@ const WebResource = msRest.WebResource; /** * Delete the connectiontype. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} connectionTypeName The name of connectiontype. @@ -38,7 +40,7 @@ const WebResource = msRest.WebResource; * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _deleteMethod(automationAccountName, connectionTypeName, options, callback) { +function _deleteMethod(resourceGroupName, automationAccountName, connectionTypeName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -51,13 +53,13 @@ function _deleteMethod(automationAccountName, connectionTypeName, options, callb let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -79,7 +81,7 @@ function _deleteMethod(automationAccountName, connectionTypeName, options, callb // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/connectionTypes/{connectionTypeName}'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{connectionTypeName}', encodeURIComponent(connectionTypeName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -153,6 +155,8 @@ function _deleteMethod(automationAccountName, connectionTypeName, options, callb /** * Retrieve the connectiontype identified by connectiontype name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} connectionTypeName The name of connectiontype. @@ -175,7 +179,7 @@ function _deleteMethod(automationAccountName, connectionTypeName, options, callb * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _get(automationAccountName, connectionTypeName, options, callback) { +function _get(resourceGroupName, automationAccountName, connectionTypeName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -188,13 +192,13 @@ function _get(automationAccountName, connectionTypeName, options, callback) { let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -216,7 +220,7 @@ function _get(automationAccountName, connectionTypeName, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/connectionTypes/{connectionTypeName}'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{connectionTypeName}', encodeURIComponent(connectionTypeName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -307,6 +311,8 @@ function _get(automationAccountName, connectionTypeName, options, callback) { /** * Create a connectiontype. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} connectionTypeName The parameters supplied to the create or @@ -342,7 +348,7 @@ function _get(automationAccountName, connectionTypeName, options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _createOrUpdate(automationAccountName, connectionTypeName, parameters, options, callback) { +function _createOrUpdate(resourceGroupName, automationAccountName, connectionTypeName, parameters, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -355,13 +361,13 @@ function _createOrUpdate(automationAccountName, connectionTypeName, parameters, let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -386,7 +392,7 @@ function _createOrUpdate(automationAccountName, connectionTypeName, parameters, // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/connectionTypes/{connectionTypeName}'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{connectionTypeName}', encodeURIComponent(connectionTypeName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -508,6 +514,8 @@ function _createOrUpdate(automationAccountName, connectionTypeName, parameters, /** * Retrieve a list of connectiontypes. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -529,7 +537,7 @@ function _createOrUpdate(automationAccountName, connectionTypeName, parameters, * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _listByAutomationAccount(automationAccountName, options, callback) { +function _listByAutomationAccount(resourceGroupName, automationAccountName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -542,13 +550,13 @@ function _listByAutomationAccount(automationAccountName, options, callback) { let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -567,7 +575,7 @@ function _listByAutomationAccount(automationAccountName, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/connectionTypes'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; @@ -801,6 +809,8 @@ class ConnectionTypeOperations { /** * Delete the connectiontype. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} connectionTypeName The name of connectiontype. @@ -816,11 +826,11 @@ class ConnectionTypeOperations { * * @reject {Error} - The error object. */ - deleteMethodWithHttpOperationResponse(automationAccountName, connectionTypeName, options) { + deleteMethodWithHttpOperationResponse(resourceGroupName, automationAccountName, connectionTypeName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._deleteMethod(automationAccountName, connectionTypeName, options, (err, result, request, response) => { + self._deleteMethod(resourceGroupName, automationAccountName, connectionTypeName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -833,6 +843,8 @@ class ConnectionTypeOperations { /** * Delete the connectiontype. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} connectionTypeName The name of connectiontype. @@ -863,7 +875,7 @@ class ConnectionTypeOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(automationAccountName, connectionTypeName, options, optionalCallback) { + deleteMethod(resourceGroupName, automationAccountName, connectionTypeName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -872,20 +884,22 @@ class ConnectionTypeOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._deleteMethod(automationAccountName, connectionTypeName, options, (err, result, request, response) => { + self._deleteMethod(resourceGroupName, automationAccountName, connectionTypeName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._deleteMethod(automationAccountName, connectionTypeName, options, optionalCallback); + return self._deleteMethod(resourceGroupName, automationAccountName, connectionTypeName, options, optionalCallback); } } /** * Retrieve the connectiontype identified by connectiontype name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} connectionTypeName The name of connectiontype. @@ -901,11 +915,11 @@ class ConnectionTypeOperations { * * @reject {Error} - The error object. */ - getWithHttpOperationResponse(automationAccountName, connectionTypeName, options) { + getWithHttpOperationResponse(resourceGroupName, automationAccountName, connectionTypeName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._get(automationAccountName, connectionTypeName, options, (err, result, request, response) => { + self._get(resourceGroupName, automationAccountName, connectionTypeName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -918,6 +932,8 @@ class ConnectionTypeOperations { /** * Retrieve the connectiontype identified by connectiontype name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} connectionTypeName The name of connectiontype. @@ -949,7 +965,7 @@ class ConnectionTypeOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - get(automationAccountName, connectionTypeName, options, optionalCallback) { + get(resourceGroupName, automationAccountName, connectionTypeName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -958,20 +974,22 @@ class ConnectionTypeOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._get(automationAccountName, connectionTypeName, options, (err, result, request, response) => { + self._get(resourceGroupName, automationAccountName, connectionTypeName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._get(automationAccountName, connectionTypeName, options, optionalCallback); + return self._get(resourceGroupName, automationAccountName, connectionTypeName, options, optionalCallback); } } /** * Create a connectiontype. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} connectionTypeName The parameters supplied to the create or @@ -1000,11 +1018,11 @@ class ConnectionTypeOperations { * * @reject {Error} - The error object. */ - createOrUpdateWithHttpOperationResponse(automationAccountName, connectionTypeName, parameters, options) { + createOrUpdateWithHttpOperationResponse(resourceGroupName, automationAccountName, connectionTypeName, parameters, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._createOrUpdate(automationAccountName, connectionTypeName, parameters, options, (err, result, request, response) => { + self._createOrUpdate(resourceGroupName, automationAccountName, connectionTypeName, parameters, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1017,6 +1035,8 @@ class ConnectionTypeOperations { /** * Create a connectiontype. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} connectionTypeName The parameters supplied to the create or @@ -1061,7 +1081,7 @@ class ConnectionTypeOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - createOrUpdate(automationAccountName, connectionTypeName, parameters, options, optionalCallback) { + createOrUpdate(resourceGroupName, automationAccountName, connectionTypeName, parameters, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1070,20 +1090,22 @@ class ConnectionTypeOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._createOrUpdate(automationAccountName, connectionTypeName, parameters, options, (err, result, request, response) => { + self._createOrUpdate(resourceGroupName, automationAccountName, connectionTypeName, parameters, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._createOrUpdate(automationAccountName, connectionTypeName, parameters, options, optionalCallback); + return self._createOrUpdate(resourceGroupName, automationAccountName, connectionTypeName, parameters, options, optionalCallback); } } /** * Retrieve a list of connectiontypes. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -1097,11 +1119,11 @@ class ConnectionTypeOperations { * * @reject {Error} - The error object. */ - listByAutomationAccountWithHttpOperationResponse(automationAccountName, options) { + listByAutomationAccountWithHttpOperationResponse(resourceGroupName, automationAccountName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._listByAutomationAccount(automationAccountName, options, (err, result, request, response) => { + self._listByAutomationAccount(resourceGroupName, automationAccountName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1114,6 +1136,8 @@ class ConnectionTypeOperations { /** * Retrieve a list of connectiontypes. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -1144,7 +1168,7 @@ class ConnectionTypeOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - listByAutomationAccount(automationAccountName, options, optionalCallback) { + listByAutomationAccount(resourceGroupName, automationAccountName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1153,14 +1177,14 @@ class ConnectionTypeOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._listByAutomationAccount(automationAccountName, options, (err, result, request, response) => { + self._listByAutomationAccount(resourceGroupName, automationAccountName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._listByAutomationAccount(automationAccountName, options, optionalCallback); + return self._listByAutomationAccount(resourceGroupName, automationAccountName, options, optionalCallback); } } diff --git a/lib/services/automationManagement/lib/operations/credentialOperations.js b/lib/services/automationManagement/lib/operations/credentialOperations.js index 2f7b0283a0..68c96bf0b3 100644 --- a/lib/services/automationManagement/lib/operations/credentialOperations.js +++ b/lib/services/automationManagement/lib/operations/credentialOperations.js @@ -17,6 +17,8 @@ const WebResource = msRest.WebResource; /** * Delete the credential. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} credentialName The name of credential. @@ -38,7 +40,7 @@ const WebResource = msRest.WebResource; * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _deleteMethod(automationAccountName, credentialName, options, callback) { +function _deleteMethod(resourceGroupName, automationAccountName, credentialName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -51,13 +53,13 @@ function _deleteMethod(automationAccountName, credentialName, options, callback) let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -79,7 +81,7 @@ function _deleteMethod(automationAccountName, credentialName, options, callback) // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/credentials/{credentialName}'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{credentialName}', encodeURIComponent(credentialName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -153,6 +155,8 @@ function _deleteMethod(automationAccountName, credentialName, options, callback) /** * Retrieve the credential identified by credential name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} credentialName The name of credential. @@ -175,7 +179,7 @@ function _deleteMethod(automationAccountName, credentialName, options, callback) * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _get(automationAccountName, credentialName, options, callback) { +function _get(resourceGroupName, automationAccountName, credentialName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -188,13 +192,13 @@ function _get(automationAccountName, credentialName, options, callback) { let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -216,7 +220,7 @@ function _get(automationAccountName, credentialName, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/credentials/{credentialName}'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{credentialName}', encodeURIComponent(credentialName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -307,6 +311,8 @@ function _get(automationAccountName, credentialName, options, callback) { /** * Create a credential. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} credentialName The parameters supplied to the create or @@ -344,7 +350,7 @@ function _get(automationAccountName, credentialName, options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _createOrUpdate(automationAccountName, credentialName, parameters, options, callback) { +function _createOrUpdate(resourceGroupName, automationAccountName, credentialName, parameters, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -357,13 +363,13 @@ function _createOrUpdate(automationAccountName, credentialName, parameters, opti let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -388,7 +394,7 @@ function _createOrUpdate(automationAccountName, credentialName, parameters, opti // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/credentials/{credentialName}'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{credentialName}', encodeURIComponent(credentialName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -510,6 +516,8 @@ function _createOrUpdate(automationAccountName, credentialName, parameters, opti /** * Update a credential. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} credentialName The parameters supplied to the Update @@ -547,7 +555,7 @@ function _createOrUpdate(automationAccountName, credentialName, parameters, opti * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _update(automationAccountName, credentialName, parameters, options, callback) { +function _update(resourceGroupName, automationAccountName, credentialName, parameters, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -560,13 +568,13 @@ function _update(automationAccountName, credentialName, parameters, options, cal let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -591,7 +599,7 @@ function _update(automationAccountName, credentialName, parameters, options, cal // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/credentials/{credentialName}'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{credentialName}', encodeURIComponent(credentialName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -696,6 +704,8 @@ function _update(automationAccountName, credentialName, parameters, options, cal /** * Retrieve a list of credentials. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -716,7 +726,7 @@ function _update(automationAccountName, credentialName, parameters, options, cal * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _listByAutomationAccount(automationAccountName, options, callback) { +function _listByAutomationAccount(resourceGroupName, automationAccountName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -729,13 +739,13 @@ function _listByAutomationAccount(automationAccountName, options, callback) { let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -754,7 +764,7 @@ function _listByAutomationAccount(automationAccountName, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/credentials'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; @@ -986,6 +996,8 @@ class CredentialOperations { /** * Delete the credential. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} credentialName The name of credential. @@ -1001,11 +1013,11 @@ class CredentialOperations { * * @reject {Error} - The error object. */ - deleteMethodWithHttpOperationResponse(automationAccountName, credentialName, options) { + deleteMethodWithHttpOperationResponse(resourceGroupName, automationAccountName, credentialName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._deleteMethod(automationAccountName, credentialName, options, (err, result, request, response) => { + self._deleteMethod(resourceGroupName, automationAccountName, credentialName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1018,6 +1030,8 @@ class CredentialOperations { /** * Delete the credential. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} credentialName The name of credential. @@ -1048,7 +1062,7 @@ class CredentialOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(automationAccountName, credentialName, options, optionalCallback) { + deleteMethod(resourceGroupName, automationAccountName, credentialName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1057,20 +1071,22 @@ class CredentialOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._deleteMethod(automationAccountName, credentialName, options, (err, result, request, response) => { + self._deleteMethod(resourceGroupName, automationAccountName, credentialName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._deleteMethod(automationAccountName, credentialName, options, optionalCallback); + return self._deleteMethod(resourceGroupName, automationAccountName, credentialName, options, optionalCallback); } } /** * Retrieve the credential identified by credential name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} credentialName The name of credential. @@ -1086,11 +1102,11 @@ class CredentialOperations { * * @reject {Error} - The error object. */ - getWithHttpOperationResponse(automationAccountName, credentialName, options) { + getWithHttpOperationResponse(resourceGroupName, automationAccountName, credentialName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._get(automationAccountName, credentialName, options, (err, result, request, response) => { + self._get(resourceGroupName, automationAccountName, credentialName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1103,6 +1119,8 @@ class CredentialOperations { /** * Retrieve the credential identified by credential name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} credentialName The name of credential. @@ -1134,7 +1152,7 @@ class CredentialOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - get(automationAccountName, credentialName, options, optionalCallback) { + get(resourceGroupName, automationAccountName, credentialName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1143,20 +1161,22 @@ class CredentialOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._get(automationAccountName, credentialName, options, (err, result, request, response) => { + self._get(resourceGroupName, automationAccountName, credentialName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._get(automationAccountName, credentialName, options, optionalCallback); + return self._get(resourceGroupName, automationAccountName, credentialName, options, optionalCallback); } } /** * Create a credential. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} credentialName The parameters supplied to the create or @@ -1187,11 +1207,11 @@ class CredentialOperations { * * @reject {Error} - The error object. */ - createOrUpdateWithHttpOperationResponse(automationAccountName, credentialName, parameters, options) { + createOrUpdateWithHttpOperationResponse(resourceGroupName, automationAccountName, credentialName, parameters, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._createOrUpdate(automationAccountName, credentialName, parameters, options, (err, result, request, response) => { + self._createOrUpdate(resourceGroupName, automationAccountName, credentialName, parameters, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1204,6 +1224,8 @@ class CredentialOperations { /** * Create a credential. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} credentialName The parameters supplied to the create or @@ -1250,7 +1272,7 @@ class CredentialOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - createOrUpdate(automationAccountName, credentialName, parameters, options, optionalCallback) { + createOrUpdate(resourceGroupName, automationAccountName, credentialName, parameters, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1259,20 +1281,22 @@ class CredentialOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._createOrUpdate(automationAccountName, credentialName, parameters, options, (err, result, request, response) => { + self._createOrUpdate(resourceGroupName, automationAccountName, credentialName, parameters, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._createOrUpdate(automationAccountName, credentialName, parameters, options, optionalCallback); + return self._createOrUpdate(resourceGroupName, automationAccountName, credentialName, parameters, options, optionalCallback); } } /** * Update a credential. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} credentialName The parameters supplied to the Update @@ -1303,11 +1327,11 @@ class CredentialOperations { * * @reject {Error} - The error object. */ - updateWithHttpOperationResponse(automationAccountName, credentialName, parameters, options) { + updateWithHttpOperationResponse(resourceGroupName, automationAccountName, credentialName, parameters, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._update(automationAccountName, credentialName, parameters, options, (err, result, request, response) => { + self._update(resourceGroupName, automationAccountName, credentialName, parameters, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1320,6 +1344,8 @@ class CredentialOperations { /** * Update a credential. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} credentialName The parameters supplied to the Update @@ -1366,7 +1392,7 @@ class CredentialOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - update(automationAccountName, credentialName, parameters, options, optionalCallback) { + update(resourceGroupName, automationAccountName, credentialName, parameters, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1375,20 +1401,22 @@ class CredentialOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._update(automationAccountName, credentialName, parameters, options, (err, result, request, response) => { + self._update(resourceGroupName, automationAccountName, credentialName, parameters, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._update(automationAccountName, credentialName, parameters, options, optionalCallback); + return self._update(resourceGroupName, automationAccountName, credentialName, parameters, options, optionalCallback); } } /** * Retrieve a list of credentials. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -1402,11 +1430,11 @@ class CredentialOperations { * * @reject {Error} - The error object. */ - listByAutomationAccountWithHttpOperationResponse(automationAccountName, options) { + listByAutomationAccountWithHttpOperationResponse(resourceGroupName, automationAccountName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._listByAutomationAccount(automationAccountName, options, (err, result, request, response) => { + self._listByAutomationAccount(resourceGroupName, automationAccountName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1419,6 +1447,8 @@ class CredentialOperations { /** * Retrieve a list of credentials. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -1448,7 +1478,7 @@ class CredentialOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - listByAutomationAccount(automationAccountName, options, optionalCallback) { + listByAutomationAccount(resourceGroupName, automationAccountName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1457,14 +1487,14 @@ class CredentialOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._listByAutomationAccount(automationAccountName, options, (err, result, request, response) => { + self._listByAutomationAccount(resourceGroupName, automationAccountName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._listByAutomationAccount(automationAccountName, options, optionalCallback); + return self._listByAutomationAccount(resourceGroupName, automationAccountName, options, optionalCallback); } } diff --git a/lib/services/automationManagement/lib/operations/dscCompilationJobOperations.js b/lib/services/automationManagement/lib/operations/dscCompilationJobOperations.js index 413df5947c..641962720d 100644 --- a/lib/services/automationManagement/lib/operations/dscCompilationJobOperations.js +++ b/lib/services/automationManagement/lib/operations/dscCompilationJobOperations.js @@ -17,6 +17,8 @@ const WebResource = msRest.WebResource; /** * Creates the Dsc compilation job of the configuration. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {uuid} compilationJobId The the DSC configuration Id. @@ -61,7 +63,7 @@ const WebResource = msRest.WebResource; * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _create(automationAccountName, compilationJobId, parameters, options, callback) { +function _create(resourceGroupName, automationAccountName, compilationJobId, parameters, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -74,13 +76,13 @@ function _create(automationAccountName, compilationJobId, parameters, options, c let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -105,7 +107,7 @@ function _create(automationAccountName, compilationJobId, parameters, options, c // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/compilationjobs/{compilationJobId}'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{compilationJobId}', encodeURIComponent(compilationJobId.toString())); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -210,6 +212,8 @@ function _create(automationAccountName, compilationJobId, parameters, options, c /** * Retrieve the Dsc configuration compilation job identified by job id. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {uuid} compilationJobId The Dsc configuration compilation job id. @@ -232,7 +236,7 @@ function _create(automationAccountName, compilationJobId, parameters, options, c * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _get(automationAccountName, compilationJobId, options, callback) { +function _get(resourceGroupName, automationAccountName, compilationJobId, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -245,13 +249,13 @@ function _get(automationAccountName, compilationJobId, options, callback) { let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -273,7 +277,7 @@ function _get(automationAccountName, compilationJobId, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/compilationjobs/{compilationJobId}'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{compilationJobId}', encodeURIComponent(compilationJobId.toString())); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -364,6 +368,8 @@ function _get(automationAccountName, compilationJobId, options, callback) { /** * Retrieve a list of dsc compilation jobs. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -387,7 +393,7 @@ function _get(automationAccountName, compilationJobId, options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _listByAutomationAccount(automationAccountName, options, callback) { +function _listByAutomationAccount(resourceGroupName, automationAccountName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -401,13 +407,13 @@ function _listByAutomationAccount(automationAccountName, options, callback) { let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -429,7 +435,7 @@ function _listByAutomationAccount(automationAccountName, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/compilationjobs'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; @@ -522,6 +528,8 @@ function _listByAutomationAccount(automationAccountName, options, callback) { /** * Retrieve the job stream identified by job stream id. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {uuid} jobId The job id. @@ -546,7 +554,7 @@ function _listByAutomationAccount(automationAccountName, options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _getStream(automationAccountName, jobId, jobStreamId, options, callback) { +function _getStream(resourceGroupName, automationAccountName, jobId, jobStreamId, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -559,13 +567,13 @@ function _getStream(automationAccountName, jobId, jobStreamId, options, callback let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -590,7 +598,7 @@ function _getStream(automationAccountName, jobId, jobStreamId, options, callback // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/compilationjobs/{jobId}/streams/{jobStreamId}'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{jobId}', encodeURIComponent(jobId.toString())); requestUrl = requestUrl.replace('{jobStreamId}', encodeURIComponent(jobStreamId)); @@ -826,6 +834,8 @@ class DscCompilationJobOperations { /** * Creates the Dsc compilation job of the configuration. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {uuid} compilationJobId The the DSC configuration Id. @@ -863,11 +873,11 @@ class DscCompilationJobOperations { * * @reject {Error} - The error object. */ - createWithHttpOperationResponse(automationAccountName, compilationJobId, parameters, options) { + createWithHttpOperationResponse(resourceGroupName, automationAccountName, compilationJobId, parameters, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._create(automationAccountName, compilationJobId, parameters, options, (err, result, request, response) => { + self._create(resourceGroupName, automationAccountName, compilationJobId, parameters, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -880,6 +890,8 @@ class DscCompilationJobOperations { /** * Creates the Dsc compilation job of the configuration. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {uuid} compilationJobId The the DSC configuration Id. @@ -933,7 +945,7 @@ class DscCompilationJobOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - create(automationAccountName, compilationJobId, parameters, options, optionalCallback) { + create(resourceGroupName, automationAccountName, compilationJobId, parameters, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -942,20 +954,22 @@ class DscCompilationJobOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._create(automationAccountName, compilationJobId, parameters, options, (err, result, request, response) => { + self._create(resourceGroupName, automationAccountName, compilationJobId, parameters, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._create(automationAccountName, compilationJobId, parameters, options, optionalCallback); + return self._create(resourceGroupName, automationAccountName, compilationJobId, parameters, options, optionalCallback); } } /** * Retrieve the Dsc configuration compilation job identified by job id. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {uuid} compilationJobId The Dsc configuration compilation job id. @@ -971,11 +985,11 @@ class DscCompilationJobOperations { * * @reject {Error} - The error object. */ - getWithHttpOperationResponse(automationAccountName, compilationJobId, options) { + getWithHttpOperationResponse(resourceGroupName, automationAccountName, compilationJobId, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._get(automationAccountName, compilationJobId, options, (err, result, request, response) => { + self._get(resourceGroupName, automationAccountName, compilationJobId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -988,6 +1002,8 @@ class DscCompilationJobOperations { /** * Retrieve the Dsc configuration compilation job identified by job id. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {uuid} compilationJobId The Dsc configuration compilation job id. @@ -1019,7 +1035,7 @@ class DscCompilationJobOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - get(automationAccountName, compilationJobId, options, optionalCallback) { + get(resourceGroupName, automationAccountName, compilationJobId, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1028,20 +1044,22 @@ class DscCompilationJobOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._get(automationAccountName, compilationJobId, options, (err, result, request, response) => { + self._get(resourceGroupName, automationAccountName, compilationJobId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._get(automationAccountName, compilationJobId, options, optionalCallback); + return self._get(resourceGroupName, automationAccountName, compilationJobId, options, optionalCallback); } } /** * Retrieve a list of dsc compilation jobs. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -1057,11 +1075,11 @@ class DscCompilationJobOperations { * * @reject {Error} - The error object. */ - listByAutomationAccountWithHttpOperationResponse(automationAccountName, options) { + listByAutomationAccountWithHttpOperationResponse(resourceGroupName, automationAccountName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._listByAutomationAccount(automationAccountName, options, (err, result, request, response) => { + self._listByAutomationAccount(resourceGroupName, automationAccountName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1074,6 +1092,8 @@ class DscCompilationJobOperations { /** * Retrieve a list of dsc compilation jobs. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -1106,7 +1126,7 @@ class DscCompilationJobOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - listByAutomationAccount(automationAccountName, options, optionalCallback) { + listByAutomationAccount(resourceGroupName, automationAccountName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1115,20 +1135,22 @@ class DscCompilationJobOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._listByAutomationAccount(automationAccountName, options, (err, result, request, response) => { + self._listByAutomationAccount(resourceGroupName, automationAccountName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._listByAutomationAccount(automationAccountName, options, optionalCallback); + return self._listByAutomationAccount(resourceGroupName, automationAccountName, options, optionalCallback); } } /** * Retrieve the job stream identified by job stream id. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {uuid} jobId The job id. @@ -1146,11 +1168,11 @@ class DscCompilationJobOperations { * * @reject {Error} - The error object. */ - getStreamWithHttpOperationResponse(automationAccountName, jobId, jobStreamId, options) { + getStreamWithHttpOperationResponse(resourceGroupName, automationAccountName, jobId, jobStreamId, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._getStream(automationAccountName, jobId, jobStreamId, options, (err, result, request, response) => { + self._getStream(resourceGroupName, automationAccountName, jobId, jobStreamId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1163,6 +1185,8 @@ class DscCompilationJobOperations { /** * Retrieve the job stream identified by job stream id. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {uuid} jobId The job id. @@ -1196,7 +1220,7 @@ class DscCompilationJobOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getStream(automationAccountName, jobId, jobStreamId, options, optionalCallback) { + getStream(resourceGroupName, automationAccountName, jobId, jobStreamId, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1205,14 +1229,14 @@ class DscCompilationJobOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getStream(automationAccountName, jobId, jobStreamId, options, (err, result, request, response) => { + self._getStream(resourceGroupName, automationAccountName, jobId, jobStreamId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getStream(automationAccountName, jobId, jobStreamId, options, optionalCallback); + return self._getStream(resourceGroupName, automationAccountName, jobId, jobStreamId, options, optionalCallback); } } diff --git a/lib/services/automationManagement/lib/operations/dscCompilationJobStream.js b/lib/services/automationManagement/lib/operations/dscCompilationJobStream.js index 4afe189714..31a252d987 100644 --- a/lib/services/automationManagement/lib/operations/dscCompilationJobStream.js +++ b/lib/services/automationManagement/lib/operations/dscCompilationJobStream.js @@ -17,6 +17,8 @@ const WebResource = msRest.WebResource; /** * Retrieve all the job streams for the compilation Job. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {uuid} jobId The job id. @@ -39,7 +41,7 @@ const WebResource = msRest.WebResource; * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _listByJob(automationAccountName, jobId, options, callback) { +function _listByJob(resourceGroupName, automationAccountName, jobId, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -52,13 +54,13 @@ function _listByJob(automationAccountName, jobId, options, callback) { let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -80,7 +82,7 @@ function _listByJob(automationAccountName, jobId, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/compilationjobs/{jobId}/streams/'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{jobId}', encodeURIComponent(jobId.toString())); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -182,6 +184,8 @@ class DscCompilationJobStream { /** * Retrieve all the job streams for the compilation Job. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {uuid} jobId The job id. @@ -197,11 +201,11 @@ class DscCompilationJobStream { * * @reject {Error} - The error object. */ - listByJobWithHttpOperationResponse(automationAccountName, jobId, options) { + listByJobWithHttpOperationResponse(resourceGroupName, automationAccountName, jobId, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._listByJob(automationAccountName, jobId, options, (err, result, request, response) => { + self._listByJob(resourceGroupName, automationAccountName, jobId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -214,6 +218,8 @@ class DscCompilationJobStream { /** * Retrieve all the job streams for the compilation Job. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {uuid} jobId The job id. @@ -245,7 +251,7 @@ class DscCompilationJobStream { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - listByJob(automationAccountName, jobId, options, optionalCallback) { + listByJob(resourceGroupName, automationAccountName, jobId, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -254,14 +260,14 @@ class DscCompilationJobStream { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._listByJob(automationAccountName, jobId, options, (err, result, request, response) => { + self._listByJob(resourceGroupName, automationAccountName, jobId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._listByJob(automationAccountName, jobId, options, optionalCallback); + return self._listByJob(resourceGroupName, automationAccountName, jobId, options, optionalCallback); } } diff --git a/lib/services/automationManagement/lib/operations/dscConfigurationOperations.js b/lib/services/automationManagement/lib/operations/dscConfigurationOperations.js index c80ee3ac53..6b19bcf05c 100644 --- a/lib/services/automationManagement/lib/operations/dscConfigurationOperations.js +++ b/lib/services/automationManagement/lib/operations/dscConfigurationOperations.js @@ -17,6 +17,8 @@ const WebResource = msRest.WebResource; /** * Delete the dsc configuration identified by configuration name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} configurationName The configuration name. @@ -38,7 +40,7 @@ const WebResource = msRest.WebResource; * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _deleteMethod(automationAccountName, configurationName, options, callback) { +function _deleteMethod(resourceGroupName, automationAccountName, configurationName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -51,13 +53,13 @@ function _deleteMethod(automationAccountName, configurationName, options, callba let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -79,7 +81,7 @@ function _deleteMethod(automationAccountName, configurationName, options, callba // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/configurations/{configurationName}'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{configurationName}', encodeURIComponent(configurationName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -153,6 +155,8 @@ function _deleteMethod(automationAccountName, configurationName, options, callba /** * Retrieve the configuration identified by configuration name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} configurationName The configuration name. @@ -175,7 +179,7 @@ function _deleteMethod(automationAccountName, configurationName, options, callba * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _get(automationAccountName, configurationName, options, callback) { +function _get(resourceGroupName, automationAccountName, configurationName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -188,13 +192,13 @@ function _get(automationAccountName, configurationName, options, callback) { let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -216,7 +220,7 @@ function _get(automationAccountName, configurationName, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/configurations/{configurationName}'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{configurationName}', encodeURIComponent(configurationName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -307,6 +311,8 @@ function _get(automationAccountName, configurationName, options, callback) { /** * Create the configuration identified by configuration name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} configurationName The create or update parameters for @@ -370,7 +376,7 @@ function _get(automationAccountName, configurationName, options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _createOrUpdate(automationAccountName, configurationName, parameters, options, callback) { +function _createOrUpdate(resourceGroupName, automationAccountName, configurationName, parameters, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -383,13 +389,13 @@ function _createOrUpdate(automationAccountName, configurationName, parameters, o let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -414,7 +420,7 @@ function _createOrUpdate(automationAccountName, configurationName, parameters, o // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/configurations/{configurationName}'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{configurationName}', encodeURIComponent(configurationName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -536,6 +542,8 @@ function _createOrUpdate(automationAccountName, configurationName, parameters, o /** * Retrieve the configuration script identified by configuration name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} configurationName The configuration name. @@ -557,7 +565,7 @@ function _createOrUpdate(automationAccountName, configurationName, parameters, o * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _getContent(automationAccountName, configurationName, options, callback) { +function _getContent(resourceGroupName, automationAccountName, configurationName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -570,13 +578,13 @@ function _getContent(automationAccountName, configurationName, options, callback let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -598,7 +606,7 @@ function _getContent(automationAccountName, configurationName, options, callback // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/configurations/{configurationName}/content'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{configurationName}', encodeURIComponent(configurationName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -695,6 +703,8 @@ function _getContent(automationAccountName, configurationName, options, callback /** * Retrieve a list of configurations. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -716,7 +726,7 @@ function _getContent(automationAccountName, configurationName, options, callback * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _listByAutomationAccount(automationAccountName, options, callback) { +function _listByAutomationAccount(resourceGroupName, automationAccountName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -729,13 +739,13 @@ function _listByAutomationAccount(automationAccountName, options, callback) { let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -754,7 +764,7 @@ function _listByAutomationAccount(automationAccountName, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/configurations'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; @@ -989,6 +999,8 @@ class DscConfigurationOperations { /** * Delete the dsc configuration identified by configuration name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} configurationName The configuration name. @@ -1004,11 +1016,11 @@ class DscConfigurationOperations { * * @reject {Error} - The error object. */ - deleteMethodWithHttpOperationResponse(automationAccountName, configurationName, options) { + deleteMethodWithHttpOperationResponse(resourceGroupName, automationAccountName, configurationName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._deleteMethod(automationAccountName, configurationName, options, (err, result, request, response) => { + self._deleteMethod(resourceGroupName, automationAccountName, configurationName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1021,6 +1033,8 @@ class DscConfigurationOperations { /** * Delete the dsc configuration identified by configuration name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} configurationName The configuration name. @@ -1051,7 +1065,7 @@ class DscConfigurationOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(automationAccountName, configurationName, options, optionalCallback) { + deleteMethod(resourceGroupName, automationAccountName, configurationName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1060,20 +1074,22 @@ class DscConfigurationOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._deleteMethod(automationAccountName, configurationName, options, (err, result, request, response) => { + self._deleteMethod(resourceGroupName, automationAccountName, configurationName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._deleteMethod(automationAccountName, configurationName, options, optionalCallback); + return self._deleteMethod(resourceGroupName, automationAccountName, configurationName, options, optionalCallback); } } /** * Retrieve the configuration identified by configuration name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} configurationName The configuration name. @@ -1089,11 +1105,11 @@ class DscConfigurationOperations { * * @reject {Error} - The error object. */ - getWithHttpOperationResponse(automationAccountName, configurationName, options) { + getWithHttpOperationResponse(resourceGroupName, automationAccountName, configurationName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._get(automationAccountName, configurationName, options, (err, result, request, response) => { + self._get(resourceGroupName, automationAccountName, configurationName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1106,6 +1122,8 @@ class DscConfigurationOperations { /** * Retrieve the configuration identified by configuration name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} configurationName The configuration name. @@ -1137,7 +1155,7 @@ class DscConfigurationOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - get(automationAccountName, configurationName, options, optionalCallback) { + get(resourceGroupName, automationAccountName, configurationName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1146,20 +1164,22 @@ class DscConfigurationOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._get(automationAccountName, configurationName, options, (err, result, request, response) => { + self._get(resourceGroupName, automationAccountName, configurationName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._get(automationAccountName, configurationName, options, optionalCallback); + return self._get(resourceGroupName, automationAccountName, configurationName, options, optionalCallback); } } /** * Create the configuration identified by configuration name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} configurationName The create or update parameters for @@ -1216,11 +1236,11 @@ class DscConfigurationOperations { * * @reject {Error} - The error object. */ - createOrUpdateWithHttpOperationResponse(automationAccountName, configurationName, parameters, options) { + createOrUpdateWithHttpOperationResponse(resourceGroupName, automationAccountName, configurationName, parameters, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._createOrUpdate(automationAccountName, configurationName, parameters, options, (err, result, request, response) => { + self._createOrUpdate(resourceGroupName, automationAccountName, configurationName, parameters, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1233,6 +1253,8 @@ class DscConfigurationOperations { /** * Create the configuration identified by configuration name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} configurationName The create or update parameters for @@ -1305,7 +1327,7 @@ class DscConfigurationOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - createOrUpdate(automationAccountName, configurationName, parameters, options, optionalCallback) { + createOrUpdate(resourceGroupName, automationAccountName, configurationName, parameters, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1314,20 +1336,22 @@ class DscConfigurationOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._createOrUpdate(automationAccountName, configurationName, parameters, options, (err, result, request, response) => { + self._createOrUpdate(resourceGroupName, automationAccountName, configurationName, parameters, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._createOrUpdate(automationAccountName, configurationName, parameters, options, optionalCallback); + return self._createOrUpdate(resourceGroupName, automationAccountName, configurationName, parameters, options, optionalCallback); } } /** * Retrieve the configuration script identified by configuration name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} configurationName The configuration name. @@ -1343,11 +1367,11 @@ class DscConfigurationOperations { * * @reject {Error} - The error object. */ - getContentWithHttpOperationResponse(automationAccountName, configurationName, options) { + getContentWithHttpOperationResponse(resourceGroupName, automationAccountName, configurationName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._getContent(automationAccountName, configurationName, options, (err, result, request, response) => { + self._getContent(resourceGroupName, automationAccountName, configurationName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1360,6 +1384,8 @@ class DscConfigurationOperations { /** * Retrieve the configuration script identified by configuration name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} configurationName The configuration name. @@ -1390,7 +1416,7 @@ class DscConfigurationOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getContent(automationAccountName, configurationName, options, optionalCallback) { + getContent(resourceGroupName, automationAccountName, configurationName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1399,20 +1425,22 @@ class DscConfigurationOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getContent(automationAccountName, configurationName, options, (err, result, request, response) => { + self._getContent(resourceGroupName, automationAccountName, configurationName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getContent(automationAccountName, configurationName, options, optionalCallback); + return self._getContent(resourceGroupName, automationAccountName, configurationName, options, optionalCallback); } } /** * Retrieve a list of configurations. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -1426,11 +1454,11 @@ class DscConfigurationOperations { * * @reject {Error} - The error object. */ - listByAutomationAccountWithHttpOperationResponse(automationAccountName, options) { + listByAutomationAccountWithHttpOperationResponse(resourceGroupName, automationAccountName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._listByAutomationAccount(automationAccountName, options, (err, result, request, response) => { + self._listByAutomationAccount(resourceGroupName, automationAccountName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1443,6 +1471,8 @@ class DscConfigurationOperations { /** * Retrieve a list of configurations. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -1473,7 +1503,7 @@ class DscConfigurationOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - listByAutomationAccount(automationAccountName, options, optionalCallback) { + listByAutomationAccount(resourceGroupName, automationAccountName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1482,14 +1512,14 @@ class DscConfigurationOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._listByAutomationAccount(automationAccountName, options, (err, result, request, response) => { + self._listByAutomationAccount(resourceGroupName, automationAccountName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._listByAutomationAccount(automationAccountName, options, optionalCallback); + return self._listByAutomationAccount(resourceGroupName, automationAccountName, options, optionalCallback); } } diff --git a/lib/services/automationManagement/lib/operations/dscNodeConfigurationOperations.js b/lib/services/automationManagement/lib/operations/dscNodeConfigurationOperations.js index 324a545465..54dc7f4b1f 100644 --- a/lib/services/automationManagement/lib/operations/dscNodeConfigurationOperations.js +++ b/lib/services/automationManagement/lib/operations/dscNodeConfigurationOperations.js @@ -17,6 +17,8 @@ const WebResource = msRest.WebResource; /** * Delete the Dsc node configurations by node configuration. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} nodeConfigurationName The Dsc node configuration name. @@ -38,7 +40,7 @@ const WebResource = msRest.WebResource; * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _deleteMethod(automationAccountName, nodeConfigurationName, options, callback) { +function _deleteMethod(resourceGroupName, automationAccountName, nodeConfigurationName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -51,13 +53,13 @@ function _deleteMethod(automationAccountName, nodeConfigurationName, options, ca let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -79,7 +81,7 @@ function _deleteMethod(automationAccountName, nodeConfigurationName, options, ca // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/nodeConfigurations/{nodeConfigurationName}'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{nodeConfigurationName}', encodeURIComponent(nodeConfigurationName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -153,6 +155,8 @@ function _deleteMethod(automationAccountName, nodeConfigurationName, options, ca /** * Retrieve the Dsc node configurations by node configuration. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} nodeConfigurationName The Dsc node configuration name. @@ -175,7 +179,7 @@ function _deleteMethod(automationAccountName, nodeConfigurationName, options, ca * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _get(automationAccountName, nodeConfigurationName, options, callback) { +function _get(resourceGroupName, automationAccountName, nodeConfigurationName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -188,13 +192,13 @@ function _get(automationAccountName, nodeConfigurationName, options, callback) { let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -216,7 +220,7 @@ function _get(automationAccountName, nodeConfigurationName, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/nodeConfigurations/{nodeConfigurationName}'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{nodeConfigurationName}', encodeURIComponent(nodeConfigurationName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -307,6 +311,8 @@ function _get(automationAccountName, nodeConfigurationName, options, callback) { /** * Create the node configuration identified by node configuration name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} nodeConfigurationName The create or update parameters for @@ -363,7 +369,7 @@ function _get(automationAccountName, nodeConfigurationName, options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _createOrUpdate(automationAccountName, nodeConfigurationName, parameters, options, callback) { +function _createOrUpdate(resourceGroupName, automationAccountName, nodeConfigurationName, parameters, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -376,13 +382,13 @@ function _createOrUpdate(automationAccountName, nodeConfigurationName, parameter let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -407,7 +413,7 @@ function _createOrUpdate(automationAccountName, nodeConfigurationName, parameter // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/nodeConfigurations/{nodeConfigurationName}'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{nodeConfigurationName}', encodeURIComponent(nodeConfigurationName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -512,6 +518,8 @@ function _createOrUpdate(automationAccountName, nodeConfigurationName, parameter /** * Retrieve a list of dsc node configurations. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -535,7 +543,7 @@ function _createOrUpdate(automationAccountName, nodeConfigurationName, parameter * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _listByAutomationAccount(automationAccountName, options, callback) { +function _listByAutomationAccount(resourceGroupName, automationAccountName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -549,13 +557,13 @@ function _listByAutomationAccount(automationAccountName, options, callback) { let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -577,7 +585,7 @@ function _listByAutomationAccount(automationAccountName, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/nodeConfigurations'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; @@ -814,6 +822,8 @@ class DscNodeConfigurationOperations { /** * Delete the Dsc node configurations by node configuration. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} nodeConfigurationName The Dsc node configuration name. @@ -829,11 +839,11 @@ class DscNodeConfigurationOperations { * * @reject {Error} - The error object. */ - deleteMethodWithHttpOperationResponse(automationAccountName, nodeConfigurationName, options) { + deleteMethodWithHttpOperationResponse(resourceGroupName, automationAccountName, nodeConfigurationName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._deleteMethod(automationAccountName, nodeConfigurationName, options, (err, result, request, response) => { + self._deleteMethod(resourceGroupName, automationAccountName, nodeConfigurationName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -846,6 +856,8 @@ class DscNodeConfigurationOperations { /** * Delete the Dsc node configurations by node configuration. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} nodeConfigurationName The Dsc node configuration name. @@ -876,7 +888,7 @@ class DscNodeConfigurationOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(automationAccountName, nodeConfigurationName, options, optionalCallback) { + deleteMethod(resourceGroupName, automationAccountName, nodeConfigurationName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -885,20 +897,22 @@ class DscNodeConfigurationOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._deleteMethod(automationAccountName, nodeConfigurationName, options, (err, result, request, response) => { + self._deleteMethod(resourceGroupName, automationAccountName, nodeConfigurationName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._deleteMethod(automationAccountName, nodeConfigurationName, options, optionalCallback); + return self._deleteMethod(resourceGroupName, automationAccountName, nodeConfigurationName, options, optionalCallback); } } /** * Retrieve the Dsc node configurations by node configuration. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} nodeConfigurationName The Dsc node configuration name. @@ -914,11 +928,11 @@ class DscNodeConfigurationOperations { * * @reject {Error} - The error object. */ - getWithHttpOperationResponse(automationAccountName, nodeConfigurationName, options) { + getWithHttpOperationResponse(resourceGroupName, automationAccountName, nodeConfigurationName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._get(automationAccountName, nodeConfigurationName, options, (err, result, request, response) => { + self._get(resourceGroupName, automationAccountName, nodeConfigurationName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -931,6 +945,8 @@ class DscNodeConfigurationOperations { /** * Retrieve the Dsc node configurations by node configuration. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} nodeConfigurationName The Dsc node configuration name. @@ -962,7 +978,7 @@ class DscNodeConfigurationOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - get(automationAccountName, nodeConfigurationName, options, optionalCallback) { + get(resourceGroupName, automationAccountName, nodeConfigurationName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -971,20 +987,22 @@ class DscNodeConfigurationOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._get(automationAccountName, nodeConfigurationName, options, (err, result, request, response) => { + self._get(resourceGroupName, automationAccountName, nodeConfigurationName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._get(automationAccountName, nodeConfigurationName, options, optionalCallback); + return self._get(resourceGroupName, automationAccountName, nodeConfigurationName, options, optionalCallback); } } /** * Create the node configuration identified by node configuration name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} nodeConfigurationName The create or update parameters for @@ -1034,11 +1052,11 @@ class DscNodeConfigurationOperations { * * @reject {Error} - The error object. */ - createOrUpdateWithHttpOperationResponse(automationAccountName, nodeConfigurationName, parameters, options) { + createOrUpdateWithHttpOperationResponse(resourceGroupName, automationAccountName, nodeConfigurationName, parameters, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._createOrUpdate(automationAccountName, nodeConfigurationName, parameters, options, (err, result, request, response) => { + self._createOrUpdate(resourceGroupName, automationAccountName, nodeConfigurationName, parameters, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1051,6 +1069,8 @@ class DscNodeConfigurationOperations { /** * Create the node configuration identified by node configuration name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} nodeConfigurationName The create or update parameters for @@ -1116,7 +1136,7 @@ class DscNodeConfigurationOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - createOrUpdate(automationAccountName, nodeConfigurationName, parameters, options, optionalCallback) { + createOrUpdate(resourceGroupName, automationAccountName, nodeConfigurationName, parameters, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1125,20 +1145,22 @@ class DscNodeConfigurationOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._createOrUpdate(automationAccountName, nodeConfigurationName, parameters, options, (err, result, request, response) => { + self._createOrUpdate(resourceGroupName, automationAccountName, nodeConfigurationName, parameters, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._createOrUpdate(automationAccountName, nodeConfigurationName, parameters, options, optionalCallback); + return self._createOrUpdate(resourceGroupName, automationAccountName, nodeConfigurationName, parameters, options, optionalCallback); } } /** * Retrieve a list of dsc node configurations. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -1154,11 +1176,11 @@ class DscNodeConfigurationOperations { * * @reject {Error} - The error object. */ - listByAutomationAccountWithHttpOperationResponse(automationAccountName, options) { + listByAutomationAccountWithHttpOperationResponse(resourceGroupName, automationAccountName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._listByAutomationAccount(automationAccountName, options, (err, result, request, response) => { + self._listByAutomationAccount(resourceGroupName, automationAccountName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1171,6 +1193,8 @@ class DscNodeConfigurationOperations { /** * Retrieve a list of dsc node configurations. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -1203,7 +1227,7 @@ class DscNodeConfigurationOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - listByAutomationAccount(automationAccountName, options, optionalCallback) { + listByAutomationAccount(resourceGroupName, automationAccountName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1212,14 +1236,14 @@ class DscNodeConfigurationOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._listByAutomationAccount(automationAccountName, options, (err, result, request, response) => { + self._listByAutomationAccount(resourceGroupName, automationAccountName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._listByAutomationAccount(automationAccountName, options, optionalCallback); + return self._listByAutomationAccount(resourceGroupName, automationAccountName, options, optionalCallback); } } diff --git a/lib/services/automationManagement/lib/operations/dscNodeOperations.js b/lib/services/automationManagement/lib/operations/dscNodeOperations.js index ad3a2e48e8..de8644ff57 100644 --- a/lib/services/automationManagement/lib/operations/dscNodeOperations.js +++ b/lib/services/automationManagement/lib/operations/dscNodeOperations.js @@ -17,6 +17,8 @@ const WebResource = msRest.WebResource; /** * Delete the dsc node identified by node id. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName Automation account name. * * @param {string} nodeId The node id. @@ -39,7 +41,7 @@ const WebResource = msRest.WebResource; * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _deleteMethod(automationAccountName, nodeId, options, callback) { +function _deleteMethod(resourceGroupName, automationAccountName, nodeId, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -52,13 +54,13 @@ function _deleteMethod(automationAccountName, nodeId, options, callback) { let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -80,7 +82,7 @@ function _deleteMethod(automationAccountName, nodeId, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/nodes/{nodeId}'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{nodeId}', encodeURIComponent(nodeId)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -171,6 +173,8 @@ function _deleteMethod(automationAccountName, nodeId, options, callback) { /** * Retrieve the dsc node identified by node id. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} nodeId The node id. @@ -193,7 +197,7 @@ function _deleteMethod(automationAccountName, nodeId, options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _get(automationAccountName, nodeId, options, callback) { +function _get(resourceGroupName, automationAccountName, nodeId, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -206,13 +210,13 @@ function _get(automationAccountName, nodeId, options, callback) { let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -234,7 +238,7 @@ function _get(automationAccountName, nodeId, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/nodes/{nodeId}'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{nodeId}', encodeURIComponent(nodeId)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -325,6 +329,8 @@ function _get(automationAccountName, nodeId, options, callback) { /** * Update the dsc node. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} nodeId Parameters supplied to the update dsc node. @@ -357,7 +363,7 @@ function _get(automationAccountName, nodeId, options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _update(automationAccountName, nodeId, parameters, options, callback) { +function _update(resourceGroupName, automationAccountName, nodeId, parameters, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -370,13 +376,13 @@ function _update(automationAccountName, nodeId, parameters, options, callback) { let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -401,7 +407,7 @@ function _update(automationAccountName, nodeId, parameters, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/nodes/{nodeId}'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{nodeId}', encodeURIComponent(nodeId)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -506,6 +512,8 @@ function _update(automationAccountName, nodeId, parameters, options, callback) { /** * Retrieve a list of dsc nodes. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -528,7 +536,7 @@ function _update(automationAccountName, nodeId, parameters, options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _listByAutomationAccount(automationAccountName, options, callback) { +function _listByAutomationAccount(resourceGroupName, automationAccountName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -542,13 +550,13 @@ function _listByAutomationAccount(automationAccountName, options, callback) { let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -570,7 +578,7 @@ function _listByAutomationAccount(automationAccountName, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/nodes'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; @@ -806,6 +814,8 @@ class DscNodeOperations { /** * Delete the dsc node identified by node id. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName Automation account name. * * @param {string} nodeId The node id. @@ -821,11 +831,11 @@ class DscNodeOperations { * * @reject {Error} - The error object. */ - deleteMethodWithHttpOperationResponse(automationAccountName, nodeId, options) { + deleteMethodWithHttpOperationResponse(resourceGroupName, automationAccountName, nodeId, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._deleteMethod(automationAccountName, nodeId, options, (err, result, request, response) => { + self._deleteMethod(resourceGroupName, automationAccountName, nodeId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -838,6 +848,8 @@ class DscNodeOperations { /** * Delete the dsc node identified by node id. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName Automation account name. * * @param {string} nodeId The node id. @@ -869,7 +881,7 @@ class DscNodeOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(automationAccountName, nodeId, options, optionalCallback) { + deleteMethod(resourceGroupName, automationAccountName, nodeId, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -878,20 +890,22 @@ class DscNodeOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._deleteMethod(automationAccountName, nodeId, options, (err, result, request, response) => { + self._deleteMethod(resourceGroupName, automationAccountName, nodeId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._deleteMethod(automationAccountName, nodeId, options, optionalCallback); + return self._deleteMethod(resourceGroupName, automationAccountName, nodeId, options, optionalCallback); } } /** * Retrieve the dsc node identified by node id. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} nodeId The node id. @@ -907,11 +921,11 @@ class DscNodeOperations { * * @reject {Error} - The error object. */ - getWithHttpOperationResponse(automationAccountName, nodeId, options) { + getWithHttpOperationResponse(resourceGroupName, automationAccountName, nodeId, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._get(automationAccountName, nodeId, options, (err, result, request, response) => { + self._get(resourceGroupName, automationAccountName, nodeId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -924,6 +938,8 @@ class DscNodeOperations { /** * Retrieve the dsc node identified by node id. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} nodeId The node id. @@ -955,7 +971,7 @@ class DscNodeOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - get(automationAccountName, nodeId, options, optionalCallback) { + get(resourceGroupName, automationAccountName, nodeId, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -964,20 +980,22 @@ class DscNodeOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._get(automationAccountName, nodeId, options, (err, result, request, response) => { + self._get(resourceGroupName, automationAccountName, nodeId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._get(automationAccountName, nodeId, options, optionalCallback); + return self._get(resourceGroupName, automationAccountName, nodeId, options, optionalCallback); } } /** * Update the dsc node. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} nodeId Parameters supplied to the update dsc node. @@ -1003,11 +1021,11 @@ class DscNodeOperations { * * @reject {Error} - The error object. */ - updateWithHttpOperationResponse(automationAccountName, nodeId, parameters, options) { + updateWithHttpOperationResponse(resourceGroupName, automationAccountName, nodeId, parameters, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._update(automationAccountName, nodeId, parameters, options, (err, result, request, response) => { + self._update(resourceGroupName, automationAccountName, nodeId, parameters, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1020,6 +1038,8 @@ class DscNodeOperations { /** * Update the dsc node. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} nodeId Parameters supplied to the update dsc node. @@ -1061,7 +1081,7 @@ class DscNodeOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - update(automationAccountName, nodeId, parameters, options, optionalCallback) { + update(resourceGroupName, automationAccountName, nodeId, parameters, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1070,20 +1090,22 @@ class DscNodeOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._update(automationAccountName, nodeId, parameters, options, (err, result, request, response) => { + self._update(resourceGroupName, automationAccountName, nodeId, parameters, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._update(automationAccountName, nodeId, parameters, options, optionalCallback); + return self._update(resourceGroupName, automationAccountName, nodeId, parameters, options, optionalCallback); } } /** * Retrieve a list of dsc nodes. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -1099,11 +1121,11 @@ class DscNodeOperations { * * @reject {Error} - The error object. */ - listByAutomationAccountWithHttpOperationResponse(automationAccountName, options) { + listByAutomationAccountWithHttpOperationResponse(resourceGroupName, automationAccountName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._listByAutomationAccount(automationAccountName, options, (err, result, request, response) => { + self._listByAutomationAccount(resourceGroupName, automationAccountName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1116,6 +1138,8 @@ class DscNodeOperations { /** * Retrieve a list of dsc nodes. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -1147,7 +1171,7 @@ class DscNodeOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - listByAutomationAccount(automationAccountName, options, optionalCallback) { + listByAutomationAccount(resourceGroupName, automationAccountName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1156,14 +1180,14 @@ class DscNodeOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._listByAutomationAccount(automationAccountName, options, (err, result, request, response) => { + self._listByAutomationAccount(resourceGroupName, automationAccountName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._listByAutomationAccount(automationAccountName, options, optionalCallback); + return self._listByAutomationAccount(resourceGroupName, automationAccountName, options, optionalCallback); } } diff --git a/lib/services/automationManagement/lib/operations/fields.js b/lib/services/automationManagement/lib/operations/fields.js index dcfadd3d8f..bad55aa687 100644 --- a/lib/services/automationManagement/lib/operations/fields.js +++ b/lib/services/automationManagement/lib/operations/fields.js @@ -17,6 +17,8 @@ const WebResource = msRest.WebResource; /** * Retrieve a list of fields of a given type identified by module name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} moduleName The name of module. @@ -41,7 +43,7 @@ const WebResource = msRest.WebResource; * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _listByType(automationAccountName, moduleName, typeName, options, callback) { +function _listByType(resourceGroupName, automationAccountName, moduleName, typeName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -54,13 +56,13 @@ function _listByType(automationAccountName, moduleName, typeName, options, callb let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -85,7 +87,7 @@ function _listByType(automationAccountName, moduleName, typeName, options, callb // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/modules/{moduleName}/types/{typeName}/fields'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{moduleName}', encodeURIComponent(moduleName)); requestUrl = requestUrl.replace('{typeName}', encodeURIComponent(typeName)); @@ -188,6 +190,8 @@ class Fields { /** * Retrieve a list of fields of a given type identified by module name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} moduleName The name of module. @@ -205,11 +209,11 @@ class Fields { * * @reject {Error} - The error object. */ - listByTypeWithHttpOperationResponse(automationAccountName, moduleName, typeName, options) { + listByTypeWithHttpOperationResponse(resourceGroupName, automationAccountName, moduleName, typeName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._listByType(automationAccountName, moduleName, typeName, options, (err, result, request, response) => { + self._listByType(resourceGroupName, automationAccountName, moduleName, typeName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -222,6 +226,8 @@ class Fields { /** * Retrieve a list of fields of a given type identified by module name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} moduleName The name of module. @@ -255,7 +261,7 @@ class Fields { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - listByType(automationAccountName, moduleName, typeName, options, optionalCallback) { + listByType(resourceGroupName, automationAccountName, moduleName, typeName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -264,14 +270,14 @@ class Fields { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._listByType(automationAccountName, moduleName, typeName, options, (err, result, request, response) => { + self._listByType(resourceGroupName, automationAccountName, moduleName, typeName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._listByType(automationAccountName, moduleName, typeName, options, optionalCallback); + return self._listByType(resourceGroupName, automationAccountName, moduleName, typeName, options, optionalCallback); } } diff --git a/lib/services/automationManagement/lib/operations/hybridRunbookWorkerGroupOperations.js b/lib/services/automationManagement/lib/operations/hybridRunbookWorkerGroupOperations.js index 327e721335..a4fe69fd98 100644 --- a/lib/services/automationManagement/lib/operations/hybridRunbookWorkerGroupOperations.js +++ b/lib/services/automationManagement/lib/operations/hybridRunbookWorkerGroupOperations.js @@ -17,6 +17,8 @@ const WebResource = msRest.WebResource; /** * Delete a hybrid runbook worker group. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName Automation account name. * * @param {string} hybridRunbookWorkerGroupName The hybrid runbook worker group @@ -39,7 +41,7 @@ const WebResource = msRest.WebResource; * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _deleteMethod(automationAccountName, hybridRunbookWorkerGroupName, options, callback) { +function _deleteMethod(resourceGroupName, automationAccountName, hybridRunbookWorkerGroupName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -52,13 +54,13 @@ function _deleteMethod(automationAccountName, hybridRunbookWorkerGroupName, opti let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -80,7 +82,7 @@ function _deleteMethod(automationAccountName, hybridRunbookWorkerGroupName, opti // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/hybridRunbookWorkerGroups/{hybridRunbookWorkerGroupName}'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{hybridRunbookWorkerGroupName}', encodeURIComponent(hybridRunbookWorkerGroupName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -154,6 +156,8 @@ function _deleteMethod(automationAccountName, hybridRunbookWorkerGroupName, opti /** * Retrieve a hybrid runbook worker group. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} hybridRunbookWorkerGroupName The hybrid runbook worker group @@ -178,7 +182,7 @@ function _deleteMethod(automationAccountName, hybridRunbookWorkerGroupName, opti * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _get(automationAccountName, hybridRunbookWorkerGroupName, options, callback) { +function _get(resourceGroupName, automationAccountName, hybridRunbookWorkerGroupName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -191,13 +195,13 @@ function _get(automationAccountName, hybridRunbookWorkerGroupName, options, call let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -219,7 +223,7 @@ function _get(automationAccountName, hybridRunbookWorkerGroupName, options, call // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/hybridRunbookWorkerGroups/{hybridRunbookWorkerGroupName}'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{hybridRunbookWorkerGroupName}', encodeURIComponent(hybridRunbookWorkerGroupName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -310,6 +314,8 @@ function _get(automationAccountName, hybridRunbookWorkerGroupName, options, call /** * Update a hybrid runbook worker group. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} hybridRunbookWorkerGroupName The hybrid runbook worker group @@ -342,7 +348,7 @@ function _get(automationAccountName, hybridRunbookWorkerGroupName, options, call * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _update(automationAccountName, hybridRunbookWorkerGroupName, parameters, options, callback) { +function _update(resourceGroupName, automationAccountName, hybridRunbookWorkerGroupName, parameters, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -355,13 +361,13 @@ function _update(automationAccountName, hybridRunbookWorkerGroupName, parameters let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -386,7 +392,7 @@ function _update(automationAccountName, hybridRunbookWorkerGroupName, parameters // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/hybridRunbookWorkerGroups/{hybridRunbookWorkerGroupName}'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{hybridRunbookWorkerGroupName}', encodeURIComponent(hybridRunbookWorkerGroupName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -491,6 +497,8 @@ function _update(automationAccountName, hybridRunbookWorkerGroupName, parameters /** * Retrieve a list of hybrid runbook worker groups. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -512,7 +520,7 @@ function _update(automationAccountName, hybridRunbookWorkerGroupName, parameters * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _listByAutomationAccount(automationAccountName, options, callback) { +function _listByAutomationAccount(resourceGroupName, automationAccountName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -525,13 +533,13 @@ function _listByAutomationAccount(automationAccountName, options, callback) { let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -550,7 +558,7 @@ function _listByAutomationAccount(automationAccountName, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/hybridRunbookWorkerGroups'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; @@ -784,6 +792,8 @@ class HybridRunbookWorkerGroupOperations { /** * Delete a hybrid runbook worker group. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName Automation account name. * * @param {string} hybridRunbookWorkerGroupName The hybrid runbook worker group @@ -800,11 +810,11 @@ class HybridRunbookWorkerGroupOperations { * * @reject {Error} - The error object. */ - deleteMethodWithHttpOperationResponse(automationAccountName, hybridRunbookWorkerGroupName, options) { + deleteMethodWithHttpOperationResponse(resourceGroupName, automationAccountName, hybridRunbookWorkerGroupName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._deleteMethod(automationAccountName, hybridRunbookWorkerGroupName, options, (err, result, request, response) => { + self._deleteMethod(resourceGroupName, automationAccountName, hybridRunbookWorkerGroupName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -817,6 +827,8 @@ class HybridRunbookWorkerGroupOperations { /** * Delete a hybrid runbook worker group. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName Automation account name. * * @param {string} hybridRunbookWorkerGroupName The hybrid runbook worker group @@ -848,7 +860,7 @@ class HybridRunbookWorkerGroupOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(automationAccountName, hybridRunbookWorkerGroupName, options, optionalCallback) { + deleteMethod(resourceGroupName, automationAccountName, hybridRunbookWorkerGroupName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -857,20 +869,22 @@ class HybridRunbookWorkerGroupOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._deleteMethod(automationAccountName, hybridRunbookWorkerGroupName, options, (err, result, request, response) => { + self._deleteMethod(resourceGroupName, automationAccountName, hybridRunbookWorkerGroupName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._deleteMethod(automationAccountName, hybridRunbookWorkerGroupName, options, optionalCallback); + return self._deleteMethod(resourceGroupName, automationAccountName, hybridRunbookWorkerGroupName, options, optionalCallback); } } /** * Retrieve a hybrid runbook worker group. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} hybridRunbookWorkerGroupName The hybrid runbook worker group @@ -887,11 +901,11 @@ class HybridRunbookWorkerGroupOperations { * * @reject {Error} - The error object. */ - getWithHttpOperationResponse(automationAccountName, hybridRunbookWorkerGroupName, options) { + getWithHttpOperationResponse(resourceGroupName, automationAccountName, hybridRunbookWorkerGroupName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._get(automationAccountName, hybridRunbookWorkerGroupName, options, (err, result, request, response) => { + self._get(resourceGroupName, automationAccountName, hybridRunbookWorkerGroupName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -904,6 +918,8 @@ class HybridRunbookWorkerGroupOperations { /** * Retrieve a hybrid runbook worker group. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} hybridRunbookWorkerGroupName The hybrid runbook worker group @@ -937,7 +953,7 @@ class HybridRunbookWorkerGroupOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - get(automationAccountName, hybridRunbookWorkerGroupName, options, optionalCallback) { + get(resourceGroupName, automationAccountName, hybridRunbookWorkerGroupName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -946,20 +962,22 @@ class HybridRunbookWorkerGroupOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._get(automationAccountName, hybridRunbookWorkerGroupName, options, (err, result, request, response) => { + self._get(resourceGroupName, automationAccountName, hybridRunbookWorkerGroupName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._get(automationAccountName, hybridRunbookWorkerGroupName, options, optionalCallback); + return self._get(resourceGroupName, automationAccountName, hybridRunbookWorkerGroupName, options, optionalCallback); } } /** * Update a hybrid runbook worker group. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} hybridRunbookWorkerGroupName The hybrid runbook worker group @@ -984,11 +1002,11 @@ class HybridRunbookWorkerGroupOperations { * * @reject {Error} - The error object. */ - updateWithHttpOperationResponse(automationAccountName, hybridRunbookWorkerGroupName, parameters, options) { + updateWithHttpOperationResponse(resourceGroupName, automationAccountName, hybridRunbookWorkerGroupName, parameters, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._update(automationAccountName, hybridRunbookWorkerGroupName, parameters, options, (err, result, request, response) => { + self._update(resourceGroupName, automationAccountName, hybridRunbookWorkerGroupName, parameters, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1001,6 +1019,8 @@ class HybridRunbookWorkerGroupOperations { /** * Update a hybrid runbook worker group. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} hybridRunbookWorkerGroupName The hybrid runbook worker group @@ -1042,7 +1062,7 @@ class HybridRunbookWorkerGroupOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - update(automationAccountName, hybridRunbookWorkerGroupName, parameters, options, optionalCallback) { + update(resourceGroupName, automationAccountName, hybridRunbookWorkerGroupName, parameters, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1051,20 +1071,22 @@ class HybridRunbookWorkerGroupOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._update(automationAccountName, hybridRunbookWorkerGroupName, parameters, options, (err, result, request, response) => { + self._update(resourceGroupName, automationAccountName, hybridRunbookWorkerGroupName, parameters, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._update(automationAccountName, hybridRunbookWorkerGroupName, parameters, options, optionalCallback); + return self._update(resourceGroupName, automationAccountName, hybridRunbookWorkerGroupName, parameters, options, optionalCallback); } } /** * Retrieve a list of hybrid runbook worker groups. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -1078,11 +1100,11 @@ class HybridRunbookWorkerGroupOperations { * * @reject {Error} - The error object. */ - listByAutomationAccountWithHttpOperationResponse(automationAccountName, options) { + listByAutomationAccountWithHttpOperationResponse(resourceGroupName, automationAccountName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._listByAutomationAccount(automationAccountName, options, (err, result, request, response) => { + self._listByAutomationAccount(resourceGroupName, automationAccountName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1095,6 +1117,8 @@ class HybridRunbookWorkerGroupOperations { /** * Retrieve a list of hybrid runbook worker groups. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -1125,7 +1149,7 @@ class HybridRunbookWorkerGroupOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - listByAutomationAccount(automationAccountName, options, optionalCallback) { + listByAutomationAccount(resourceGroupName, automationAccountName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1134,14 +1158,14 @@ class HybridRunbookWorkerGroupOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._listByAutomationAccount(automationAccountName, options, (err, result, request, response) => { + self._listByAutomationAccount(resourceGroupName, automationAccountName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._listByAutomationAccount(automationAccountName, options, optionalCallback); + return self._listByAutomationAccount(resourceGroupName, automationAccountName, options, optionalCallback); } } diff --git a/lib/services/automationManagement/lib/operations/index.d.ts b/lib/services/automationManagement/lib/operations/index.d.ts index 2041f688c2..157a4348c3 100644 --- a/lib/services/automationManagement/lib/operations/index.d.ts +++ b/lib/services/automationManagement/lib/operations/index.d.ts @@ -782,6 +782,8 @@ export interface CertificateOperations { /** * Delete the certificate. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} certificateName The name of certificate. @@ -797,11 +799,13 @@ export interface CertificateOperations { * * @reject {Error|ServiceError} - The error object. */ - deleteMethodWithHttpOperationResponse(automationAccountName: string, certificateName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + deleteMethodWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, certificateName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Delete the certificate. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} certificateName The name of certificate. @@ -832,14 +836,16 @@ export interface CertificateOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(automationAccountName: string, certificateName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - deleteMethod(automationAccountName: string, certificateName: string, callback: ServiceCallback): void; - deleteMethod(automationAccountName: string, certificateName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, automationAccountName: string, certificateName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + deleteMethod(resourceGroupName: string, automationAccountName: string, certificateName: string, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, automationAccountName: string, certificateName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Retrieve the certificate identified by certificate name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} certificateName The name of certificate. @@ -855,11 +861,13 @@ export interface CertificateOperations { * * @reject {Error|ServiceError} - The error object. */ - getWithHttpOperationResponse(automationAccountName: string, certificateName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, certificateName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieve the certificate identified by certificate name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} certificateName The name of certificate. @@ -891,14 +899,16 @@ export interface CertificateOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - get(automationAccountName: string, certificateName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - get(automationAccountName: string, certificateName: string, callback: ServiceCallback): void; - get(automationAccountName: string, certificateName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + get(resourceGroupName: string, automationAccountName: string, certificateName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + get(resourceGroupName: string, automationAccountName: string, certificateName: string, callback: ServiceCallback): void; + get(resourceGroupName: string, automationAccountName: string, certificateName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Create a certificate. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} certificateName The parameters supplied to the create or @@ -932,11 +942,13 @@ export interface CertificateOperations { * * @reject {Error|ServiceError} - The error object. */ - createOrUpdateWithHttpOperationResponse(automationAccountName: string, certificateName: string, parameters: models.CertificateCreateOrUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + createOrUpdateWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, certificateName: string, parameters: models.CertificateCreateOrUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Create a certificate. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} certificateName The parameters supplied to the create or @@ -986,14 +998,16 @@ export interface CertificateOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - createOrUpdate(automationAccountName: string, certificateName: string, parameters: models.CertificateCreateOrUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - createOrUpdate(automationAccountName: string, certificateName: string, parameters: models.CertificateCreateOrUpdateParameters, callback: ServiceCallback): void; - createOrUpdate(automationAccountName: string, certificateName: string, parameters: models.CertificateCreateOrUpdateParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, automationAccountName: string, certificateName: string, parameters: models.CertificateCreateOrUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + createOrUpdate(resourceGroupName: string, automationAccountName: string, certificateName: string, parameters: models.CertificateCreateOrUpdateParameters, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, automationAccountName: string, certificateName: string, parameters: models.CertificateCreateOrUpdateParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Update a certificate. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} certificateName The parameters supplied to the update @@ -1018,11 +1032,13 @@ export interface CertificateOperations { * * @reject {Error|ServiceError} - The error object. */ - updateWithHttpOperationResponse(automationAccountName: string, certificateName: string, parameters: models.CertificateUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + updateWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, certificateName: string, parameters: models.CertificateUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Update a certificate. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} certificateName The parameters supplied to the update @@ -1063,14 +1079,16 @@ export interface CertificateOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - update(automationAccountName: string, certificateName: string, parameters: models.CertificateUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - update(automationAccountName: string, certificateName: string, parameters: models.CertificateUpdateParameters, callback: ServiceCallback): void; - update(automationAccountName: string, certificateName: string, parameters: models.CertificateUpdateParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + update(resourceGroupName: string, automationAccountName: string, certificateName: string, parameters: models.CertificateUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + update(resourceGroupName: string, automationAccountName: string, certificateName: string, parameters: models.CertificateUpdateParameters, callback: ServiceCallback): void; + update(resourceGroupName: string, automationAccountName: string, certificateName: string, parameters: models.CertificateUpdateParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Retrieve a list of certificates. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -1084,11 +1102,13 @@ export interface CertificateOperations { * * @reject {Error|ServiceError} - The error object. */ - listByAutomationAccountWithHttpOperationResponse(automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listByAutomationAccountWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieve a list of certificates. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -1118,9 +1138,9 @@ export interface CertificateOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listByAutomationAccount(automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listByAutomationAccount(automationAccountName: string, callback: ServiceCallback): void; - listByAutomationAccount(automationAccountName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listByAutomationAccount(resourceGroupName: string, automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listByAutomationAccount(resourceGroupName: string, automationAccountName: string, callback: ServiceCallback): void; + listByAutomationAccount(resourceGroupName: string, automationAccountName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -1192,6 +1212,8 @@ export interface ConnectionOperations { /** * Delete the connection. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} connectionName The name of connection. @@ -1207,11 +1229,13 @@ export interface ConnectionOperations { * * @reject {Error|ServiceError} - The error object. */ - deleteMethodWithHttpOperationResponse(automationAccountName: string, connectionName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + deleteMethodWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, connectionName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Delete the connection. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} connectionName The name of connection. @@ -1243,14 +1267,16 @@ export interface ConnectionOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(automationAccountName: string, connectionName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - deleteMethod(automationAccountName: string, connectionName: string, callback: ServiceCallback): void; - deleteMethod(automationAccountName: string, connectionName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, automationAccountName: string, connectionName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + deleteMethod(resourceGroupName: string, automationAccountName: string, connectionName: string, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, automationAccountName: string, connectionName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Retrieve the connection identified by connection name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} connectionName The name of connection. @@ -1266,11 +1292,13 @@ export interface ConnectionOperations { * * @reject {Error|ServiceError} - The error object. */ - getWithHttpOperationResponse(automationAccountName: string, connectionName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, connectionName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieve the connection identified by connection name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} connectionName The name of connection. @@ -1302,14 +1330,16 @@ export interface ConnectionOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - get(automationAccountName: string, connectionName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - get(automationAccountName: string, connectionName: string, callback: ServiceCallback): void; - get(automationAccountName: string, connectionName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + get(resourceGroupName: string, automationAccountName: string, connectionName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + get(resourceGroupName: string, automationAccountName: string, connectionName: string, callback: ServiceCallback): void; + get(resourceGroupName: string, automationAccountName: string, connectionName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Create or update a connection. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} connectionName The parameters supplied to the create or @@ -1343,11 +1373,13 @@ export interface ConnectionOperations { * * @reject {Error|ServiceError} - The error object. */ - createOrUpdateWithHttpOperationResponse(automationAccountName: string, connectionName: string, parameters: models.ConnectionCreateOrUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + createOrUpdateWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, connectionName: string, parameters: models.ConnectionCreateOrUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Create or update a connection. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} connectionName The parameters supplied to the create or @@ -1397,14 +1429,16 @@ export interface ConnectionOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - createOrUpdate(automationAccountName: string, connectionName: string, parameters: models.ConnectionCreateOrUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - createOrUpdate(automationAccountName: string, connectionName: string, parameters: models.ConnectionCreateOrUpdateParameters, callback: ServiceCallback): void; - createOrUpdate(automationAccountName: string, connectionName: string, parameters: models.ConnectionCreateOrUpdateParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, automationAccountName: string, connectionName: string, parameters: models.ConnectionCreateOrUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + createOrUpdate(resourceGroupName: string, automationAccountName: string, connectionName: string, parameters: models.ConnectionCreateOrUpdateParameters, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, automationAccountName: string, connectionName: string, parameters: models.ConnectionCreateOrUpdateParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Update a connection. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} connectionName The parameters supplied to the update a @@ -1432,11 +1466,13 @@ export interface ConnectionOperations { * * @reject {Error|ServiceError} - The error object. */ - updateWithHttpOperationResponse(automationAccountName: string, connectionName: string, parameters: models.ConnectionUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + updateWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, connectionName: string, parameters: models.ConnectionUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Update a connection. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} connectionName The parameters supplied to the update a @@ -1480,14 +1516,16 @@ export interface ConnectionOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - update(automationAccountName: string, connectionName: string, parameters: models.ConnectionUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - update(automationAccountName: string, connectionName: string, parameters: models.ConnectionUpdateParameters, callback: ServiceCallback): void; - update(automationAccountName: string, connectionName: string, parameters: models.ConnectionUpdateParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + update(resourceGroupName: string, automationAccountName: string, connectionName: string, parameters: models.ConnectionUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + update(resourceGroupName: string, automationAccountName: string, connectionName: string, parameters: models.ConnectionUpdateParameters, callback: ServiceCallback): void; + update(resourceGroupName: string, automationAccountName: string, connectionName: string, parameters: models.ConnectionUpdateParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Retrieve a list of connections. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -1501,11 +1539,13 @@ export interface ConnectionOperations { * * @reject {Error|ServiceError} - The error object. */ - listByAutomationAccountWithHttpOperationResponse(automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listByAutomationAccountWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieve a list of connections. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -1535,9 +1575,9 @@ export interface ConnectionOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listByAutomationAccount(automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listByAutomationAccount(automationAccountName: string, callback: ServiceCallback): void; - listByAutomationAccount(automationAccountName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listByAutomationAccount(resourceGroupName: string, automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listByAutomationAccount(resourceGroupName: string, automationAccountName: string, callback: ServiceCallback): void; + listByAutomationAccount(resourceGroupName: string, automationAccountName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -1609,6 +1649,8 @@ export interface ConnectionTypeOperations { /** * Delete the connectiontype. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} connectionTypeName The name of connectiontype. @@ -1624,11 +1666,13 @@ export interface ConnectionTypeOperations { * * @reject {Error|ServiceError} - The error object. */ - deleteMethodWithHttpOperationResponse(automationAccountName: string, connectionTypeName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + deleteMethodWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, connectionTypeName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Delete the connectiontype. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} connectionTypeName The name of connectiontype. @@ -1659,14 +1703,16 @@ export interface ConnectionTypeOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(automationAccountName: string, connectionTypeName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - deleteMethod(automationAccountName: string, connectionTypeName: string, callback: ServiceCallback): void; - deleteMethod(automationAccountName: string, connectionTypeName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, automationAccountName: string, connectionTypeName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + deleteMethod(resourceGroupName: string, automationAccountName: string, connectionTypeName: string, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, automationAccountName: string, connectionTypeName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Retrieve the connectiontype identified by connectiontype name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} connectionTypeName The name of connectiontype. @@ -1682,11 +1728,13 @@ export interface ConnectionTypeOperations { * * @reject {Error|ServiceError} - The error object. */ - getWithHttpOperationResponse(automationAccountName: string, connectionTypeName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, connectionTypeName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieve the connectiontype identified by connectiontype name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} connectionTypeName The name of connectiontype. @@ -1718,14 +1766,16 @@ export interface ConnectionTypeOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - get(automationAccountName: string, connectionTypeName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - get(automationAccountName: string, connectionTypeName: string, callback: ServiceCallback): void; - get(automationAccountName: string, connectionTypeName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + get(resourceGroupName: string, automationAccountName: string, connectionTypeName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + get(resourceGroupName: string, automationAccountName: string, connectionTypeName: string, callback: ServiceCallback): void; + get(resourceGroupName: string, automationAccountName: string, connectionTypeName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Create a connectiontype. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} connectionTypeName The parameters supplied to the create or @@ -1754,11 +1804,13 @@ export interface ConnectionTypeOperations { * * @reject {Error|ServiceError} - The error object. */ - createOrUpdateWithHttpOperationResponse(automationAccountName: string, connectionTypeName: string, parameters: models.ConnectionTypeCreateOrUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + createOrUpdateWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, connectionTypeName: string, parameters: models.ConnectionTypeCreateOrUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Create a connectiontype. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} connectionTypeName The parameters supplied to the create or @@ -1803,14 +1855,16 @@ export interface ConnectionTypeOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - createOrUpdate(automationAccountName: string, connectionTypeName: string, parameters: models.ConnectionTypeCreateOrUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - createOrUpdate(automationAccountName: string, connectionTypeName: string, parameters: models.ConnectionTypeCreateOrUpdateParameters, callback: ServiceCallback): void; - createOrUpdate(automationAccountName: string, connectionTypeName: string, parameters: models.ConnectionTypeCreateOrUpdateParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, automationAccountName: string, connectionTypeName: string, parameters: models.ConnectionTypeCreateOrUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + createOrUpdate(resourceGroupName: string, automationAccountName: string, connectionTypeName: string, parameters: models.ConnectionTypeCreateOrUpdateParameters, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, automationAccountName: string, connectionTypeName: string, parameters: models.ConnectionTypeCreateOrUpdateParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Retrieve a list of connectiontypes. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -1824,11 +1878,13 @@ export interface ConnectionTypeOperations { * * @reject {Error|ServiceError} - The error object. */ - listByAutomationAccountWithHttpOperationResponse(automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listByAutomationAccountWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieve a list of connectiontypes. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -1859,9 +1915,9 @@ export interface ConnectionTypeOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listByAutomationAccount(automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listByAutomationAccount(automationAccountName: string, callback: ServiceCallback): void; - listByAutomationAccount(automationAccountName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listByAutomationAccount(resourceGroupName: string, automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listByAutomationAccount(resourceGroupName: string, automationAccountName: string, callback: ServiceCallback): void; + listByAutomationAccount(resourceGroupName: string, automationAccountName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -1934,6 +1990,8 @@ export interface CredentialOperations { /** * Delete the credential. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} credentialName The name of credential. @@ -1949,11 +2007,13 @@ export interface CredentialOperations { * * @reject {Error|ServiceError} - The error object. */ - deleteMethodWithHttpOperationResponse(automationAccountName: string, credentialName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + deleteMethodWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, credentialName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Delete the credential. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} credentialName The name of credential. @@ -1984,14 +2044,16 @@ export interface CredentialOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(automationAccountName: string, credentialName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - deleteMethod(automationAccountName: string, credentialName: string, callback: ServiceCallback): void; - deleteMethod(automationAccountName: string, credentialName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, automationAccountName: string, credentialName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + deleteMethod(resourceGroupName: string, automationAccountName: string, credentialName: string, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, automationAccountName: string, credentialName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Retrieve the credential identified by credential name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} credentialName The name of credential. @@ -2007,11 +2069,13 @@ export interface CredentialOperations { * * @reject {Error|ServiceError} - The error object. */ - getWithHttpOperationResponse(automationAccountName: string, credentialName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, credentialName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieve the credential identified by credential name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} credentialName The name of credential. @@ -2043,14 +2107,16 @@ export interface CredentialOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - get(automationAccountName: string, credentialName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - get(automationAccountName: string, credentialName: string, callback: ServiceCallback): void; - get(automationAccountName: string, credentialName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + get(resourceGroupName: string, automationAccountName: string, credentialName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + get(resourceGroupName: string, automationAccountName: string, credentialName: string, callback: ServiceCallback): void; + get(resourceGroupName: string, automationAccountName: string, credentialName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Create a credential. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} credentialName The parameters supplied to the create or @@ -2081,11 +2147,13 @@ export interface CredentialOperations { * * @reject {Error|ServiceError} - The error object. */ - createOrUpdateWithHttpOperationResponse(automationAccountName: string, credentialName: string, parameters: models.CredentialCreateOrUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + createOrUpdateWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, credentialName: string, parameters: models.CredentialCreateOrUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Create a credential. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} credentialName The parameters supplied to the create or @@ -2132,14 +2200,16 @@ export interface CredentialOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - createOrUpdate(automationAccountName: string, credentialName: string, parameters: models.CredentialCreateOrUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - createOrUpdate(automationAccountName: string, credentialName: string, parameters: models.CredentialCreateOrUpdateParameters, callback: ServiceCallback): void; - createOrUpdate(automationAccountName: string, credentialName: string, parameters: models.CredentialCreateOrUpdateParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, automationAccountName: string, credentialName: string, parameters: models.CredentialCreateOrUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + createOrUpdate(resourceGroupName: string, automationAccountName: string, credentialName: string, parameters: models.CredentialCreateOrUpdateParameters, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, automationAccountName: string, credentialName: string, parameters: models.CredentialCreateOrUpdateParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Update a credential. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} credentialName The parameters supplied to the Update @@ -2170,11 +2240,13 @@ export interface CredentialOperations { * * @reject {Error|ServiceError} - The error object. */ - updateWithHttpOperationResponse(automationAccountName: string, credentialName: string, parameters: models.CredentialUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + updateWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, credentialName: string, parameters: models.CredentialUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Update a credential. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} credentialName The parameters supplied to the Update @@ -2221,14 +2293,16 @@ export interface CredentialOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - update(automationAccountName: string, credentialName: string, parameters: models.CredentialUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - update(automationAccountName: string, credentialName: string, parameters: models.CredentialUpdateParameters, callback: ServiceCallback): void; - update(automationAccountName: string, credentialName: string, parameters: models.CredentialUpdateParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + update(resourceGroupName: string, automationAccountName: string, credentialName: string, parameters: models.CredentialUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + update(resourceGroupName: string, automationAccountName: string, credentialName: string, parameters: models.CredentialUpdateParameters, callback: ServiceCallback): void; + update(resourceGroupName: string, automationAccountName: string, credentialName: string, parameters: models.CredentialUpdateParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Retrieve a list of credentials. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -2242,11 +2316,13 @@ export interface CredentialOperations { * * @reject {Error|ServiceError} - The error object. */ - listByAutomationAccountWithHttpOperationResponse(automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listByAutomationAccountWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieve a list of credentials. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -2276,9 +2352,9 @@ export interface CredentialOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listByAutomationAccount(automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listByAutomationAccount(automationAccountName: string, callback: ServiceCallback): void; - listByAutomationAccount(automationAccountName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listByAutomationAccount(resourceGroupName: string, automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listByAutomationAccount(resourceGroupName: string, automationAccountName: string, callback: ServiceCallback): void; + listByAutomationAccount(resourceGroupName: string, automationAccountName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -2350,6 +2426,8 @@ export interface DscCompilationJobOperations { /** * Creates the Dsc compilation job of the configuration. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {uuid} compilationJobId The the DSC configuration Id. @@ -2387,11 +2465,13 @@ export interface DscCompilationJobOperations { * * @reject {Error|ServiceError} - The error object. */ - createWithHttpOperationResponse(automationAccountName: string, compilationJobId: string, parameters: models.DscCompilationJobCreateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + createWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, compilationJobId: string, parameters: models.DscCompilationJobCreateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Creates the Dsc compilation job of the configuration. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {uuid} compilationJobId The the DSC configuration Id. @@ -2445,14 +2525,16 @@ export interface DscCompilationJobOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - create(automationAccountName: string, compilationJobId: string, parameters: models.DscCompilationJobCreateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - create(automationAccountName: string, compilationJobId: string, parameters: models.DscCompilationJobCreateParameters, callback: ServiceCallback): void; - create(automationAccountName: string, compilationJobId: string, parameters: models.DscCompilationJobCreateParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + create(resourceGroupName: string, automationAccountName: string, compilationJobId: string, parameters: models.DscCompilationJobCreateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + create(resourceGroupName: string, automationAccountName: string, compilationJobId: string, parameters: models.DscCompilationJobCreateParameters, callback: ServiceCallback): void; + create(resourceGroupName: string, automationAccountName: string, compilationJobId: string, parameters: models.DscCompilationJobCreateParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Retrieve the Dsc configuration compilation job identified by job id. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {uuid} compilationJobId The Dsc configuration compilation job id. @@ -2468,11 +2550,13 @@ export interface DscCompilationJobOperations { * * @reject {Error|ServiceError} - The error object. */ - getWithHttpOperationResponse(automationAccountName: string, compilationJobId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, compilationJobId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieve the Dsc configuration compilation job identified by job id. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {uuid} compilationJobId The Dsc configuration compilation job id. @@ -2504,14 +2588,16 @@ export interface DscCompilationJobOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - get(automationAccountName: string, compilationJobId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - get(automationAccountName: string, compilationJobId: string, callback: ServiceCallback): void; - get(automationAccountName: string, compilationJobId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + get(resourceGroupName: string, automationAccountName: string, compilationJobId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + get(resourceGroupName: string, automationAccountName: string, compilationJobId: string, callback: ServiceCallback): void; + get(resourceGroupName: string, automationAccountName: string, compilationJobId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Retrieve a list of dsc compilation jobs. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -2527,11 +2613,13 @@ export interface DscCompilationJobOperations { * * @reject {Error|ServiceError} - The error object. */ - listByAutomationAccountWithHttpOperationResponse(automationAccountName: string, options?: { filter? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; + listByAutomationAccountWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, options?: { filter? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieve a list of dsc compilation jobs. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -2564,14 +2652,16 @@ export interface DscCompilationJobOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listByAutomationAccount(automationAccountName: string, options?: { filter? : string, customHeaders? : { [headerName: string]: string; } }): Promise; - listByAutomationAccount(automationAccountName: string, callback: ServiceCallback): void; - listByAutomationAccount(automationAccountName: string, options: { filter? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listByAutomationAccount(resourceGroupName: string, automationAccountName: string, options?: { filter? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + listByAutomationAccount(resourceGroupName: string, automationAccountName: string, callback: ServiceCallback): void; + listByAutomationAccount(resourceGroupName: string, automationAccountName: string, options: { filter? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Retrieve the job stream identified by job stream id. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {uuid} jobId The job id. @@ -2589,11 +2679,13 @@ export interface DscCompilationJobOperations { * * @reject {Error|ServiceError} - The error object. */ - getStreamWithHttpOperationResponse(automationAccountName: string, jobId: string, jobStreamId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getStreamWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, jobId: string, jobStreamId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieve the job stream identified by job stream id. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {uuid} jobId The job id. @@ -2627,9 +2719,9 @@ export interface DscCompilationJobOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - getStream(automationAccountName: string, jobId: string, jobStreamId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - getStream(automationAccountName: string, jobId: string, jobStreamId: string, callback: ServiceCallback): void; - getStream(automationAccountName: string, jobId: string, jobStreamId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + getStream(resourceGroupName: string, automationAccountName: string, jobId: string, jobStreamId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + getStream(resourceGroupName: string, automationAccountName: string, jobId: string, jobStreamId: string, callback: ServiceCallback): void; + getStream(resourceGroupName: string, automationAccountName: string, jobId: string, jobStreamId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -2702,6 +2794,8 @@ export interface DscCompilationJobStream { /** * Retrieve all the job streams for the compilation Job. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {uuid} jobId The job id. @@ -2717,11 +2811,13 @@ export interface DscCompilationJobStream { * * @reject {Error|ServiceError} - The error object. */ - listByJobWithHttpOperationResponse(automationAccountName: string, jobId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listByJobWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, jobId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieve all the job streams for the compilation Job. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {uuid} jobId The job id. @@ -2753,9 +2849,9 @@ export interface DscCompilationJobStream { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listByJob(automationAccountName: string, jobId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listByJob(automationAccountName: string, jobId: string, callback: ServiceCallback): void; - listByJob(automationAccountName: string, jobId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listByJob(resourceGroupName: string, automationAccountName: string, jobId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listByJob(resourceGroupName: string, automationAccountName: string, jobId: string, callback: ServiceCallback): void; + listByJob(resourceGroupName: string, automationAccountName: string, jobId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; } /** @@ -2770,6 +2866,8 @@ export interface DscConfigurationOperations { /** * Delete the dsc configuration identified by configuration name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} configurationName The configuration name. @@ -2785,11 +2883,13 @@ export interface DscConfigurationOperations { * * @reject {Error|ServiceError} - The error object. */ - deleteMethodWithHttpOperationResponse(automationAccountName: string, configurationName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + deleteMethodWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, configurationName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Delete the dsc configuration identified by configuration name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} configurationName The configuration name. @@ -2820,14 +2920,16 @@ export interface DscConfigurationOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(automationAccountName: string, configurationName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - deleteMethod(automationAccountName: string, configurationName: string, callback: ServiceCallback): void; - deleteMethod(automationAccountName: string, configurationName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, automationAccountName: string, configurationName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + deleteMethod(resourceGroupName: string, automationAccountName: string, configurationName: string, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, automationAccountName: string, configurationName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Retrieve the configuration identified by configuration name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} configurationName The configuration name. @@ -2843,11 +2945,13 @@ export interface DscConfigurationOperations { * * @reject {Error|ServiceError} - The error object. */ - getWithHttpOperationResponse(automationAccountName: string, configurationName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, configurationName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieve the configuration identified by configuration name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} configurationName The configuration name. @@ -2879,14 +2983,16 @@ export interface DscConfigurationOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - get(automationAccountName: string, configurationName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - get(automationAccountName: string, configurationName: string, callback: ServiceCallback): void; - get(automationAccountName: string, configurationName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + get(resourceGroupName: string, automationAccountName: string, configurationName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + get(resourceGroupName: string, automationAccountName: string, configurationName: string, callback: ServiceCallback): void; + get(resourceGroupName: string, automationAccountName: string, configurationName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Create the configuration identified by configuration name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} configurationName The create or update parameters for @@ -2943,11 +3049,13 @@ export interface DscConfigurationOperations { * * @reject {Error|ServiceError} - The error object. */ - createOrUpdateWithHttpOperationResponse(automationAccountName: string, configurationName: string, parameters: models.DscConfigurationCreateOrUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + createOrUpdateWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, configurationName: string, parameters: models.DscConfigurationCreateOrUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Create the configuration identified by configuration name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} configurationName The create or update parameters for @@ -3020,14 +3128,16 @@ export interface DscConfigurationOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - createOrUpdate(automationAccountName: string, configurationName: string, parameters: models.DscConfigurationCreateOrUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - createOrUpdate(automationAccountName: string, configurationName: string, parameters: models.DscConfigurationCreateOrUpdateParameters, callback: ServiceCallback): void; - createOrUpdate(automationAccountName: string, configurationName: string, parameters: models.DscConfigurationCreateOrUpdateParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, automationAccountName: string, configurationName: string, parameters: models.DscConfigurationCreateOrUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + createOrUpdate(resourceGroupName: string, automationAccountName: string, configurationName: string, parameters: models.DscConfigurationCreateOrUpdateParameters, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, automationAccountName: string, configurationName: string, parameters: models.DscConfigurationCreateOrUpdateParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Retrieve the configuration script identified by configuration name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} configurationName The configuration name. @@ -3043,11 +3153,13 @@ export interface DscConfigurationOperations { * * @reject {Error|ServiceError} - The error object. */ - getContentWithHttpOperationResponse(automationAccountName: string, configurationName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getContentWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, configurationName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieve the configuration script identified by configuration name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} configurationName The configuration name. @@ -3078,14 +3190,16 @@ export interface DscConfigurationOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - getContent(automationAccountName: string, configurationName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - getContent(automationAccountName: string, configurationName: string, callback: ServiceCallback): void; - getContent(automationAccountName: string, configurationName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + getContent(resourceGroupName: string, automationAccountName: string, configurationName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + getContent(resourceGroupName: string, automationAccountName: string, configurationName: string, callback: ServiceCallback): void; + getContent(resourceGroupName: string, automationAccountName: string, configurationName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Retrieve a list of configurations. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -3099,11 +3213,13 @@ export interface DscConfigurationOperations { * * @reject {Error|ServiceError} - The error object. */ - listByAutomationAccountWithHttpOperationResponse(automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listByAutomationAccountWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieve a list of configurations. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -3134,9 +3250,9 @@ export interface DscConfigurationOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listByAutomationAccount(automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listByAutomationAccount(automationAccountName: string, callback: ServiceCallback): void; - listByAutomationAccount(automationAccountName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listByAutomationAccount(resourceGroupName: string, automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listByAutomationAccount(resourceGroupName: string, automationAccountName: string, callback: ServiceCallback): void; + listByAutomationAccount(resourceGroupName: string, automationAccountName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -3209,6 +3325,8 @@ export interface AgentRegistrationInformation { /** * Retrieve the automation agent registration information. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -3222,11 +3340,13 @@ export interface AgentRegistrationInformation { * * @reject {Error|ServiceError} - The error object. */ - getWithHttpOperationResponse(automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieve the automation agent registration information. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -3256,14 +3376,16 @@ export interface AgentRegistrationInformation { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - get(automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - get(automationAccountName: string, callback: ServiceCallback): void; - get(automationAccountName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + get(resourceGroupName: string, automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + get(resourceGroupName: string, automationAccountName: string, callback: ServiceCallback): void; + get(resourceGroupName: string, automationAccountName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Regenerate a primary or secondary agent registration key * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} parameters The name of the agent registration key to be @@ -3291,11 +3413,13 @@ export interface AgentRegistrationInformation { * * @reject {Error|ServiceError} - The error object. */ - regenerateKeyWithHttpOperationResponse(automationAccountName: string, parameters: models.AgentRegistrationRegenerateKeyParameter, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + regenerateKeyWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, parameters: models.AgentRegistrationRegenerateKeyParameter, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Regenerate a primary or secondary agent registration key * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} parameters The name of the agent registration key to be @@ -3339,9 +3463,9 @@ export interface AgentRegistrationInformation { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - regenerateKey(automationAccountName: string, parameters: models.AgentRegistrationRegenerateKeyParameter, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - regenerateKey(automationAccountName: string, parameters: models.AgentRegistrationRegenerateKeyParameter, callback: ServiceCallback): void; - regenerateKey(automationAccountName: string, parameters: models.AgentRegistrationRegenerateKeyParameter, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + regenerateKey(resourceGroupName: string, automationAccountName: string, parameters: models.AgentRegistrationRegenerateKeyParameter, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + regenerateKey(resourceGroupName: string, automationAccountName: string, parameters: models.AgentRegistrationRegenerateKeyParameter, callback: ServiceCallback): void; + regenerateKey(resourceGroupName: string, automationAccountName: string, parameters: models.AgentRegistrationRegenerateKeyParameter, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; } /** @@ -3356,6 +3480,8 @@ export interface DscNodeOperations { /** * Delete the dsc node identified by node id. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName Automation account name. * * @param {string} nodeId The node id. @@ -3371,11 +3497,13 @@ export interface DscNodeOperations { * * @reject {Error|ServiceError} - The error object. */ - deleteMethodWithHttpOperationResponse(automationAccountName: string, nodeId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + deleteMethodWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, nodeId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Delete the dsc node identified by node id. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName Automation account name. * * @param {string} nodeId The node id. @@ -3407,14 +3535,16 @@ export interface DscNodeOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(automationAccountName: string, nodeId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - deleteMethod(automationAccountName: string, nodeId: string, callback: ServiceCallback): void; - deleteMethod(automationAccountName: string, nodeId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, automationAccountName: string, nodeId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + deleteMethod(resourceGroupName: string, automationAccountName: string, nodeId: string, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, automationAccountName: string, nodeId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Retrieve the dsc node identified by node id. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} nodeId The node id. @@ -3430,11 +3560,13 @@ export interface DscNodeOperations { * * @reject {Error|ServiceError} - The error object. */ - getWithHttpOperationResponse(automationAccountName: string, nodeId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, nodeId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieve the dsc node identified by node id. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} nodeId The node id. @@ -3466,14 +3598,16 @@ export interface DscNodeOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - get(automationAccountName: string, nodeId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - get(automationAccountName: string, nodeId: string, callback: ServiceCallback): void; - get(automationAccountName: string, nodeId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + get(resourceGroupName: string, automationAccountName: string, nodeId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + get(resourceGroupName: string, automationAccountName: string, nodeId: string, callback: ServiceCallback): void; + get(resourceGroupName: string, automationAccountName: string, nodeId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Update the dsc node. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} nodeId Parameters supplied to the update dsc node. @@ -3499,11 +3633,13 @@ export interface DscNodeOperations { * * @reject {Error|ServiceError} - The error object. */ - updateWithHttpOperationResponse(automationAccountName: string, nodeId: string, parameters: models.DscNodeUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + updateWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, nodeId: string, parameters: models.DscNodeUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Update the dsc node. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} nodeId Parameters supplied to the update dsc node. @@ -3545,14 +3681,16 @@ export interface DscNodeOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - update(automationAccountName: string, nodeId: string, parameters: models.DscNodeUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - update(automationAccountName: string, nodeId: string, parameters: models.DscNodeUpdateParameters, callback: ServiceCallback): void; - update(automationAccountName: string, nodeId: string, parameters: models.DscNodeUpdateParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + update(resourceGroupName: string, automationAccountName: string, nodeId: string, parameters: models.DscNodeUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + update(resourceGroupName: string, automationAccountName: string, nodeId: string, parameters: models.DscNodeUpdateParameters, callback: ServiceCallback): void; + update(resourceGroupName: string, automationAccountName: string, nodeId: string, parameters: models.DscNodeUpdateParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Retrieve a list of dsc nodes. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -3568,11 +3706,13 @@ export interface DscNodeOperations { * * @reject {Error|ServiceError} - The error object. */ - listByAutomationAccountWithHttpOperationResponse(automationAccountName: string, options?: { filter? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; + listByAutomationAccountWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, options?: { filter? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieve a list of dsc nodes. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -3604,9 +3744,9 @@ export interface DscNodeOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listByAutomationAccount(automationAccountName: string, options?: { filter? : string, customHeaders? : { [headerName: string]: string; } }): Promise; - listByAutomationAccount(automationAccountName: string, callback: ServiceCallback): void; - listByAutomationAccount(automationAccountName: string, options: { filter? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listByAutomationAccount(resourceGroupName: string, automationAccountName: string, options?: { filter? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + listByAutomationAccount(resourceGroupName: string, automationAccountName: string, callback: ServiceCallback): void; + listByAutomationAccount(resourceGroupName: string, automationAccountName: string, options: { filter? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -3678,6 +3818,8 @@ export interface NodeReports { /** * Retrieve the Dsc node report list by node id. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} nodeId The parameters supplied to the list operation. @@ -3695,11 +3837,13 @@ export interface NodeReports { * * @reject {Error|ServiceError} - The error object. */ - listByNodeWithHttpOperationResponse(automationAccountName: string, nodeId: string, options?: { filter? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; + listByNodeWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, nodeId: string, options?: { filter? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieve the Dsc node report list by node id. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} nodeId The parameters supplied to the list operation. @@ -3734,14 +3878,16 @@ export interface NodeReports { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listByNode(automationAccountName: string, nodeId: string, options?: { filter? : string, customHeaders? : { [headerName: string]: string; } }): Promise; - listByNode(automationAccountName: string, nodeId: string, callback: ServiceCallback): void; - listByNode(automationAccountName: string, nodeId: string, options: { filter? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listByNode(resourceGroupName: string, automationAccountName: string, nodeId: string, options?: { filter? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + listByNode(resourceGroupName: string, automationAccountName: string, nodeId: string, callback: ServiceCallback): void; + listByNode(resourceGroupName: string, automationAccountName: string, nodeId: string, options: { filter? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Retrieve the Dsc node report data by node id and report id. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} nodeId The Dsc node id. @@ -3759,11 +3905,13 @@ export interface NodeReports { * * @reject {Error|ServiceError} - The error object. */ - getWithHttpOperationResponse(automationAccountName: string, nodeId: string, reportId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, nodeId: string, reportId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieve the Dsc node report data by node id and report id. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} nodeId The Dsc node id. @@ -3797,14 +3945,16 @@ export interface NodeReports { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - get(automationAccountName: string, nodeId: string, reportId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - get(automationAccountName: string, nodeId: string, reportId: string, callback: ServiceCallback): void; - get(automationAccountName: string, nodeId: string, reportId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + get(resourceGroupName: string, automationAccountName: string, nodeId: string, reportId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + get(resourceGroupName: string, automationAccountName: string, nodeId: string, reportId: string, callback: ServiceCallback): void; + get(resourceGroupName: string, automationAccountName: string, nodeId: string, reportId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Retrieve the Dsc node reports by node id and report id. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} nodeId The Dsc node id. @@ -3822,11 +3972,13 @@ export interface NodeReports { * * @reject {Error|ServiceError} - The error object. */ - getContentWithHttpOperationResponse(automationAccountName: string, nodeId: string, reportId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getContentWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, nodeId: string, reportId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieve the Dsc node reports by node id and report id. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} nodeId The Dsc node id. @@ -3859,9 +4011,9 @@ export interface NodeReports { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - getContent(automationAccountName: string, nodeId: string, reportId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - getContent(automationAccountName: string, nodeId: string, reportId: string, callback: ServiceCallback): void; - getContent(automationAccountName: string, nodeId: string, reportId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + getContent(resourceGroupName: string, automationAccountName: string, nodeId: string, reportId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + getContent(resourceGroupName: string, automationAccountName: string, nodeId: string, reportId: string, callback: ServiceCallback): void; + getContent(resourceGroupName: string, automationAccountName: string, nodeId: string, reportId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -3934,6 +4086,8 @@ export interface DscNodeConfigurationOperations { /** * Delete the Dsc node configurations by node configuration. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} nodeConfigurationName The Dsc node configuration name. @@ -3949,11 +4103,13 @@ export interface DscNodeConfigurationOperations { * * @reject {Error|ServiceError} - The error object. */ - deleteMethodWithHttpOperationResponse(automationAccountName: string, nodeConfigurationName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + deleteMethodWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, nodeConfigurationName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Delete the Dsc node configurations by node configuration. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} nodeConfigurationName The Dsc node configuration name. @@ -3984,14 +4140,16 @@ export interface DscNodeConfigurationOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(automationAccountName: string, nodeConfigurationName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - deleteMethod(automationAccountName: string, nodeConfigurationName: string, callback: ServiceCallback): void; - deleteMethod(automationAccountName: string, nodeConfigurationName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, automationAccountName: string, nodeConfigurationName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + deleteMethod(resourceGroupName: string, automationAccountName: string, nodeConfigurationName: string, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, automationAccountName: string, nodeConfigurationName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Retrieve the Dsc node configurations by node configuration. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} nodeConfigurationName The Dsc node configuration name. @@ -4007,11 +4165,13 @@ export interface DscNodeConfigurationOperations { * * @reject {Error|ServiceError} - The error object. */ - getWithHttpOperationResponse(automationAccountName: string, nodeConfigurationName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, nodeConfigurationName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieve the Dsc node configurations by node configuration. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} nodeConfigurationName The Dsc node configuration name. @@ -4043,14 +4203,16 @@ export interface DscNodeConfigurationOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - get(automationAccountName: string, nodeConfigurationName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - get(automationAccountName: string, nodeConfigurationName: string, callback: ServiceCallback): void; - get(automationAccountName: string, nodeConfigurationName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + get(resourceGroupName: string, automationAccountName: string, nodeConfigurationName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + get(resourceGroupName: string, automationAccountName: string, nodeConfigurationName: string, callback: ServiceCallback): void; + get(resourceGroupName: string, automationAccountName: string, nodeConfigurationName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Create the node configuration identified by node configuration name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} nodeConfigurationName The create or update parameters for @@ -4100,11 +4262,13 @@ export interface DscNodeConfigurationOperations { * * @reject {Error|ServiceError} - The error object. */ - createOrUpdateWithHttpOperationResponse(automationAccountName: string, nodeConfigurationName: string, parameters: models.DscNodeConfigurationCreateOrUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + createOrUpdateWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, nodeConfigurationName: string, parameters: models.DscNodeConfigurationCreateOrUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Create the node configuration identified by node configuration name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} nodeConfigurationName The create or update parameters for @@ -4170,14 +4334,16 @@ export interface DscNodeConfigurationOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - createOrUpdate(automationAccountName: string, nodeConfigurationName: string, parameters: models.DscNodeConfigurationCreateOrUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - createOrUpdate(automationAccountName: string, nodeConfigurationName: string, parameters: models.DscNodeConfigurationCreateOrUpdateParameters, callback: ServiceCallback): void; - createOrUpdate(automationAccountName: string, nodeConfigurationName: string, parameters: models.DscNodeConfigurationCreateOrUpdateParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, automationAccountName: string, nodeConfigurationName: string, parameters: models.DscNodeConfigurationCreateOrUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + createOrUpdate(resourceGroupName: string, automationAccountName: string, nodeConfigurationName: string, parameters: models.DscNodeConfigurationCreateOrUpdateParameters, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, automationAccountName: string, nodeConfigurationName: string, parameters: models.DscNodeConfigurationCreateOrUpdateParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Retrieve a list of dsc node configurations. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -4193,11 +4359,13 @@ export interface DscNodeConfigurationOperations { * * @reject {Error|ServiceError} - The error object. */ - listByAutomationAccountWithHttpOperationResponse(automationAccountName: string, options?: { filter? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; + listByAutomationAccountWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, options?: { filter? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieve a list of dsc node configurations. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -4230,9 +4398,9 @@ export interface DscNodeConfigurationOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listByAutomationAccount(automationAccountName: string, options?: { filter? : string, customHeaders? : { [headerName: string]: string; } }): Promise; - listByAutomationAccount(automationAccountName: string, callback: ServiceCallback): void; - listByAutomationAccount(automationAccountName: string, options: { filter? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listByAutomationAccount(resourceGroupName: string, automationAccountName: string, options?: { filter? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + listByAutomationAccount(resourceGroupName: string, automationAccountName: string, callback: ServiceCallback): void; + listByAutomationAccount(resourceGroupName: string, automationAccountName: string, options: { filter? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -4305,6 +4473,8 @@ export interface HybridRunbookWorkerGroupOperations { /** * Delete a hybrid runbook worker group. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName Automation account name. * * @param {string} hybridRunbookWorkerGroupName The hybrid runbook worker group @@ -4321,11 +4491,13 @@ export interface HybridRunbookWorkerGroupOperations { * * @reject {Error|ServiceError} - The error object. */ - deleteMethodWithHttpOperationResponse(automationAccountName: string, hybridRunbookWorkerGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + deleteMethodWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, hybridRunbookWorkerGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Delete a hybrid runbook worker group. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName Automation account name. * * @param {string} hybridRunbookWorkerGroupName The hybrid runbook worker group @@ -4357,14 +4529,16 @@ export interface HybridRunbookWorkerGroupOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(automationAccountName: string, hybridRunbookWorkerGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - deleteMethod(automationAccountName: string, hybridRunbookWorkerGroupName: string, callback: ServiceCallback): void; - deleteMethod(automationAccountName: string, hybridRunbookWorkerGroupName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, automationAccountName: string, hybridRunbookWorkerGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + deleteMethod(resourceGroupName: string, automationAccountName: string, hybridRunbookWorkerGroupName: string, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, automationAccountName: string, hybridRunbookWorkerGroupName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Retrieve a hybrid runbook worker group. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} hybridRunbookWorkerGroupName The hybrid runbook worker group @@ -4381,11 +4555,13 @@ export interface HybridRunbookWorkerGroupOperations { * * @reject {Error|ServiceError} - The error object. */ - getWithHttpOperationResponse(automationAccountName: string, hybridRunbookWorkerGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, hybridRunbookWorkerGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieve a hybrid runbook worker group. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} hybridRunbookWorkerGroupName The hybrid runbook worker group @@ -4419,14 +4595,16 @@ export interface HybridRunbookWorkerGroupOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - get(automationAccountName: string, hybridRunbookWorkerGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - get(automationAccountName: string, hybridRunbookWorkerGroupName: string, callback: ServiceCallback): void; - get(automationAccountName: string, hybridRunbookWorkerGroupName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + get(resourceGroupName: string, automationAccountName: string, hybridRunbookWorkerGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + get(resourceGroupName: string, automationAccountName: string, hybridRunbookWorkerGroupName: string, callback: ServiceCallback): void; + get(resourceGroupName: string, automationAccountName: string, hybridRunbookWorkerGroupName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Update a hybrid runbook worker group. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} hybridRunbookWorkerGroupName The hybrid runbook worker group @@ -4451,11 +4629,13 @@ export interface HybridRunbookWorkerGroupOperations { * * @reject {Error|ServiceError} - The error object. */ - updateWithHttpOperationResponse(automationAccountName: string, hybridRunbookWorkerGroupName: string, parameters: models.HybridRunbookWorkerGroupUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + updateWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, hybridRunbookWorkerGroupName: string, parameters: models.HybridRunbookWorkerGroupUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Update a hybrid runbook worker group. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} hybridRunbookWorkerGroupName The hybrid runbook worker group @@ -4497,14 +4677,16 @@ export interface HybridRunbookWorkerGroupOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - update(automationAccountName: string, hybridRunbookWorkerGroupName: string, parameters: models.HybridRunbookWorkerGroupUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - update(automationAccountName: string, hybridRunbookWorkerGroupName: string, parameters: models.HybridRunbookWorkerGroupUpdateParameters, callback: ServiceCallback): void; - update(automationAccountName: string, hybridRunbookWorkerGroupName: string, parameters: models.HybridRunbookWorkerGroupUpdateParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + update(resourceGroupName: string, automationAccountName: string, hybridRunbookWorkerGroupName: string, parameters: models.HybridRunbookWorkerGroupUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + update(resourceGroupName: string, automationAccountName: string, hybridRunbookWorkerGroupName: string, parameters: models.HybridRunbookWorkerGroupUpdateParameters, callback: ServiceCallback): void; + update(resourceGroupName: string, automationAccountName: string, hybridRunbookWorkerGroupName: string, parameters: models.HybridRunbookWorkerGroupUpdateParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Retrieve a list of hybrid runbook worker groups. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -4518,11 +4700,13 @@ export interface HybridRunbookWorkerGroupOperations { * * @reject {Error|ServiceError} - The error object. */ - listByAutomationAccountWithHttpOperationResponse(automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listByAutomationAccountWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieve a list of hybrid runbook worker groups. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -4553,9 +4737,9 @@ export interface HybridRunbookWorkerGroupOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listByAutomationAccount(automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listByAutomationAccount(automationAccountName: string, callback: ServiceCallback): void; - listByAutomationAccount(automationAccountName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listByAutomationAccount(resourceGroupName: string, automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listByAutomationAccount(resourceGroupName: string, automationAccountName: string, callback: ServiceCallback): void; + listByAutomationAccount(resourceGroupName: string, automationAccountName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -4628,6 +4812,8 @@ export interface JobScheduleOperations { /** * Delete the job schedule identified by job schedule name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {uuid} jobScheduleId The job schedule name. @@ -4643,11 +4829,13 @@ export interface JobScheduleOperations { * * @reject {Error|ServiceError} - The error object. */ - deleteMethodWithHttpOperationResponse(automationAccountName: string, jobScheduleId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + deleteMethodWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, jobScheduleId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Delete the job schedule identified by job schedule name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {uuid} jobScheduleId The job schedule name. @@ -4678,14 +4866,16 @@ export interface JobScheduleOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(automationAccountName: string, jobScheduleId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - deleteMethod(automationAccountName: string, jobScheduleId: string, callback: ServiceCallback): void; - deleteMethod(automationAccountName: string, jobScheduleId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, automationAccountName: string, jobScheduleId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + deleteMethod(resourceGroupName: string, automationAccountName: string, jobScheduleId: string, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, automationAccountName: string, jobScheduleId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Retrieve the job schedule identified by job schedule name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {uuid} jobScheduleId The job schedule name. @@ -4701,11 +4891,13 @@ export interface JobScheduleOperations { * * @reject {Error|ServiceError} - The error object. */ - getWithHttpOperationResponse(automationAccountName: string, jobScheduleId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, jobScheduleId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieve the job schedule identified by job schedule name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {uuid} jobScheduleId The job schedule name. @@ -4737,14 +4929,16 @@ export interface JobScheduleOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - get(automationAccountName: string, jobScheduleId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - get(automationAccountName: string, jobScheduleId: string, callback: ServiceCallback): void; - get(automationAccountName: string, jobScheduleId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + get(resourceGroupName: string, automationAccountName: string, jobScheduleId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + get(resourceGroupName: string, automationAccountName: string, jobScheduleId: string, callback: ServiceCallback): void; + get(resourceGroupName: string, automationAccountName: string, jobScheduleId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Create a job schedule. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {uuid} jobScheduleId The job schedule name. @@ -4779,11 +4973,13 @@ export interface JobScheduleOperations { * * @reject {Error|ServiceError} - The error object. */ - createWithHttpOperationResponse(automationAccountName: string, jobScheduleId: string, parameters: models.JobScheduleCreateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + createWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, jobScheduleId: string, parameters: models.JobScheduleCreateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Create a job schedule. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {uuid} jobScheduleId The job schedule name. @@ -4834,14 +5030,16 @@ export interface JobScheduleOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - create(automationAccountName: string, jobScheduleId: string, parameters: models.JobScheduleCreateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - create(automationAccountName: string, jobScheduleId: string, parameters: models.JobScheduleCreateParameters, callback: ServiceCallback): void; - create(automationAccountName: string, jobScheduleId: string, parameters: models.JobScheduleCreateParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + create(resourceGroupName: string, automationAccountName: string, jobScheduleId: string, parameters: models.JobScheduleCreateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + create(resourceGroupName: string, automationAccountName: string, jobScheduleId: string, parameters: models.JobScheduleCreateParameters, callback: ServiceCallback): void; + create(resourceGroupName: string, automationAccountName: string, jobScheduleId: string, parameters: models.JobScheduleCreateParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Retrieve a list of job schedules. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -4855,11 +5053,13 @@ export interface JobScheduleOperations { * * @reject {Error|ServiceError} - The error object. */ - listByAutomationAccountWithHttpOperationResponse(automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listByAutomationAccountWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieve a list of job schedules. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -4889,9 +5089,9 @@ export interface JobScheduleOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listByAutomationAccount(automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listByAutomationAccount(automationAccountName: string, callback: ServiceCallback): void; - listByAutomationAccount(automationAccountName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listByAutomationAccount(resourceGroupName: string, automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listByAutomationAccount(resourceGroupName: string, automationAccountName: string, callback: ServiceCallback): void; + listByAutomationAccount(resourceGroupName: string, automationAccountName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -4963,6 +5163,8 @@ export interface LinkedWorkspaceOperations { /** * Retrieve the linked workspace for the account id. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -4976,11 +5178,13 @@ export interface LinkedWorkspaceOperations { * * @reject {Error|ServiceError} - The error object. */ - getWithHttpOperationResponse(automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieve the linked workspace for the account id. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -5010,9 +5214,9 @@ export interface LinkedWorkspaceOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - get(automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - get(automationAccountName: string, callback: ServiceCallback): void; - get(automationAccountName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + get(resourceGroupName: string, automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + get(resourceGroupName: string, automationAccountName: string, callback: ServiceCallback): void; + get(resourceGroupName: string, automationAccountName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; } /** @@ -5028,6 +5232,8 @@ export interface ActivityOperations { * Retrieve the activity in the module identified by module name and activity * name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} moduleName The name of module. @@ -5045,12 +5251,14 @@ export interface ActivityOperations { * * @reject {Error|ServiceError} - The error object. */ - getWithHttpOperationResponse(automationAccountName: string, moduleName: string, activityName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, moduleName: string, activityName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieve the activity in the module identified by module name and activity * name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} moduleName The name of module. @@ -5084,14 +5292,16 @@ export interface ActivityOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - get(automationAccountName: string, moduleName: string, activityName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - get(automationAccountName: string, moduleName: string, activityName: string, callback: ServiceCallback): void; - get(automationAccountName: string, moduleName: string, activityName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + get(resourceGroupName: string, automationAccountName: string, moduleName: string, activityName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + get(resourceGroupName: string, automationAccountName: string, moduleName: string, activityName: string, callback: ServiceCallback): void; + get(resourceGroupName: string, automationAccountName: string, moduleName: string, activityName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Retrieve a list of activities in the module identified by module name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} moduleName The name of module. @@ -5107,11 +5317,13 @@ export interface ActivityOperations { * * @reject {Error|ServiceError} - The error object. */ - listByModuleWithHttpOperationResponse(automationAccountName: string, moduleName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listByModuleWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, moduleName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieve a list of activities in the module identified by module name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} moduleName The name of module. @@ -5143,9 +5355,9 @@ export interface ActivityOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listByModule(automationAccountName: string, moduleName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listByModule(automationAccountName: string, moduleName: string, callback: ServiceCallback): void; - listByModule(automationAccountName: string, moduleName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listByModule(resourceGroupName: string, automationAccountName: string, moduleName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listByModule(resourceGroupName: string, automationAccountName: string, moduleName: string, callback: ServiceCallback): void; + listByModule(resourceGroupName: string, automationAccountName: string, moduleName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -5217,6 +5429,8 @@ export interface ModuleOperations { /** * Delete the module by name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} moduleName The module name. @@ -5232,11 +5446,13 @@ export interface ModuleOperations { * * @reject {Error|ServiceError} - The error object. */ - deleteMethodWithHttpOperationResponse(automationAccountName: string, moduleName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + deleteMethodWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, moduleName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Delete the module by name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} moduleName The module name. @@ -5267,14 +5483,16 @@ export interface ModuleOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(automationAccountName: string, moduleName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - deleteMethod(automationAccountName: string, moduleName: string, callback: ServiceCallback): void; - deleteMethod(automationAccountName: string, moduleName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, automationAccountName: string, moduleName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + deleteMethod(resourceGroupName: string, automationAccountName: string, moduleName: string, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, automationAccountName: string, moduleName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Retrieve the module identified by module name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} moduleName The module name. @@ -5290,11 +5508,13 @@ export interface ModuleOperations { * * @reject {Error|ServiceError} - The error object. */ - getWithHttpOperationResponse(automationAccountName: string, moduleName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, moduleName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieve the module identified by module name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} moduleName The module name. @@ -5326,14 +5546,16 @@ export interface ModuleOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - get(automationAccountName: string, moduleName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - get(automationAccountName: string, moduleName: string, callback: ServiceCallback): void; - get(automationAccountName: string, moduleName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + get(resourceGroupName: string, automationAccountName: string, moduleName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + get(resourceGroupName: string, automationAccountName: string, moduleName: string, callback: ServiceCallback): void; + get(resourceGroupName: string, automationAccountName: string, moduleName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Create or Update the module identified by module name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} moduleName The name of module. @@ -5375,11 +5597,13 @@ export interface ModuleOperations { * * @reject {Error|ServiceError} - The error object. */ - createOrUpdateWithHttpOperationResponse(automationAccountName: string, moduleName: string, parameters: models.ModuleCreateOrUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + createOrUpdateWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, moduleName: string, parameters: models.ModuleCreateOrUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Create or Update the module identified by module name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} moduleName The name of module. @@ -5437,14 +5661,16 @@ export interface ModuleOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - createOrUpdate(automationAccountName: string, moduleName: string, parameters: models.ModuleCreateOrUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - createOrUpdate(automationAccountName: string, moduleName: string, parameters: models.ModuleCreateOrUpdateParameters, callback: ServiceCallback): void; - createOrUpdate(automationAccountName: string, moduleName: string, parameters: models.ModuleCreateOrUpdateParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, automationAccountName: string, moduleName: string, parameters: models.ModuleCreateOrUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + createOrUpdate(resourceGroupName: string, automationAccountName: string, moduleName: string, parameters: models.ModuleCreateOrUpdateParameters, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, automationAccountName: string, moduleName: string, parameters: models.ModuleCreateOrUpdateParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Update the module identified by module name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} moduleName The name of module. @@ -5487,11 +5713,13 @@ export interface ModuleOperations { * * @reject {Error|ServiceError} - The error object. */ - updateWithHttpOperationResponse(automationAccountName: string, moduleName: string, parameters: models.ModuleUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + updateWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, moduleName: string, parameters: models.ModuleUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Update the module identified by module name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} moduleName The name of module. @@ -5550,14 +5778,16 @@ export interface ModuleOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - update(automationAccountName: string, moduleName: string, parameters: models.ModuleUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - update(automationAccountName: string, moduleName: string, parameters: models.ModuleUpdateParameters, callback: ServiceCallback): void; - update(automationAccountName: string, moduleName: string, parameters: models.ModuleUpdateParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + update(resourceGroupName: string, automationAccountName: string, moduleName: string, parameters: models.ModuleUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + update(resourceGroupName: string, automationAccountName: string, moduleName: string, parameters: models.ModuleUpdateParameters, callback: ServiceCallback): void; + update(resourceGroupName: string, automationAccountName: string, moduleName: string, parameters: models.ModuleUpdateParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Retrieve a list of modules. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -5571,11 +5801,13 @@ export interface ModuleOperations { * * @reject {Error|ServiceError} - The error object. */ - listByAutomationAccountWithHttpOperationResponse(automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listByAutomationAccountWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieve a list of modules. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -5605,9 +5837,9 @@ export interface ModuleOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listByAutomationAccount(automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listByAutomationAccount(automationAccountName: string, callback: ServiceCallback): void; - listByAutomationAccount(automationAccountName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listByAutomationAccount(resourceGroupName: string, automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listByAutomationAccount(resourceGroupName: string, automationAccountName: string, callback: ServiceCallback): void; + listByAutomationAccount(resourceGroupName: string, automationAccountName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -5679,6 +5911,8 @@ export interface ObjectDataTypes { /** * Retrieve a list of fields of a given type identified by module name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} moduleName The name of module. @@ -5696,11 +5930,13 @@ export interface ObjectDataTypes { * * @reject {Error|ServiceError} - The error object. */ - listFieldsByModuleAndTypeWithHttpOperationResponse(automationAccountName: string, moduleName: string, typeName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listFieldsByModuleAndTypeWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, moduleName: string, typeName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieve a list of fields of a given type identified by module name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} moduleName The name of module. @@ -5734,14 +5970,16 @@ export interface ObjectDataTypes { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listFieldsByModuleAndType(automationAccountName: string, moduleName: string, typeName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listFieldsByModuleAndType(automationAccountName: string, moduleName: string, typeName: string, callback: ServiceCallback): void; - listFieldsByModuleAndType(automationAccountName: string, moduleName: string, typeName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listFieldsByModuleAndType(resourceGroupName: string, automationAccountName: string, moduleName: string, typeName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listFieldsByModuleAndType(resourceGroupName: string, automationAccountName: string, moduleName: string, typeName: string, callback: ServiceCallback): void; + listFieldsByModuleAndType(resourceGroupName: string, automationAccountName: string, moduleName: string, typeName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Retrieve a list of fields of a given type across all accessible modules. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} typeName The name of type. @@ -5757,11 +5995,13 @@ export interface ObjectDataTypes { * * @reject {Error|ServiceError} - The error object. */ - listFieldsByTypeWithHttpOperationResponse(automationAccountName: string, typeName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listFieldsByTypeWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, typeName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieve a list of fields of a given type across all accessible modules. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} typeName The name of type. @@ -5793,9 +6033,9 @@ export interface ObjectDataTypes { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listFieldsByType(automationAccountName: string, typeName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listFieldsByType(automationAccountName: string, typeName: string, callback: ServiceCallback): void; - listFieldsByType(automationAccountName: string, typeName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listFieldsByType(resourceGroupName: string, automationAccountName: string, typeName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listFieldsByType(resourceGroupName: string, automationAccountName: string, typeName: string, callback: ServiceCallback): void; + listFieldsByType(resourceGroupName: string, automationAccountName: string, typeName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; } /** @@ -5810,6 +6050,8 @@ export interface Fields { /** * Retrieve a list of fields of a given type identified by module name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} moduleName The name of module. @@ -5827,11 +6069,13 @@ export interface Fields { * * @reject {Error|ServiceError} - The error object. */ - listByTypeWithHttpOperationResponse(automationAccountName: string, moduleName: string, typeName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listByTypeWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, moduleName: string, typeName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieve a list of fields of a given type identified by module name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} moduleName The name of module. @@ -5865,9 +6109,9 @@ export interface Fields { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listByType(automationAccountName: string, moduleName: string, typeName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listByType(automationAccountName: string, moduleName: string, typeName: string, callback: ServiceCallback): void; - listByType(automationAccountName: string, moduleName: string, typeName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listByType(resourceGroupName: string, automationAccountName: string, moduleName: string, typeName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listByType(resourceGroupName: string, automationAccountName: string, moduleName: string, typeName: string, callback: ServiceCallback): void; + listByType(resourceGroupName: string, automationAccountName: string, moduleName: string, typeName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; } /** @@ -5882,6 +6126,8 @@ export interface RunbookDraftOperations { /** * Retrieve the content of runbook draft identified by runbook name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -5897,11 +6143,13 @@ export interface RunbookDraftOperations { * * @reject {Error|ServiceError} - The error object. */ - getContentWithHttpOperationResponse(automationAccountName: string, runbookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getContentWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, runbookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieve the content of runbook draft identified by runbook name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -5932,14 +6180,16 @@ export interface RunbookDraftOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - getContent(automationAccountName: string, runbookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - getContent(automationAccountName: string, runbookName: string, callback: ServiceCallback): void; - getContent(automationAccountName: string, runbookName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + getContent(resourceGroupName: string, automationAccountName: string, runbookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + getContent(resourceGroupName: string, automationAccountName: string, runbookName: string, callback: ServiceCallback): void; + getContent(resourceGroupName: string, automationAccountName: string, runbookName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Replaces the runbook draft content. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -5957,11 +6207,13 @@ export interface RunbookDraftOperations { * * @reject {Error|ServiceError} - The error object. */ - replaceContentWithHttpOperationResponse(automationAccountName: string, runbookName: string, runbookContent: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + replaceContentWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, runbookName: string, runbookContent: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Replaces the runbook draft content. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -5994,14 +6246,16 @@ export interface RunbookDraftOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - replaceContent(automationAccountName: string, runbookName: string, runbookContent: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - replaceContent(automationAccountName: string, runbookName: string, runbookContent: string, callback: ServiceCallback): void; - replaceContent(automationAccountName: string, runbookName: string, runbookContent: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + replaceContent(resourceGroupName: string, automationAccountName: string, runbookName: string, runbookContent: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + replaceContent(resourceGroupName: string, automationAccountName: string, runbookName: string, runbookContent: string, callback: ServiceCallback): void; + replaceContent(resourceGroupName: string, automationAccountName: string, runbookName: string, runbookContent: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Retrieve the runbook draft identified by runbook name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -6017,11 +6271,13 @@ export interface RunbookDraftOperations { * * @reject {Error|ServiceError} - The error object. */ - getWithHttpOperationResponse(automationAccountName: string, runbookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, runbookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieve the runbook draft identified by runbook name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -6053,14 +6309,16 @@ export interface RunbookDraftOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - get(automationAccountName: string, runbookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - get(automationAccountName: string, runbookName: string, callback: ServiceCallback): void; - get(automationAccountName: string, runbookName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + get(resourceGroupName: string, automationAccountName: string, runbookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + get(resourceGroupName: string, automationAccountName: string, runbookName: string, callback: ServiceCallback): void; + get(resourceGroupName: string, automationAccountName: string, runbookName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Publish runbook draft. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The parameters supplied to the publish runbook @@ -6077,11 +6335,13 @@ export interface RunbookDraftOperations { * * @reject {Error|ServiceError} - The error object. */ - publishWithHttpOperationResponse(automationAccountName: string, runbookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + publishWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, runbookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Publish runbook draft. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The parameters supplied to the publish runbook @@ -6113,14 +6373,16 @@ export interface RunbookDraftOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - publish(automationAccountName: string, runbookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - publish(automationAccountName: string, runbookName: string, callback: ServiceCallback): void; - publish(automationAccountName: string, runbookName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + publish(resourceGroupName: string, automationAccountName: string, runbookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + publish(resourceGroupName: string, automationAccountName: string, runbookName: string, callback: ServiceCallback): void; + publish(resourceGroupName: string, automationAccountName: string, runbookName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Undo draft edit to last known published state identified by runbook name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -6136,11 +6398,13 @@ export interface RunbookDraftOperations { * * @reject {Error|ServiceError} - The error object. */ - undoEditWithHttpOperationResponse(automationAccountName: string, runbookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + undoEditWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, runbookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Undo draft edit to last known published state identified by runbook name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -6173,14 +6437,16 @@ export interface RunbookDraftOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - undoEdit(automationAccountName: string, runbookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - undoEdit(automationAccountName: string, runbookName: string, callback: ServiceCallback): void; - undoEdit(automationAccountName: string, runbookName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + undoEdit(resourceGroupName: string, automationAccountName: string, runbookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + undoEdit(resourceGroupName: string, automationAccountName: string, runbookName: string, callback: ServiceCallback): void; + undoEdit(resourceGroupName: string, automationAccountName: string, runbookName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Replaces the runbook draft content. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -6198,11 +6464,13 @@ export interface RunbookDraftOperations { * * @reject {Error|ServiceError} - The error object. */ - beginReplaceContentWithHttpOperationResponse(automationAccountName: string, runbookName: string, runbookContent: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginReplaceContentWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, runbookName: string, runbookContent: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Replaces the runbook draft content. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -6235,14 +6503,16 @@ export interface RunbookDraftOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginReplaceContent(automationAccountName: string, runbookName: string, runbookContent: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginReplaceContent(automationAccountName: string, runbookName: string, runbookContent: string, callback: ServiceCallback): void; - beginReplaceContent(automationAccountName: string, runbookName: string, runbookContent: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginReplaceContent(resourceGroupName: string, automationAccountName: string, runbookName: string, runbookContent: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginReplaceContent(resourceGroupName: string, automationAccountName: string, runbookName: string, runbookContent: string, callback: ServiceCallback): void; + beginReplaceContent(resourceGroupName: string, automationAccountName: string, runbookName: string, runbookContent: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Publish runbook draft. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The parameters supplied to the publish runbook @@ -6259,11 +6529,13 @@ export interface RunbookDraftOperations { * * @reject {Error|ServiceError} - The error object. */ - beginPublishWithHttpOperationResponse(automationAccountName: string, runbookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginPublishWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, runbookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Publish runbook draft. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The parameters supplied to the publish runbook @@ -6295,9 +6567,9 @@ export interface RunbookDraftOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginPublish(automationAccountName: string, runbookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginPublish(automationAccountName: string, runbookName: string, callback: ServiceCallback): void; - beginPublish(automationAccountName: string, runbookName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginPublish(resourceGroupName: string, automationAccountName: string, runbookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginPublish(resourceGroupName: string, automationAccountName: string, runbookName: string, callback: ServiceCallback): void; + beginPublish(resourceGroupName: string, automationAccountName: string, runbookName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; } /** @@ -6312,6 +6584,8 @@ export interface RunbookOperations { /** * Retrieve the content of runbook identified by runbook name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -6327,11 +6601,13 @@ export interface RunbookOperations { * * @reject {Error|ServiceError} - The error object. */ - getContentWithHttpOperationResponse(automationAccountName: string, runbookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getContentWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, runbookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieve the content of runbook identified by runbook name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -6362,14 +6638,16 @@ export interface RunbookOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - getContent(automationAccountName: string, runbookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - getContent(automationAccountName: string, runbookName: string, callback: ServiceCallback): void; - getContent(automationAccountName: string, runbookName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + getContent(resourceGroupName: string, automationAccountName: string, runbookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + getContent(resourceGroupName: string, automationAccountName: string, runbookName: string, callback: ServiceCallback): void; + getContent(resourceGroupName: string, automationAccountName: string, runbookName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Retrieve the runbook identified by runbook name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -6385,11 +6663,13 @@ export interface RunbookOperations { * * @reject {Error|ServiceError} - The error object. */ - getWithHttpOperationResponse(automationAccountName: string, runbookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, runbookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieve the runbook identified by runbook name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -6421,14 +6701,16 @@ export interface RunbookOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - get(automationAccountName: string, runbookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - get(automationAccountName: string, runbookName: string, callback: ServiceCallback): void; - get(automationAccountName: string, runbookName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + get(resourceGroupName: string, automationAccountName: string, runbookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + get(resourceGroupName: string, automationAccountName: string, runbookName: string, callback: ServiceCallback): void; + get(resourceGroupName: string, automationAccountName: string, runbookName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Create the runbook identified by runbook name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -6508,11 +6790,13 @@ export interface RunbookOperations { * * @reject {Error|ServiceError} - The error object. */ - createOrUpdateWithHttpOperationResponse(automationAccountName: string, runbookName: string, parameters: models.RunbookCreateOrUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + createOrUpdateWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, runbookName: string, parameters: models.RunbookCreateOrUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Create the runbook identified by runbook name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -6608,14 +6892,16 @@ export interface RunbookOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - createOrUpdate(automationAccountName: string, runbookName: string, parameters: models.RunbookCreateOrUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - createOrUpdate(automationAccountName: string, runbookName: string, parameters: models.RunbookCreateOrUpdateParameters, callback: ServiceCallback): void; - createOrUpdate(automationAccountName: string, runbookName: string, parameters: models.RunbookCreateOrUpdateParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, automationAccountName: string, runbookName: string, parameters: models.RunbookCreateOrUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + createOrUpdate(resourceGroupName: string, automationAccountName: string, runbookName: string, parameters: models.RunbookCreateOrUpdateParameters, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, automationAccountName: string, runbookName: string, parameters: models.RunbookCreateOrUpdateParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Update the runbook identified by runbook name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -6651,11 +6937,13 @@ export interface RunbookOperations { * * @reject {Error|ServiceError} - The error object. */ - updateWithHttpOperationResponse(automationAccountName: string, runbookName: string, parameters: models.RunbookUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + updateWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, runbookName: string, parameters: models.RunbookUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Update the runbook identified by runbook name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -6707,14 +6995,16 @@ export interface RunbookOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - update(automationAccountName: string, runbookName: string, parameters: models.RunbookUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - update(automationAccountName: string, runbookName: string, parameters: models.RunbookUpdateParameters, callback: ServiceCallback): void; - update(automationAccountName: string, runbookName: string, parameters: models.RunbookUpdateParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + update(resourceGroupName: string, automationAccountName: string, runbookName: string, parameters: models.RunbookUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + update(resourceGroupName: string, automationAccountName: string, runbookName: string, parameters: models.RunbookUpdateParameters, callback: ServiceCallback): void; + update(resourceGroupName: string, automationAccountName: string, runbookName: string, parameters: models.RunbookUpdateParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Delete the runbook by name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -6730,11 +7020,13 @@ export interface RunbookOperations { * * @reject {Error|ServiceError} - The error object. */ - deleteMethodWithHttpOperationResponse(automationAccountName: string, runbookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + deleteMethodWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, runbookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Delete the runbook by name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -6765,14 +7057,16 @@ export interface RunbookOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(automationAccountName: string, runbookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - deleteMethod(automationAccountName: string, runbookName: string, callback: ServiceCallback): void; - deleteMethod(automationAccountName: string, runbookName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, automationAccountName: string, runbookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + deleteMethod(resourceGroupName: string, automationAccountName: string, runbookName: string, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, automationAccountName: string, runbookName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Retrieve a list of runbooks. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -6786,11 +7080,13 @@ export interface RunbookOperations { * * @reject {Error|ServiceError} - The error object. */ - listByAutomationAccountWithHttpOperationResponse(automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listByAutomationAccountWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieve a list of runbooks. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -6820,9 +7116,9 @@ export interface RunbookOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listByAutomationAccount(automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listByAutomationAccount(automationAccountName: string, callback: ServiceCallback): void; - listByAutomationAccount(automationAccountName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listByAutomationAccount(resourceGroupName: string, automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listByAutomationAccount(resourceGroupName: string, automationAccountName: string, callback: ServiceCallback): void; + listByAutomationAccount(resourceGroupName: string, automationAccountName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -6895,6 +7191,8 @@ export interface TestJobStreams { * Retrieve a test job stream of the test job identified by runbook name and * stream id. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -6912,12 +7210,14 @@ export interface TestJobStreams { * * @reject {Error|ServiceError} - The error object. */ - getWithHttpOperationResponse(automationAccountName: string, runbookName: string, jobStreamId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, runbookName: string, jobStreamId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieve a test job stream of the test job identified by runbook name and * stream id. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -6951,14 +7251,16 @@ export interface TestJobStreams { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - get(automationAccountName: string, runbookName: string, jobStreamId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - get(automationAccountName: string, runbookName: string, jobStreamId: string, callback: ServiceCallback): void; - get(automationAccountName: string, runbookName: string, jobStreamId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + get(resourceGroupName: string, automationAccountName: string, runbookName: string, jobStreamId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + get(resourceGroupName: string, automationAccountName: string, runbookName: string, jobStreamId: string, callback: ServiceCallback): void; + get(resourceGroupName: string, automationAccountName: string, runbookName: string, jobStreamId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Retrieve a list of test job streams identified by runbook name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -6976,11 +7278,13 @@ export interface TestJobStreams { * * @reject {Error|ServiceError} - The error object. */ - listByTestJobWithHttpOperationResponse(automationAccountName: string, runbookName: string, options?: { filter? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; + listByTestJobWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, runbookName: string, options?: { filter? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieve a list of test job streams identified by runbook name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -7014,9 +7318,9 @@ export interface TestJobStreams { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listByTestJob(automationAccountName: string, runbookName: string, options?: { filter? : string, customHeaders? : { [headerName: string]: string; } }): Promise; - listByTestJob(automationAccountName: string, runbookName: string, callback: ServiceCallback): void; - listByTestJob(automationAccountName: string, runbookName: string, options: { filter? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listByTestJob(resourceGroupName: string, automationAccountName: string, runbookName: string, options?: { filter? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + listByTestJob(resourceGroupName: string, automationAccountName: string, runbookName: string, callback: ServiceCallback): void; + listByTestJob(resourceGroupName: string, automationAccountName: string, runbookName: string, options: { filter? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -7088,6 +7392,8 @@ export interface TestJobOperations { /** * Create a test job of the runbook. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The parameters supplied to the create test job @@ -7113,11 +7419,13 @@ export interface TestJobOperations { * * @reject {Error|ServiceError} - The error object. */ - createWithHttpOperationResponse(automationAccountName: string, runbookName: string, parameters: models.TestJobCreateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + createWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, runbookName: string, parameters: models.TestJobCreateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Create a test job of the runbook. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The parameters supplied to the create test job @@ -7159,14 +7467,16 @@ export interface TestJobOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - create(automationAccountName: string, runbookName: string, parameters: models.TestJobCreateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - create(automationAccountName: string, runbookName: string, parameters: models.TestJobCreateParameters, callback: ServiceCallback): void; - create(automationAccountName: string, runbookName: string, parameters: models.TestJobCreateParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + create(resourceGroupName: string, automationAccountName: string, runbookName: string, parameters: models.TestJobCreateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + create(resourceGroupName: string, automationAccountName: string, runbookName: string, parameters: models.TestJobCreateParameters, callback: ServiceCallback): void; + create(resourceGroupName: string, automationAccountName: string, runbookName: string, parameters: models.TestJobCreateParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Retrieve the test job for the specified runbook. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -7182,11 +7492,13 @@ export interface TestJobOperations { * * @reject {Error|ServiceError} - The error object. */ - getWithHttpOperationResponse(automationAccountName: string, runbookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, runbookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieve the test job for the specified runbook. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -7218,14 +7530,16 @@ export interface TestJobOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - get(automationAccountName: string, runbookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - get(automationAccountName: string, runbookName: string, callback: ServiceCallback): void; - get(automationAccountName: string, runbookName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + get(resourceGroupName: string, automationAccountName: string, runbookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + get(resourceGroupName: string, automationAccountName: string, runbookName: string, callback: ServiceCallback): void; + get(resourceGroupName: string, automationAccountName: string, runbookName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Resume the test job. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -7241,11 +7555,13 @@ export interface TestJobOperations { * * @reject {Error|ServiceError} - The error object. */ - resumeWithHttpOperationResponse(automationAccountName: string, runbookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + resumeWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, runbookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Resume the test job. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -7276,14 +7592,16 @@ export interface TestJobOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - resume(automationAccountName: string, runbookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - resume(automationAccountName: string, runbookName: string, callback: ServiceCallback): void; - resume(automationAccountName: string, runbookName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + resume(resourceGroupName: string, automationAccountName: string, runbookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + resume(resourceGroupName: string, automationAccountName: string, runbookName: string, callback: ServiceCallback): void; + resume(resourceGroupName: string, automationAccountName: string, runbookName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Stop the test job. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -7299,11 +7617,13 @@ export interface TestJobOperations { * * @reject {Error|ServiceError} - The error object. */ - stopWithHttpOperationResponse(automationAccountName: string, runbookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + stopWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, runbookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Stop the test job. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -7334,14 +7654,16 @@ export interface TestJobOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - stop(automationAccountName: string, runbookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - stop(automationAccountName: string, runbookName: string, callback: ServiceCallback): void; - stop(automationAccountName: string, runbookName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + stop(resourceGroupName: string, automationAccountName: string, runbookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + stop(resourceGroupName: string, automationAccountName: string, runbookName: string, callback: ServiceCallback): void; + stop(resourceGroupName: string, automationAccountName: string, runbookName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Suspend the test job. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -7357,11 +7679,13 @@ export interface TestJobOperations { * * @reject {Error|ServiceError} - The error object. */ - suspendWithHttpOperationResponse(automationAccountName: string, runbookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + suspendWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, runbookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Suspend the test job. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -7392,9 +7716,9 @@ export interface TestJobOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - suspend(automationAccountName: string, runbookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - suspend(automationAccountName: string, runbookName: string, callback: ServiceCallback): void; - suspend(automationAccountName: string, runbookName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + suspend(resourceGroupName: string, automationAccountName: string, runbookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + suspend(resourceGroupName: string, automationAccountName: string, runbookName: string, callback: ServiceCallback): void; + suspend(resourceGroupName: string, automationAccountName: string, runbookName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; } /** @@ -7409,6 +7733,8 @@ export interface ScheduleOperations { /** * Create a schedule. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} scheduleName The schedule name. @@ -7459,11 +7785,13 @@ export interface ScheduleOperations { * * @reject {Error|ServiceError} - The error object. */ - createOrUpdateWithHttpOperationResponse(automationAccountName: string, scheduleName: string, parameters: models.ScheduleCreateOrUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + createOrUpdateWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, scheduleName: string, parameters: models.ScheduleCreateOrUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Create a schedule. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} scheduleName The schedule name. @@ -7530,14 +7858,16 @@ export interface ScheduleOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - createOrUpdate(automationAccountName: string, scheduleName: string, parameters: models.ScheduleCreateOrUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - createOrUpdate(automationAccountName: string, scheduleName: string, parameters: models.ScheduleCreateOrUpdateParameters, callback: ServiceCallback): void; - createOrUpdate(automationAccountName: string, scheduleName: string, parameters: models.ScheduleCreateOrUpdateParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, automationAccountName: string, scheduleName: string, parameters: models.ScheduleCreateOrUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + createOrUpdate(resourceGroupName: string, automationAccountName: string, scheduleName: string, parameters: models.ScheduleCreateOrUpdateParameters, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, automationAccountName: string, scheduleName: string, parameters: models.ScheduleCreateOrUpdateParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Update the schedule identified by schedule name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} scheduleName The schedule name. @@ -7564,11 +7894,13 @@ export interface ScheduleOperations { * * @reject {Error|ServiceError} - The error object. */ - updateWithHttpOperationResponse(automationAccountName: string, scheduleName: string, parameters: models.ScheduleUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + updateWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, scheduleName: string, parameters: models.ScheduleUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Update the schedule identified by schedule name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} scheduleName The schedule name. @@ -7611,14 +7943,16 @@ export interface ScheduleOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - update(automationAccountName: string, scheduleName: string, parameters: models.ScheduleUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - update(automationAccountName: string, scheduleName: string, parameters: models.ScheduleUpdateParameters, callback: ServiceCallback): void; - update(automationAccountName: string, scheduleName: string, parameters: models.ScheduleUpdateParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + update(resourceGroupName: string, automationAccountName: string, scheduleName: string, parameters: models.ScheduleUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + update(resourceGroupName: string, automationAccountName: string, scheduleName: string, parameters: models.ScheduleUpdateParameters, callback: ServiceCallback): void; + update(resourceGroupName: string, automationAccountName: string, scheduleName: string, parameters: models.ScheduleUpdateParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Retrieve the schedule identified by schedule name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} scheduleName The schedule name. @@ -7634,11 +7968,13 @@ export interface ScheduleOperations { * * @reject {Error|ServiceError} - The error object. */ - getWithHttpOperationResponse(automationAccountName: string, scheduleName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, scheduleName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieve the schedule identified by schedule name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} scheduleName The schedule name. @@ -7670,14 +8006,16 @@ export interface ScheduleOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - get(automationAccountName: string, scheduleName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - get(automationAccountName: string, scheduleName: string, callback: ServiceCallback): void; - get(automationAccountName: string, scheduleName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + get(resourceGroupName: string, automationAccountName: string, scheduleName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + get(resourceGroupName: string, automationAccountName: string, scheduleName: string, callback: ServiceCallback): void; + get(resourceGroupName: string, automationAccountName: string, scheduleName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Delete the schedule identified by schedule name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} scheduleName The schedule name. @@ -7693,11 +8031,13 @@ export interface ScheduleOperations { * * @reject {Error|ServiceError} - The error object. */ - deleteMethodWithHttpOperationResponse(automationAccountName: string, scheduleName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + deleteMethodWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, scheduleName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Delete the schedule identified by schedule name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} scheduleName The schedule name. @@ -7728,14 +8068,16 @@ export interface ScheduleOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(automationAccountName: string, scheduleName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - deleteMethod(automationAccountName: string, scheduleName: string, callback: ServiceCallback): void; - deleteMethod(automationAccountName: string, scheduleName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, automationAccountName: string, scheduleName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + deleteMethod(resourceGroupName: string, automationAccountName: string, scheduleName: string, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, automationAccountName: string, scheduleName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Retrieve a list of schedules. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -7749,11 +8091,13 @@ export interface ScheduleOperations { * * @reject {Error|ServiceError} - The error object. */ - listByAutomationAccountWithHttpOperationResponse(automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listByAutomationAccountWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieve a list of schedules. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -7783,9 +8127,9 @@ export interface ScheduleOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listByAutomationAccount(automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listByAutomationAccount(automationAccountName: string, callback: ServiceCallback): void; - listByAutomationAccount(automationAccountName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listByAutomationAccount(resourceGroupName: string, automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listByAutomationAccount(resourceGroupName: string, automationAccountName: string, callback: ServiceCallback): void; + listByAutomationAccount(resourceGroupName: string, automationAccountName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -7857,6 +8201,8 @@ export interface VariableOperations { /** * Create a variable. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} variableName The variable name. @@ -7885,11 +8231,13 @@ export interface VariableOperations { * * @reject {Error|ServiceError} - The error object. */ - createOrUpdateWithHttpOperationResponse(automationAccountName: string, variableName: string, parameters: models.VariableCreateOrUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + createOrUpdateWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, variableName: string, parameters: models.VariableCreateOrUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Create a variable. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} variableName The variable name. @@ -7934,14 +8282,16 @@ export interface VariableOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - createOrUpdate(automationAccountName: string, variableName: string, parameters: models.VariableCreateOrUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - createOrUpdate(automationAccountName: string, variableName: string, parameters: models.VariableCreateOrUpdateParameters, callback: ServiceCallback): void; - createOrUpdate(automationAccountName: string, variableName: string, parameters: models.VariableCreateOrUpdateParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, automationAccountName: string, variableName: string, parameters: models.VariableCreateOrUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + createOrUpdate(resourceGroupName: string, automationAccountName: string, variableName: string, parameters: models.VariableCreateOrUpdateParameters, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, automationAccountName: string, variableName: string, parameters: models.VariableCreateOrUpdateParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Update a variable. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} variableName The variable name. @@ -7967,11 +8317,13 @@ export interface VariableOperations { * * @reject {Error|ServiceError} - The error object. */ - updateWithHttpOperationResponse(automationAccountName: string, variableName: string, parameters: models.VariableUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + updateWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, variableName: string, parameters: models.VariableUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Update a variable. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} variableName The variable name. @@ -8013,14 +8365,16 @@ export interface VariableOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - update(automationAccountName: string, variableName: string, parameters: models.VariableUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - update(automationAccountName: string, variableName: string, parameters: models.VariableUpdateParameters, callback: ServiceCallback): void; - update(automationAccountName: string, variableName: string, parameters: models.VariableUpdateParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + update(resourceGroupName: string, automationAccountName: string, variableName: string, parameters: models.VariableUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + update(resourceGroupName: string, automationAccountName: string, variableName: string, parameters: models.VariableUpdateParameters, callback: ServiceCallback): void; + update(resourceGroupName: string, automationAccountName: string, variableName: string, parameters: models.VariableUpdateParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Delete the variable. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} variableName The name of variable. @@ -8036,11 +8390,13 @@ export interface VariableOperations { * * @reject {Error|ServiceError} - The error object. */ - deleteMethodWithHttpOperationResponse(automationAccountName: string, variableName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + deleteMethodWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, variableName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Delete the variable. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} variableName The name of variable. @@ -8071,14 +8427,16 @@ export interface VariableOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(automationAccountName: string, variableName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - deleteMethod(automationAccountName: string, variableName: string, callback: ServiceCallback): void; - deleteMethod(automationAccountName: string, variableName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, automationAccountName: string, variableName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + deleteMethod(resourceGroupName: string, automationAccountName: string, variableName: string, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, automationAccountName: string, variableName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Retrieve the variable identified by variable name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} variableName The name of variable. @@ -8094,11 +8452,13 @@ export interface VariableOperations { * * @reject {Error|ServiceError} - The error object. */ - getWithHttpOperationResponse(automationAccountName: string, variableName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, variableName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieve the variable identified by variable name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} variableName The name of variable. @@ -8130,14 +8490,16 @@ export interface VariableOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - get(automationAccountName: string, variableName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - get(automationAccountName: string, variableName: string, callback: ServiceCallback): void; - get(automationAccountName: string, variableName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + get(resourceGroupName: string, automationAccountName: string, variableName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + get(resourceGroupName: string, automationAccountName: string, variableName: string, callback: ServiceCallback): void; + get(resourceGroupName: string, automationAccountName: string, variableName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Retrieve a list of variables. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -8151,11 +8513,13 @@ export interface VariableOperations { * * @reject {Error|ServiceError} - The error object. */ - listByAutomationAccountWithHttpOperationResponse(automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listByAutomationAccountWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieve a list of variables. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -8185,9 +8549,9 @@ export interface VariableOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listByAutomationAccount(automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listByAutomationAccount(automationAccountName: string, callback: ServiceCallback): void; - listByAutomationAccount(automationAccountName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listByAutomationAccount(resourceGroupName: string, automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listByAutomationAccount(resourceGroupName: string, automationAccountName: string, callback: ServiceCallback): void; + listByAutomationAccount(resourceGroupName: string, automationAccountName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -8259,6 +8623,8 @@ export interface WebhookOperations { /** * Generates a Uri for use in creating a webhook. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -8272,11 +8638,13 @@ export interface WebhookOperations { * * @reject {Error|ServiceError} - The error object. */ - generateUriWithHttpOperationResponse(automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + generateUriWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Generates a Uri for use in creating a webhook. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -8305,14 +8673,16 @@ export interface WebhookOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - generateUri(automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - generateUri(automationAccountName: string, callback: ServiceCallback): void; - generateUri(automationAccountName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + generateUri(resourceGroupName: string, automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + generateUri(resourceGroupName: string, automationAccountName: string, callback: ServiceCallback): void; + generateUri(resourceGroupName: string, automationAccountName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Delete the webhook by name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} webhookName The webhook name. @@ -8328,11 +8698,13 @@ export interface WebhookOperations { * * @reject {Error|ServiceError} - The error object. */ - deleteMethodWithHttpOperationResponse(automationAccountName: string, webhookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + deleteMethodWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, webhookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Delete the webhook by name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} webhookName The webhook name. @@ -8363,14 +8735,16 @@ export interface WebhookOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(automationAccountName: string, webhookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - deleteMethod(automationAccountName: string, webhookName: string, callback: ServiceCallback): void; - deleteMethod(automationAccountName: string, webhookName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, automationAccountName: string, webhookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + deleteMethod(resourceGroupName: string, automationAccountName: string, webhookName: string, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, automationAccountName: string, webhookName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Retrieve the webhook identified by webhook name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} webhookName The webhook name. @@ -8386,11 +8760,13 @@ export interface WebhookOperations { * * @reject {Error|ServiceError} - The error object. */ - getWithHttpOperationResponse(automationAccountName: string, webhookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, webhookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieve the webhook identified by webhook name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} webhookName The webhook name. @@ -8422,14 +8798,16 @@ export interface WebhookOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - get(automationAccountName: string, webhookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - get(automationAccountName: string, webhookName: string, callback: ServiceCallback): void; - get(automationAccountName: string, webhookName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + get(resourceGroupName: string, automationAccountName: string, webhookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + get(resourceGroupName: string, automationAccountName: string, webhookName: string, callback: ServiceCallback): void; + get(resourceGroupName: string, automationAccountName: string, webhookName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Create the webhook identified by webhook name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} webhookName The webhook name. @@ -8467,11 +8845,13 @@ export interface WebhookOperations { * * @reject {Error|ServiceError} - The error object. */ - createOrUpdateWithHttpOperationResponse(automationAccountName: string, webhookName: string, parameters: models.WebhookCreateOrUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + createOrUpdateWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, webhookName: string, parameters: models.WebhookCreateOrUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Create the webhook identified by webhook name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} webhookName The webhook name. @@ -8525,14 +8905,16 @@ export interface WebhookOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - createOrUpdate(automationAccountName: string, webhookName: string, parameters: models.WebhookCreateOrUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - createOrUpdate(automationAccountName: string, webhookName: string, parameters: models.WebhookCreateOrUpdateParameters, callback: ServiceCallback): void; - createOrUpdate(automationAccountName: string, webhookName: string, parameters: models.WebhookCreateOrUpdateParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, automationAccountName: string, webhookName: string, parameters: models.WebhookCreateOrUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + createOrUpdate(resourceGroupName: string, automationAccountName: string, webhookName: string, parameters: models.WebhookCreateOrUpdateParameters, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, automationAccountName: string, webhookName: string, parameters: models.WebhookCreateOrUpdateParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Update the webhook identified by webhook name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} webhookName The webhook name. @@ -8564,11 +8946,13 @@ export interface WebhookOperations { * * @reject {Error|ServiceError} - The error object. */ - updateWithHttpOperationResponse(automationAccountName: string, webhookName: string, parameters: models.WebhookUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + updateWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, webhookName: string, parameters: models.WebhookUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Update the webhook identified by webhook name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} webhookName The webhook name. @@ -8616,14 +9000,16 @@ export interface WebhookOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - update(automationAccountName: string, webhookName: string, parameters: models.WebhookUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - update(automationAccountName: string, webhookName: string, parameters: models.WebhookUpdateParameters, callback: ServiceCallback): void; - update(automationAccountName: string, webhookName: string, parameters: models.WebhookUpdateParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + update(resourceGroupName: string, automationAccountName: string, webhookName: string, parameters: models.WebhookUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + update(resourceGroupName: string, automationAccountName: string, webhookName: string, parameters: models.WebhookUpdateParameters, callback: ServiceCallback): void; + update(resourceGroupName: string, automationAccountName: string, webhookName: string, parameters: models.WebhookUpdateParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Retrieve a list of webhooks. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -8639,11 +9025,13 @@ export interface WebhookOperations { * * @reject {Error|ServiceError} - The error object. */ - listByAutomationAccountWithHttpOperationResponse(automationAccountName: string, options?: { filter? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; + listByAutomationAccountWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, options?: { filter? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieve a list of webhooks. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -8675,9 +9063,9 @@ export interface WebhookOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listByAutomationAccount(automationAccountName: string, options?: { filter? : string, customHeaders? : { [headerName: string]: string; } }): Promise; - listByAutomationAccount(automationAccountName: string, callback: ServiceCallback): void; - listByAutomationAccount(automationAccountName: string, options: { filter? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listByAutomationAccount(resourceGroupName: string, automationAccountName: string, options?: { filter? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + listByAutomationAccount(resourceGroupName: string, automationAccountName: string, callback: ServiceCallback): void; + listByAutomationAccount(resourceGroupName: string, automationAccountName: string, options: { filter? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -8749,6 +9137,10 @@ export interface SoftwareUpdateConfigurations { /** * Create a new software update configuration with the name given in the URI. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {string} softwareUpdateConfigurationName The name of the software * update configuration to be created. * @@ -8858,6 +9250,9 @@ export interface SoftwareUpdateConfigurations { * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -8867,11 +9262,15 @@ export interface SoftwareUpdateConfigurations { * * @reject {Error|ServiceError} - The error object. */ - createWithHttpOperationResponse(softwareUpdateConfigurationName: string, parameters: models.SoftwareUpdateConfiguration, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + createWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, softwareUpdateConfigurationName: string, parameters: models.SoftwareUpdateConfiguration, options?: { clientRequestId? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Create a new software update configuration with the name given in the URI. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {string} softwareUpdateConfigurationName The name of the software * update configuration to be created. * @@ -8981,6 +9380,9 @@ export interface SoftwareUpdateConfigurations { * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -9007,19 +9409,26 @@ export interface SoftwareUpdateConfigurations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - create(softwareUpdateConfigurationName: string, parameters: models.SoftwareUpdateConfiguration, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - create(softwareUpdateConfigurationName: string, parameters: models.SoftwareUpdateConfiguration, callback: ServiceCallback): void; - create(softwareUpdateConfigurationName: string, parameters: models.SoftwareUpdateConfiguration, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + create(resourceGroupName: string, automationAccountName: string, softwareUpdateConfigurationName: string, parameters: models.SoftwareUpdateConfiguration, options?: { clientRequestId? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + create(resourceGroupName: string, automationAccountName: string, softwareUpdateConfigurationName: string, parameters: models.SoftwareUpdateConfiguration, callback: ServiceCallback): void; + create(resourceGroupName: string, automationAccountName: string, softwareUpdateConfigurationName: string, parameters: models.SoftwareUpdateConfiguration, options: { clientRequestId? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Get a single software update configuration by name. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {string} softwareUpdateConfigurationName The name of the software * update configuration to be created. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -9029,16 +9438,23 @@ export interface SoftwareUpdateConfigurations { * * @reject {Error|ServiceError} - The error object. */ - getByNameWithHttpOperationResponse(softwareUpdateConfigurationName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getByNameWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, softwareUpdateConfigurationName: string, options?: { clientRequestId? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Get a single software update configuration by name. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {string} softwareUpdateConfigurationName The name of the software * update configuration to be created. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -9065,19 +9481,26 @@ export interface SoftwareUpdateConfigurations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - getByName(softwareUpdateConfigurationName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - getByName(softwareUpdateConfigurationName: string, callback: ServiceCallback): void; - getByName(softwareUpdateConfigurationName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + getByName(resourceGroupName: string, automationAccountName: string, softwareUpdateConfigurationName: string, options?: { clientRequestId? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + getByName(resourceGroupName: string, automationAccountName: string, softwareUpdateConfigurationName: string, callback: ServiceCallback): void; + getByName(resourceGroupName: string, automationAccountName: string, softwareUpdateConfigurationName: string, options: { clientRequestId? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * delete a specific software update configuration. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {string} softwareUpdateConfigurationName The name of the software * update configuration to be created. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -9087,16 +9510,23 @@ export interface SoftwareUpdateConfigurations { * * @reject {Error|ServiceError} - The error object. */ - deleteMethodWithHttpOperationResponse(softwareUpdateConfigurationName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + deleteMethodWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, softwareUpdateConfigurationName: string, options?: { clientRequestId? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; /** * delete a specific software update configuration. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {string} softwareUpdateConfigurationName The name of the software * update configuration to be created. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -9121,16 +9551,23 @@ export interface SoftwareUpdateConfigurations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(softwareUpdateConfigurationName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - deleteMethod(softwareUpdateConfigurationName: string, callback: ServiceCallback): void; - deleteMethod(softwareUpdateConfigurationName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, automationAccountName: string, softwareUpdateConfigurationName: string, options?: { clientRequestId? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + deleteMethod(resourceGroupName: string, automationAccountName: string, softwareUpdateConfigurationName: string, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, automationAccountName: string, softwareUpdateConfigurationName: string, options: { clientRequestId? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Get all software update configurations for the account. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {string} [options.filter] The filter to apply on the operation. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -9142,13 +9579,20 @@ export interface SoftwareUpdateConfigurations { * * @reject {Error|ServiceError} - The error object. */ - listWithHttpOperationResponse(options?: { filter? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; + listWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, options?: { clientRequestId? : string, filter? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Get all software update configurations for the account. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {string} [options.filter] The filter to apply on the operation. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -9177,9 +9621,9 @@ export interface SoftwareUpdateConfigurations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - list(options?: { filter? : string, customHeaders? : { [headerName: string]: string; } }): Promise; - list(callback: ServiceCallback): void; - list(options: { filter? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + list(resourceGroupName: string, automationAccountName: string, options?: { clientRequestId? : string, filter? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + list(resourceGroupName: string, automationAccountName: string, callback: ServiceCallback): void; + list(resourceGroupName: string, automationAccountName: string, options: { clientRequestId? : string, filter? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; } /** @@ -9194,11 +9638,18 @@ export interface SoftwareUpdateConfigurationRuns { /** * Get a single software update configuration Run by Id. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {uuid} softwareUpdateConfigurationRunId The Id of the software update * configuration run. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -9208,16 +9659,23 @@ export interface SoftwareUpdateConfigurationRuns { * * @reject {Error|ServiceError} - The error object. */ - getByIdWithHttpOperationResponse(softwareUpdateConfigurationRunId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getByIdWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, softwareUpdateConfigurationRunId: string, options?: { clientRequestId? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Get a single software update configuration Run by Id. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {uuid} softwareUpdateConfigurationRunId The Id of the software update * configuration run. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -9244,16 +9702,23 @@ export interface SoftwareUpdateConfigurationRuns { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - getById(softwareUpdateConfigurationRunId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - getById(softwareUpdateConfigurationRunId: string, callback: ServiceCallback): void; - getById(softwareUpdateConfigurationRunId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + getById(resourceGroupName: string, automationAccountName: string, softwareUpdateConfigurationRunId: string, options?: { clientRequestId? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + getById(resourceGroupName: string, automationAccountName: string, softwareUpdateConfigurationRunId: string, callback: ServiceCallback): void; + getById(resourceGroupName: string, automationAccountName: string, softwareUpdateConfigurationRunId: string, options: { clientRequestId? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Return list of software update configuration runs * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {string} [options.filter] The filter to apply on the operation. You * can use the following filters: 'properties/osType', 'properties/status', * 'properties/startTime', and 'properties/softwareUpdateConfiguration/name' @@ -9273,13 +9738,20 @@ export interface SoftwareUpdateConfigurationRuns { * * @reject {Error|ServiceError} - The error object. */ - listWithHttpOperationResponse(options?: { filter? : string, skip? : string, top? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; + listWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, options?: { clientRequestId? : string, filter? : string, skip? : string, top? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Return list of software update configuration runs * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {string} [options.filter] The filter to apply on the operation. You * can use the following filters: 'properties/osType', 'properties/status', * 'properties/startTime', and 'properties/softwareUpdateConfiguration/name' @@ -9316,9 +9788,9 @@ export interface SoftwareUpdateConfigurationRuns { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - list(options?: { filter? : string, skip? : string, top? : string, customHeaders? : { [headerName: string]: string; } }): Promise; - list(callback: ServiceCallback): void; - list(options: { filter? : string, skip? : string, top? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + list(resourceGroupName: string, automationAccountName: string, options?: { clientRequestId? : string, filter? : string, skip? : string, top? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + list(resourceGroupName: string, automationAccountName: string, callback: ServiceCallback): void; + list(resourceGroupName: string, automationAccountName: string, options: { clientRequestId? : string, filter? : string, skip? : string, top? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; } /** @@ -9333,11 +9805,18 @@ export interface SoftwareUpdateConfigurationMachineRuns { /** * Get a single software update configuration machine run by Id. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {uuid} softwareUpdateConfigurationMachineRunId The Id of the software * update configuration machine run. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -9347,16 +9826,23 @@ export interface SoftwareUpdateConfigurationMachineRuns { * * @reject {Error|ServiceError} - The error object. */ - getByIdWithHttpOperationResponse(softwareUpdateConfigurationMachineRunId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getByIdWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, softwareUpdateConfigurationMachineRunId: string, options?: { clientRequestId? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Get a single software update configuration machine run by Id. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {uuid} softwareUpdateConfigurationMachineRunId The Id of the software * update configuration machine run. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -9383,16 +9869,23 @@ export interface SoftwareUpdateConfigurationMachineRuns { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - getById(softwareUpdateConfigurationMachineRunId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - getById(softwareUpdateConfigurationMachineRunId: string, callback: ServiceCallback): void; - getById(softwareUpdateConfigurationMachineRunId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + getById(resourceGroupName: string, automationAccountName: string, softwareUpdateConfigurationMachineRunId: string, options?: { clientRequestId? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + getById(resourceGroupName: string, automationAccountName: string, softwareUpdateConfigurationMachineRunId: string, callback: ServiceCallback): void; + getById(resourceGroupName: string, automationAccountName: string, softwareUpdateConfigurationMachineRunId: string, options: { clientRequestId? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Return list of software update configuration machine runs * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {string} [options.filter] The filter to apply on the operation. You * can use the following filters: 'properties/osType', 'properties/status', * 'properties/startTime', and 'properties/softwareUpdateConfiguration/name' @@ -9412,13 +9905,20 @@ export interface SoftwareUpdateConfigurationMachineRuns { * * @reject {Error|ServiceError} - The error object. */ - listWithHttpOperationResponse(options?: { filter? : string, skip? : string, top? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; + listWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, options?: { clientRequestId? : string, filter? : string, skip? : string, top? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Return list of software update configuration machine runs * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {string} [options.filter] The filter to apply on the operation. You * can use the following filters: 'properties/osType', 'properties/status', * 'properties/startTime', and 'properties/softwareUpdateConfiguration/name' @@ -9456,9 +9956,9 @@ export interface SoftwareUpdateConfigurationMachineRuns { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - list(options?: { filter? : string, skip? : string, top? : string, customHeaders? : { [headerName: string]: string; } }): Promise; - list(callback: ServiceCallback): void; - list(options: { filter? : string, skip? : string, top? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + list(resourceGroupName: string, automationAccountName: string, options?: { clientRequestId? : string, filter? : string, skip? : string, top? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + list(resourceGroupName: string, automationAccountName: string, callback: ServiceCallback): void; + list(resourceGroupName: string, automationAccountName: string, options: { clientRequestId? : string, filter? : string, skip? : string, top? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; } /** @@ -9473,6 +9973,8 @@ export interface SourceControlOperations { /** * Create a source control. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} sourceControlName The source control name. @@ -9516,11 +10018,13 @@ export interface SourceControlOperations { * * @reject {Error|ServiceError} - The error object. */ - createOrUpdateWithHttpOperationResponse(automationAccountName: string, sourceControlName: string, parameters: models.SourceControlCreateOrUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + createOrUpdateWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, sourceControlName: string, parameters: models.SourceControlCreateOrUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Create a source control. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} sourceControlName The source control name. @@ -9580,14 +10084,16 @@ export interface SourceControlOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - createOrUpdate(automationAccountName: string, sourceControlName: string, parameters: models.SourceControlCreateOrUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - createOrUpdate(automationAccountName: string, sourceControlName: string, parameters: models.SourceControlCreateOrUpdateParameters, callback: ServiceCallback): void; - createOrUpdate(automationAccountName: string, sourceControlName: string, parameters: models.SourceControlCreateOrUpdateParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, automationAccountName: string, sourceControlName: string, parameters: models.SourceControlCreateOrUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + createOrUpdate(resourceGroupName: string, automationAccountName: string, sourceControlName: string, parameters: models.SourceControlCreateOrUpdateParameters, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, automationAccountName: string, sourceControlName: string, parameters: models.SourceControlCreateOrUpdateParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Update a source control. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} sourceControlName The source control name. @@ -9624,11 +10130,13 @@ export interface SourceControlOperations { * * @reject {Error|ServiceError} - The error object. */ - updateWithHttpOperationResponse(automationAccountName: string, sourceControlName: string, parameters: models.SourceControlUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + updateWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, sourceControlName: string, parameters: models.SourceControlUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Update a source control. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} sourceControlName The source control name. @@ -9681,14 +10189,16 @@ export interface SourceControlOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - update(automationAccountName: string, sourceControlName: string, parameters: models.SourceControlUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - update(automationAccountName: string, sourceControlName: string, parameters: models.SourceControlUpdateParameters, callback: ServiceCallback): void; - update(automationAccountName: string, sourceControlName: string, parameters: models.SourceControlUpdateParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + update(resourceGroupName: string, automationAccountName: string, sourceControlName: string, parameters: models.SourceControlUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + update(resourceGroupName: string, automationAccountName: string, sourceControlName: string, parameters: models.SourceControlUpdateParameters, callback: ServiceCallback): void; + update(resourceGroupName: string, automationAccountName: string, sourceControlName: string, parameters: models.SourceControlUpdateParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Delete the source control. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} sourceControlName The name of source control. @@ -9704,11 +10214,13 @@ export interface SourceControlOperations { * * @reject {Error|ServiceError} - The error object. */ - deleteMethodWithHttpOperationResponse(automationAccountName: string, sourceControlName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + deleteMethodWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, sourceControlName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Delete the source control. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} sourceControlName The name of source control. @@ -9739,14 +10251,16 @@ export interface SourceControlOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(automationAccountName: string, sourceControlName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - deleteMethod(automationAccountName: string, sourceControlName: string, callback: ServiceCallback): void; - deleteMethod(automationAccountName: string, sourceControlName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, automationAccountName: string, sourceControlName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + deleteMethod(resourceGroupName: string, automationAccountName: string, sourceControlName: string, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, automationAccountName: string, sourceControlName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Retrieve the source control identified by source control name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} sourceControlName The name of source control. @@ -9762,11 +10276,13 @@ export interface SourceControlOperations { * * @reject {Error|ServiceError} - The error object. */ - getWithHttpOperationResponse(automationAccountName: string, sourceControlName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, sourceControlName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieve the source control identified by source control name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} sourceControlName The name of source control. @@ -9798,14 +10314,16 @@ export interface SourceControlOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - get(automationAccountName: string, sourceControlName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - get(automationAccountName: string, sourceControlName: string, callback: ServiceCallback): void; - get(automationAccountName: string, sourceControlName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + get(resourceGroupName: string, automationAccountName: string, sourceControlName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + get(resourceGroupName: string, automationAccountName: string, sourceControlName: string, callback: ServiceCallback): void; + get(resourceGroupName: string, automationAccountName: string, sourceControlName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Retrieve a list of source controls. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -9821,11 +10339,13 @@ export interface SourceControlOperations { * * @reject {Error|ServiceError} - The error object. */ - listByAutomationAccountWithHttpOperationResponse(automationAccountName: string, options?: { filter? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; + listByAutomationAccountWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, options?: { filter? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieve a list of source controls. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -9858,9 +10378,9 @@ export interface SourceControlOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listByAutomationAccount(automationAccountName: string, options?: { filter? : string, customHeaders? : { [headerName: string]: string; } }): Promise; - listByAutomationAccount(automationAccountName: string, callback: ServiceCallback): void; - listByAutomationAccount(automationAccountName: string, options: { filter? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listByAutomationAccount(resourceGroupName: string, automationAccountName: string, options?: { filter? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + listByAutomationAccount(resourceGroupName: string, automationAccountName: string, callback: ServiceCallback): void; + listByAutomationAccount(resourceGroupName: string, automationAccountName: string, options: { filter? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -9933,6 +10453,8 @@ export interface SourceControlSyncJobOperations { /** * Creates the sync job for a source control. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} sourceControlName The source control name. @@ -9950,11 +10472,13 @@ export interface SourceControlSyncJobOperations { * * @reject {Error|ServiceError} - The error object. */ - createWithHttpOperationResponse(automationAccountName: string, sourceControlName: string, sourceControlSyncJobId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + createWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, sourceControlName: string, sourceControlSyncJobId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Creates the sync job for a source control. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} sourceControlName The source control name. @@ -9988,14 +10512,16 @@ export interface SourceControlSyncJobOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - create(automationAccountName: string, sourceControlName: string, sourceControlSyncJobId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - create(automationAccountName: string, sourceControlName: string, sourceControlSyncJobId: string, callback: ServiceCallback): void; - create(automationAccountName: string, sourceControlName: string, sourceControlSyncJobId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + create(resourceGroupName: string, automationAccountName: string, sourceControlName: string, sourceControlSyncJobId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + create(resourceGroupName: string, automationAccountName: string, sourceControlName: string, sourceControlSyncJobId: string, callback: ServiceCallback): void; + create(resourceGroupName: string, automationAccountName: string, sourceControlName: string, sourceControlSyncJobId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Retrieve the source control sync job identified by job id. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} sourceControlName The source control name. @@ -10013,11 +10539,13 @@ export interface SourceControlSyncJobOperations { * * @reject {Error|ServiceError} - The error object. */ - getWithHttpOperationResponse(automationAccountName: string, sourceControlName: string, sourceControlSyncJobId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, sourceControlName: string, sourceControlSyncJobId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieve the source control sync job identified by job id. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} sourceControlName The source control name. @@ -10052,14 +10580,16 @@ export interface SourceControlSyncJobOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - get(automationAccountName: string, sourceControlName: string, sourceControlSyncJobId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - get(automationAccountName: string, sourceControlName: string, sourceControlSyncJobId: string, callback: ServiceCallback): void; - get(automationAccountName: string, sourceControlName: string, sourceControlSyncJobId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + get(resourceGroupName: string, automationAccountName: string, sourceControlName: string, sourceControlSyncJobId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + get(resourceGroupName: string, automationAccountName: string, sourceControlName: string, sourceControlSyncJobId: string, callback: ServiceCallback): void; + get(resourceGroupName: string, automationAccountName: string, sourceControlName: string, sourceControlSyncJobId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Retrieve a list of source control sync jobs. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} sourceControlName The source control name. @@ -10077,11 +10607,13 @@ export interface SourceControlSyncJobOperations { * * @reject {Error|ServiceError} - The error object. */ - listByAutomationAccountWithHttpOperationResponse(automationAccountName: string, sourceControlName: string, options?: { filter? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; + listByAutomationAccountWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, sourceControlName: string, options?: { filter? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieve a list of source control sync jobs. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} sourceControlName The source control name. @@ -10116,9 +10648,9 @@ export interface SourceControlSyncJobOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listByAutomationAccount(automationAccountName: string, sourceControlName: string, options?: { filter? : string, customHeaders? : { [headerName: string]: string; } }): Promise; - listByAutomationAccount(automationAccountName: string, sourceControlName: string, callback: ServiceCallback): void; - listByAutomationAccount(automationAccountName: string, sourceControlName: string, options: { filter? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listByAutomationAccount(resourceGroupName: string, automationAccountName: string, sourceControlName: string, options?: { filter? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + listByAutomationAccount(resourceGroupName: string, automationAccountName: string, sourceControlName: string, callback: ServiceCallback): void; + listByAutomationAccount(resourceGroupName: string, automationAccountName: string, sourceControlName: string, options: { filter? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -10191,10 +10723,17 @@ export interface JobOperations { /** * Retrieve the job output identified by job name. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {string} jobName The name of the job to be created. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -10204,15 +10743,22 @@ export interface JobOperations { * * @reject {Error|ServiceError} - The error object. */ - getOutputWithHttpOperationResponse(jobName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getOutputWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, jobName: string, options?: { clientRequestId? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieve the job output identified by job name. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {string} jobName The name of the job to be created. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -10237,18 +10783,25 @@ export interface JobOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - getOutput(jobName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - getOutput(jobName: string, callback: ServiceCallback): void; - getOutput(jobName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + getOutput(resourceGroupName: string, automationAccountName: string, jobName: string, options?: { clientRequestId? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + getOutput(resourceGroupName: string, automationAccountName: string, jobName: string, callback: ServiceCallback): void; + getOutput(resourceGroupName: string, automationAccountName: string, jobName: string, options: { clientRequestId? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Retrieve the runbook content of the job identified by job name. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {string} jobName The job name. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -10258,15 +10811,22 @@ export interface JobOperations { * * @reject {Error|ServiceError} - The error object. */ - getRunbookContentWithHttpOperationResponse(jobName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getRunbookContentWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, jobName: string, options?: { clientRequestId? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieve the runbook content of the job identified by job name. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {string} jobName The job name. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -10291,18 +10851,25 @@ export interface JobOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - getRunbookContent(jobName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - getRunbookContent(jobName: string, callback: ServiceCallback): void; - getRunbookContent(jobName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + getRunbookContent(resourceGroupName: string, automationAccountName: string, jobName: string, options?: { clientRequestId? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + getRunbookContent(resourceGroupName: string, automationAccountName: string, jobName: string, callback: ServiceCallback): void; + getRunbookContent(resourceGroupName: string, automationAccountName: string, jobName: string, options: { clientRequestId? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Suspend the job identified by job name. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {string} jobName The job name. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -10312,15 +10879,22 @@ export interface JobOperations { * * @reject {Error|ServiceError} - The error object. */ - suspendWithHttpOperationResponse(jobName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + suspendWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, jobName: string, options?: { clientRequestId? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Suspend the job identified by job name. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {string} jobName The job name. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -10345,18 +10919,25 @@ export interface JobOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - suspend(jobName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - suspend(jobName: string, callback: ServiceCallback): void; - suspend(jobName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + suspend(resourceGroupName: string, automationAccountName: string, jobName: string, options?: { clientRequestId? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + suspend(resourceGroupName: string, automationAccountName: string, jobName: string, callback: ServiceCallback): void; + suspend(resourceGroupName: string, automationAccountName: string, jobName: string, options: { clientRequestId? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Stop the job identified by jobName. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {string} jobName The job name. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -10366,15 +10947,22 @@ export interface JobOperations { * * @reject {Error|ServiceError} - The error object. */ - stopWithHttpOperationResponse(jobName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + stopWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, jobName: string, options?: { clientRequestId? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Stop the job identified by jobName. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {string} jobName The job name. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -10399,18 +10987,25 @@ export interface JobOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - stop(jobName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - stop(jobName: string, callback: ServiceCallback): void; - stop(jobName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + stop(resourceGroupName: string, automationAccountName: string, jobName: string, options?: { clientRequestId? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + stop(resourceGroupName: string, automationAccountName: string, jobName: string, callback: ServiceCallback): void; + stop(resourceGroupName: string, automationAccountName: string, jobName: string, options: { clientRequestId? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Retrieve the job identified by job name. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {string} jobName The job name. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -10420,15 +11015,22 @@ export interface JobOperations { * * @reject {Error|ServiceError} - The error object. */ - getWithHttpOperationResponse(jobName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, jobName: string, options?: { clientRequestId? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieve the job identified by job name. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {string} jobName The job name. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -10454,14 +11056,18 @@ export interface JobOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - get(jobName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - get(jobName: string, callback: ServiceCallback): void; - get(jobName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + get(resourceGroupName: string, automationAccountName: string, jobName: string, options?: { clientRequestId? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + get(resourceGroupName: string, automationAccountName: string, jobName: string, callback: ServiceCallback): void; + get(resourceGroupName: string, automationAccountName: string, jobName: string, options: { clientRequestId? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Create a job of the runbook. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {string} jobName The job name. * * @param {object} parameters The parameters supplied to the create job @@ -10480,6 +11086,9 @@ export interface JobOperations { * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -10489,11 +11098,15 @@ export interface JobOperations { * * @reject {Error|ServiceError} - The error object. */ - createWithHttpOperationResponse(jobName: string, parameters: models.JobCreateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + createWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, jobName: string, parameters: models.JobCreateParameters, options?: { clientRequestId? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Create a job of the runbook. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {string} jobName The job name. * * @param {object} parameters The parameters supplied to the create job @@ -10512,6 +11125,9 @@ export interface JobOperations { * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -10537,18 +11153,25 @@ export interface JobOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - create(jobName: string, parameters: models.JobCreateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - create(jobName: string, parameters: models.JobCreateParameters, callback: ServiceCallback): void; - create(jobName: string, parameters: models.JobCreateParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + create(resourceGroupName: string, automationAccountName: string, jobName: string, parameters: models.JobCreateParameters, options?: { clientRequestId? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + create(resourceGroupName: string, automationAccountName: string, jobName: string, parameters: models.JobCreateParameters, callback: ServiceCallback): void; + create(resourceGroupName: string, automationAccountName: string, jobName: string, parameters: models.JobCreateParameters, options: { clientRequestId? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Retrieve a list of jobs. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {object} [options] Optional Parameters. * * @param {string} [options.filter] The filter to apply on the operation. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -10558,15 +11181,22 @@ export interface JobOperations { * * @reject {Error|ServiceError} - The error object. */ - listByAutomationAccountWithHttpOperationResponse(options?: { filter? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; + listByAutomationAccountWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, options?: { filter? : string, clientRequestId? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieve a list of jobs. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {object} [options] Optional Parameters. * * @param {string} [options.filter] The filter to apply on the operation. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -10592,18 +11222,25 @@ export interface JobOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listByAutomationAccount(options?: { filter? : string, customHeaders? : { [headerName: string]: string; } }): Promise; - listByAutomationAccount(callback: ServiceCallback): void; - listByAutomationAccount(options: { filter? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listByAutomationAccount(resourceGroupName: string, automationAccountName: string, options?: { filter? : string, clientRequestId? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + listByAutomationAccount(resourceGroupName: string, automationAccountName: string, callback: ServiceCallback): void; + listByAutomationAccount(resourceGroupName: string, automationAccountName: string, options: { filter? : string, clientRequestId? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Resume the job identified by jobName. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {string} jobName The job name. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -10613,15 +11250,22 @@ export interface JobOperations { * * @reject {Error|ServiceError} - The error object. */ - resumeWithHttpOperationResponse(jobName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + resumeWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, jobName: string, options?: { clientRequestId? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Resume the job identified by jobName. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {string} jobName The job name. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -10646,9 +11290,9 @@ export interface JobOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - resume(jobName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - resume(jobName: string, callback: ServiceCallback): void; - resume(jobName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + resume(resourceGroupName: string, automationAccountName: string, jobName: string, options?: { clientRequestId? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + resume(resourceGroupName: string, automationAccountName: string, jobName: string, callback: ServiceCallback): void; + resume(resourceGroupName: string, automationAccountName: string, jobName: string, options: { clientRequestId? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -10659,6 +11303,9 @@ export interface JobOperations { * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -10668,7 +11315,7 @@ export interface JobOperations { * * @reject {Error|ServiceError} - The error object. */ - listByAutomationAccountNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listByAutomationAccountNextWithHttpOperationResponse(nextPageLink: string, options?: { clientRequestId? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieve a list of jobs. @@ -10678,6 +11325,9 @@ export interface JobOperations { * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -10703,9 +11353,9 @@ export interface JobOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listByAutomationAccountNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listByAutomationAccountNext(nextPageLink: string, options?: { clientRequestId? : string, customHeaders? : { [headerName: string]: string; } }): Promise; listByAutomationAccountNext(nextPageLink: string, callback: ServiceCallback): void; - listByAutomationAccountNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listByAutomationAccountNext(nextPageLink: string, options: { clientRequestId? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; } /** @@ -10720,12 +11370,19 @@ export interface JobStreamOperations { /** * Retrieve the job stream identified by job stream id. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {string} jobName The job name. * * @param {string} jobStreamId The job stream id. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -10735,17 +11392,24 @@ export interface JobStreamOperations { * * @reject {Error|ServiceError} - The error object. */ - getWithHttpOperationResponse(jobName: string, jobStreamId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, jobName: string, jobStreamId: string, options?: { clientRequestId? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieve the job stream identified by job stream id. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {string} jobName The job name. * * @param {string} jobStreamId The job stream id. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -10771,20 +11435,27 @@ export interface JobStreamOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - get(jobName: string, jobStreamId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - get(jobName: string, jobStreamId: string, callback: ServiceCallback): void; - get(jobName: string, jobStreamId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + get(resourceGroupName: string, automationAccountName: string, jobName: string, jobStreamId: string, options?: { clientRequestId? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + get(resourceGroupName: string, automationAccountName: string, jobName: string, jobStreamId: string, callback: ServiceCallback): void; + get(resourceGroupName: string, automationAccountName: string, jobName: string, jobStreamId: string, options: { clientRequestId? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Retrieve a list of jobs streams identified by job name. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {string} jobName The job name. * * @param {object} [options] Optional Parameters. * * @param {string} [options.filter] The filter to apply on the operation. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -10794,17 +11465,24 @@ export interface JobStreamOperations { * * @reject {Error|ServiceError} - The error object. */ - listByJobWithHttpOperationResponse(jobName: string, options?: { filter? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; + listByJobWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, jobName: string, options?: { filter? : string, clientRequestId? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieve a list of jobs streams identified by job name. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {string} jobName The job name. * * @param {object} [options] Optional Parameters. * * @param {string} [options.filter] The filter to apply on the operation. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -10830,9 +11508,9 @@ export interface JobStreamOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listByJob(jobName: string, options?: { filter? : string, customHeaders? : { [headerName: string]: string; } }): Promise; - listByJob(jobName: string, callback: ServiceCallback): void; - listByJob(jobName: string, options: { filter? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listByJob(resourceGroupName: string, automationAccountName: string, jobName: string, options?: { filter? : string, clientRequestId? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + listByJob(resourceGroupName: string, automationAccountName: string, jobName: string, callback: ServiceCallback): void; + listByJob(resourceGroupName: string, automationAccountName: string, jobName: string, options: { filter? : string, clientRequestId? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -10843,6 +11521,9 @@ export interface JobStreamOperations { * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -10852,7 +11533,7 @@ export interface JobStreamOperations { * * @reject {Error|ServiceError} - The error object. */ - listByJobNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listByJobNextWithHttpOperationResponse(nextPageLink: string, options?: { clientRequestId? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieve a list of jobs streams identified by job name. @@ -10862,6 +11543,9 @@ export interface JobStreamOperations { * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -10887,7 +11571,7 @@ export interface JobStreamOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listByJobNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listByJobNext(nextPageLink: string, options?: { clientRequestId? : string, customHeaders? : { [headerName: string]: string; } }): Promise; listByJobNext(nextPageLink: string, callback: ServiceCallback): void; - listByJobNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listByJobNext(nextPageLink: string, options: { clientRequestId? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; } diff --git a/lib/services/automationManagement/lib/operations/jobOperations.js b/lib/services/automationManagement/lib/operations/jobOperations.js index 05c64386ee..fac6162054 100644 --- a/lib/services/automationManagement/lib/operations/jobOperations.js +++ b/lib/services/automationManagement/lib/operations/jobOperations.js @@ -17,10 +17,17 @@ const WebResource = msRest.WebResource; /** * Retrieve the job output identified by job name. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {string} jobName The name of the job to be created. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -36,7 +43,7 @@ const WebResource = msRest.WebResource; * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _getOutput(jobName, options, callback) { +function _getOutput(resourceGroupName, automationAccountName, jobName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -46,29 +53,30 @@ function _getOutput(jobName, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } + let clientRequestId = (options && options.clientRequestId !== undefined) ? options.clientRequestId : undefined; let apiVersion = '2017-05-15-preview'; // Validate try { if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } - if (this.client.automationAccountName === null || this.client.automationAccountName === undefined || typeof this.client.automationAccountName.valueOf() !== 'string') { - throw new Error('this.client.automationAccountName cannot be null or undefined and it must be of type string.'); + if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { + throw new Error('automationAccountName cannot be null or undefined and it must be of type string.'); } if (jobName === null || jobName === undefined || typeof jobName.valueOf() !== 'string') { throw new Error('jobName cannot be null or undefined and it must be of type string.'); } - if (this.client.clientRequestId !== null && this.client.clientRequestId !== undefined && typeof this.client.clientRequestId.valueOf() !== 'string') { - throw new Error('this.client.clientRequestId must be of type string.'); + if (clientRequestId !== null && clientRequestId !== undefined && typeof clientRequestId.valueOf() !== 'string') { + throw new Error('clientRequestId must be of type string.'); } if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { throw new Error('this.client.acceptLanguage must be of type string.'); @@ -81,8 +89,8 @@ function _getOutput(jobName, options, callback) { let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/jobs/{jobName}/output'; requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); - requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(this.client.automationAccountName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{jobName}', encodeURIComponent(jobName)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); @@ -100,8 +108,8 @@ function _getOutput(jobName, options, callback) { if (this.client.generateClientRequestId) { httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); } - if (this.client.clientRequestId !== undefined && this.client.clientRequestId !== null) { - httpRequest.headers['clientRequestId'] = this.client.clientRequestId; + if (clientRequestId !== undefined && clientRequestId !== null) { + httpRequest.headers['clientRequestId'] = clientRequestId; } if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { httpRequest.headers['accept-language'] = this.client.acceptLanguage; @@ -179,10 +187,17 @@ function _getOutput(jobName, options, callback) { /** * Retrieve the runbook content of the job identified by job name. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {string} jobName The job name. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -198,7 +213,7 @@ function _getOutput(jobName, options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _getRunbookContent(jobName, options, callback) { +function _getRunbookContent(resourceGroupName, automationAccountName, jobName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -208,29 +223,30 @@ function _getRunbookContent(jobName, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } + let clientRequestId = (options && options.clientRequestId !== undefined) ? options.clientRequestId : undefined; let apiVersion = '2017-05-15-preview'; // Validate try { if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } - if (this.client.automationAccountName === null || this.client.automationAccountName === undefined || typeof this.client.automationAccountName.valueOf() !== 'string') { - throw new Error('this.client.automationAccountName cannot be null or undefined and it must be of type string.'); + if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { + throw new Error('automationAccountName cannot be null or undefined and it must be of type string.'); } if (jobName === null || jobName === undefined || typeof jobName.valueOf() !== 'string') { throw new Error('jobName cannot be null or undefined and it must be of type string.'); } - if (this.client.clientRequestId !== null && this.client.clientRequestId !== undefined && typeof this.client.clientRequestId.valueOf() !== 'string') { - throw new Error('this.client.clientRequestId must be of type string.'); + if (clientRequestId !== null && clientRequestId !== undefined && typeof clientRequestId.valueOf() !== 'string') { + throw new Error('clientRequestId must be of type string.'); } if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { throw new Error('this.client.acceptLanguage must be of type string.'); @@ -243,8 +259,8 @@ function _getRunbookContent(jobName, options, callback) { let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/jobs/{jobName}/runbookContent'; requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); - requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(this.client.automationAccountName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{jobName}', encodeURIComponent(jobName)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); @@ -262,8 +278,8 @@ function _getRunbookContent(jobName, options, callback) { if (this.client.generateClientRequestId) { httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); } - if (this.client.clientRequestId !== undefined && this.client.clientRequestId !== null) { - httpRequest.headers['clientRequestId'] = this.client.clientRequestId; + if (clientRequestId !== undefined && clientRequestId !== null) { + httpRequest.headers['clientRequestId'] = clientRequestId; } if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { httpRequest.headers['accept-language'] = this.client.acceptLanguage; @@ -341,10 +357,17 @@ function _getRunbookContent(jobName, options, callback) { /** * Suspend the job identified by job name. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {string} jobName The job name. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -360,7 +383,7 @@ function _getRunbookContent(jobName, options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _suspend(jobName, options, callback) { +function _suspend(resourceGroupName, automationAccountName, jobName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -370,29 +393,30 @@ function _suspend(jobName, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } + let clientRequestId = (options && options.clientRequestId !== undefined) ? options.clientRequestId : undefined; let apiVersion = '2017-05-15-preview'; // Validate try { if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } - if (this.client.automationAccountName === null || this.client.automationAccountName === undefined || typeof this.client.automationAccountName.valueOf() !== 'string') { - throw new Error('this.client.automationAccountName cannot be null or undefined and it must be of type string.'); + if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { + throw new Error('automationAccountName cannot be null or undefined and it must be of type string.'); } if (jobName === null || jobName === undefined || typeof jobName.valueOf() !== 'string') { throw new Error('jobName cannot be null or undefined and it must be of type string.'); } - if (this.client.clientRequestId !== null && this.client.clientRequestId !== undefined && typeof this.client.clientRequestId.valueOf() !== 'string') { - throw new Error('this.client.clientRequestId must be of type string.'); + if (clientRequestId !== null && clientRequestId !== undefined && typeof clientRequestId.valueOf() !== 'string') { + throw new Error('clientRequestId must be of type string.'); } if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { throw new Error('this.client.acceptLanguage must be of type string.'); @@ -405,8 +429,8 @@ function _suspend(jobName, options, callback) { let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/jobs/{jobName}/suspend'; requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); - requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(this.client.automationAccountName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{jobName}', encodeURIComponent(jobName)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); @@ -424,8 +448,8 @@ function _suspend(jobName, options, callback) { if (this.client.generateClientRequestId) { httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); } - if (this.client.clientRequestId !== undefined && this.client.clientRequestId !== null) { - httpRequest.headers['clientRequestId'] = this.client.clientRequestId; + if (clientRequestId !== undefined && clientRequestId !== null) { + httpRequest.headers['clientRequestId'] = clientRequestId; } if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { httpRequest.headers['accept-language'] = this.client.acceptLanguage; @@ -481,10 +505,17 @@ function _suspend(jobName, options, callback) { /** * Stop the job identified by jobName. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {string} jobName The job name. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -500,7 +531,7 @@ function _suspend(jobName, options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _stop(jobName, options, callback) { +function _stop(resourceGroupName, automationAccountName, jobName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -510,20 +541,21 @@ function _stop(jobName, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } + let clientRequestId = (options && options.clientRequestId !== undefined) ? options.clientRequestId : undefined; let apiVersion = '2017-05-15-preview'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } - if (this.client.automationAccountName === null || this.client.automationAccountName === undefined || typeof this.client.automationAccountName.valueOf() !== 'string') { - throw new Error('this.client.automationAccountName cannot be null or undefined and it must be of type string.'); + if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { + throw new Error('automationAccountName cannot be null or undefined and it must be of type string.'); } if (jobName === null || jobName === undefined || typeof jobName.valueOf() !== 'string') { throw new Error('jobName cannot be null or undefined and it must be of type string.'); @@ -531,8 +563,8 @@ function _stop(jobName, options, callback) { if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); } - if (this.client.clientRequestId !== null && this.client.clientRequestId !== undefined && typeof this.client.clientRequestId.valueOf() !== 'string') { - throw new Error('this.client.clientRequestId must be of type string.'); + if (clientRequestId !== null && clientRequestId !== undefined && typeof clientRequestId.valueOf() !== 'string') { + throw new Error('clientRequestId must be of type string.'); } if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { throw new Error('this.client.acceptLanguage must be of type string.'); @@ -544,8 +576,8 @@ function _stop(jobName, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/jobs/{jobName}/stop'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); - requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(this.client.automationAccountName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{jobName}', encodeURIComponent(jobName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; @@ -564,8 +596,8 @@ function _stop(jobName, options, callback) { if (this.client.generateClientRequestId) { httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); } - if (this.client.clientRequestId !== undefined && this.client.clientRequestId !== null) { - httpRequest.headers['clientRequestId'] = this.client.clientRequestId; + if (clientRequestId !== undefined && clientRequestId !== null) { + httpRequest.headers['clientRequestId'] = clientRequestId; } if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { httpRequest.headers['accept-language'] = this.client.acceptLanguage; @@ -621,10 +653,17 @@ function _stop(jobName, options, callback) { /** * Retrieve the job identified by job name. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {string} jobName The job name. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -641,7 +680,7 @@ function _stop(jobName, options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _get(jobName, options, callback) { +function _get(resourceGroupName, automationAccountName, jobName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -651,29 +690,30 @@ function _get(jobName, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } + let clientRequestId = (options && options.clientRequestId !== undefined) ? options.clientRequestId : undefined; let apiVersion = '2017-05-15-preview'; // Validate try { if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } - if (this.client.automationAccountName === null || this.client.automationAccountName === undefined || typeof this.client.automationAccountName.valueOf() !== 'string') { - throw new Error('this.client.automationAccountName cannot be null or undefined and it must be of type string.'); + if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { + throw new Error('automationAccountName cannot be null or undefined and it must be of type string.'); } if (jobName === null || jobName === undefined || typeof jobName.valueOf() !== 'string') { throw new Error('jobName cannot be null or undefined and it must be of type string.'); } - if (this.client.clientRequestId !== null && this.client.clientRequestId !== undefined && typeof this.client.clientRequestId.valueOf() !== 'string') { - throw new Error('this.client.clientRequestId must be of type string.'); + if (clientRequestId !== null && clientRequestId !== undefined && typeof clientRequestId.valueOf() !== 'string') { + throw new Error('clientRequestId must be of type string.'); } if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { throw new Error('this.client.acceptLanguage must be of type string.'); @@ -686,8 +726,8 @@ function _get(jobName, options, callback) { let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/jobs/{jobName}'; requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); - requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(this.client.automationAccountName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{jobName}', encodeURIComponent(jobName)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); @@ -705,8 +745,8 @@ function _get(jobName, options, callback) { if (this.client.generateClientRequestId) { httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); } - if (this.client.clientRequestId !== undefined && this.client.clientRequestId !== null) { - httpRequest.headers['clientRequestId'] = this.client.clientRequestId; + if (clientRequestId !== undefined && clientRequestId !== null) { + httpRequest.headers['clientRequestId'] = clientRequestId; } if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { httpRequest.headers['accept-language'] = this.client.acceptLanguage; @@ -779,6 +819,10 @@ function _get(jobName, options, callback) { /** * Create a job of the runbook. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {string} jobName The job name. * * @param {object} parameters The parameters supplied to the create job @@ -797,6 +841,9 @@ function _get(jobName, options, callback) { * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -813,7 +860,7 @@ function _get(jobName, options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _create(jobName, parameters, options, callback) { +function _create(resourceGroupName, automationAccountName, jobName, parameters, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -823,23 +870,24 @@ function _create(jobName, parameters, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } + let clientRequestId = (options && options.clientRequestId !== undefined) ? options.clientRequestId : undefined; let apiVersion = '2017-05-15-preview'; // Validate try { if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } - if (this.client.automationAccountName === null || this.client.automationAccountName === undefined || typeof this.client.automationAccountName.valueOf() !== 'string') { - throw new Error('this.client.automationAccountName cannot be null or undefined and it must be of type string.'); + if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { + throw new Error('automationAccountName cannot be null or undefined and it must be of type string.'); } if (jobName === null || jobName === undefined || typeof jobName.valueOf() !== 'string') { throw new Error('jobName cannot be null or undefined and it must be of type string.'); @@ -847,8 +895,8 @@ function _create(jobName, parameters, options, callback) { if (parameters === null || parameters === undefined) { throw new Error('parameters cannot be null or undefined.'); } - if (this.client.clientRequestId !== null && this.client.clientRequestId !== undefined && typeof this.client.clientRequestId.valueOf() !== 'string') { - throw new Error('this.client.clientRequestId must be of type string.'); + if (clientRequestId !== null && clientRequestId !== undefined && typeof clientRequestId.valueOf() !== 'string') { + throw new Error('clientRequestId must be of type string.'); } if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { throw new Error('this.client.acceptLanguage must be of type string.'); @@ -861,8 +909,8 @@ function _create(jobName, parameters, options, callback) { let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/jobs/{jobName}'; requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); - requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(this.client.automationAccountName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{jobName}', encodeURIComponent(jobName)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); @@ -880,8 +928,8 @@ function _create(jobName, parameters, options, callback) { if (this.client.generateClientRequestId) { httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); } - if (this.client.clientRequestId !== undefined && this.client.clientRequestId !== null) { - httpRequest.headers['clientRequestId'] = this.client.clientRequestId; + if (clientRequestId !== undefined && clientRequestId !== null) { + httpRequest.headers['clientRequestId'] = clientRequestId; } if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { httpRequest.headers['accept-language'] = this.client.acceptLanguage; @@ -968,10 +1016,17 @@ function _create(jobName, parameters, options, callback) { /** * Retrieve a list of jobs. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {object} [options] Optional Parameters. * * @param {string} [options.filter] The filter to apply on the operation. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -988,7 +1043,7 @@ function _create(jobName, parameters, options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _listByAutomationAccount(options, callback) { +function _listByAutomationAccount(resourceGroupName, automationAccountName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -999,20 +1054,21 @@ function _listByAutomationAccount(options, callback) { throw new Error('callback cannot be null.'); } let filter = (options && options.filter !== undefined) ? options.filter : undefined; + let clientRequestId = (options && options.clientRequestId !== undefined) ? options.clientRequestId : undefined; let apiVersion = '2017-05-15-preview'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } - if (this.client.automationAccountName === null || this.client.automationAccountName === undefined || typeof this.client.automationAccountName.valueOf() !== 'string') { - throw new Error('this.client.automationAccountName cannot be null or undefined and it must be of type string.'); + if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { + throw new Error('automationAccountName cannot be null or undefined and it must be of type string.'); } if (filter !== null && filter !== undefined && typeof filter.valueOf() !== 'string') { throw new Error('filter must be of type string.'); @@ -1020,8 +1076,8 @@ function _listByAutomationAccount(options, callback) { if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); } - if (this.client.clientRequestId !== null && this.client.clientRequestId !== undefined && typeof this.client.clientRequestId.valueOf() !== 'string') { - throw new Error('this.client.clientRequestId must be of type string.'); + if (clientRequestId !== null && clientRequestId !== undefined && typeof clientRequestId.valueOf() !== 'string') { + throw new Error('clientRequestId must be of type string.'); } if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { throw new Error('this.client.acceptLanguage must be of type string.'); @@ -1033,8 +1089,8 @@ function _listByAutomationAccount(options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/jobs'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); - requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(this.client.automationAccountName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; if (filter !== null && filter !== undefined) { @@ -1055,8 +1111,8 @@ function _listByAutomationAccount(options, callback) { if (this.client.generateClientRequestId) { httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); } - if (this.client.clientRequestId !== undefined && this.client.clientRequestId !== null) { - httpRequest.headers['clientRequestId'] = this.client.clientRequestId; + if (clientRequestId !== undefined && clientRequestId !== null) { + httpRequest.headers['clientRequestId'] = clientRequestId; } if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { httpRequest.headers['accept-language'] = this.client.acceptLanguage; @@ -1129,10 +1185,17 @@ function _listByAutomationAccount(options, callback) { /** * Resume the job identified by jobName. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {string} jobName The job name. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -1148,7 +1211,7 @@ function _listByAutomationAccount(options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _resume(jobName, options, callback) { +function _resume(resourceGroupName, automationAccountName, jobName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -1158,20 +1221,21 @@ function _resume(jobName, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } + let clientRequestId = (options && options.clientRequestId !== undefined) ? options.clientRequestId : undefined; let apiVersion = '2017-05-15-preview'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } - if (this.client.automationAccountName === null || this.client.automationAccountName === undefined || typeof this.client.automationAccountName.valueOf() !== 'string') { - throw new Error('this.client.automationAccountName cannot be null or undefined and it must be of type string.'); + if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { + throw new Error('automationAccountName cannot be null or undefined and it must be of type string.'); } if (jobName === null || jobName === undefined || typeof jobName.valueOf() !== 'string') { throw new Error('jobName cannot be null or undefined and it must be of type string.'); @@ -1179,8 +1243,8 @@ function _resume(jobName, options, callback) { if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); } - if (this.client.clientRequestId !== null && this.client.clientRequestId !== undefined && typeof this.client.clientRequestId.valueOf() !== 'string') { - throw new Error('this.client.clientRequestId must be of type string.'); + if (clientRequestId !== null && clientRequestId !== undefined && typeof clientRequestId.valueOf() !== 'string') { + throw new Error('clientRequestId must be of type string.'); } if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { throw new Error('this.client.acceptLanguage must be of type string.'); @@ -1192,8 +1256,8 @@ function _resume(jobName, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/jobs/{jobName}/resume'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); - requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(this.client.automationAccountName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{jobName}', encodeURIComponent(jobName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; @@ -1212,8 +1276,8 @@ function _resume(jobName, options, callback) { if (this.client.generateClientRequestId) { httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); } - if (this.client.clientRequestId !== undefined && this.client.clientRequestId !== null) { - httpRequest.headers['clientRequestId'] = this.client.clientRequestId; + if (clientRequestId !== undefined && clientRequestId !== null) { + httpRequest.headers['clientRequestId'] = clientRequestId; } if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { httpRequest.headers['accept-language'] = this.client.acceptLanguage; @@ -1274,6 +1338,9 @@ function _resume(jobName, options, callback) { * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -1300,13 +1367,14 @@ function _listByAutomationAccountNext(nextPageLink, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } + let clientRequestId = (options && options.clientRequestId !== undefined) ? options.clientRequestId : undefined; // Validate try { if (nextPageLink === null || nextPageLink === undefined || typeof nextPageLink.valueOf() !== 'string') { throw new Error('nextPageLink cannot be null or undefined and it must be of type string.'); } - if (this.client.clientRequestId !== null && this.client.clientRequestId !== undefined && typeof this.client.clientRequestId.valueOf() !== 'string') { - throw new Error('this.client.clientRequestId must be of type string.'); + if (clientRequestId !== null && clientRequestId !== undefined && typeof clientRequestId.valueOf() !== 'string') { + throw new Error('clientRequestId must be of type string.'); } if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { throw new Error('this.client.acceptLanguage must be of type string.'); @@ -1329,8 +1397,8 @@ function _listByAutomationAccountNext(nextPageLink, options, callback) { if (this.client.generateClientRequestId) { httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); } - if (this.client.clientRequestId !== undefined && this.client.clientRequestId !== null) { - httpRequest.headers['clientRequestId'] = this.client.clientRequestId; + if (clientRequestId !== undefined && clientRequestId !== null) { + httpRequest.headers['clientRequestId'] = clientRequestId; } if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { httpRequest.headers['accept-language'] = this.client.acceptLanguage; @@ -1422,10 +1490,17 @@ class JobOperations { /** * Retrieve the job output identified by job name. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {string} jobName The name of the job to be created. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -1435,11 +1510,11 @@ class JobOperations { * * @reject {Error} - The error object. */ - getOutputWithHttpOperationResponse(jobName, options) { + getOutputWithHttpOperationResponse(resourceGroupName, automationAccountName, jobName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._getOutput(jobName, options, (err, result, request, response) => { + self._getOutput(resourceGroupName, automationAccountName, jobName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1452,10 +1527,17 @@ class JobOperations { /** * Retrieve the job output identified by job name. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {string} jobName The name of the job to be created. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -1480,7 +1562,7 @@ class JobOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getOutput(jobName, options, optionalCallback) { + getOutput(resourceGroupName, automationAccountName, jobName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1489,24 +1571,31 @@ class JobOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getOutput(jobName, options, (err, result, request, response) => { + self._getOutput(resourceGroupName, automationAccountName, jobName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getOutput(jobName, options, optionalCallback); + return self._getOutput(resourceGroupName, automationAccountName, jobName, options, optionalCallback); } } /** * Retrieve the runbook content of the job identified by job name. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {string} jobName The job name. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -1516,11 +1605,11 @@ class JobOperations { * * @reject {Error} - The error object. */ - getRunbookContentWithHttpOperationResponse(jobName, options) { + getRunbookContentWithHttpOperationResponse(resourceGroupName, automationAccountName, jobName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._getRunbookContent(jobName, options, (err, result, request, response) => { + self._getRunbookContent(resourceGroupName, automationAccountName, jobName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1533,10 +1622,17 @@ class JobOperations { /** * Retrieve the runbook content of the job identified by job name. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {string} jobName The job name. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -1561,7 +1657,7 @@ class JobOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getRunbookContent(jobName, options, optionalCallback) { + getRunbookContent(resourceGroupName, automationAccountName, jobName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1570,24 +1666,31 @@ class JobOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getRunbookContent(jobName, options, (err, result, request, response) => { + self._getRunbookContent(resourceGroupName, automationAccountName, jobName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getRunbookContent(jobName, options, optionalCallback); + return self._getRunbookContent(resourceGroupName, automationAccountName, jobName, options, optionalCallback); } } /** * Suspend the job identified by job name. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {string} jobName The job name. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -1597,11 +1700,11 @@ class JobOperations { * * @reject {Error} - The error object. */ - suspendWithHttpOperationResponse(jobName, options) { + suspendWithHttpOperationResponse(resourceGroupName, automationAccountName, jobName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._suspend(jobName, options, (err, result, request, response) => { + self._suspend(resourceGroupName, automationAccountName, jobName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1614,10 +1717,17 @@ class JobOperations { /** * Suspend the job identified by job name. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {string} jobName The job name. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -1642,7 +1752,7 @@ class JobOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - suspend(jobName, options, optionalCallback) { + suspend(resourceGroupName, automationAccountName, jobName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1651,24 +1761,31 @@ class JobOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._suspend(jobName, options, (err, result, request, response) => { + self._suspend(resourceGroupName, automationAccountName, jobName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._suspend(jobName, options, optionalCallback); + return self._suspend(resourceGroupName, automationAccountName, jobName, options, optionalCallback); } } /** * Stop the job identified by jobName. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {string} jobName The job name. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -1678,11 +1795,11 @@ class JobOperations { * * @reject {Error} - The error object. */ - stopWithHttpOperationResponse(jobName, options) { + stopWithHttpOperationResponse(resourceGroupName, automationAccountName, jobName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._stop(jobName, options, (err, result, request, response) => { + self._stop(resourceGroupName, automationAccountName, jobName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1695,10 +1812,17 @@ class JobOperations { /** * Stop the job identified by jobName. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {string} jobName The job name. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -1723,7 +1847,7 @@ class JobOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - stop(jobName, options, optionalCallback) { + stop(resourceGroupName, automationAccountName, jobName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1732,24 +1856,31 @@ class JobOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._stop(jobName, options, (err, result, request, response) => { + self._stop(resourceGroupName, automationAccountName, jobName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._stop(jobName, options, optionalCallback); + return self._stop(resourceGroupName, automationAccountName, jobName, options, optionalCallback); } } /** * Retrieve the job identified by job name. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {string} jobName The job name. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -1759,11 +1890,11 @@ class JobOperations { * * @reject {Error} - The error object. */ - getWithHttpOperationResponse(jobName, options) { + getWithHttpOperationResponse(resourceGroupName, automationAccountName, jobName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._get(jobName, options, (err, result, request, response) => { + self._get(resourceGroupName, automationAccountName, jobName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1776,10 +1907,17 @@ class JobOperations { /** * Retrieve the job identified by job name. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {string} jobName The job name. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -1805,7 +1943,7 @@ class JobOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - get(jobName, options, optionalCallback) { + get(resourceGroupName, automationAccountName, jobName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1814,20 +1952,24 @@ class JobOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._get(jobName, options, (err, result, request, response) => { + self._get(resourceGroupName, automationAccountName, jobName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._get(jobName, options, optionalCallback); + return self._get(resourceGroupName, automationAccountName, jobName, options, optionalCallback); } } /** * Create a job of the runbook. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {string} jobName The job name. * * @param {object} parameters The parameters supplied to the create job @@ -1846,6 +1988,9 @@ class JobOperations { * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -1855,11 +2000,11 @@ class JobOperations { * * @reject {Error} - The error object. */ - createWithHttpOperationResponse(jobName, parameters, options) { + createWithHttpOperationResponse(resourceGroupName, automationAccountName, jobName, parameters, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._create(jobName, parameters, options, (err, result, request, response) => { + self._create(resourceGroupName, automationAccountName, jobName, parameters, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1872,6 +2017,10 @@ class JobOperations { /** * Create a job of the runbook. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {string} jobName The job name. * * @param {object} parameters The parameters supplied to the create job @@ -1890,6 +2039,9 @@ class JobOperations { * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -1915,7 +2067,7 @@ class JobOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - create(jobName, parameters, options, optionalCallback) { + create(resourceGroupName, automationAccountName, jobName, parameters, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1924,24 +2076,31 @@ class JobOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._create(jobName, parameters, options, (err, result, request, response) => { + self._create(resourceGroupName, automationAccountName, jobName, parameters, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._create(jobName, parameters, options, optionalCallback); + return self._create(resourceGroupName, automationAccountName, jobName, parameters, options, optionalCallback); } } /** * Retrieve a list of jobs. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {object} [options] Optional Parameters. * * @param {string} [options.filter] The filter to apply on the operation. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -1951,11 +2110,11 @@ class JobOperations { * * @reject {Error} - The error object. */ - listByAutomationAccountWithHttpOperationResponse(options) { + listByAutomationAccountWithHttpOperationResponse(resourceGroupName, automationAccountName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._listByAutomationAccount(options, (err, result, request, response) => { + self._listByAutomationAccount(resourceGroupName, automationAccountName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1968,10 +2127,17 @@ class JobOperations { /** * Retrieve a list of jobs. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {object} [options] Optional Parameters. * * @param {string} [options.filter] The filter to apply on the operation. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -1997,7 +2163,7 @@ class JobOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - listByAutomationAccount(options, optionalCallback) { + listByAutomationAccount(resourceGroupName, automationAccountName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -2006,24 +2172,31 @@ class JobOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._listByAutomationAccount(options, (err, result, request, response) => { + self._listByAutomationAccount(resourceGroupName, automationAccountName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._listByAutomationAccount(options, optionalCallback); + return self._listByAutomationAccount(resourceGroupName, automationAccountName, options, optionalCallback); } } /** * Resume the job identified by jobName. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {string} jobName The job name. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -2033,11 +2206,11 @@ class JobOperations { * * @reject {Error} - The error object. */ - resumeWithHttpOperationResponse(jobName, options) { + resumeWithHttpOperationResponse(resourceGroupName, automationAccountName, jobName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._resume(jobName, options, (err, result, request, response) => { + self._resume(resourceGroupName, automationAccountName, jobName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -2050,10 +2223,17 @@ class JobOperations { /** * Resume the job identified by jobName. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {string} jobName The job name. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -2078,7 +2258,7 @@ class JobOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - resume(jobName, options, optionalCallback) { + resume(resourceGroupName, automationAccountName, jobName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -2087,14 +2267,14 @@ class JobOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._resume(jobName, options, (err, result, request, response) => { + self._resume(resourceGroupName, automationAccountName, jobName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._resume(jobName, options, optionalCallback); + return self._resume(resourceGroupName, automationAccountName, jobName, options, optionalCallback); } } @@ -2106,6 +2286,9 @@ class JobOperations { * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -2137,6 +2320,9 @@ class JobOperations { * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * diff --git a/lib/services/automationManagement/lib/operations/jobScheduleOperations.js b/lib/services/automationManagement/lib/operations/jobScheduleOperations.js index 073d28a536..1d2333cd93 100644 --- a/lib/services/automationManagement/lib/operations/jobScheduleOperations.js +++ b/lib/services/automationManagement/lib/operations/jobScheduleOperations.js @@ -17,6 +17,8 @@ const WebResource = msRest.WebResource; /** * Delete the job schedule identified by job schedule name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {uuid} jobScheduleId The job schedule name. @@ -38,7 +40,7 @@ const WebResource = msRest.WebResource; * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _deleteMethod(automationAccountName, jobScheduleId, options, callback) { +function _deleteMethod(resourceGroupName, automationAccountName, jobScheduleId, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -51,13 +53,13 @@ function _deleteMethod(automationAccountName, jobScheduleId, options, callback) let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -79,7 +81,7 @@ function _deleteMethod(automationAccountName, jobScheduleId, options, callback) // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/jobSchedules/{jobScheduleId}'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{jobScheduleId}', encodeURIComponent(jobScheduleId.toString())); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -153,6 +155,8 @@ function _deleteMethod(automationAccountName, jobScheduleId, options, callback) /** * Retrieve the job schedule identified by job schedule name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {uuid} jobScheduleId The job schedule name. @@ -175,7 +179,7 @@ function _deleteMethod(automationAccountName, jobScheduleId, options, callback) * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _get(automationAccountName, jobScheduleId, options, callback) { +function _get(resourceGroupName, automationAccountName, jobScheduleId, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -188,13 +192,13 @@ function _get(automationAccountName, jobScheduleId, options, callback) { let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -216,7 +220,7 @@ function _get(automationAccountName, jobScheduleId, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/jobSchedules/{jobScheduleId}'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{jobScheduleId}', encodeURIComponent(jobScheduleId.toString())); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -307,6 +311,8 @@ function _get(automationAccountName, jobScheduleId, options, callback) { /** * Create a job schedule. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {uuid} jobScheduleId The job schedule name. @@ -348,7 +354,7 @@ function _get(automationAccountName, jobScheduleId, options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _create(automationAccountName, jobScheduleId, parameters, options, callback) { +function _create(resourceGroupName, automationAccountName, jobScheduleId, parameters, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -361,13 +367,13 @@ function _create(automationAccountName, jobScheduleId, parameters, options, call let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -392,7 +398,7 @@ function _create(automationAccountName, jobScheduleId, parameters, options, call // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/jobSchedules/{jobScheduleId}'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{jobScheduleId}', encodeURIComponent(jobScheduleId.toString())); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -497,6 +503,8 @@ function _create(automationAccountName, jobScheduleId, parameters, options, call /** * Retrieve a list of job schedules. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -517,7 +525,7 @@ function _create(automationAccountName, jobScheduleId, parameters, options, call * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _listByAutomationAccount(automationAccountName, options, callback) { +function _listByAutomationAccount(resourceGroupName, automationAccountName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -530,13 +538,13 @@ function _listByAutomationAccount(automationAccountName, options, callback) { let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -555,7 +563,7 @@ function _listByAutomationAccount(automationAccountName, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/jobSchedules'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; @@ -788,6 +796,8 @@ class JobScheduleOperations { /** * Delete the job schedule identified by job schedule name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {uuid} jobScheduleId The job schedule name. @@ -803,11 +813,11 @@ class JobScheduleOperations { * * @reject {Error} - The error object. */ - deleteMethodWithHttpOperationResponse(automationAccountName, jobScheduleId, options) { + deleteMethodWithHttpOperationResponse(resourceGroupName, automationAccountName, jobScheduleId, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._deleteMethod(automationAccountName, jobScheduleId, options, (err, result, request, response) => { + self._deleteMethod(resourceGroupName, automationAccountName, jobScheduleId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -820,6 +830,8 @@ class JobScheduleOperations { /** * Delete the job schedule identified by job schedule name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {uuid} jobScheduleId The job schedule name. @@ -850,7 +862,7 @@ class JobScheduleOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(automationAccountName, jobScheduleId, options, optionalCallback) { + deleteMethod(resourceGroupName, automationAccountName, jobScheduleId, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -859,20 +871,22 @@ class JobScheduleOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._deleteMethod(automationAccountName, jobScheduleId, options, (err, result, request, response) => { + self._deleteMethod(resourceGroupName, automationAccountName, jobScheduleId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._deleteMethod(automationAccountName, jobScheduleId, options, optionalCallback); + return self._deleteMethod(resourceGroupName, automationAccountName, jobScheduleId, options, optionalCallback); } } /** * Retrieve the job schedule identified by job schedule name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {uuid} jobScheduleId The job schedule name. @@ -888,11 +902,11 @@ class JobScheduleOperations { * * @reject {Error} - The error object. */ - getWithHttpOperationResponse(automationAccountName, jobScheduleId, options) { + getWithHttpOperationResponse(resourceGroupName, automationAccountName, jobScheduleId, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._get(automationAccountName, jobScheduleId, options, (err, result, request, response) => { + self._get(resourceGroupName, automationAccountName, jobScheduleId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -905,6 +919,8 @@ class JobScheduleOperations { /** * Retrieve the job schedule identified by job schedule name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {uuid} jobScheduleId The job schedule name. @@ -936,7 +952,7 @@ class JobScheduleOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - get(automationAccountName, jobScheduleId, options, optionalCallback) { + get(resourceGroupName, automationAccountName, jobScheduleId, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -945,20 +961,22 @@ class JobScheduleOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._get(automationAccountName, jobScheduleId, options, (err, result, request, response) => { + self._get(resourceGroupName, automationAccountName, jobScheduleId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._get(automationAccountName, jobScheduleId, options, optionalCallback); + return self._get(resourceGroupName, automationAccountName, jobScheduleId, options, optionalCallback); } } /** * Create a job schedule. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {uuid} jobScheduleId The job schedule name. @@ -993,11 +1011,11 @@ class JobScheduleOperations { * * @reject {Error} - The error object. */ - createWithHttpOperationResponse(automationAccountName, jobScheduleId, parameters, options) { + createWithHttpOperationResponse(resourceGroupName, automationAccountName, jobScheduleId, parameters, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._create(automationAccountName, jobScheduleId, parameters, options, (err, result, request, response) => { + self._create(resourceGroupName, automationAccountName, jobScheduleId, parameters, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1010,6 +1028,8 @@ class JobScheduleOperations { /** * Create a job schedule. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {uuid} jobScheduleId The job schedule name. @@ -1060,7 +1080,7 @@ class JobScheduleOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - create(automationAccountName, jobScheduleId, parameters, options, optionalCallback) { + create(resourceGroupName, automationAccountName, jobScheduleId, parameters, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1069,20 +1089,22 @@ class JobScheduleOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._create(automationAccountName, jobScheduleId, parameters, options, (err, result, request, response) => { + self._create(resourceGroupName, automationAccountName, jobScheduleId, parameters, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._create(automationAccountName, jobScheduleId, parameters, options, optionalCallback); + return self._create(resourceGroupName, automationAccountName, jobScheduleId, parameters, options, optionalCallback); } } /** * Retrieve a list of job schedules. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -1096,11 +1118,11 @@ class JobScheduleOperations { * * @reject {Error} - The error object. */ - listByAutomationAccountWithHttpOperationResponse(automationAccountName, options) { + listByAutomationAccountWithHttpOperationResponse(resourceGroupName, automationAccountName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._listByAutomationAccount(automationAccountName, options, (err, result, request, response) => { + self._listByAutomationAccount(resourceGroupName, automationAccountName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1113,6 +1135,8 @@ class JobScheduleOperations { /** * Retrieve a list of job schedules. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -1142,7 +1166,7 @@ class JobScheduleOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - listByAutomationAccount(automationAccountName, options, optionalCallback) { + listByAutomationAccount(resourceGroupName, automationAccountName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1151,14 +1175,14 @@ class JobScheduleOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._listByAutomationAccount(automationAccountName, options, (err, result, request, response) => { + self._listByAutomationAccount(resourceGroupName, automationAccountName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._listByAutomationAccount(automationAccountName, options, optionalCallback); + return self._listByAutomationAccount(resourceGroupName, automationAccountName, options, optionalCallback); } } diff --git a/lib/services/automationManagement/lib/operations/jobStreamOperations.js b/lib/services/automationManagement/lib/operations/jobStreamOperations.js index 75db40543f..7527b8fad3 100644 --- a/lib/services/automationManagement/lib/operations/jobStreamOperations.js +++ b/lib/services/automationManagement/lib/operations/jobStreamOperations.js @@ -17,12 +17,19 @@ const WebResource = msRest.WebResource; /** * Retrieve the job stream identified by job stream id. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {string} jobName The job name. * * @param {string} jobStreamId The job stream id. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -39,7 +46,7 @@ const WebResource = msRest.WebResource; * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _get(jobName, jobStreamId, options, callback) { +function _get(resourceGroupName, automationAccountName, jobName, jobStreamId, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -49,23 +56,24 @@ function _get(jobName, jobStreamId, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } + let clientRequestId = (options && options.clientRequestId !== undefined) ? options.clientRequestId : undefined; let apiVersion = '2017-05-15-preview'; // Validate try { if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } - if (this.client.automationAccountName === null || this.client.automationAccountName === undefined || typeof this.client.automationAccountName.valueOf() !== 'string') { - throw new Error('this.client.automationAccountName cannot be null or undefined and it must be of type string.'); + if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { + throw new Error('automationAccountName cannot be null or undefined and it must be of type string.'); } if (jobName === null || jobName === undefined || typeof jobName.valueOf() !== 'string') { throw new Error('jobName cannot be null or undefined and it must be of type string.'); @@ -73,8 +81,8 @@ function _get(jobName, jobStreamId, options, callback) { if (jobStreamId === null || jobStreamId === undefined || typeof jobStreamId.valueOf() !== 'string') { throw new Error('jobStreamId cannot be null or undefined and it must be of type string.'); } - if (this.client.clientRequestId !== null && this.client.clientRequestId !== undefined && typeof this.client.clientRequestId.valueOf() !== 'string') { - throw new Error('this.client.clientRequestId must be of type string.'); + if (clientRequestId !== null && clientRequestId !== undefined && typeof clientRequestId.valueOf() !== 'string') { + throw new Error('clientRequestId must be of type string.'); } if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { throw new Error('this.client.acceptLanguage must be of type string.'); @@ -87,8 +95,8 @@ function _get(jobName, jobStreamId, options, callback) { let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/jobs/{jobName}/streams/{jobStreamId}'; requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); - requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(this.client.automationAccountName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{jobName}', encodeURIComponent(jobName)); requestUrl = requestUrl.replace('{jobStreamId}', encodeURIComponent(jobStreamId)); let queryParameters = []; @@ -107,8 +115,8 @@ function _get(jobName, jobStreamId, options, callback) { if (this.client.generateClientRequestId) { httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); } - if (this.client.clientRequestId !== undefined && this.client.clientRequestId !== null) { - httpRequest.headers['clientRequestId'] = this.client.clientRequestId; + if (clientRequestId !== undefined && clientRequestId !== null) { + httpRequest.headers['clientRequestId'] = clientRequestId; } if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { httpRequest.headers['accept-language'] = this.client.acceptLanguage; @@ -181,12 +189,19 @@ function _get(jobName, jobStreamId, options, callback) { /** * Retrieve a list of jobs streams identified by job name. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {string} jobName The job name. * * @param {object} [options] Optional Parameters. * * @param {string} [options.filter] The filter to apply on the operation. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -203,7 +218,7 @@ function _get(jobName, jobStreamId, options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _listByJob(jobName, options, callback) { +function _listByJob(resourceGroupName, automationAccountName, jobName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -214,20 +229,21 @@ function _listByJob(jobName, options, callback) { throw new Error('callback cannot be null.'); } let filter = (options && options.filter !== undefined) ? options.filter : undefined; + let clientRequestId = (options && options.clientRequestId !== undefined) ? options.clientRequestId : undefined; let apiVersion = '2017-05-15-preview'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } - if (this.client.automationAccountName === null || this.client.automationAccountName === undefined || typeof this.client.automationAccountName.valueOf() !== 'string') { - throw new Error('this.client.automationAccountName cannot be null or undefined and it must be of type string.'); + if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { + throw new Error('automationAccountName cannot be null or undefined and it must be of type string.'); } if (jobName === null || jobName === undefined || typeof jobName.valueOf() !== 'string') { throw new Error('jobName cannot be null or undefined and it must be of type string.'); @@ -238,8 +254,8 @@ function _listByJob(jobName, options, callback) { if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); } - if (this.client.clientRequestId !== null && this.client.clientRequestId !== undefined && typeof this.client.clientRequestId.valueOf() !== 'string') { - throw new Error('this.client.clientRequestId must be of type string.'); + if (clientRequestId !== null && clientRequestId !== undefined && typeof clientRequestId.valueOf() !== 'string') { + throw new Error('clientRequestId must be of type string.'); } if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { throw new Error('this.client.acceptLanguage must be of type string.'); @@ -251,8 +267,8 @@ function _listByJob(jobName, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/jobs/{jobName}/streams'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); - requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(this.client.automationAccountName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{jobName}', encodeURIComponent(jobName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; @@ -274,8 +290,8 @@ function _listByJob(jobName, options, callback) { if (this.client.generateClientRequestId) { httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); } - if (this.client.clientRequestId !== undefined && this.client.clientRequestId !== null) { - httpRequest.headers['clientRequestId'] = this.client.clientRequestId; + if (clientRequestId !== undefined && clientRequestId !== null) { + httpRequest.headers['clientRequestId'] = clientRequestId; } if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { httpRequest.headers['accept-language'] = this.client.acceptLanguage; @@ -353,6 +369,9 @@ function _listByJob(jobName, options, callback) { * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -379,13 +398,14 @@ function _listByJobNext(nextPageLink, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } + let clientRequestId = (options && options.clientRequestId !== undefined) ? options.clientRequestId : undefined; // Validate try { if (nextPageLink === null || nextPageLink === undefined || typeof nextPageLink.valueOf() !== 'string') { throw new Error('nextPageLink cannot be null or undefined and it must be of type string.'); } - if (this.client.clientRequestId !== null && this.client.clientRequestId !== undefined && typeof this.client.clientRequestId.valueOf() !== 'string') { - throw new Error('this.client.clientRequestId must be of type string.'); + if (clientRequestId !== null && clientRequestId !== undefined && typeof clientRequestId.valueOf() !== 'string') { + throw new Error('clientRequestId must be of type string.'); } if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { throw new Error('this.client.acceptLanguage must be of type string.'); @@ -408,8 +428,8 @@ function _listByJobNext(nextPageLink, options, callback) { if (this.client.generateClientRequestId) { httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); } - if (this.client.clientRequestId !== undefined && this.client.clientRequestId !== null) { - httpRequest.headers['clientRequestId'] = this.client.clientRequestId; + if (clientRequestId !== undefined && clientRequestId !== null) { + httpRequest.headers['clientRequestId'] = clientRequestId; } if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { httpRequest.headers['accept-language'] = this.client.acceptLanguage; @@ -495,12 +515,19 @@ class JobStreamOperations { /** * Retrieve the job stream identified by job stream id. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {string} jobName The job name. * * @param {string} jobStreamId The job stream id. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -510,11 +537,11 @@ class JobStreamOperations { * * @reject {Error} - The error object. */ - getWithHttpOperationResponse(jobName, jobStreamId, options) { + getWithHttpOperationResponse(resourceGroupName, automationAccountName, jobName, jobStreamId, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._get(jobName, jobStreamId, options, (err, result, request, response) => { + self._get(resourceGroupName, automationAccountName, jobName, jobStreamId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -527,12 +554,19 @@ class JobStreamOperations { /** * Retrieve the job stream identified by job stream id. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {string} jobName The job name. * * @param {string} jobStreamId The job stream id. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -558,7 +592,7 @@ class JobStreamOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - get(jobName, jobStreamId, options, optionalCallback) { + get(resourceGroupName, automationAccountName, jobName, jobStreamId, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -567,26 +601,33 @@ class JobStreamOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._get(jobName, jobStreamId, options, (err, result, request, response) => { + self._get(resourceGroupName, automationAccountName, jobName, jobStreamId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._get(jobName, jobStreamId, options, optionalCallback); + return self._get(resourceGroupName, automationAccountName, jobName, jobStreamId, options, optionalCallback); } } /** * Retrieve a list of jobs streams identified by job name. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {string} jobName The job name. * * @param {object} [options] Optional Parameters. * * @param {string} [options.filter] The filter to apply on the operation. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -596,11 +637,11 @@ class JobStreamOperations { * * @reject {Error} - The error object. */ - listByJobWithHttpOperationResponse(jobName, options) { + listByJobWithHttpOperationResponse(resourceGroupName, automationAccountName, jobName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._listByJob(jobName, options, (err, result, request, response) => { + self._listByJob(resourceGroupName, automationAccountName, jobName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -613,12 +654,19 @@ class JobStreamOperations { /** * Retrieve a list of jobs streams identified by job name. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {string} jobName The job name. * * @param {object} [options] Optional Parameters. * * @param {string} [options.filter] The filter to apply on the operation. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -644,7 +692,7 @@ class JobStreamOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - listByJob(jobName, options, optionalCallback) { + listByJob(resourceGroupName, automationAccountName, jobName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -653,14 +701,14 @@ class JobStreamOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._listByJob(jobName, options, (err, result, request, response) => { + self._listByJob(resourceGroupName, automationAccountName, jobName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._listByJob(jobName, options, optionalCallback); + return self._listByJob(resourceGroupName, automationAccountName, jobName, options, optionalCallback); } } @@ -672,6 +720,9 @@ class JobStreamOperations { * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -703,6 +754,9 @@ class JobStreamOperations { * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * diff --git a/lib/services/automationManagement/lib/operations/linkedWorkspaceOperations.js b/lib/services/automationManagement/lib/operations/linkedWorkspaceOperations.js index 1853bbf687..29ae1f29af 100644 --- a/lib/services/automationManagement/lib/operations/linkedWorkspaceOperations.js +++ b/lib/services/automationManagement/lib/operations/linkedWorkspaceOperations.js @@ -17,6 +17,8 @@ const WebResource = msRest.WebResource; /** * Retrieve the linked workspace for the account id. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -37,7 +39,7 @@ const WebResource = msRest.WebResource; * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _get(automationAccountName, options, callback) { +function _get(resourceGroupName, automationAccountName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -50,13 +52,13 @@ function _get(automationAccountName, options, callback) { let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -75,7 +77,7 @@ function _get(automationAccountName, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/linkedWorkspace'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; @@ -176,6 +178,8 @@ class LinkedWorkspaceOperations { /** * Retrieve the linked workspace for the account id. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -189,11 +193,11 @@ class LinkedWorkspaceOperations { * * @reject {Error} - The error object. */ - getWithHttpOperationResponse(automationAccountName, options) { + getWithHttpOperationResponse(resourceGroupName, automationAccountName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._get(automationAccountName, options, (err, result, request, response) => { + self._get(resourceGroupName, automationAccountName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -206,6 +210,8 @@ class LinkedWorkspaceOperations { /** * Retrieve the linked workspace for the account id. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -235,7 +241,7 @@ class LinkedWorkspaceOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - get(automationAccountName, options, optionalCallback) { + get(resourceGroupName, automationAccountName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -244,14 +250,14 @@ class LinkedWorkspaceOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._get(automationAccountName, options, (err, result, request, response) => { + self._get(resourceGroupName, automationAccountName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._get(automationAccountName, options, optionalCallback); + return self._get(resourceGroupName, automationAccountName, options, optionalCallback); } } diff --git a/lib/services/automationManagement/lib/operations/moduleOperations.js b/lib/services/automationManagement/lib/operations/moduleOperations.js index edef4bcdce..54438c961e 100644 --- a/lib/services/automationManagement/lib/operations/moduleOperations.js +++ b/lib/services/automationManagement/lib/operations/moduleOperations.js @@ -17,6 +17,8 @@ const WebResource = msRest.WebResource; /** * Delete the module by name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} moduleName The module name. @@ -38,7 +40,7 @@ const WebResource = msRest.WebResource; * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _deleteMethod(automationAccountName, moduleName, options, callback) { +function _deleteMethod(resourceGroupName, automationAccountName, moduleName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -51,13 +53,13 @@ function _deleteMethod(automationAccountName, moduleName, options, callback) { let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -79,7 +81,7 @@ function _deleteMethod(automationAccountName, moduleName, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/modules/{moduleName}'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{moduleName}', encodeURIComponent(moduleName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -153,6 +155,8 @@ function _deleteMethod(automationAccountName, moduleName, options, callback) { /** * Retrieve the module identified by module name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} moduleName The module name. @@ -175,7 +179,7 @@ function _deleteMethod(automationAccountName, moduleName, options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _get(automationAccountName, moduleName, options, callback) { +function _get(resourceGroupName, automationAccountName, moduleName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -188,13 +192,13 @@ function _get(automationAccountName, moduleName, options, callback) { let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -216,7 +220,7 @@ function _get(automationAccountName, moduleName, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/modules/{moduleName}'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{moduleName}', encodeURIComponent(moduleName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -307,6 +311,8 @@ function _get(automationAccountName, moduleName, options, callback) { /** * Create or Update the module identified by module name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} moduleName The name of module. @@ -355,7 +361,7 @@ function _get(automationAccountName, moduleName, options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _createOrUpdate(automationAccountName, moduleName, parameters, options, callback) { +function _createOrUpdate(resourceGroupName, automationAccountName, moduleName, parameters, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -368,13 +374,13 @@ function _createOrUpdate(automationAccountName, moduleName, parameters, options, let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -399,7 +405,7 @@ function _createOrUpdate(automationAccountName, moduleName, parameters, options, // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/modules/{moduleName}'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{moduleName}', encodeURIComponent(moduleName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -521,6 +527,8 @@ function _createOrUpdate(automationAccountName, moduleName, parameters, options, /** * Update the module identified by module name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} moduleName The name of module. @@ -570,7 +578,7 @@ function _createOrUpdate(automationAccountName, moduleName, parameters, options, * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _update(automationAccountName, moduleName, parameters, options, callback) { +function _update(resourceGroupName, automationAccountName, moduleName, parameters, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -583,13 +591,13 @@ function _update(automationAccountName, moduleName, parameters, options, callbac let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -614,7 +622,7 @@ function _update(automationAccountName, moduleName, parameters, options, callbac // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/modules/{moduleName}'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{moduleName}', encodeURIComponent(moduleName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -719,6 +727,8 @@ function _update(automationAccountName, moduleName, parameters, options, callbac /** * Retrieve a list of modules. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -739,7 +749,7 @@ function _update(automationAccountName, moduleName, parameters, options, callbac * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _listByAutomationAccount(automationAccountName, options, callback) { +function _listByAutomationAccount(resourceGroupName, automationAccountName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -752,13 +762,13 @@ function _listByAutomationAccount(automationAccountName, options, callback) { let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -777,7 +787,7 @@ function _listByAutomationAccount(automationAccountName, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/modules'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; @@ -1011,6 +1021,8 @@ class ModuleOperations { /** * Delete the module by name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} moduleName The module name. @@ -1026,11 +1038,11 @@ class ModuleOperations { * * @reject {Error} - The error object. */ - deleteMethodWithHttpOperationResponse(automationAccountName, moduleName, options) { + deleteMethodWithHttpOperationResponse(resourceGroupName, automationAccountName, moduleName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._deleteMethod(automationAccountName, moduleName, options, (err, result, request, response) => { + self._deleteMethod(resourceGroupName, automationAccountName, moduleName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1043,6 +1055,8 @@ class ModuleOperations { /** * Delete the module by name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} moduleName The module name. @@ -1073,7 +1087,7 @@ class ModuleOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(automationAccountName, moduleName, options, optionalCallback) { + deleteMethod(resourceGroupName, automationAccountName, moduleName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1082,20 +1096,22 @@ class ModuleOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._deleteMethod(automationAccountName, moduleName, options, (err, result, request, response) => { + self._deleteMethod(resourceGroupName, automationAccountName, moduleName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._deleteMethod(automationAccountName, moduleName, options, optionalCallback); + return self._deleteMethod(resourceGroupName, automationAccountName, moduleName, options, optionalCallback); } } /** * Retrieve the module identified by module name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} moduleName The module name. @@ -1111,11 +1127,11 @@ class ModuleOperations { * * @reject {Error} - The error object. */ - getWithHttpOperationResponse(automationAccountName, moduleName, options) { + getWithHttpOperationResponse(resourceGroupName, automationAccountName, moduleName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._get(automationAccountName, moduleName, options, (err, result, request, response) => { + self._get(resourceGroupName, automationAccountName, moduleName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1128,6 +1144,8 @@ class ModuleOperations { /** * Retrieve the module identified by module name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} moduleName The module name. @@ -1159,7 +1177,7 @@ class ModuleOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - get(automationAccountName, moduleName, options, optionalCallback) { + get(resourceGroupName, automationAccountName, moduleName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1168,20 +1186,22 @@ class ModuleOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._get(automationAccountName, moduleName, options, (err, result, request, response) => { + self._get(resourceGroupName, automationAccountName, moduleName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._get(automationAccountName, moduleName, options, optionalCallback); + return self._get(resourceGroupName, automationAccountName, moduleName, options, optionalCallback); } } /** * Create or Update the module identified by module name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} moduleName The name of module. @@ -1223,11 +1243,11 @@ class ModuleOperations { * * @reject {Error} - The error object. */ - createOrUpdateWithHttpOperationResponse(automationAccountName, moduleName, parameters, options) { + createOrUpdateWithHttpOperationResponse(resourceGroupName, automationAccountName, moduleName, parameters, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._createOrUpdate(automationAccountName, moduleName, parameters, options, (err, result, request, response) => { + self._createOrUpdate(resourceGroupName, automationAccountName, moduleName, parameters, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1240,6 +1260,8 @@ class ModuleOperations { /** * Create or Update the module identified by module name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} moduleName The name of module. @@ -1297,7 +1319,7 @@ class ModuleOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - createOrUpdate(automationAccountName, moduleName, parameters, options, optionalCallback) { + createOrUpdate(resourceGroupName, automationAccountName, moduleName, parameters, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1306,20 +1328,22 @@ class ModuleOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._createOrUpdate(automationAccountName, moduleName, parameters, options, (err, result, request, response) => { + self._createOrUpdate(resourceGroupName, automationAccountName, moduleName, parameters, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._createOrUpdate(automationAccountName, moduleName, parameters, options, optionalCallback); + return self._createOrUpdate(resourceGroupName, automationAccountName, moduleName, parameters, options, optionalCallback); } } /** * Update the module identified by module name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} moduleName The name of module. @@ -1362,11 +1386,11 @@ class ModuleOperations { * * @reject {Error} - The error object. */ - updateWithHttpOperationResponse(automationAccountName, moduleName, parameters, options) { + updateWithHttpOperationResponse(resourceGroupName, automationAccountName, moduleName, parameters, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._update(automationAccountName, moduleName, parameters, options, (err, result, request, response) => { + self._update(resourceGroupName, automationAccountName, moduleName, parameters, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1379,6 +1403,8 @@ class ModuleOperations { /** * Update the module identified by module name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} moduleName The name of module. @@ -1437,7 +1463,7 @@ class ModuleOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - update(automationAccountName, moduleName, parameters, options, optionalCallback) { + update(resourceGroupName, automationAccountName, moduleName, parameters, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1446,20 +1472,22 @@ class ModuleOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._update(automationAccountName, moduleName, parameters, options, (err, result, request, response) => { + self._update(resourceGroupName, automationAccountName, moduleName, parameters, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._update(automationAccountName, moduleName, parameters, options, optionalCallback); + return self._update(resourceGroupName, automationAccountName, moduleName, parameters, options, optionalCallback); } } /** * Retrieve a list of modules. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -1473,11 +1501,11 @@ class ModuleOperations { * * @reject {Error} - The error object. */ - listByAutomationAccountWithHttpOperationResponse(automationAccountName, options) { + listByAutomationAccountWithHttpOperationResponse(resourceGroupName, automationAccountName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._listByAutomationAccount(automationAccountName, options, (err, result, request, response) => { + self._listByAutomationAccount(resourceGroupName, automationAccountName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1490,6 +1518,8 @@ class ModuleOperations { /** * Retrieve a list of modules. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -1519,7 +1549,7 @@ class ModuleOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - listByAutomationAccount(automationAccountName, options, optionalCallback) { + listByAutomationAccount(resourceGroupName, automationAccountName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1528,14 +1558,14 @@ class ModuleOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._listByAutomationAccount(automationAccountName, options, (err, result, request, response) => { + self._listByAutomationAccount(resourceGroupName, automationAccountName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._listByAutomationAccount(automationAccountName, options, optionalCallback); + return self._listByAutomationAccount(resourceGroupName, automationAccountName, options, optionalCallback); } } diff --git a/lib/services/automationManagement/lib/operations/nodeReports.js b/lib/services/automationManagement/lib/operations/nodeReports.js index aea8ef8eb3..49e13fd659 100644 --- a/lib/services/automationManagement/lib/operations/nodeReports.js +++ b/lib/services/automationManagement/lib/operations/nodeReports.js @@ -17,6 +17,8 @@ const WebResource = msRest.WebResource; /** * Retrieve the Dsc node report list by node id. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} nodeId The parameters supplied to the list operation. @@ -42,7 +44,7 @@ const WebResource = msRest.WebResource; * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _listByNode(automationAccountName, nodeId, options, callback) { +function _listByNode(resourceGroupName, automationAccountName, nodeId, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -56,13 +58,13 @@ function _listByNode(automationAccountName, nodeId, options, callback) { let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -87,7 +89,7 @@ function _listByNode(automationAccountName, nodeId, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/nodes/{nodeId}/reports'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{nodeId}', encodeURIComponent(nodeId)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -181,6 +183,8 @@ function _listByNode(automationAccountName, nodeId, options, callback) { /** * Retrieve the Dsc node report data by node id and report id. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} nodeId The Dsc node id. @@ -205,7 +209,7 @@ function _listByNode(automationAccountName, nodeId, options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _get(automationAccountName, nodeId, reportId, options, callback) { +function _get(resourceGroupName, automationAccountName, nodeId, reportId, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -218,13 +222,13 @@ function _get(automationAccountName, nodeId, reportId, options, callback) { let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -249,7 +253,7 @@ function _get(automationAccountName, nodeId, reportId, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/nodes/{nodeId}/reports/{reportId}'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{nodeId}', encodeURIComponent(nodeId)); requestUrl = requestUrl.replace('{reportId}', encodeURIComponent(reportId)); @@ -341,6 +345,8 @@ function _get(automationAccountName, nodeId, reportId, options, callback) { /** * Retrieve the Dsc node reports by node id and report id. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} nodeId The Dsc node id. @@ -364,7 +370,7 @@ function _get(automationAccountName, nodeId, reportId, options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _getContent(automationAccountName, nodeId, reportId, options, callback) { +function _getContent(resourceGroupName, automationAccountName, nodeId, reportId, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -377,13 +383,13 @@ function _getContent(automationAccountName, nodeId, reportId, options, callback) let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -408,7 +414,7 @@ function _getContent(automationAccountName, nodeId, reportId, options, callback) // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/nodes/{nodeId}/reports/{reportId}/content'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{nodeId}', encodeURIComponent(nodeId)); requestUrl = requestUrl.replace('{reportId}', encodeURIComponent(reportId)); @@ -649,6 +655,8 @@ class NodeReports { /** * Retrieve the Dsc node report list by node id. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} nodeId The parameters supplied to the list operation. @@ -666,11 +674,11 @@ class NodeReports { * * @reject {Error} - The error object. */ - listByNodeWithHttpOperationResponse(automationAccountName, nodeId, options) { + listByNodeWithHttpOperationResponse(resourceGroupName, automationAccountName, nodeId, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._listByNode(automationAccountName, nodeId, options, (err, result, request, response) => { + self._listByNode(resourceGroupName, automationAccountName, nodeId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -683,6 +691,8 @@ class NodeReports { /** * Retrieve the Dsc node report list by node id. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} nodeId The parameters supplied to the list operation. @@ -717,7 +727,7 @@ class NodeReports { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - listByNode(automationAccountName, nodeId, options, optionalCallback) { + listByNode(resourceGroupName, automationAccountName, nodeId, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -726,20 +736,22 @@ class NodeReports { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._listByNode(automationAccountName, nodeId, options, (err, result, request, response) => { + self._listByNode(resourceGroupName, automationAccountName, nodeId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._listByNode(automationAccountName, nodeId, options, optionalCallback); + return self._listByNode(resourceGroupName, automationAccountName, nodeId, options, optionalCallback); } } /** * Retrieve the Dsc node report data by node id and report id. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} nodeId The Dsc node id. @@ -757,11 +769,11 @@ class NodeReports { * * @reject {Error} - The error object. */ - getWithHttpOperationResponse(automationAccountName, nodeId, reportId, options) { + getWithHttpOperationResponse(resourceGroupName, automationAccountName, nodeId, reportId, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._get(automationAccountName, nodeId, reportId, options, (err, result, request, response) => { + self._get(resourceGroupName, automationAccountName, nodeId, reportId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -774,6 +786,8 @@ class NodeReports { /** * Retrieve the Dsc node report data by node id and report id. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} nodeId The Dsc node id. @@ -807,7 +821,7 @@ class NodeReports { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - get(automationAccountName, nodeId, reportId, options, optionalCallback) { + get(resourceGroupName, automationAccountName, nodeId, reportId, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -816,20 +830,22 @@ class NodeReports { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._get(automationAccountName, nodeId, reportId, options, (err, result, request, response) => { + self._get(resourceGroupName, automationAccountName, nodeId, reportId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._get(automationAccountName, nodeId, reportId, options, optionalCallback); + return self._get(resourceGroupName, automationAccountName, nodeId, reportId, options, optionalCallback); } } /** * Retrieve the Dsc node reports by node id and report id. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} nodeId The Dsc node id. @@ -847,11 +863,11 @@ class NodeReports { * * @reject {Error} - The error object. */ - getContentWithHttpOperationResponse(automationAccountName, nodeId, reportId, options) { + getContentWithHttpOperationResponse(resourceGroupName, automationAccountName, nodeId, reportId, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._getContent(automationAccountName, nodeId, reportId, options, (err, result, request, response) => { + self._getContent(resourceGroupName, automationAccountName, nodeId, reportId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -864,6 +880,8 @@ class NodeReports { /** * Retrieve the Dsc node reports by node id and report id. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} nodeId The Dsc node id. @@ -896,7 +914,7 @@ class NodeReports { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getContent(automationAccountName, nodeId, reportId, options, optionalCallback) { + getContent(resourceGroupName, automationAccountName, nodeId, reportId, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -905,14 +923,14 @@ class NodeReports { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getContent(automationAccountName, nodeId, reportId, options, (err, result, request, response) => { + self._getContent(resourceGroupName, automationAccountName, nodeId, reportId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getContent(automationAccountName, nodeId, reportId, options, optionalCallback); + return self._getContent(resourceGroupName, automationAccountName, nodeId, reportId, options, optionalCallback); } } diff --git a/lib/services/automationManagement/lib/operations/objectDataTypes.js b/lib/services/automationManagement/lib/operations/objectDataTypes.js index 86d9aad839..5b3a4f44f7 100644 --- a/lib/services/automationManagement/lib/operations/objectDataTypes.js +++ b/lib/services/automationManagement/lib/operations/objectDataTypes.js @@ -17,6 +17,8 @@ const WebResource = msRest.WebResource; /** * Retrieve a list of fields of a given type identified by module name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} moduleName The name of module. @@ -41,7 +43,7 @@ const WebResource = msRest.WebResource; * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _listFieldsByModuleAndType(automationAccountName, moduleName, typeName, options, callback) { +function _listFieldsByModuleAndType(resourceGroupName, automationAccountName, moduleName, typeName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -54,13 +56,13 @@ function _listFieldsByModuleAndType(automationAccountName, moduleName, typeName, let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -85,7 +87,7 @@ function _listFieldsByModuleAndType(automationAccountName, moduleName, typeName, // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/modules/{moduleName}/objectDataTypes/{typeName}/fields'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{moduleName}', encodeURIComponent(moduleName)); requestUrl = requestUrl.replace('{typeName}', encodeURIComponent(typeName)); @@ -177,6 +179,8 @@ function _listFieldsByModuleAndType(automationAccountName, moduleName, typeName, /** * Retrieve a list of fields of a given type across all accessible modules. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} typeName The name of type. @@ -199,7 +203,7 @@ function _listFieldsByModuleAndType(automationAccountName, moduleName, typeName, * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _listFieldsByType(automationAccountName, typeName, options, callback) { +function _listFieldsByType(resourceGroupName, automationAccountName, typeName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -212,13 +216,13 @@ function _listFieldsByType(automationAccountName, typeName, options, callback) { let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -240,7 +244,7 @@ function _listFieldsByType(automationAccountName, typeName, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/objectDataTypes/{typeName}/fields'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{typeName}', encodeURIComponent(typeName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -343,6 +347,8 @@ class ObjectDataTypes { /** * Retrieve a list of fields of a given type identified by module name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} moduleName The name of module. @@ -360,11 +366,11 @@ class ObjectDataTypes { * * @reject {Error} - The error object. */ - listFieldsByModuleAndTypeWithHttpOperationResponse(automationAccountName, moduleName, typeName, options) { + listFieldsByModuleAndTypeWithHttpOperationResponse(resourceGroupName, automationAccountName, moduleName, typeName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._listFieldsByModuleAndType(automationAccountName, moduleName, typeName, options, (err, result, request, response) => { + self._listFieldsByModuleAndType(resourceGroupName, automationAccountName, moduleName, typeName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -377,6 +383,8 @@ class ObjectDataTypes { /** * Retrieve a list of fields of a given type identified by module name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} moduleName The name of module. @@ -410,7 +418,7 @@ class ObjectDataTypes { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - listFieldsByModuleAndType(automationAccountName, moduleName, typeName, options, optionalCallback) { + listFieldsByModuleAndType(resourceGroupName, automationAccountName, moduleName, typeName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -419,20 +427,22 @@ class ObjectDataTypes { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._listFieldsByModuleAndType(automationAccountName, moduleName, typeName, options, (err, result, request, response) => { + self._listFieldsByModuleAndType(resourceGroupName, automationAccountName, moduleName, typeName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._listFieldsByModuleAndType(automationAccountName, moduleName, typeName, options, optionalCallback); + return self._listFieldsByModuleAndType(resourceGroupName, automationAccountName, moduleName, typeName, options, optionalCallback); } } /** * Retrieve a list of fields of a given type across all accessible modules. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} typeName The name of type. @@ -448,11 +458,11 @@ class ObjectDataTypes { * * @reject {Error} - The error object. */ - listFieldsByTypeWithHttpOperationResponse(automationAccountName, typeName, options) { + listFieldsByTypeWithHttpOperationResponse(resourceGroupName, automationAccountName, typeName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._listFieldsByType(automationAccountName, typeName, options, (err, result, request, response) => { + self._listFieldsByType(resourceGroupName, automationAccountName, typeName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -465,6 +475,8 @@ class ObjectDataTypes { /** * Retrieve a list of fields of a given type across all accessible modules. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} typeName The name of type. @@ -496,7 +508,7 @@ class ObjectDataTypes { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - listFieldsByType(automationAccountName, typeName, options, optionalCallback) { + listFieldsByType(resourceGroupName, automationAccountName, typeName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -505,14 +517,14 @@ class ObjectDataTypes { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._listFieldsByType(automationAccountName, typeName, options, (err, result, request, response) => { + self._listFieldsByType(resourceGroupName, automationAccountName, typeName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._listFieldsByType(automationAccountName, typeName, options, optionalCallback); + return self._listFieldsByType(resourceGroupName, automationAccountName, typeName, options, optionalCallback); } } diff --git a/lib/services/automationManagement/lib/operations/runbookDraftOperations.js b/lib/services/automationManagement/lib/operations/runbookDraftOperations.js index e4e627796f..2bd90ce433 100644 --- a/lib/services/automationManagement/lib/operations/runbookDraftOperations.js +++ b/lib/services/automationManagement/lib/operations/runbookDraftOperations.js @@ -17,6 +17,8 @@ const WebResource = msRest.WebResource; /** * Retrieve the content of runbook draft identified by runbook name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -38,7 +40,7 @@ const WebResource = msRest.WebResource; * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _getContent(automationAccountName, runbookName, options, callback) { +function _getContent(resourceGroupName, automationAccountName, runbookName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -54,13 +56,13 @@ function _getContent(automationAccountName, runbookName, options, callback) { if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -80,7 +82,7 @@ function _getContent(automationAccountName, runbookName, options, callback) { let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/runbooks/{runbookName}/draft/content'; requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{runbookName}', encodeURIComponent(runbookName)); let queryParameters = []; @@ -176,6 +178,8 @@ function _getContent(automationAccountName, runbookName, options, callback) { /** * Replaces the runbook draft content. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -199,7 +203,7 @@ function _getContent(automationAccountName, runbookName, options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _replaceContent(automationAccountName, runbookName, runbookContent, options, callback) { +function _replaceContent(resourceGroupName, automationAccountName, runbookName, runbookContent, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -212,7 +216,7 @@ function _replaceContent(automationAccountName, runbookName, runbookContent, opt } // Send request - this.beginReplaceContent(automationAccountName, runbookName, runbookContent, options, (err, parsedResult, httpRequest, response) => { + this.beginReplaceContent(resourceGroupName, automationAccountName, runbookName, runbookContent, options, (err, parsedResult, httpRequest, response) => { if (err) return callback(err); let initialResult = new msRest.HttpOperationResponse(); @@ -240,6 +244,8 @@ function _replaceContent(automationAccountName, runbookName, runbookContent, opt /** * Retrieve the runbook draft identified by runbook name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -262,7 +268,7 @@ function _replaceContent(automationAccountName, runbookName, runbookContent, opt * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _get(automationAccountName, runbookName, options, callback) { +function _get(resourceGroupName, automationAccountName, runbookName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -278,13 +284,13 @@ function _get(automationAccountName, runbookName, options, callback) { if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -304,7 +310,7 @@ function _get(automationAccountName, runbookName, options, callback) { let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/runbooks/{runbookName}/draft'; requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{runbookName}', encodeURIComponent(runbookName)); let queryParameters = []; @@ -395,6 +401,8 @@ function _get(automationAccountName, runbookName, options, callback) { /** * Publish runbook draft. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The parameters supplied to the publish runbook @@ -417,7 +425,7 @@ function _get(automationAccountName, runbookName, options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _publish(automationAccountName, runbookName, options, callback) { +function _publish(resourceGroupName, automationAccountName, runbookName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -430,7 +438,7 @@ function _publish(automationAccountName, runbookName, options, callback) { } // Send request - this.beginPublish(automationAccountName, runbookName, options, (err, parsedResult, httpRequest, response) => { + this.beginPublish(resourceGroupName, automationAccountName, runbookName, options, (err, parsedResult, httpRequest, response) => { if (err) return callback(err); let initialResult = new msRest.HttpOperationResponse(); @@ -458,6 +466,8 @@ function _publish(automationAccountName, runbookName, options, callback) { /** * Undo draft edit to last known published state identified by runbook name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -481,7 +491,7 @@ function _publish(automationAccountName, runbookName, options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _undoEdit(automationAccountName, runbookName, options, callback) { +function _undoEdit(resourceGroupName, automationAccountName, runbookName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -497,13 +507,13 @@ function _undoEdit(automationAccountName, runbookName, options, callback) { if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -523,7 +533,7 @@ function _undoEdit(automationAccountName, runbookName, options, callback) { let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/runbooks/{runbookName}/draft/undoEdit'; requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{runbookName}', encodeURIComponent(runbookName)); let queryParameters = []; @@ -613,6 +623,8 @@ function _undoEdit(automationAccountName, runbookName, options, callback) { /** * Replaces the runbook draft content. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -636,7 +648,7 @@ function _undoEdit(automationAccountName, runbookName, options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _beginReplaceContent(automationAccountName, runbookName, runbookContent, options, callback) { +function _beginReplaceContent(resourceGroupName, automationAccountName, runbookName, runbookContent, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -652,13 +664,13 @@ function _beginReplaceContent(automationAccountName, runbookName, runbookContent if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -681,7 +693,7 @@ function _beginReplaceContent(automationAccountName, runbookName, runbookContent let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/runbooks/{runbookName}/draft/content'; requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{runbookName}', encodeURIComponent(runbookName)); let queryParameters = []; @@ -774,6 +786,8 @@ function _beginReplaceContent(automationAccountName, runbookName, runbookContent /** * Publish runbook draft. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The parameters supplied to the publish runbook @@ -796,7 +810,7 @@ function _beginReplaceContent(automationAccountName, runbookName, runbookContent * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _beginPublish(automationAccountName, runbookName, options, callback) { +function _beginPublish(resourceGroupName, automationAccountName, runbookName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -812,13 +826,13 @@ function _beginPublish(automationAccountName, runbookName, options, callback) { if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -838,7 +852,7 @@ function _beginPublish(automationAccountName, runbookName, options, callback) { let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/runbooks/{runbookName}/draft/publish'; requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{runbookName}', encodeURIComponent(runbookName)); let queryParameters = []; @@ -928,6 +942,8 @@ class RunbookDraftOperations { /** * Retrieve the content of runbook draft identified by runbook name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -943,11 +959,11 @@ class RunbookDraftOperations { * * @reject {Error} - The error object. */ - getContentWithHttpOperationResponse(automationAccountName, runbookName, options) { + getContentWithHttpOperationResponse(resourceGroupName, automationAccountName, runbookName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._getContent(automationAccountName, runbookName, options, (err, result, request, response) => { + self._getContent(resourceGroupName, automationAccountName, runbookName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -960,6 +976,8 @@ class RunbookDraftOperations { /** * Retrieve the content of runbook draft identified by runbook name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -990,7 +1008,7 @@ class RunbookDraftOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getContent(automationAccountName, runbookName, options, optionalCallback) { + getContent(resourceGroupName, automationAccountName, runbookName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -999,20 +1017,22 @@ class RunbookDraftOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getContent(automationAccountName, runbookName, options, (err, result, request, response) => { + self._getContent(resourceGroupName, automationAccountName, runbookName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getContent(automationAccountName, runbookName, options, optionalCallback); + return self._getContent(resourceGroupName, automationAccountName, runbookName, options, optionalCallback); } } /** * Replaces the runbook draft content. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -1030,11 +1050,11 @@ class RunbookDraftOperations { * * @reject {Error} - The error object. */ - replaceContentWithHttpOperationResponse(automationAccountName, runbookName, runbookContent, options) { + replaceContentWithHttpOperationResponse(resourceGroupName, automationAccountName, runbookName, runbookContent, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._replaceContent(automationAccountName, runbookName, runbookContent, options, (err, result, request, response) => { + self._replaceContent(resourceGroupName, automationAccountName, runbookName, runbookContent, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1047,6 +1067,8 @@ class RunbookDraftOperations { /** * Replaces the runbook draft content. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -1079,7 +1101,7 @@ class RunbookDraftOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - replaceContent(automationAccountName, runbookName, runbookContent, options, optionalCallback) { + replaceContent(resourceGroupName, automationAccountName, runbookName, runbookContent, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1088,20 +1110,22 @@ class RunbookDraftOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._replaceContent(automationAccountName, runbookName, runbookContent, options, (err, result, request, response) => { + self._replaceContent(resourceGroupName, automationAccountName, runbookName, runbookContent, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._replaceContent(automationAccountName, runbookName, runbookContent, options, optionalCallback); + return self._replaceContent(resourceGroupName, automationAccountName, runbookName, runbookContent, options, optionalCallback); } } /** * Retrieve the runbook draft identified by runbook name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -1117,11 +1141,11 @@ class RunbookDraftOperations { * * @reject {Error} - The error object. */ - getWithHttpOperationResponse(automationAccountName, runbookName, options) { + getWithHttpOperationResponse(resourceGroupName, automationAccountName, runbookName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._get(automationAccountName, runbookName, options, (err, result, request, response) => { + self._get(resourceGroupName, automationAccountName, runbookName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1134,6 +1158,8 @@ class RunbookDraftOperations { /** * Retrieve the runbook draft identified by runbook name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -1165,7 +1191,7 @@ class RunbookDraftOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - get(automationAccountName, runbookName, options, optionalCallback) { + get(resourceGroupName, automationAccountName, runbookName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1174,20 +1200,22 @@ class RunbookDraftOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._get(automationAccountName, runbookName, options, (err, result, request, response) => { + self._get(resourceGroupName, automationAccountName, runbookName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._get(automationAccountName, runbookName, options, optionalCallback); + return self._get(resourceGroupName, automationAccountName, runbookName, options, optionalCallback); } } /** * Publish runbook draft. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The parameters supplied to the publish runbook @@ -1204,11 +1232,11 @@ class RunbookDraftOperations { * * @reject {Error} - The error object. */ - publishWithHttpOperationResponse(automationAccountName, runbookName, options) { + publishWithHttpOperationResponse(resourceGroupName, automationAccountName, runbookName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._publish(automationAccountName, runbookName, options, (err, result, request, response) => { + self._publish(resourceGroupName, automationAccountName, runbookName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1221,6 +1249,8 @@ class RunbookDraftOperations { /** * Publish runbook draft. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The parameters supplied to the publish runbook @@ -1252,7 +1282,7 @@ class RunbookDraftOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - publish(automationAccountName, runbookName, options, optionalCallback) { + publish(resourceGroupName, automationAccountName, runbookName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1261,20 +1291,22 @@ class RunbookDraftOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._publish(automationAccountName, runbookName, options, (err, result, request, response) => { + self._publish(resourceGroupName, automationAccountName, runbookName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._publish(automationAccountName, runbookName, options, optionalCallback); + return self._publish(resourceGroupName, automationAccountName, runbookName, options, optionalCallback); } } /** * Undo draft edit to last known published state identified by runbook name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -1290,11 +1322,11 @@ class RunbookDraftOperations { * * @reject {Error} - The error object. */ - undoEditWithHttpOperationResponse(automationAccountName, runbookName, options) { + undoEditWithHttpOperationResponse(resourceGroupName, automationAccountName, runbookName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._undoEdit(automationAccountName, runbookName, options, (err, result, request, response) => { + self._undoEdit(resourceGroupName, automationAccountName, runbookName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1307,6 +1339,8 @@ class RunbookDraftOperations { /** * Undo draft edit to last known published state identified by runbook name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -1339,7 +1373,7 @@ class RunbookDraftOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - undoEdit(automationAccountName, runbookName, options, optionalCallback) { + undoEdit(resourceGroupName, automationAccountName, runbookName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1348,20 +1382,22 @@ class RunbookDraftOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._undoEdit(automationAccountName, runbookName, options, (err, result, request, response) => { + self._undoEdit(resourceGroupName, automationAccountName, runbookName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._undoEdit(automationAccountName, runbookName, options, optionalCallback); + return self._undoEdit(resourceGroupName, automationAccountName, runbookName, options, optionalCallback); } } /** * Replaces the runbook draft content. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -1379,11 +1415,11 @@ class RunbookDraftOperations { * * @reject {Error} - The error object. */ - beginReplaceContentWithHttpOperationResponse(automationAccountName, runbookName, runbookContent, options) { + beginReplaceContentWithHttpOperationResponse(resourceGroupName, automationAccountName, runbookName, runbookContent, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._beginReplaceContent(automationAccountName, runbookName, runbookContent, options, (err, result, request, response) => { + self._beginReplaceContent(resourceGroupName, automationAccountName, runbookName, runbookContent, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1396,6 +1432,8 @@ class RunbookDraftOperations { /** * Replaces the runbook draft content. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -1428,7 +1466,7 @@ class RunbookDraftOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - beginReplaceContent(automationAccountName, runbookName, runbookContent, options, optionalCallback) { + beginReplaceContent(resourceGroupName, automationAccountName, runbookName, runbookContent, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1437,20 +1475,22 @@ class RunbookDraftOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._beginReplaceContent(automationAccountName, runbookName, runbookContent, options, (err, result, request, response) => { + self._beginReplaceContent(resourceGroupName, automationAccountName, runbookName, runbookContent, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._beginReplaceContent(automationAccountName, runbookName, runbookContent, options, optionalCallback); + return self._beginReplaceContent(resourceGroupName, automationAccountName, runbookName, runbookContent, options, optionalCallback); } } /** * Publish runbook draft. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The parameters supplied to the publish runbook @@ -1467,11 +1507,11 @@ class RunbookDraftOperations { * * @reject {Error} - The error object. */ - beginPublishWithHttpOperationResponse(automationAccountName, runbookName, options) { + beginPublishWithHttpOperationResponse(resourceGroupName, automationAccountName, runbookName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._beginPublish(automationAccountName, runbookName, options, (err, result, request, response) => { + self._beginPublish(resourceGroupName, automationAccountName, runbookName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1484,6 +1524,8 @@ class RunbookDraftOperations { /** * Publish runbook draft. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The parameters supplied to the publish runbook @@ -1515,7 +1557,7 @@ class RunbookDraftOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - beginPublish(automationAccountName, runbookName, options, optionalCallback) { + beginPublish(resourceGroupName, automationAccountName, runbookName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1524,14 +1566,14 @@ class RunbookDraftOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._beginPublish(automationAccountName, runbookName, options, (err, result, request, response) => { + self._beginPublish(resourceGroupName, automationAccountName, runbookName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._beginPublish(automationAccountName, runbookName, options, optionalCallback); + return self._beginPublish(resourceGroupName, automationAccountName, runbookName, options, optionalCallback); } } diff --git a/lib/services/automationManagement/lib/operations/runbookOperations.js b/lib/services/automationManagement/lib/operations/runbookOperations.js index 727f2c4ed7..bc857a50b5 100644 --- a/lib/services/automationManagement/lib/operations/runbookOperations.js +++ b/lib/services/automationManagement/lib/operations/runbookOperations.js @@ -17,6 +17,8 @@ const WebResource = msRest.WebResource; /** * Retrieve the content of runbook identified by runbook name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -38,7 +40,7 @@ const WebResource = msRest.WebResource; * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _getContent(automationAccountName, runbookName, options, callback) { +function _getContent(resourceGroupName, automationAccountName, runbookName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -54,13 +56,13 @@ function _getContent(automationAccountName, runbookName, options, callback) { if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -80,7 +82,7 @@ function _getContent(automationAccountName, runbookName, options, callback) { let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/runbooks/{runbookName}/content'; requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{runbookName}', encodeURIComponent(runbookName)); let queryParameters = []; @@ -175,6 +177,8 @@ function _getContent(automationAccountName, runbookName, options, callback) { /** * Retrieve the runbook identified by runbook name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -197,7 +201,7 @@ function _getContent(automationAccountName, runbookName, options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _get(automationAccountName, runbookName, options, callback) { +function _get(resourceGroupName, automationAccountName, runbookName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -213,13 +217,13 @@ function _get(automationAccountName, runbookName, options, callback) { if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -239,7 +243,7 @@ function _get(automationAccountName, runbookName, options, callback) { let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/runbooks/{runbookName}'; requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{runbookName}', encodeURIComponent(runbookName)); let queryParameters = []; @@ -329,6 +333,8 @@ function _get(automationAccountName, runbookName, options, callback) { /** * Create the runbook identified by runbook name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -415,7 +421,7 @@ function _get(automationAccountName, runbookName, options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _createOrUpdate(automationAccountName, runbookName, parameters, options, callback) { +function _createOrUpdate(resourceGroupName, automationAccountName, runbookName, parameters, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -431,13 +437,13 @@ function _createOrUpdate(automationAccountName, runbookName, parameters, options if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -460,7 +466,7 @@ function _createOrUpdate(automationAccountName, runbookName, parameters, options let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/runbooks/{runbookName}'; requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{runbookName}', encodeURIComponent(runbookName)); let queryParameters = []; @@ -581,6 +587,8 @@ function _createOrUpdate(automationAccountName, runbookName, parameters, options /** * Update the runbook identified by runbook name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -623,7 +631,7 @@ function _createOrUpdate(automationAccountName, runbookName, parameters, options * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _update(automationAccountName, runbookName, parameters, options, callback) { +function _update(resourceGroupName, automationAccountName, runbookName, parameters, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -639,13 +647,13 @@ function _update(automationAccountName, runbookName, parameters, options, callba if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -668,7 +676,7 @@ function _update(automationAccountName, runbookName, parameters, options, callba let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/runbooks/{runbookName}'; requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{runbookName}', encodeURIComponent(runbookName)); let queryParameters = []; @@ -772,6 +780,8 @@ function _update(automationAccountName, runbookName, parameters, options, callba /** * Delete the runbook by name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -793,7 +803,7 @@ function _update(automationAccountName, runbookName, parameters, options, callba * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _deleteMethod(automationAccountName, runbookName, options, callback) { +function _deleteMethod(resourceGroupName, automationAccountName, runbookName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -809,13 +819,13 @@ function _deleteMethod(automationAccountName, runbookName, options, callback) { if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -835,7 +845,7 @@ function _deleteMethod(automationAccountName, runbookName, options, callback) { let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/runbooks/{runbookName}'; requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{runbookName}', encodeURIComponent(runbookName)); let queryParameters = []; @@ -908,6 +918,8 @@ function _deleteMethod(automationAccountName, runbookName, options, callback) { /** * Retrieve a list of runbooks. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -928,7 +940,7 @@ function _deleteMethod(automationAccountName, runbookName, options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _listByAutomationAccount(automationAccountName, options, callback) { +function _listByAutomationAccount(resourceGroupName, automationAccountName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -944,13 +956,13 @@ function _listByAutomationAccount(automationAccountName, options, callback) { if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -967,7 +979,7 @@ function _listByAutomationAccount(automationAccountName, options, callback) { let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/runbooks'; requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); @@ -1201,6 +1213,8 @@ class RunbookOperations { /** * Retrieve the content of runbook identified by runbook name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -1216,11 +1230,11 @@ class RunbookOperations { * * @reject {Error} - The error object. */ - getContentWithHttpOperationResponse(automationAccountName, runbookName, options) { + getContentWithHttpOperationResponse(resourceGroupName, automationAccountName, runbookName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._getContent(automationAccountName, runbookName, options, (err, result, request, response) => { + self._getContent(resourceGroupName, automationAccountName, runbookName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1233,6 +1247,8 @@ class RunbookOperations { /** * Retrieve the content of runbook identified by runbook name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -1263,7 +1279,7 @@ class RunbookOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getContent(automationAccountName, runbookName, options, optionalCallback) { + getContent(resourceGroupName, automationAccountName, runbookName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1272,20 +1288,22 @@ class RunbookOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getContent(automationAccountName, runbookName, options, (err, result, request, response) => { + self._getContent(resourceGroupName, automationAccountName, runbookName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getContent(automationAccountName, runbookName, options, optionalCallback); + return self._getContent(resourceGroupName, automationAccountName, runbookName, options, optionalCallback); } } /** * Retrieve the runbook identified by runbook name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -1301,11 +1319,11 @@ class RunbookOperations { * * @reject {Error} - The error object. */ - getWithHttpOperationResponse(automationAccountName, runbookName, options) { + getWithHttpOperationResponse(resourceGroupName, automationAccountName, runbookName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._get(automationAccountName, runbookName, options, (err, result, request, response) => { + self._get(resourceGroupName, automationAccountName, runbookName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1318,6 +1336,8 @@ class RunbookOperations { /** * Retrieve the runbook identified by runbook name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -1349,7 +1369,7 @@ class RunbookOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - get(automationAccountName, runbookName, options, optionalCallback) { + get(resourceGroupName, automationAccountName, runbookName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1358,20 +1378,22 @@ class RunbookOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._get(automationAccountName, runbookName, options, (err, result, request, response) => { + self._get(resourceGroupName, automationAccountName, runbookName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._get(automationAccountName, runbookName, options, optionalCallback); + return self._get(resourceGroupName, automationAccountName, runbookName, options, optionalCallback); } } /** * Create the runbook identified by runbook name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -1451,11 +1473,11 @@ class RunbookOperations { * * @reject {Error} - The error object. */ - createOrUpdateWithHttpOperationResponse(automationAccountName, runbookName, parameters, options) { + createOrUpdateWithHttpOperationResponse(resourceGroupName, automationAccountName, runbookName, parameters, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._createOrUpdate(automationAccountName, runbookName, parameters, options, (err, result, request, response) => { + self._createOrUpdate(resourceGroupName, automationAccountName, runbookName, parameters, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1468,6 +1490,8 @@ class RunbookOperations { /** * Create the runbook identified by runbook name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -1563,7 +1587,7 @@ class RunbookOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - createOrUpdate(automationAccountName, runbookName, parameters, options, optionalCallback) { + createOrUpdate(resourceGroupName, automationAccountName, runbookName, parameters, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1572,20 +1596,22 @@ class RunbookOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._createOrUpdate(automationAccountName, runbookName, parameters, options, (err, result, request, response) => { + self._createOrUpdate(resourceGroupName, automationAccountName, runbookName, parameters, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._createOrUpdate(automationAccountName, runbookName, parameters, options, optionalCallback); + return self._createOrUpdate(resourceGroupName, automationAccountName, runbookName, parameters, options, optionalCallback); } } /** * Update the runbook identified by runbook name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -1621,11 +1647,11 @@ class RunbookOperations { * * @reject {Error} - The error object. */ - updateWithHttpOperationResponse(automationAccountName, runbookName, parameters, options) { + updateWithHttpOperationResponse(resourceGroupName, automationAccountName, runbookName, parameters, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._update(automationAccountName, runbookName, parameters, options, (err, result, request, response) => { + self._update(resourceGroupName, automationAccountName, runbookName, parameters, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1638,6 +1664,8 @@ class RunbookOperations { /** * Update the runbook identified by runbook name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -1689,7 +1717,7 @@ class RunbookOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - update(automationAccountName, runbookName, parameters, options, optionalCallback) { + update(resourceGroupName, automationAccountName, runbookName, parameters, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1698,20 +1726,22 @@ class RunbookOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._update(automationAccountName, runbookName, parameters, options, (err, result, request, response) => { + self._update(resourceGroupName, automationAccountName, runbookName, parameters, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._update(automationAccountName, runbookName, parameters, options, optionalCallback); + return self._update(resourceGroupName, automationAccountName, runbookName, parameters, options, optionalCallback); } } /** * Delete the runbook by name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -1727,11 +1757,11 @@ class RunbookOperations { * * @reject {Error} - The error object. */ - deleteMethodWithHttpOperationResponse(automationAccountName, runbookName, options) { + deleteMethodWithHttpOperationResponse(resourceGroupName, automationAccountName, runbookName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._deleteMethod(automationAccountName, runbookName, options, (err, result, request, response) => { + self._deleteMethod(resourceGroupName, automationAccountName, runbookName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1744,6 +1774,8 @@ class RunbookOperations { /** * Delete the runbook by name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -1774,7 +1806,7 @@ class RunbookOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(automationAccountName, runbookName, options, optionalCallback) { + deleteMethod(resourceGroupName, automationAccountName, runbookName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1783,20 +1815,22 @@ class RunbookOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._deleteMethod(automationAccountName, runbookName, options, (err, result, request, response) => { + self._deleteMethod(resourceGroupName, automationAccountName, runbookName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._deleteMethod(automationAccountName, runbookName, options, optionalCallback); + return self._deleteMethod(resourceGroupName, automationAccountName, runbookName, options, optionalCallback); } } /** * Retrieve a list of runbooks. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -1810,11 +1844,11 @@ class RunbookOperations { * * @reject {Error} - The error object. */ - listByAutomationAccountWithHttpOperationResponse(automationAccountName, options) { + listByAutomationAccountWithHttpOperationResponse(resourceGroupName, automationAccountName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._listByAutomationAccount(automationAccountName, options, (err, result, request, response) => { + self._listByAutomationAccount(resourceGroupName, automationAccountName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1827,6 +1861,8 @@ class RunbookOperations { /** * Retrieve a list of runbooks. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -1856,7 +1892,7 @@ class RunbookOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - listByAutomationAccount(automationAccountName, options, optionalCallback) { + listByAutomationAccount(resourceGroupName, automationAccountName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1865,14 +1901,14 @@ class RunbookOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._listByAutomationAccount(automationAccountName, options, (err, result, request, response) => { + self._listByAutomationAccount(resourceGroupName, automationAccountName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._listByAutomationAccount(automationAccountName, options, optionalCallback); + return self._listByAutomationAccount(resourceGroupName, automationAccountName, options, optionalCallback); } } diff --git a/lib/services/automationManagement/lib/operations/scheduleOperations.js b/lib/services/automationManagement/lib/operations/scheduleOperations.js index 48f5c87207..ab725860f2 100644 --- a/lib/services/automationManagement/lib/operations/scheduleOperations.js +++ b/lib/services/automationManagement/lib/operations/scheduleOperations.js @@ -17,6 +17,8 @@ const WebResource = msRest.WebResource; /** * Create a schedule. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} scheduleName The schedule name. @@ -74,7 +76,7 @@ const WebResource = msRest.WebResource; * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _createOrUpdate(automationAccountName, scheduleName, parameters, options, callback) { +function _createOrUpdate(resourceGroupName, automationAccountName, scheduleName, parameters, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -87,13 +89,13 @@ function _createOrUpdate(automationAccountName, scheduleName, parameters, option let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -118,7 +120,7 @@ function _createOrUpdate(automationAccountName, scheduleName, parameters, option // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/schedules/{scheduleName}'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{scheduleName}', encodeURIComponent(scheduleName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -223,6 +225,8 @@ function _createOrUpdate(automationAccountName, scheduleName, parameters, option /** * Update the schedule identified by schedule name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} scheduleName The schedule name. @@ -256,7 +260,7 @@ function _createOrUpdate(automationAccountName, scheduleName, parameters, option * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _update(automationAccountName, scheduleName, parameters, options, callback) { +function _update(resourceGroupName, automationAccountName, scheduleName, parameters, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -269,13 +273,13 @@ function _update(automationAccountName, scheduleName, parameters, options, callb let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -300,7 +304,7 @@ function _update(automationAccountName, scheduleName, parameters, options, callb // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/schedules/{scheduleName}'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{scheduleName}', encodeURIComponent(scheduleName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -405,6 +409,8 @@ function _update(automationAccountName, scheduleName, parameters, options, callb /** * Retrieve the schedule identified by schedule name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} scheduleName The schedule name. @@ -427,7 +433,7 @@ function _update(automationAccountName, scheduleName, parameters, options, callb * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _get(automationAccountName, scheduleName, options, callback) { +function _get(resourceGroupName, automationAccountName, scheduleName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -440,13 +446,13 @@ function _get(automationAccountName, scheduleName, options, callback) { let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -468,7 +474,7 @@ function _get(automationAccountName, scheduleName, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/schedules/{scheduleName}'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{scheduleName}', encodeURIComponent(scheduleName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -559,6 +565,8 @@ function _get(automationAccountName, scheduleName, options, callback) { /** * Delete the schedule identified by schedule name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} scheduleName The schedule name. @@ -580,7 +588,7 @@ function _get(automationAccountName, scheduleName, options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _deleteMethod(automationAccountName, scheduleName, options, callback) { +function _deleteMethod(resourceGroupName, automationAccountName, scheduleName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -593,13 +601,13 @@ function _deleteMethod(automationAccountName, scheduleName, options, callback) { let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -621,7 +629,7 @@ function _deleteMethod(automationAccountName, scheduleName, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/schedules/{scheduleName}'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{scheduleName}', encodeURIComponent(scheduleName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -695,6 +703,8 @@ function _deleteMethod(automationAccountName, scheduleName, options, callback) { /** * Retrieve a list of schedules. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -715,7 +725,7 @@ function _deleteMethod(automationAccountName, scheduleName, options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _listByAutomationAccount(automationAccountName, options, callback) { +function _listByAutomationAccount(resourceGroupName, automationAccountName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -728,13 +738,13 @@ function _listByAutomationAccount(automationAccountName, options, callback) { let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -753,7 +763,7 @@ function _listByAutomationAccount(automationAccountName, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/schedules'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; @@ -987,6 +997,8 @@ class ScheduleOperations { /** * Create a schedule. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} scheduleName The schedule name. @@ -1037,11 +1049,11 @@ class ScheduleOperations { * * @reject {Error} - The error object. */ - createOrUpdateWithHttpOperationResponse(automationAccountName, scheduleName, parameters, options) { + createOrUpdateWithHttpOperationResponse(resourceGroupName, automationAccountName, scheduleName, parameters, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._createOrUpdate(automationAccountName, scheduleName, parameters, options, (err, result, request, response) => { + self._createOrUpdate(resourceGroupName, automationAccountName, scheduleName, parameters, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1054,6 +1066,8 @@ class ScheduleOperations { /** * Create a schedule. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} scheduleName The schedule name. @@ -1120,7 +1134,7 @@ class ScheduleOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - createOrUpdate(automationAccountName, scheduleName, parameters, options, optionalCallback) { + createOrUpdate(resourceGroupName, automationAccountName, scheduleName, parameters, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1129,20 +1143,22 @@ class ScheduleOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._createOrUpdate(automationAccountName, scheduleName, parameters, options, (err, result, request, response) => { + self._createOrUpdate(resourceGroupName, automationAccountName, scheduleName, parameters, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._createOrUpdate(automationAccountName, scheduleName, parameters, options, optionalCallback); + return self._createOrUpdate(resourceGroupName, automationAccountName, scheduleName, parameters, options, optionalCallback); } } /** * Update the schedule identified by schedule name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} scheduleName The schedule name. @@ -1169,11 +1185,11 @@ class ScheduleOperations { * * @reject {Error} - The error object. */ - updateWithHttpOperationResponse(automationAccountName, scheduleName, parameters, options) { + updateWithHttpOperationResponse(resourceGroupName, automationAccountName, scheduleName, parameters, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._update(automationAccountName, scheduleName, parameters, options, (err, result, request, response) => { + self._update(resourceGroupName, automationAccountName, scheduleName, parameters, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1186,6 +1202,8 @@ class ScheduleOperations { /** * Update the schedule identified by schedule name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} scheduleName The schedule name. @@ -1228,7 +1246,7 @@ class ScheduleOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - update(automationAccountName, scheduleName, parameters, options, optionalCallback) { + update(resourceGroupName, automationAccountName, scheduleName, parameters, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1237,20 +1255,22 @@ class ScheduleOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._update(automationAccountName, scheduleName, parameters, options, (err, result, request, response) => { + self._update(resourceGroupName, automationAccountName, scheduleName, parameters, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._update(automationAccountName, scheduleName, parameters, options, optionalCallback); + return self._update(resourceGroupName, automationAccountName, scheduleName, parameters, options, optionalCallback); } } /** * Retrieve the schedule identified by schedule name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} scheduleName The schedule name. @@ -1266,11 +1286,11 @@ class ScheduleOperations { * * @reject {Error} - The error object. */ - getWithHttpOperationResponse(automationAccountName, scheduleName, options) { + getWithHttpOperationResponse(resourceGroupName, automationAccountName, scheduleName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._get(automationAccountName, scheduleName, options, (err, result, request, response) => { + self._get(resourceGroupName, automationAccountName, scheduleName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1283,6 +1303,8 @@ class ScheduleOperations { /** * Retrieve the schedule identified by schedule name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} scheduleName The schedule name. @@ -1314,7 +1336,7 @@ class ScheduleOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - get(automationAccountName, scheduleName, options, optionalCallback) { + get(resourceGroupName, automationAccountName, scheduleName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1323,20 +1345,22 @@ class ScheduleOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._get(automationAccountName, scheduleName, options, (err, result, request, response) => { + self._get(resourceGroupName, automationAccountName, scheduleName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._get(automationAccountName, scheduleName, options, optionalCallback); + return self._get(resourceGroupName, automationAccountName, scheduleName, options, optionalCallback); } } /** * Delete the schedule identified by schedule name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} scheduleName The schedule name. @@ -1352,11 +1376,11 @@ class ScheduleOperations { * * @reject {Error} - The error object. */ - deleteMethodWithHttpOperationResponse(automationAccountName, scheduleName, options) { + deleteMethodWithHttpOperationResponse(resourceGroupName, automationAccountName, scheduleName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._deleteMethod(automationAccountName, scheduleName, options, (err, result, request, response) => { + self._deleteMethod(resourceGroupName, automationAccountName, scheduleName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1369,6 +1393,8 @@ class ScheduleOperations { /** * Delete the schedule identified by schedule name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} scheduleName The schedule name. @@ -1399,7 +1425,7 @@ class ScheduleOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(automationAccountName, scheduleName, options, optionalCallback) { + deleteMethod(resourceGroupName, automationAccountName, scheduleName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1408,20 +1434,22 @@ class ScheduleOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._deleteMethod(automationAccountName, scheduleName, options, (err, result, request, response) => { + self._deleteMethod(resourceGroupName, automationAccountName, scheduleName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._deleteMethod(automationAccountName, scheduleName, options, optionalCallback); + return self._deleteMethod(resourceGroupName, automationAccountName, scheduleName, options, optionalCallback); } } /** * Retrieve a list of schedules. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -1435,11 +1463,11 @@ class ScheduleOperations { * * @reject {Error} - The error object. */ - listByAutomationAccountWithHttpOperationResponse(automationAccountName, options) { + listByAutomationAccountWithHttpOperationResponse(resourceGroupName, automationAccountName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._listByAutomationAccount(automationAccountName, options, (err, result, request, response) => { + self._listByAutomationAccount(resourceGroupName, automationAccountName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1452,6 +1480,8 @@ class ScheduleOperations { /** * Retrieve a list of schedules. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -1481,7 +1511,7 @@ class ScheduleOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - listByAutomationAccount(automationAccountName, options, optionalCallback) { + listByAutomationAccount(resourceGroupName, automationAccountName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1490,14 +1520,14 @@ class ScheduleOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._listByAutomationAccount(automationAccountName, options, (err, result, request, response) => { + self._listByAutomationAccount(resourceGroupName, automationAccountName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._listByAutomationAccount(automationAccountName, options, optionalCallback); + return self._listByAutomationAccount(resourceGroupName, automationAccountName, options, optionalCallback); } } diff --git a/lib/services/automationManagement/lib/operations/softwareUpdateConfigurationMachineRuns.js b/lib/services/automationManagement/lib/operations/softwareUpdateConfigurationMachineRuns.js index 0e7ecad27e..e70e258544 100644 --- a/lib/services/automationManagement/lib/operations/softwareUpdateConfigurationMachineRuns.js +++ b/lib/services/automationManagement/lib/operations/softwareUpdateConfigurationMachineRuns.js @@ -17,11 +17,18 @@ const WebResource = msRest.WebResource; /** * Get a single software update configuration machine run by Id. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {uuid} softwareUpdateConfigurationMachineRunId The Id of the software * update configuration machine run. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -39,7 +46,7 @@ const WebResource = msRest.WebResource; * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _getById(softwareUpdateConfigurationMachineRunId, options, callback) { +function _getById(resourceGroupName, automationAccountName, softwareUpdateConfigurationMachineRunId, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -49,29 +56,30 @@ function _getById(softwareUpdateConfigurationMachineRunId, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } + let clientRequestId = (options && options.clientRequestId !== undefined) ? options.clientRequestId : undefined; let apiVersion = '2017-05-15-preview'; // Validate try { if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } - if (this.client.automationAccountName === null || this.client.automationAccountName === undefined || typeof this.client.automationAccountName.valueOf() !== 'string') { - throw new Error('this.client.automationAccountName cannot be null or undefined and it must be of type string.'); + if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { + throw new Error('automationAccountName cannot be null or undefined and it must be of type string.'); } if (softwareUpdateConfigurationMachineRunId === null || softwareUpdateConfigurationMachineRunId === undefined || typeof softwareUpdateConfigurationMachineRunId.valueOf() !== 'string' || !msRest.isValidUuid(softwareUpdateConfigurationMachineRunId)) { throw new Error('softwareUpdateConfigurationMachineRunId cannot be null or undefined and it must be of type string and must be a valid uuid.'); } - if (this.client.clientRequestId !== null && this.client.clientRequestId !== undefined && typeof this.client.clientRequestId.valueOf() !== 'string') { - throw new Error('this.client.clientRequestId must be of type string.'); + if (clientRequestId !== null && clientRequestId !== undefined && typeof clientRequestId.valueOf() !== 'string') { + throw new Error('clientRequestId must be of type string.'); } if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { throw new Error('this.client.acceptLanguage must be of type string.'); @@ -84,8 +92,8 @@ function _getById(softwareUpdateConfigurationMachineRunId, options, callback) { let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/softwareUpdateConfigurationMachineRuns/{softwareUpdateConfigurationMachineRunId}'; requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); - requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(this.client.automationAccountName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{softwareUpdateConfigurationMachineRunId}', encodeURIComponent(softwareUpdateConfigurationMachineRunId.toString())); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); @@ -103,8 +111,8 @@ function _getById(softwareUpdateConfigurationMachineRunId, options, callback) { if (this.client.generateClientRequestId) { httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); } - if (this.client.clientRequestId !== undefined && this.client.clientRequestId !== null) { - httpRequest.headers['clientRequestId'] = this.client.clientRequestId; + if (clientRequestId !== undefined && clientRequestId !== null) { + httpRequest.headers['clientRequestId'] = clientRequestId; } if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { httpRequest.headers['accept-language'] = this.client.acceptLanguage; @@ -176,8 +184,15 @@ function _getById(softwareUpdateConfigurationMachineRunId, options, callback) { /** * Return list of software update configuration machine runs * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {string} [options.filter] The filter to apply on the operation. You * can use the following filters: 'properties/osType', 'properties/status', * 'properties/startTime', and 'properties/softwareUpdateConfiguration/name' @@ -206,7 +221,7 @@ function _getById(softwareUpdateConfigurationMachineRunId, options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _list(options, callback) { +function _list(resourceGroupName, automationAccountName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -216,6 +231,7 @@ function _list(options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } + let clientRequestId = (options && options.clientRequestId !== undefined) ? options.clientRequestId : undefined; let filter = (options && options.filter !== undefined) ? options.filter : undefined; let skip = (options && options.skip !== undefined) ? options.skip : undefined; let top = (options && options.top !== undefined) ? options.top : undefined; @@ -225,20 +241,20 @@ function _list(options, callback) { if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } - if (this.client.automationAccountName === null || this.client.automationAccountName === undefined || typeof this.client.automationAccountName.valueOf() !== 'string') { - throw new Error('this.client.automationAccountName cannot be null or undefined and it must be of type string.'); + if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { + throw new Error('automationAccountName cannot be null or undefined and it must be of type string.'); } - if (this.client.clientRequestId !== null && this.client.clientRequestId !== undefined && typeof this.client.clientRequestId.valueOf() !== 'string') { - throw new Error('this.client.clientRequestId must be of type string.'); + if (clientRequestId !== null && clientRequestId !== undefined && typeof clientRequestId.valueOf() !== 'string') { + throw new Error('clientRequestId must be of type string.'); } if (filter !== null && filter !== undefined && typeof filter.valueOf() !== 'string') { throw new Error('filter must be of type string.'); @@ -260,8 +276,8 @@ function _list(options, callback) { let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/softwareUpdateConfigurationMachineRuns'; requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); - requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(this.client.automationAccountName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); if (filter !== null && filter !== undefined) { @@ -287,8 +303,8 @@ function _list(options, callback) { if (this.client.generateClientRequestId) { httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); } - if (this.client.clientRequestId !== undefined && this.client.clientRequestId !== null) { - httpRequest.headers['clientRequestId'] = this.client.clientRequestId; + if (clientRequestId !== undefined && clientRequestId !== null) { + httpRequest.headers['clientRequestId'] = clientRequestId; } if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { httpRequest.headers['accept-language'] = this.client.acceptLanguage; @@ -372,11 +388,18 @@ class SoftwareUpdateConfigurationMachineRuns { /** * Get a single software update configuration machine run by Id. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {uuid} softwareUpdateConfigurationMachineRunId The Id of the software * update configuration machine run. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -386,11 +409,11 @@ class SoftwareUpdateConfigurationMachineRuns { * * @reject {Error} - The error object. */ - getByIdWithHttpOperationResponse(softwareUpdateConfigurationMachineRunId, options) { + getByIdWithHttpOperationResponse(resourceGroupName, automationAccountName, softwareUpdateConfigurationMachineRunId, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._getById(softwareUpdateConfigurationMachineRunId, options, (err, result, request, response) => { + self._getById(resourceGroupName, automationAccountName, softwareUpdateConfigurationMachineRunId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -403,11 +426,18 @@ class SoftwareUpdateConfigurationMachineRuns { /** * Get a single software update configuration machine run by Id. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {uuid} softwareUpdateConfigurationMachineRunId The Id of the software * update configuration machine run. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -434,7 +464,7 @@ class SoftwareUpdateConfigurationMachineRuns { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getById(softwareUpdateConfigurationMachineRunId, options, optionalCallback) { + getById(resourceGroupName, automationAccountName, softwareUpdateConfigurationMachineRunId, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -443,22 +473,29 @@ class SoftwareUpdateConfigurationMachineRuns { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getById(softwareUpdateConfigurationMachineRunId, options, (err, result, request, response) => { + self._getById(resourceGroupName, automationAccountName, softwareUpdateConfigurationMachineRunId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getById(softwareUpdateConfigurationMachineRunId, options, optionalCallback); + return self._getById(resourceGroupName, automationAccountName, softwareUpdateConfigurationMachineRunId, options, optionalCallback); } } /** * Return list of software update configuration machine runs * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {string} [options.filter] The filter to apply on the operation. You * can use the following filters: 'properties/osType', 'properties/status', * 'properties/startTime', and 'properties/softwareUpdateConfiguration/name' @@ -478,11 +515,11 @@ class SoftwareUpdateConfigurationMachineRuns { * * @reject {Error} - The error object. */ - listWithHttpOperationResponse(options) { + listWithHttpOperationResponse(resourceGroupName, automationAccountName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._list(options, (err, result, request, response) => { + self._list(resourceGroupName, automationAccountName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -495,8 +532,15 @@ class SoftwareUpdateConfigurationMachineRuns { /** * Return list of software update configuration machine runs * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {string} [options.filter] The filter to apply on the operation. You * can use the following filters: 'properties/osType', 'properties/status', * 'properties/startTime', and 'properties/softwareUpdateConfiguration/name' @@ -534,7 +578,7 @@ class SoftwareUpdateConfigurationMachineRuns { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - list(options, optionalCallback) { + list(resourceGroupName, automationAccountName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -543,14 +587,14 @@ class SoftwareUpdateConfigurationMachineRuns { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._list(options, (err, result, request, response) => { + self._list(resourceGroupName, automationAccountName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._list(options, optionalCallback); + return self._list(resourceGroupName, automationAccountName, options, optionalCallback); } } diff --git a/lib/services/automationManagement/lib/operations/softwareUpdateConfigurationRuns.js b/lib/services/automationManagement/lib/operations/softwareUpdateConfigurationRuns.js index ed70966f40..0aaec32ede 100644 --- a/lib/services/automationManagement/lib/operations/softwareUpdateConfigurationRuns.js +++ b/lib/services/automationManagement/lib/operations/softwareUpdateConfigurationRuns.js @@ -17,11 +17,18 @@ const WebResource = msRest.WebResource; /** * Get a single software update configuration Run by Id. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {uuid} softwareUpdateConfigurationRunId The Id of the software update * configuration run. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -39,7 +46,7 @@ const WebResource = msRest.WebResource; * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _getById(softwareUpdateConfigurationRunId, options, callback) { +function _getById(resourceGroupName, automationAccountName, softwareUpdateConfigurationRunId, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -49,29 +56,30 @@ function _getById(softwareUpdateConfigurationRunId, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } + let clientRequestId = (options && options.clientRequestId !== undefined) ? options.clientRequestId : undefined; let apiVersion = '2017-05-15-preview'; // Validate try { if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } - if (this.client.automationAccountName === null || this.client.automationAccountName === undefined || typeof this.client.automationAccountName.valueOf() !== 'string') { - throw new Error('this.client.automationAccountName cannot be null or undefined and it must be of type string.'); + if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { + throw new Error('automationAccountName cannot be null or undefined and it must be of type string.'); } if (softwareUpdateConfigurationRunId === null || softwareUpdateConfigurationRunId === undefined || typeof softwareUpdateConfigurationRunId.valueOf() !== 'string' || !msRest.isValidUuid(softwareUpdateConfigurationRunId)) { throw new Error('softwareUpdateConfigurationRunId cannot be null or undefined and it must be of type string and must be a valid uuid.'); } - if (this.client.clientRequestId !== null && this.client.clientRequestId !== undefined && typeof this.client.clientRequestId.valueOf() !== 'string') { - throw new Error('this.client.clientRequestId must be of type string.'); + if (clientRequestId !== null && clientRequestId !== undefined && typeof clientRequestId.valueOf() !== 'string') { + throw new Error('clientRequestId must be of type string.'); } if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { throw new Error('this.client.acceptLanguage must be of type string.'); @@ -84,8 +92,8 @@ function _getById(softwareUpdateConfigurationRunId, options, callback) { let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/softwareUpdateConfigurationRuns/{softwareUpdateConfigurationRunId}'; requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); - requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(this.client.automationAccountName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{softwareUpdateConfigurationRunId}', encodeURIComponent(softwareUpdateConfigurationRunId.toString())); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); @@ -103,8 +111,8 @@ function _getById(softwareUpdateConfigurationRunId, options, callback) { if (this.client.generateClientRequestId) { httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); } - if (this.client.clientRequestId !== undefined && this.client.clientRequestId !== null) { - httpRequest.headers['clientRequestId'] = this.client.clientRequestId; + if (clientRequestId !== undefined && clientRequestId !== null) { + httpRequest.headers['clientRequestId'] = clientRequestId; } if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { httpRequest.headers['accept-language'] = this.client.acceptLanguage; @@ -176,8 +184,15 @@ function _getById(softwareUpdateConfigurationRunId, options, callback) { /** * Return list of software update configuration runs * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {string} [options.filter] The filter to apply on the operation. You * can use the following filters: 'properties/osType', 'properties/status', * 'properties/startTime', and 'properties/softwareUpdateConfiguration/name' @@ -205,7 +220,7 @@ function _getById(softwareUpdateConfigurationRunId, options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _list(options, callback) { +function _list(resourceGroupName, automationAccountName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -215,6 +230,7 @@ function _list(options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } + let clientRequestId = (options && options.clientRequestId !== undefined) ? options.clientRequestId : undefined; let filter = (options && options.filter !== undefined) ? options.filter : undefined; let skip = (options && options.skip !== undefined) ? options.skip : undefined; let top = (options && options.top !== undefined) ? options.top : undefined; @@ -224,20 +240,20 @@ function _list(options, callback) { if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } - if (this.client.automationAccountName === null || this.client.automationAccountName === undefined || typeof this.client.automationAccountName.valueOf() !== 'string') { - throw new Error('this.client.automationAccountName cannot be null or undefined and it must be of type string.'); + if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { + throw new Error('automationAccountName cannot be null or undefined and it must be of type string.'); } - if (this.client.clientRequestId !== null && this.client.clientRequestId !== undefined && typeof this.client.clientRequestId.valueOf() !== 'string') { - throw new Error('this.client.clientRequestId must be of type string.'); + if (clientRequestId !== null && clientRequestId !== undefined && typeof clientRequestId.valueOf() !== 'string') { + throw new Error('clientRequestId must be of type string.'); } if (filter !== null && filter !== undefined && typeof filter.valueOf() !== 'string') { throw new Error('filter must be of type string.'); @@ -259,8 +275,8 @@ function _list(options, callback) { let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/softwareUpdateConfigurationRuns'; requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); - requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(this.client.automationAccountName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); if (filter !== null && filter !== undefined) { @@ -286,8 +302,8 @@ function _list(options, callback) { if (this.client.generateClientRequestId) { httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); } - if (this.client.clientRequestId !== undefined && this.client.clientRequestId !== null) { - httpRequest.headers['clientRequestId'] = this.client.clientRequestId; + if (clientRequestId !== undefined && clientRequestId !== null) { + httpRequest.headers['clientRequestId'] = clientRequestId; } if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { httpRequest.headers['accept-language'] = this.client.acceptLanguage; @@ -371,11 +387,18 @@ class SoftwareUpdateConfigurationRuns { /** * Get a single software update configuration Run by Id. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {uuid} softwareUpdateConfigurationRunId The Id of the software update * configuration run. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -385,11 +408,11 @@ class SoftwareUpdateConfigurationRuns { * * @reject {Error} - The error object. */ - getByIdWithHttpOperationResponse(softwareUpdateConfigurationRunId, options) { + getByIdWithHttpOperationResponse(resourceGroupName, automationAccountName, softwareUpdateConfigurationRunId, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._getById(softwareUpdateConfigurationRunId, options, (err, result, request, response) => { + self._getById(resourceGroupName, automationAccountName, softwareUpdateConfigurationRunId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -402,11 +425,18 @@ class SoftwareUpdateConfigurationRuns { /** * Get a single software update configuration Run by Id. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {uuid} softwareUpdateConfigurationRunId The Id of the software update * configuration run. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -433,7 +463,7 @@ class SoftwareUpdateConfigurationRuns { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getById(softwareUpdateConfigurationRunId, options, optionalCallback) { + getById(resourceGroupName, automationAccountName, softwareUpdateConfigurationRunId, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -442,22 +472,29 @@ class SoftwareUpdateConfigurationRuns { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getById(softwareUpdateConfigurationRunId, options, (err, result, request, response) => { + self._getById(resourceGroupName, automationAccountName, softwareUpdateConfigurationRunId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getById(softwareUpdateConfigurationRunId, options, optionalCallback); + return self._getById(resourceGroupName, automationAccountName, softwareUpdateConfigurationRunId, options, optionalCallback); } } /** * Return list of software update configuration runs * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {string} [options.filter] The filter to apply on the operation. You * can use the following filters: 'properties/osType', 'properties/status', * 'properties/startTime', and 'properties/softwareUpdateConfiguration/name' @@ -477,11 +514,11 @@ class SoftwareUpdateConfigurationRuns { * * @reject {Error} - The error object. */ - listWithHttpOperationResponse(options) { + listWithHttpOperationResponse(resourceGroupName, automationAccountName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._list(options, (err, result, request, response) => { + self._list(resourceGroupName, automationAccountName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -494,8 +531,15 @@ class SoftwareUpdateConfigurationRuns { /** * Return list of software update configuration runs * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {string} [options.filter] The filter to apply on the operation. You * can use the following filters: 'properties/osType', 'properties/status', * 'properties/startTime', and 'properties/softwareUpdateConfiguration/name' @@ -532,7 +576,7 @@ class SoftwareUpdateConfigurationRuns { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - list(options, optionalCallback) { + list(resourceGroupName, automationAccountName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -541,14 +585,14 @@ class SoftwareUpdateConfigurationRuns { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._list(options, (err, result, request, response) => { + self._list(resourceGroupName, automationAccountName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._list(options, optionalCallback); + return self._list(resourceGroupName, automationAccountName, options, optionalCallback); } } diff --git a/lib/services/automationManagement/lib/operations/softwareUpdateConfigurations.js b/lib/services/automationManagement/lib/operations/softwareUpdateConfigurations.js index 2bac5ec8b4..24f7f61710 100644 --- a/lib/services/automationManagement/lib/operations/softwareUpdateConfigurations.js +++ b/lib/services/automationManagement/lib/operations/softwareUpdateConfigurations.js @@ -17,6 +17,10 @@ const WebResource = msRest.WebResource; /** * Create a new software update configuration with the name given in the URI. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {string} softwareUpdateConfigurationName The name of the software * update configuration to be created. * @@ -126,6 +130,9 @@ const WebResource = msRest.WebResource; * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -143,7 +150,7 @@ const WebResource = msRest.WebResource; * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _create(softwareUpdateConfigurationName, parameters, options, callback) { +function _create(resourceGroupName, automationAccountName, softwareUpdateConfigurationName, parameters, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -153,29 +160,30 @@ function _create(softwareUpdateConfigurationName, parameters, options, callback) if (!callback) { throw new Error('callback cannot be null.'); } + let clientRequestId = (options && options.clientRequestId !== undefined) ? options.clientRequestId : undefined; let apiVersion = '2017-05-15-preview'; // Validate try { if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } - if (this.client.automationAccountName === null || this.client.automationAccountName === undefined || typeof this.client.automationAccountName.valueOf() !== 'string') { - throw new Error('this.client.automationAccountName cannot be null or undefined and it must be of type string.'); + if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { + throw new Error('automationAccountName cannot be null or undefined and it must be of type string.'); } if (softwareUpdateConfigurationName === null || softwareUpdateConfigurationName === undefined || typeof softwareUpdateConfigurationName.valueOf() !== 'string') { throw new Error('softwareUpdateConfigurationName cannot be null or undefined and it must be of type string.'); } - if (this.client.clientRequestId !== null && this.client.clientRequestId !== undefined && typeof this.client.clientRequestId.valueOf() !== 'string') { - throw new Error('this.client.clientRequestId must be of type string.'); + if (clientRequestId !== null && clientRequestId !== undefined && typeof clientRequestId.valueOf() !== 'string') { + throw new Error('clientRequestId must be of type string.'); } if (parameters === null || parameters === undefined) { throw new Error('parameters cannot be null or undefined.'); @@ -191,8 +199,8 @@ function _create(softwareUpdateConfigurationName, parameters, options, callback) let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/softwareUpdateConfigurations/{softwareUpdateConfigurationName}'; requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); - requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(this.client.automationAccountName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{softwareUpdateConfigurationName}', encodeURIComponent(softwareUpdateConfigurationName)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); @@ -210,8 +218,8 @@ function _create(softwareUpdateConfigurationName, parameters, options, callback) if (this.client.generateClientRequestId) { httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); } - if (this.client.clientRequestId !== undefined && this.client.clientRequestId !== null) { - httpRequest.headers['clientRequestId'] = this.client.clientRequestId; + if (clientRequestId !== undefined && clientRequestId !== null) { + httpRequest.headers['clientRequestId'] = clientRequestId; } if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { httpRequest.headers['accept-language'] = this.client.acceptLanguage; @@ -314,11 +322,18 @@ function _create(softwareUpdateConfigurationName, parameters, options, callback) /** * Get a single software update configuration by name. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {string} softwareUpdateConfigurationName The name of the software * update configuration to be created. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -336,7 +351,7 @@ function _create(softwareUpdateConfigurationName, parameters, options, callback) * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _getByName(softwareUpdateConfigurationName, options, callback) { +function _getByName(resourceGroupName, automationAccountName, softwareUpdateConfigurationName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -346,29 +361,30 @@ function _getByName(softwareUpdateConfigurationName, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } + let clientRequestId = (options && options.clientRequestId !== undefined) ? options.clientRequestId : undefined; let apiVersion = '2017-05-15-preview'; // Validate try { if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } - if (this.client.automationAccountName === null || this.client.automationAccountName === undefined || typeof this.client.automationAccountName.valueOf() !== 'string') { - throw new Error('this.client.automationAccountName cannot be null or undefined and it must be of type string.'); + if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { + throw new Error('automationAccountName cannot be null or undefined and it must be of type string.'); } if (softwareUpdateConfigurationName === null || softwareUpdateConfigurationName === undefined || typeof softwareUpdateConfigurationName.valueOf() !== 'string') { throw new Error('softwareUpdateConfigurationName cannot be null or undefined and it must be of type string.'); } - if (this.client.clientRequestId !== null && this.client.clientRequestId !== undefined && typeof this.client.clientRequestId.valueOf() !== 'string') { - throw new Error('this.client.clientRequestId must be of type string.'); + if (clientRequestId !== null && clientRequestId !== undefined && typeof clientRequestId.valueOf() !== 'string') { + throw new Error('clientRequestId must be of type string.'); } if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { throw new Error('this.client.acceptLanguage must be of type string.'); @@ -381,8 +397,8 @@ function _getByName(softwareUpdateConfigurationName, options, callback) { let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/softwareUpdateConfigurations/{softwareUpdateConfigurationName}'; requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); - requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(this.client.automationAccountName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{softwareUpdateConfigurationName}', encodeURIComponent(softwareUpdateConfigurationName)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); @@ -400,8 +416,8 @@ function _getByName(softwareUpdateConfigurationName, options, callback) { if (this.client.generateClientRequestId) { httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); } - if (this.client.clientRequestId !== undefined && this.client.clientRequestId !== null) { - httpRequest.headers['clientRequestId'] = this.client.clientRequestId; + if (clientRequestId !== undefined && clientRequestId !== null) { + httpRequest.headers['clientRequestId'] = clientRequestId; } if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { httpRequest.headers['accept-language'] = this.client.acceptLanguage; @@ -473,11 +489,18 @@ function _getByName(softwareUpdateConfigurationName, options, callback) { /** * delete a specific software update configuration. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {string} softwareUpdateConfigurationName The name of the software * update configuration to be created. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -493,7 +516,7 @@ function _getByName(softwareUpdateConfigurationName, options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _deleteMethod(softwareUpdateConfigurationName, options, callback) { +function _deleteMethod(resourceGroupName, automationAccountName, softwareUpdateConfigurationName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -503,29 +526,30 @@ function _deleteMethod(softwareUpdateConfigurationName, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } + let clientRequestId = (options && options.clientRequestId !== undefined) ? options.clientRequestId : undefined; let apiVersion = '2017-05-15-preview'; // Validate try { if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } - if (this.client.automationAccountName === null || this.client.automationAccountName === undefined || typeof this.client.automationAccountName.valueOf() !== 'string') { - throw new Error('this.client.automationAccountName cannot be null or undefined and it must be of type string.'); + if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { + throw new Error('automationAccountName cannot be null or undefined and it must be of type string.'); } if (softwareUpdateConfigurationName === null || softwareUpdateConfigurationName === undefined || typeof softwareUpdateConfigurationName.valueOf() !== 'string') { throw new Error('softwareUpdateConfigurationName cannot be null or undefined and it must be of type string.'); } - if (this.client.clientRequestId !== null && this.client.clientRequestId !== undefined && typeof this.client.clientRequestId.valueOf() !== 'string') { - throw new Error('this.client.clientRequestId must be of type string.'); + if (clientRequestId !== null && clientRequestId !== undefined && typeof clientRequestId.valueOf() !== 'string') { + throw new Error('clientRequestId must be of type string.'); } if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { throw new Error('this.client.acceptLanguage must be of type string.'); @@ -538,8 +562,8 @@ function _deleteMethod(softwareUpdateConfigurationName, options, callback) { let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/softwareUpdateConfigurations/{softwareUpdateConfigurationName}'; requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); - requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(this.client.automationAccountName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{softwareUpdateConfigurationName}', encodeURIComponent(softwareUpdateConfigurationName)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); @@ -557,8 +581,8 @@ function _deleteMethod(softwareUpdateConfigurationName, options, callback) { if (this.client.generateClientRequestId) { httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); } - if (this.client.clientRequestId !== undefined && this.client.clientRequestId !== null) { - httpRequest.headers['clientRequestId'] = this.client.clientRequestId; + if (clientRequestId !== undefined && clientRequestId !== null) { + httpRequest.headers['clientRequestId'] = clientRequestId; } if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { httpRequest.headers['accept-language'] = this.client.acceptLanguage; @@ -613,8 +637,15 @@ function _deleteMethod(softwareUpdateConfigurationName, options, callback) { /** * Get all software update configurations for the account. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {string} [options.filter] The filter to apply on the operation. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -634,7 +665,7 @@ function _deleteMethod(softwareUpdateConfigurationName, options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _list(options, callback) { +function _list(resourceGroupName, automationAccountName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -644,6 +675,7 @@ function _list(options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } + let clientRequestId = (options && options.clientRequestId !== undefined) ? options.clientRequestId : undefined; let filter = (options && options.filter !== undefined) ? options.filter : undefined; let apiVersion = '2017-05-15-preview'; // Validate @@ -651,20 +683,20 @@ function _list(options, callback) { if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } - if (this.client.automationAccountName === null || this.client.automationAccountName === undefined || typeof this.client.automationAccountName.valueOf() !== 'string') { - throw new Error('this.client.automationAccountName cannot be null or undefined and it must be of type string.'); + if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { + throw new Error('automationAccountName cannot be null or undefined and it must be of type string.'); } - if (this.client.clientRequestId !== null && this.client.clientRequestId !== undefined && typeof this.client.clientRequestId.valueOf() !== 'string') { - throw new Error('this.client.clientRequestId must be of type string.'); + if (clientRequestId !== null && clientRequestId !== undefined && typeof clientRequestId.valueOf() !== 'string') { + throw new Error('clientRequestId must be of type string.'); } if (filter !== null && filter !== undefined && typeof filter.valueOf() !== 'string') { throw new Error('filter must be of type string.'); @@ -680,8 +712,8 @@ function _list(options, callback) { let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/softwareUpdateConfigurations'; requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); - requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(this.client.automationAccountName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); if (filter !== null && filter !== undefined) { @@ -701,8 +733,8 @@ function _list(options, callback) { if (this.client.generateClientRequestId) { httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); } - if (this.client.clientRequestId !== undefined && this.client.clientRequestId !== null) { - httpRequest.headers['clientRequestId'] = this.client.clientRequestId; + if (clientRequestId !== undefined && clientRequestId !== null) { + httpRequest.headers['clientRequestId'] = clientRequestId; } if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { httpRequest.headers['accept-language'] = this.client.acceptLanguage; @@ -788,6 +820,10 @@ class SoftwareUpdateConfigurations { /** * Create a new software update configuration with the name given in the URI. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {string} softwareUpdateConfigurationName The name of the software * update configuration to be created. * @@ -897,6 +933,9 @@ class SoftwareUpdateConfigurations { * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -906,11 +945,11 @@ class SoftwareUpdateConfigurations { * * @reject {Error} - The error object. */ - createWithHttpOperationResponse(softwareUpdateConfigurationName, parameters, options) { + createWithHttpOperationResponse(resourceGroupName, automationAccountName, softwareUpdateConfigurationName, parameters, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._create(softwareUpdateConfigurationName, parameters, options, (err, result, request, response) => { + self._create(resourceGroupName, automationAccountName, softwareUpdateConfigurationName, parameters, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -923,6 +962,10 @@ class SoftwareUpdateConfigurations { /** * Create a new software update configuration with the name given in the URI. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {string} softwareUpdateConfigurationName The name of the software * update configuration to be created. * @@ -1032,6 +1075,9 @@ class SoftwareUpdateConfigurations { * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -1058,7 +1104,7 @@ class SoftwareUpdateConfigurations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - create(softwareUpdateConfigurationName, parameters, options, optionalCallback) { + create(resourceGroupName, automationAccountName, softwareUpdateConfigurationName, parameters, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1067,25 +1113,32 @@ class SoftwareUpdateConfigurations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._create(softwareUpdateConfigurationName, parameters, options, (err, result, request, response) => { + self._create(resourceGroupName, automationAccountName, softwareUpdateConfigurationName, parameters, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._create(softwareUpdateConfigurationName, parameters, options, optionalCallback); + return self._create(resourceGroupName, automationAccountName, softwareUpdateConfigurationName, parameters, options, optionalCallback); } } /** * Get a single software update configuration by name. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {string} softwareUpdateConfigurationName The name of the software * update configuration to be created. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -1095,11 +1148,11 @@ class SoftwareUpdateConfigurations { * * @reject {Error} - The error object. */ - getByNameWithHttpOperationResponse(softwareUpdateConfigurationName, options) { + getByNameWithHttpOperationResponse(resourceGroupName, automationAccountName, softwareUpdateConfigurationName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._getByName(softwareUpdateConfigurationName, options, (err, result, request, response) => { + self._getByName(resourceGroupName, automationAccountName, softwareUpdateConfigurationName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1112,11 +1165,18 @@ class SoftwareUpdateConfigurations { /** * Get a single software update configuration by name. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {string} softwareUpdateConfigurationName The name of the software * update configuration to be created. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -1143,7 +1203,7 @@ class SoftwareUpdateConfigurations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getByName(softwareUpdateConfigurationName, options, optionalCallback) { + getByName(resourceGroupName, automationAccountName, softwareUpdateConfigurationName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1152,25 +1212,32 @@ class SoftwareUpdateConfigurations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getByName(softwareUpdateConfigurationName, options, (err, result, request, response) => { + self._getByName(resourceGroupName, automationAccountName, softwareUpdateConfigurationName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getByName(softwareUpdateConfigurationName, options, optionalCallback); + return self._getByName(resourceGroupName, automationAccountName, softwareUpdateConfigurationName, options, optionalCallback); } } /** * delete a specific software update configuration. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {string} softwareUpdateConfigurationName The name of the software * update configuration to be created. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -1180,11 +1247,11 @@ class SoftwareUpdateConfigurations { * * @reject {Error} - The error object. */ - deleteMethodWithHttpOperationResponse(softwareUpdateConfigurationName, options) { + deleteMethodWithHttpOperationResponse(resourceGroupName, automationAccountName, softwareUpdateConfigurationName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._deleteMethod(softwareUpdateConfigurationName, options, (err, result, request, response) => { + self._deleteMethod(resourceGroupName, automationAccountName, softwareUpdateConfigurationName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1197,11 +1264,18 @@ class SoftwareUpdateConfigurations { /** * delete a specific software update configuration. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {string} softwareUpdateConfigurationName The name of the software * update configuration to be created. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -1226,7 +1300,7 @@ class SoftwareUpdateConfigurations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(softwareUpdateConfigurationName, options, optionalCallback) { + deleteMethod(resourceGroupName, automationAccountName, softwareUpdateConfigurationName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1235,22 +1309,29 @@ class SoftwareUpdateConfigurations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._deleteMethod(softwareUpdateConfigurationName, options, (err, result, request, response) => { + self._deleteMethod(resourceGroupName, automationAccountName, softwareUpdateConfigurationName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._deleteMethod(softwareUpdateConfigurationName, options, optionalCallback); + return self._deleteMethod(resourceGroupName, automationAccountName, softwareUpdateConfigurationName, options, optionalCallback); } } /** * Get all software update configurations for the account. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {string} [options.filter] The filter to apply on the operation. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -1262,11 +1343,11 @@ class SoftwareUpdateConfigurations { * * @reject {Error} - The error object. */ - listWithHttpOperationResponse(options) { + listWithHttpOperationResponse(resourceGroupName, automationAccountName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._list(options, (err, result, request, response) => { + self._list(resourceGroupName, automationAccountName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1279,8 +1360,15 @@ class SoftwareUpdateConfigurations { /** * Get all software update configurations for the account. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {string} [options.filter] The filter to apply on the operation. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -1309,7 +1397,7 @@ class SoftwareUpdateConfigurations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - list(options, optionalCallback) { + list(resourceGroupName, automationAccountName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1318,14 +1406,14 @@ class SoftwareUpdateConfigurations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._list(options, (err, result, request, response) => { + self._list(resourceGroupName, automationAccountName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._list(options, optionalCallback); + return self._list(resourceGroupName, automationAccountName, options, optionalCallback); } } diff --git a/lib/services/automationManagement/lib/operations/sourceControlOperations.js b/lib/services/automationManagement/lib/operations/sourceControlOperations.js index cc165f3f21..45f6f96beb 100644 --- a/lib/services/automationManagement/lib/operations/sourceControlOperations.js +++ b/lib/services/automationManagement/lib/operations/sourceControlOperations.js @@ -17,6 +17,8 @@ const WebResource = msRest.WebResource; /** * Create a source control. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} sourceControlName The source control name. @@ -67,7 +69,7 @@ const WebResource = msRest.WebResource; * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _createOrUpdate(automationAccountName, sourceControlName, parameters, options, callback) { +function _createOrUpdate(resourceGroupName, automationAccountName, sourceControlName, parameters, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -80,13 +82,13 @@ function _createOrUpdate(automationAccountName, sourceControlName, parameters, o let apiVersion = '2017-05-15-preview'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -111,7 +113,7 @@ function _createOrUpdate(automationAccountName, sourceControlName, parameters, o // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/sourceControls/{sourceControlName}'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{sourceControlName}', encodeURIComponent(sourceControlName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -233,6 +235,8 @@ function _createOrUpdate(automationAccountName, sourceControlName, parameters, o /** * Update a source control. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} sourceControlName The source control name. @@ -276,7 +280,7 @@ function _createOrUpdate(automationAccountName, sourceControlName, parameters, o * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _update(automationAccountName, sourceControlName, parameters, options, callback) { +function _update(resourceGroupName, automationAccountName, sourceControlName, parameters, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -289,13 +293,13 @@ function _update(automationAccountName, sourceControlName, parameters, options, let apiVersion = '2017-05-15-preview'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -320,7 +324,7 @@ function _update(automationAccountName, sourceControlName, parameters, options, // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/sourceControls/{sourceControlName}'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{sourceControlName}', encodeURIComponent(sourceControlName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -425,6 +429,8 @@ function _update(automationAccountName, sourceControlName, parameters, options, /** * Delete the source control. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} sourceControlName The name of source control. @@ -446,7 +452,7 @@ function _update(automationAccountName, sourceControlName, parameters, options, * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _deleteMethod(automationAccountName, sourceControlName, options, callback) { +function _deleteMethod(resourceGroupName, automationAccountName, sourceControlName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -459,13 +465,13 @@ function _deleteMethod(automationAccountName, sourceControlName, options, callba let apiVersion = '2017-05-15-preview'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -487,7 +493,7 @@ function _deleteMethod(automationAccountName, sourceControlName, options, callba // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/sourceControls/{sourceControlName}'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{sourceControlName}', encodeURIComponent(sourceControlName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -561,6 +567,8 @@ function _deleteMethod(automationAccountName, sourceControlName, options, callba /** * Retrieve the source control identified by source control name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} sourceControlName The name of source control. @@ -583,7 +591,7 @@ function _deleteMethod(automationAccountName, sourceControlName, options, callba * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _get(automationAccountName, sourceControlName, options, callback) { +function _get(resourceGroupName, automationAccountName, sourceControlName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -596,13 +604,13 @@ function _get(automationAccountName, sourceControlName, options, callback) { let apiVersion = '2017-05-15-preview'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -624,7 +632,7 @@ function _get(automationAccountName, sourceControlName, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/sourceControls/{sourceControlName}'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{sourceControlName}', encodeURIComponent(sourceControlName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -715,6 +723,8 @@ function _get(automationAccountName, sourceControlName, options, callback) { /** * Retrieve a list of source controls. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -738,7 +748,7 @@ function _get(automationAccountName, sourceControlName, options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _listByAutomationAccount(automationAccountName, options, callback) { +function _listByAutomationAccount(resourceGroupName, automationAccountName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -752,13 +762,13 @@ function _listByAutomationAccount(automationAccountName, options, callback) { let apiVersion = '2017-05-15-preview'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -780,7 +790,7 @@ function _listByAutomationAccount(automationAccountName, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/sourceControls'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; @@ -1018,6 +1028,8 @@ class SourceControlOperations { /** * Create a source control. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} sourceControlName The source control name. @@ -1061,11 +1073,11 @@ class SourceControlOperations { * * @reject {Error} - The error object. */ - createOrUpdateWithHttpOperationResponse(automationAccountName, sourceControlName, parameters, options) { + createOrUpdateWithHttpOperationResponse(resourceGroupName, automationAccountName, sourceControlName, parameters, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._createOrUpdate(automationAccountName, sourceControlName, parameters, options, (err, result, request, response) => { + self._createOrUpdate(resourceGroupName, automationAccountName, sourceControlName, parameters, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1078,6 +1090,8 @@ class SourceControlOperations { /** * Create a source control. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} sourceControlName The source control name. @@ -1137,7 +1151,7 @@ class SourceControlOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - createOrUpdate(automationAccountName, sourceControlName, parameters, options, optionalCallback) { + createOrUpdate(resourceGroupName, automationAccountName, sourceControlName, parameters, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1146,20 +1160,22 @@ class SourceControlOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._createOrUpdate(automationAccountName, sourceControlName, parameters, options, (err, result, request, response) => { + self._createOrUpdate(resourceGroupName, automationAccountName, sourceControlName, parameters, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._createOrUpdate(automationAccountName, sourceControlName, parameters, options, optionalCallback); + return self._createOrUpdate(resourceGroupName, automationAccountName, sourceControlName, parameters, options, optionalCallback); } } /** * Update a source control. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} sourceControlName The source control name. @@ -1196,11 +1212,11 @@ class SourceControlOperations { * * @reject {Error} - The error object. */ - updateWithHttpOperationResponse(automationAccountName, sourceControlName, parameters, options) { + updateWithHttpOperationResponse(resourceGroupName, automationAccountName, sourceControlName, parameters, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._update(automationAccountName, sourceControlName, parameters, options, (err, result, request, response) => { + self._update(resourceGroupName, automationAccountName, sourceControlName, parameters, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1213,6 +1229,8 @@ class SourceControlOperations { /** * Update a source control. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} sourceControlName The source control name. @@ -1265,7 +1283,7 @@ class SourceControlOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - update(automationAccountName, sourceControlName, parameters, options, optionalCallback) { + update(resourceGroupName, automationAccountName, sourceControlName, parameters, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1274,20 +1292,22 @@ class SourceControlOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._update(automationAccountName, sourceControlName, parameters, options, (err, result, request, response) => { + self._update(resourceGroupName, automationAccountName, sourceControlName, parameters, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._update(automationAccountName, sourceControlName, parameters, options, optionalCallback); + return self._update(resourceGroupName, automationAccountName, sourceControlName, parameters, options, optionalCallback); } } /** * Delete the source control. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} sourceControlName The name of source control. @@ -1303,11 +1323,11 @@ class SourceControlOperations { * * @reject {Error} - The error object. */ - deleteMethodWithHttpOperationResponse(automationAccountName, sourceControlName, options) { + deleteMethodWithHttpOperationResponse(resourceGroupName, automationAccountName, sourceControlName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._deleteMethod(automationAccountName, sourceControlName, options, (err, result, request, response) => { + self._deleteMethod(resourceGroupName, automationAccountName, sourceControlName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1320,6 +1340,8 @@ class SourceControlOperations { /** * Delete the source control. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} sourceControlName The name of source control. @@ -1350,7 +1372,7 @@ class SourceControlOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(automationAccountName, sourceControlName, options, optionalCallback) { + deleteMethod(resourceGroupName, automationAccountName, sourceControlName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1359,20 +1381,22 @@ class SourceControlOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._deleteMethod(automationAccountName, sourceControlName, options, (err, result, request, response) => { + self._deleteMethod(resourceGroupName, automationAccountName, sourceControlName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._deleteMethod(automationAccountName, sourceControlName, options, optionalCallback); + return self._deleteMethod(resourceGroupName, automationAccountName, sourceControlName, options, optionalCallback); } } /** * Retrieve the source control identified by source control name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} sourceControlName The name of source control. @@ -1388,11 +1412,11 @@ class SourceControlOperations { * * @reject {Error} - The error object. */ - getWithHttpOperationResponse(automationAccountName, sourceControlName, options) { + getWithHttpOperationResponse(resourceGroupName, automationAccountName, sourceControlName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._get(automationAccountName, sourceControlName, options, (err, result, request, response) => { + self._get(resourceGroupName, automationAccountName, sourceControlName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1405,6 +1429,8 @@ class SourceControlOperations { /** * Retrieve the source control identified by source control name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} sourceControlName The name of source control. @@ -1436,7 +1462,7 @@ class SourceControlOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - get(automationAccountName, sourceControlName, options, optionalCallback) { + get(resourceGroupName, automationAccountName, sourceControlName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1445,20 +1471,22 @@ class SourceControlOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._get(automationAccountName, sourceControlName, options, (err, result, request, response) => { + self._get(resourceGroupName, automationAccountName, sourceControlName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._get(automationAccountName, sourceControlName, options, optionalCallback); + return self._get(resourceGroupName, automationAccountName, sourceControlName, options, optionalCallback); } } /** * Retrieve a list of source controls. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -1474,11 +1502,11 @@ class SourceControlOperations { * * @reject {Error} - The error object. */ - listByAutomationAccountWithHttpOperationResponse(automationAccountName, options) { + listByAutomationAccountWithHttpOperationResponse(resourceGroupName, automationAccountName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._listByAutomationAccount(automationAccountName, options, (err, result, request, response) => { + self._listByAutomationAccount(resourceGroupName, automationAccountName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1491,6 +1519,8 @@ class SourceControlOperations { /** * Retrieve a list of source controls. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -1523,7 +1553,7 @@ class SourceControlOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - listByAutomationAccount(automationAccountName, options, optionalCallback) { + listByAutomationAccount(resourceGroupName, automationAccountName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1532,14 +1562,14 @@ class SourceControlOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._listByAutomationAccount(automationAccountName, options, (err, result, request, response) => { + self._listByAutomationAccount(resourceGroupName, automationAccountName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._listByAutomationAccount(automationAccountName, options, optionalCallback); + return self._listByAutomationAccount(resourceGroupName, automationAccountName, options, optionalCallback); } } diff --git a/lib/services/automationManagement/lib/operations/sourceControlSyncJobOperations.js b/lib/services/automationManagement/lib/operations/sourceControlSyncJobOperations.js index 9c083f2028..d0159af758 100644 --- a/lib/services/automationManagement/lib/operations/sourceControlSyncJobOperations.js +++ b/lib/services/automationManagement/lib/operations/sourceControlSyncJobOperations.js @@ -17,6 +17,8 @@ const WebResource = msRest.WebResource; /** * Creates the sync job for a source control. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} sourceControlName The source control name. @@ -41,7 +43,7 @@ const WebResource = msRest.WebResource; * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _create(automationAccountName, sourceControlName, sourceControlSyncJobId, options, callback) { +function _create(resourceGroupName, automationAccountName, sourceControlName, sourceControlSyncJobId, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -54,13 +56,13 @@ function _create(automationAccountName, sourceControlName, sourceControlSyncJobI let apiVersion = '2017-05-15-preview'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -85,7 +87,7 @@ function _create(automationAccountName, sourceControlName, sourceControlSyncJobI // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/sourceControls/{sourceControlName}/sourceControlSyncJobs/{sourceControlSyncJobId}'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{sourceControlName}', encodeURIComponent(sourceControlName)); requestUrl = requestUrl.replace('{sourceControlSyncJobId}', encodeURIComponent(sourceControlSyncJobId.toString())); @@ -177,6 +179,8 @@ function _create(automationAccountName, sourceControlName, sourceControlSyncJobI /** * Retrieve the source control sync job identified by job id. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} sourceControlName The source control name. @@ -202,7 +206,7 @@ function _create(automationAccountName, sourceControlName, sourceControlSyncJobI * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _get(automationAccountName, sourceControlName, sourceControlSyncJobId, options, callback) { +function _get(resourceGroupName, automationAccountName, sourceControlName, sourceControlSyncJobId, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -215,13 +219,13 @@ function _get(automationAccountName, sourceControlName, sourceControlSyncJobId, let apiVersion = '2017-05-15-preview'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -246,7 +250,7 @@ function _get(automationAccountName, sourceControlName, sourceControlSyncJobId, // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/sourceControls/{sourceControlName}/sourceControlSyncJobs/{sourceControlSyncJobId}'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{sourceControlName}', encodeURIComponent(sourceControlName)); requestUrl = requestUrl.replace('{sourceControlSyncJobId}', encodeURIComponent(sourceControlSyncJobId.toString())); @@ -338,6 +342,8 @@ function _get(automationAccountName, sourceControlName, sourceControlSyncJobId, /** * Retrieve a list of source control sync jobs. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} sourceControlName The source control name. @@ -363,7 +369,7 @@ function _get(automationAccountName, sourceControlName, sourceControlSyncJobId, * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _listByAutomationAccount(automationAccountName, sourceControlName, options, callback) { +function _listByAutomationAccount(resourceGroupName, automationAccountName, sourceControlName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -377,13 +383,13 @@ function _listByAutomationAccount(automationAccountName, sourceControlName, opti let apiVersion = '2017-05-15-preview'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -408,7 +414,7 @@ function _listByAutomationAccount(automationAccountName, sourceControlName, opti // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/sourceControls/{sourceControlName}/sourceControlSyncJobs'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{sourceControlName}', encodeURIComponent(sourceControlName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -645,6 +651,8 @@ class SourceControlSyncJobOperations { /** * Creates the sync job for a source control. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} sourceControlName The source control name. @@ -662,11 +670,11 @@ class SourceControlSyncJobOperations { * * @reject {Error} - The error object. */ - createWithHttpOperationResponse(automationAccountName, sourceControlName, sourceControlSyncJobId, options) { + createWithHttpOperationResponse(resourceGroupName, automationAccountName, sourceControlName, sourceControlSyncJobId, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._create(automationAccountName, sourceControlName, sourceControlSyncJobId, options, (err, result, request, response) => { + self._create(resourceGroupName, automationAccountName, sourceControlName, sourceControlSyncJobId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -679,6 +687,8 @@ class SourceControlSyncJobOperations { /** * Creates the sync job for a source control. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} sourceControlName The source control name. @@ -712,7 +722,7 @@ class SourceControlSyncJobOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - create(automationAccountName, sourceControlName, sourceControlSyncJobId, options, optionalCallback) { + create(resourceGroupName, automationAccountName, sourceControlName, sourceControlSyncJobId, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -721,20 +731,22 @@ class SourceControlSyncJobOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._create(automationAccountName, sourceControlName, sourceControlSyncJobId, options, (err, result, request, response) => { + self._create(resourceGroupName, automationAccountName, sourceControlName, sourceControlSyncJobId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._create(automationAccountName, sourceControlName, sourceControlSyncJobId, options, optionalCallback); + return self._create(resourceGroupName, automationAccountName, sourceControlName, sourceControlSyncJobId, options, optionalCallback); } } /** * Retrieve the source control sync job identified by job id. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} sourceControlName The source control name. @@ -752,11 +764,11 @@ class SourceControlSyncJobOperations { * * @reject {Error} - The error object. */ - getWithHttpOperationResponse(automationAccountName, sourceControlName, sourceControlSyncJobId, options) { + getWithHttpOperationResponse(resourceGroupName, automationAccountName, sourceControlName, sourceControlSyncJobId, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._get(automationAccountName, sourceControlName, sourceControlSyncJobId, options, (err, result, request, response) => { + self._get(resourceGroupName, automationAccountName, sourceControlName, sourceControlSyncJobId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -769,6 +781,8 @@ class SourceControlSyncJobOperations { /** * Retrieve the source control sync job identified by job id. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} sourceControlName The source control name. @@ -803,7 +817,7 @@ class SourceControlSyncJobOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - get(automationAccountName, sourceControlName, sourceControlSyncJobId, options, optionalCallback) { + get(resourceGroupName, automationAccountName, sourceControlName, sourceControlSyncJobId, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -812,20 +826,22 @@ class SourceControlSyncJobOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._get(automationAccountName, sourceControlName, sourceControlSyncJobId, options, (err, result, request, response) => { + self._get(resourceGroupName, automationAccountName, sourceControlName, sourceControlSyncJobId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._get(automationAccountName, sourceControlName, sourceControlSyncJobId, options, optionalCallback); + return self._get(resourceGroupName, automationAccountName, sourceControlName, sourceControlSyncJobId, options, optionalCallback); } } /** * Retrieve a list of source control sync jobs. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} sourceControlName The source control name. @@ -843,11 +859,11 @@ class SourceControlSyncJobOperations { * * @reject {Error} - The error object. */ - listByAutomationAccountWithHttpOperationResponse(automationAccountName, sourceControlName, options) { + listByAutomationAccountWithHttpOperationResponse(resourceGroupName, automationAccountName, sourceControlName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._listByAutomationAccount(automationAccountName, sourceControlName, options, (err, result, request, response) => { + self._listByAutomationAccount(resourceGroupName, automationAccountName, sourceControlName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -860,6 +876,8 @@ class SourceControlSyncJobOperations { /** * Retrieve a list of source control sync jobs. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} sourceControlName The source control name. @@ -894,7 +912,7 @@ class SourceControlSyncJobOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - listByAutomationAccount(automationAccountName, sourceControlName, options, optionalCallback) { + listByAutomationAccount(resourceGroupName, automationAccountName, sourceControlName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -903,14 +921,14 @@ class SourceControlSyncJobOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._listByAutomationAccount(automationAccountName, sourceControlName, options, (err, result, request, response) => { + self._listByAutomationAccount(resourceGroupName, automationAccountName, sourceControlName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._listByAutomationAccount(automationAccountName, sourceControlName, options, optionalCallback); + return self._listByAutomationAccount(resourceGroupName, automationAccountName, sourceControlName, options, optionalCallback); } } diff --git a/lib/services/automationManagement/lib/operations/testJobOperations.js b/lib/services/automationManagement/lib/operations/testJobOperations.js index fe584dc175..d6bdd29dcc 100644 --- a/lib/services/automationManagement/lib/operations/testJobOperations.js +++ b/lib/services/automationManagement/lib/operations/testJobOperations.js @@ -17,6 +17,8 @@ const WebResource = msRest.WebResource; /** * Create a test job of the runbook. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The parameters supplied to the create test job @@ -49,7 +51,7 @@ const WebResource = msRest.WebResource; * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _create(automationAccountName, runbookName, parameters, options, callback) { +function _create(resourceGroupName, automationAccountName, runbookName, parameters, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -65,13 +67,13 @@ function _create(automationAccountName, runbookName, parameters, options, callba if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -94,7 +96,7 @@ function _create(automationAccountName, runbookName, parameters, options, callba let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/runbooks/{runbookName}/draft/testJob'; requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{runbookName}', encodeURIComponent(runbookName)); let queryParameters = []; @@ -198,6 +200,8 @@ function _create(automationAccountName, runbookName, parameters, options, callba /** * Retrieve the test job for the specified runbook. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -220,7 +224,7 @@ function _create(automationAccountName, runbookName, parameters, options, callba * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _get(automationAccountName, runbookName, options, callback) { +function _get(resourceGroupName, automationAccountName, runbookName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -236,13 +240,13 @@ function _get(automationAccountName, runbookName, options, callback) { if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -262,7 +266,7 @@ function _get(automationAccountName, runbookName, options, callback) { let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/runbooks/{runbookName}/draft/testJob'; requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{runbookName}', encodeURIComponent(runbookName)); let queryParameters = []; @@ -352,6 +356,8 @@ function _get(automationAccountName, runbookName, options, callback) { /** * Resume the test job. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -373,7 +379,7 @@ function _get(automationAccountName, runbookName, options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _resume(automationAccountName, runbookName, options, callback) { +function _resume(resourceGroupName, automationAccountName, runbookName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -389,13 +395,13 @@ function _resume(automationAccountName, runbookName, options, callback) { if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -415,7 +421,7 @@ function _resume(automationAccountName, runbookName, options, callback) { let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/runbooks/{runbookName}/draft/testJob/resume'; requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{runbookName}', encodeURIComponent(runbookName)); let queryParameters = []; @@ -488,6 +494,8 @@ function _resume(automationAccountName, runbookName, options, callback) { /** * Stop the test job. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -509,7 +517,7 @@ function _resume(automationAccountName, runbookName, options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _stop(automationAccountName, runbookName, options, callback) { +function _stop(resourceGroupName, automationAccountName, runbookName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -525,13 +533,13 @@ function _stop(automationAccountName, runbookName, options, callback) { if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -551,7 +559,7 @@ function _stop(automationAccountName, runbookName, options, callback) { let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/runbooks/{runbookName}/draft/testJob/stop'; requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{runbookName}', encodeURIComponent(runbookName)); let queryParameters = []; @@ -624,6 +632,8 @@ function _stop(automationAccountName, runbookName, options, callback) { /** * Suspend the test job. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -645,7 +655,7 @@ function _stop(automationAccountName, runbookName, options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _suspend(automationAccountName, runbookName, options, callback) { +function _suspend(resourceGroupName, automationAccountName, runbookName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -661,13 +671,13 @@ function _suspend(automationAccountName, runbookName, options, callback) { if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -687,7 +697,7 @@ function _suspend(automationAccountName, runbookName, options, callback) { let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/runbooks/{runbookName}/draft/testJob/suspend'; requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{runbookName}', encodeURIComponent(runbookName)); let queryParameters = []; @@ -775,6 +785,8 @@ class TestJobOperations { /** * Create a test job of the runbook. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The parameters supplied to the create test job @@ -800,11 +812,11 @@ class TestJobOperations { * * @reject {Error} - The error object. */ - createWithHttpOperationResponse(automationAccountName, runbookName, parameters, options) { + createWithHttpOperationResponse(resourceGroupName, automationAccountName, runbookName, parameters, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._create(automationAccountName, runbookName, parameters, options, (err, result, request, response) => { + self._create(resourceGroupName, automationAccountName, runbookName, parameters, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -817,6 +829,8 @@ class TestJobOperations { /** * Create a test job of the runbook. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The parameters supplied to the create test job @@ -858,7 +872,7 @@ class TestJobOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - create(automationAccountName, runbookName, parameters, options, optionalCallback) { + create(resourceGroupName, automationAccountName, runbookName, parameters, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -867,20 +881,22 @@ class TestJobOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._create(automationAccountName, runbookName, parameters, options, (err, result, request, response) => { + self._create(resourceGroupName, automationAccountName, runbookName, parameters, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._create(automationAccountName, runbookName, parameters, options, optionalCallback); + return self._create(resourceGroupName, automationAccountName, runbookName, parameters, options, optionalCallback); } } /** * Retrieve the test job for the specified runbook. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -896,11 +912,11 @@ class TestJobOperations { * * @reject {Error} - The error object. */ - getWithHttpOperationResponse(automationAccountName, runbookName, options) { + getWithHttpOperationResponse(resourceGroupName, automationAccountName, runbookName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._get(automationAccountName, runbookName, options, (err, result, request, response) => { + self._get(resourceGroupName, automationAccountName, runbookName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -913,6 +929,8 @@ class TestJobOperations { /** * Retrieve the test job for the specified runbook. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -944,7 +962,7 @@ class TestJobOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - get(automationAccountName, runbookName, options, optionalCallback) { + get(resourceGroupName, automationAccountName, runbookName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -953,20 +971,22 @@ class TestJobOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._get(automationAccountName, runbookName, options, (err, result, request, response) => { + self._get(resourceGroupName, automationAccountName, runbookName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._get(automationAccountName, runbookName, options, optionalCallback); + return self._get(resourceGroupName, automationAccountName, runbookName, options, optionalCallback); } } /** * Resume the test job. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -982,11 +1002,11 @@ class TestJobOperations { * * @reject {Error} - The error object. */ - resumeWithHttpOperationResponse(automationAccountName, runbookName, options) { + resumeWithHttpOperationResponse(resourceGroupName, automationAccountName, runbookName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._resume(automationAccountName, runbookName, options, (err, result, request, response) => { + self._resume(resourceGroupName, automationAccountName, runbookName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -999,6 +1019,8 @@ class TestJobOperations { /** * Resume the test job. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -1029,7 +1051,7 @@ class TestJobOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - resume(automationAccountName, runbookName, options, optionalCallback) { + resume(resourceGroupName, automationAccountName, runbookName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1038,20 +1060,22 @@ class TestJobOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._resume(automationAccountName, runbookName, options, (err, result, request, response) => { + self._resume(resourceGroupName, automationAccountName, runbookName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._resume(automationAccountName, runbookName, options, optionalCallback); + return self._resume(resourceGroupName, automationAccountName, runbookName, options, optionalCallback); } } /** * Stop the test job. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -1067,11 +1091,11 @@ class TestJobOperations { * * @reject {Error} - The error object. */ - stopWithHttpOperationResponse(automationAccountName, runbookName, options) { + stopWithHttpOperationResponse(resourceGroupName, automationAccountName, runbookName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._stop(automationAccountName, runbookName, options, (err, result, request, response) => { + self._stop(resourceGroupName, automationAccountName, runbookName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1084,6 +1108,8 @@ class TestJobOperations { /** * Stop the test job. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -1114,7 +1140,7 @@ class TestJobOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - stop(automationAccountName, runbookName, options, optionalCallback) { + stop(resourceGroupName, automationAccountName, runbookName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1123,20 +1149,22 @@ class TestJobOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._stop(automationAccountName, runbookName, options, (err, result, request, response) => { + self._stop(resourceGroupName, automationAccountName, runbookName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._stop(automationAccountName, runbookName, options, optionalCallback); + return self._stop(resourceGroupName, automationAccountName, runbookName, options, optionalCallback); } } /** * Suspend the test job. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -1152,11 +1180,11 @@ class TestJobOperations { * * @reject {Error} - The error object. */ - suspendWithHttpOperationResponse(automationAccountName, runbookName, options) { + suspendWithHttpOperationResponse(resourceGroupName, automationAccountName, runbookName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._suspend(automationAccountName, runbookName, options, (err, result, request, response) => { + self._suspend(resourceGroupName, automationAccountName, runbookName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1169,6 +1197,8 @@ class TestJobOperations { /** * Suspend the test job. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -1199,7 +1229,7 @@ class TestJobOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - suspend(automationAccountName, runbookName, options, optionalCallback) { + suspend(resourceGroupName, automationAccountName, runbookName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1208,14 +1238,14 @@ class TestJobOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._suspend(automationAccountName, runbookName, options, (err, result, request, response) => { + self._suspend(resourceGroupName, automationAccountName, runbookName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._suspend(automationAccountName, runbookName, options, optionalCallback); + return self._suspend(resourceGroupName, automationAccountName, runbookName, options, optionalCallback); } } diff --git a/lib/services/automationManagement/lib/operations/testJobStreams.js b/lib/services/automationManagement/lib/operations/testJobStreams.js index 028a130fda..7ca01bb89b 100644 --- a/lib/services/automationManagement/lib/operations/testJobStreams.js +++ b/lib/services/automationManagement/lib/operations/testJobStreams.js @@ -18,6 +18,8 @@ const WebResource = msRest.WebResource; * Retrieve a test job stream of the test job identified by runbook name and * stream id. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -42,7 +44,7 @@ const WebResource = msRest.WebResource; * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _get(automationAccountName, runbookName, jobStreamId, options, callback) { +function _get(resourceGroupName, automationAccountName, runbookName, jobStreamId, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -58,13 +60,13 @@ function _get(automationAccountName, runbookName, jobStreamId, options, callback if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -87,7 +89,7 @@ function _get(automationAccountName, runbookName, jobStreamId, options, callback let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/runbooks/{runbookName}/draft/testJob/streams/{jobStreamId}'; requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{runbookName}', encodeURIComponent(runbookName)); requestUrl = requestUrl.replace('{jobStreamId}', encodeURIComponent(jobStreamId)); @@ -178,6 +180,8 @@ function _get(automationAccountName, runbookName, jobStreamId, options, callback /** * Retrieve a list of test job streams identified by runbook name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -202,7 +206,7 @@ function _get(automationAccountName, runbookName, jobStreamId, options, callback * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _listByTestJob(automationAccountName, runbookName, options, callback) { +function _listByTestJob(resourceGroupName, automationAccountName, runbookName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -219,13 +223,13 @@ function _listByTestJob(automationAccountName, runbookName, options, callback) { if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -248,7 +252,7 @@ function _listByTestJob(automationAccountName, runbookName, options, callback) { let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/runbooks/{runbookName}/draft/testJob/streams'; requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{runbookName}', encodeURIComponent(runbookName)); let queryParameters = []; @@ -483,6 +487,8 @@ class TestJobStreams { * Retrieve a test job stream of the test job identified by runbook name and * stream id. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -500,11 +506,11 @@ class TestJobStreams { * * @reject {Error} - The error object. */ - getWithHttpOperationResponse(automationAccountName, runbookName, jobStreamId, options) { + getWithHttpOperationResponse(resourceGroupName, automationAccountName, runbookName, jobStreamId, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._get(automationAccountName, runbookName, jobStreamId, options, (err, result, request, response) => { + self._get(resourceGroupName, automationAccountName, runbookName, jobStreamId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -518,6 +524,8 @@ class TestJobStreams { * Retrieve a test job stream of the test job identified by runbook name and * stream id. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -551,7 +559,7 @@ class TestJobStreams { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - get(automationAccountName, runbookName, jobStreamId, options, optionalCallback) { + get(resourceGroupName, automationAccountName, runbookName, jobStreamId, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -560,20 +568,22 @@ class TestJobStreams { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._get(automationAccountName, runbookName, jobStreamId, options, (err, result, request, response) => { + self._get(resourceGroupName, automationAccountName, runbookName, jobStreamId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._get(automationAccountName, runbookName, jobStreamId, options, optionalCallback); + return self._get(resourceGroupName, automationAccountName, runbookName, jobStreamId, options, optionalCallback); } } /** * Retrieve a list of test job streams identified by runbook name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -591,11 +601,11 @@ class TestJobStreams { * * @reject {Error} - The error object. */ - listByTestJobWithHttpOperationResponse(automationAccountName, runbookName, options) { + listByTestJobWithHttpOperationResponse(resourceGroupName, automationAccountName, runbookName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._listByTestJob(automationAccountName, runbookName, options, (err, result, request, response) => { + self._listByTestJob(resourceGroupName, automationAccountName, runbookName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -608,6 +618,8 @@ class TestJobStreams { /** * Retrieve a list of test job streams identified by runbook name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -641,7 +653,7 @@ class TestJobStreams { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - listByTestJob(automationAccountName, runbookName, options, optionalCallback) { + listByTestJob(resourceGroupName, automationAccountName, runbookName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -650,14 +662,14 @@ class TestJobStreams { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._listByTestJob(automationAccountName, runbookName, options, (err, result, request, response) => { + self._listByTestJob(resourceGroupName, automationAccountName, runbookName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._listByTestJob(automationAccountName, runbookName, options, optionalCallback); + return self._listByTestJob(resourceGroupName, automationAccountName, runbookName, options, optionalCallback); } } diff --git a/lib/services/automationManagement/lib/operations/variableOperations.js b/lib/services/automationManagement/lib/operations/variableOperations.js index 704a306729..8717c55b1e 100644 --- a/lib/services/automationManagement/lib/operations/variableOperations.js +++ b/lib/services/automationManagement/lib/operations/variableOperations.js @@ -17,6 +17,8 @@ const WebResource = msRest.WebResource; /** * Create a variable. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} variableName The variable name. @@ -52,7 +54,7 @@ const WebResource = msRest.WebResource; * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _createOrUpdate(automationAccountName, variableName, parameters, options, callback) { +function _createOrUpdate(resourceGroupName, automationAccountName, variableName, parameters, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -65,13 +67,13 @@ function _createOrUpdate(automationAccountName, variableName, parameters, option let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -96,7 +98,7 @@ function _createOrUpdate(automationAccountName, variableName, parameters, option // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/variables/{variableName}'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{variableName}', encodeURIComponent(variableName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -218,6 +220,8 @@ function _createOrUpdate(automationAccountName, variableName, parameters, option /** * Update a variable. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} variableName The variable name. @@ -250,7 +254,7 @@ function _createOrUpdate(automationAccountName, variableName, parameters, option * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _update(automationAccountName, variableName, parameters, options, callback) { +function _update(resourceGroupName, automationAccountName, variableName, parameters, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -263,13 +267,13 @@ function _update(automationAccountName, variableName, parameters, options, callb let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -294,7 +298,7 @@ function _update(automationAccountName, variableName, parameters, options, callb // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/variables/{variableName}'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{variableName}', encodeURIComponent(variableName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -399,6 +403,8 @@ function _update(automationAccountName, variableName, parameters, options, callb /** * Delete the variable. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} variableName The name of variable. @@ -420,7 +426,7 @@ function _update(automationAccountName, variableName, parameters, options, callb * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _deleteMethod(automationAccountName, variableName, options, callback) { +function _deleteMethod(resourceGroupName, automationAccountName, variableName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -433,13 +439,13 @@ function _deleteMethod(automationAccountName, variableName, options, callback) { let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -461,7 +467,7 @@ function _deleteMethod(automationAccountName, variableName, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/variables/{variableName}'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{variableName}', encodeURIComponent(variableName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -535,6 +541,8 @@ function _deleteMethod(automationAccountName, variableName, options, callback) { /** * Retrieve the variable identified by variable name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} variableName The name of variable. @@ -557,7 +565,7 @@ function _deleteMethod(automationAccountName, variableName, options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _get(automationAccountName, variableName, options, callback) { +function _get(resourceGroupName, automationAccountName, variableName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -570,13 +578,13 @@ function _get(automationAccountName, variableName, options, callback) { let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -598,7 +606,7 @@ function _get(automationAccountName, variableName, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/variables/{variableName}'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{variableName}', encodeURIComponent(variableName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -689,6 +697,8 @@ function _get(automationAccountName, variableName, options, callback) { /** * Retrieve a list of variables. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -709,7 +719,7 @@ function _get(automationAccountName, variableName, options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _listByAutomationAccount(automationAccountName, options, callback) { +function _listByAutomationAccount(resourceGroupName, automationAccountName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -722,13 +732,13 @@ function _listByAutomationAccount(automationAccountName, options, callback) { let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -747,7 +757,7 @@ function _listByAutomationAccount(automationAccountName, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/variables'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; @@ -981,6 +991,8 @@ class VariableOperations { /** * Create a variable. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} variableName The variable name. @@ -1009,11 +1021,11 @@ class VariableOperations { * * @reject {Error} - The error object. */ - createOrUpdateWithHttpOperationResponse(automationAccountName, variableName, parameters, options) { + createOrUpdateWithHttpOperationResponse(resourceGroupName, automationAccountName, variableName, parameters, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._createOrUpdate(automationAccountName, variableName, parameters, options, (err, result, request, response) => { + self._createOrUpdate(resourceGroupName, automationAccountName, variableName, parameters, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1026,6 +1038,8 @@ class VariableOperations { /** * Create a variable. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} variableName The variable name. @@ -1070,7 +1084,7 @@ class VariableOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - createOrUpdate(automationAccountName, variableName, parameters, options, optionalCallback) { + createOrUpdate(resourceGroupName, automationAccountName, variableName, parameters, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1079,20 +1093,22 @@ class VariableOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._createOrUpdate(automationAccountName, variableName, parameters, options, (err, result, request, response) => { + self._createOrUpdate(resourceGroupName, automationAccountName, variableName, parameters, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._createOrUpdate(automationAccountName, variableName, parameters, options, optionalCallback); + return self._createOrUpdate(resourceGroupName, automationAccountName, variableName, parameters, options, optionalCallback); } } /** * Update a variable. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} variableName The variable name. @@ -1118,11 +1134,11 @@ class VariableOperations { * * @reject {Error} - The error object. */ - updateWithHttpOperationResponse(automationAccountName, variableName, parameters, options) { + updateWithHttpOperationResponse(resourceGroupName, automationAccountName, variableName, parameters, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._update(automationAccountName, variableName, parameters, options, (err, result, request, response) => { + self._update(resourceGroupName, automationAccountName, variableName, parameters, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1135,6 +1151,8 @@ class VariableOperations { /** * Update a variable. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} variableName The variable name. @@ -1176,7 +1194,7 @@ class VariableOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - update(automationAccountName, variableName, parameters, options, optionalCallback) { + update(resourceGroupName, automationAccountName, variableName, parameters, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1185,20 +1203,22 @@ class VariableOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._update(automationAccountName, variableName, parameters, options, (err, result, request, response) => { + self._update(resourceGroupName, automationAccountName, variableName, parameters, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._update(automationAccountName, variableName, parameters, options, optionalCallback); + return self._update(resourceGroupName, automationAccountName, variableName, parameters, options, optionalCallback); } } /** * Delete the variable. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} variableName The name of variable. @@ -1214,11 +1234,11 @@ class VariableOperations { * * @reject {Error} - The error object. */ - deleteMethodWithHttpOperationResponse(automationAccountName, variableName, options) { + deleteMethodWithHttpOperationResponse(resourceGroupName, automationAccountName, variableName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._deleteMethod(automationAccountName, variableName, options, (err, result, request, response) => { + self._deleteMethod(resourceGroupName, automationAccountName, variableName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1231,6 +1251,8 @@ class VariableOperations { /** * Delete the variable. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} variableName The name of variable. @@ -1261,7 +1283,7 @@ class VariableOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(automationAccountName, variableName, options, optionalCallback) { + deleteMethod(resourceGroupName, automationAccountName, variableName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1270,20 +1292,22 @@ class VariableOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._deleteMethod(automationAccountName, variableName, options, (err, result, request, response) => { + self._deleteMethod(resourceGroupName, automationAccountName, variableName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._deleteMethod(automationAccountName, variableName, options, optionalCallback); + return self._deleteMethod(resourceGroupName, automationAccountName, variableName, options, optionalCallback); } } /** * Retrieve the variable identified by variable name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} variableName The name of variable. @@ -1299,11 +1323,11 @@ class VariableOperations { * * @reject {Error} - The error object. */ - getWithHttpOperationResponse(automationAccountName, variableName, options) { + getWithHttpOperationResponse(resourceGroupName, automationAccountName, variableName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._get(automationAccountName, variableName, options, (err, result, request, response) => { + self._get(resourceGroupName, automationAccountName, variableName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1316,6 +1340,8 @@ class VariableOperations { /** * Retrieve the variable identified by variable name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} variableName The name of variable. @@ -1347,7 +1373,7 @@ class VariableOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - get(automationAccountName, variableName, options, optionalCallback) { + get(resourceGroupName, automationAccountName, variableName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1356,20 +1382,22 @@ class VariableOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._get(automationAccountName, variableName, options, (err, result, request, response) => { + self._get(resourceGroupName, automationAccountName, variableName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._get(automationAccountName, variableName, options, optionalCallback); + return self._get(resourceGroupName, automationAccountName, variableName, options, optionalCallback); } } /** * Retrieve a list of variables. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -1383,11 +1411,11 @@ class VariableOperations { * * @reject {Error} - The error object. */ - listByAutomationAccountWithHttpOperationResponse(automationAccountName, options) { + listByAutomationAccountWithHttpOperationResponse(resourceGroupName, automationAccountName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._listByAutomationAccount(automationAccountName, options, (err, result, request, response) => { + self._listByAutomationAccount(resourceGroupName, automationAccountName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1400,6 +1428,8 @@ class VariableOperations { /** * Retrieve a list of variables. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -1429,7 +1459,7 @@ class VariableOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - listByAutomationAccount(automationAccountName, options, optionalCallback) { + listByAutomationAccount(resourceGroupName, automationAccountName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1438,14 +1468,14 @@ class VariableOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._listByAutomationAccount(automationAccountName, options, (err, result, request, response) => { + self._listByAutomationAccount(resourceGroupName, automationAccountName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._listByAutomationAccount(automationAccountName, options, optionalCallback); + return self._listByAutomationAccount(resourceGroupName, automationAccountName, options, optionalCallback); } } diff --git a/lib/services/automationManagement/lib/operations/webhookOperations.js b/lib/services/automationManagement/lib/operations/webhookOperations.js index b10646ad9d..ce2de10941 100644 --- a/lib/services/automationManagement/lib/operations/webhookOperations.js +++ b/lib/services/automationManagement/lib/operations/webhookOperations.js @@ -17,6 +17,8 @@ const WebResource = msRest.WebResource; /** * Generates a Uri for use in creating a webhook. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -36,7 +38,7 @@ const WebResource = msRest.WebResource; * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _generateUri(automationAccountName, options, callback) { +function _generateUri(resourceGroupName, automationAccountName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -49,13 +51,13 @@ function _generateUri(automationAccountName, options, callback) { let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -74,7 +76,7 @@ function _generateUri(automationAccountName, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/webhooks/generateUri'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; @@ -170,6 +172,8 @@ function _generateUri(automationAccountName, options, callback) { /** * Delete the webhook by name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} webhookName The webhook name. @@ -191,7 +195,7 @@ function _generateUri(automationAccountName, options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _deleteMethod(automationAccountName, webhookName, options, callback) { +function _deleteMethod(resourceGroupName, automationAccountName, webhookName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -204,13 +208,13 @@ function _deleteMethod(automationAccountName, webhookName, options, callback) { let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -232,7 +236,7 @@ function _deleteMethod(automationAccountName, webhookName, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/webhooks/{webhookName}'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{webhookName}', encodeURIComponent(webhookName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -306,6 +310,8 @@ function _deleteMethod(automationAccountName, webhookName, options, callback) { /** * Retrieve the webhook identified by webhook name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} webhookName The webhook name. @@ -328,7 +334,7 @@ function _deleteMethod(automationAccountName, webhookName, options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _get(automationAccountName, webhookName, options, callback) { +function _get(resourceGroupName, automationAccountName, webhookName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -341,13 +347,13 @@ function _get(automationAccountName, webhookName, options, callback) { let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -369,7 +375,7 @@ function _get(automationAccountName, webhookName, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/webhooks/{webhookName}'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{webhookName}', encodeURIComponent(webhookName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -460,6 +466,8 @@ function _get(automationAccountName, webhookName, options, callback) { /** * Create the webhook identified by webhook name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} webhookName The webhook name. @@ -504,7 +512,7 @@ function _get(automationAccountName, webhookName, options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _createOrUpdate(automationAccountName, webhookName, parameters, options, callback) { +function _createOrUpdate(resourceGroupName, automationAccountName, webhookName, parameters, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -517,13 +525,13 @@ function _createOrUpdate(automationAccountName, webhookName, parameters, options let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -548,7 +556,7 @@ function _createOrUpdate(automationAccountName, webhookName, parameters, options // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/webhooks/{webhookName}'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{webhookName}', encodeURIComponent(webhookName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -670,6 +678,8 @@ function _createOrUpdate(automationAccountName, webhookName, parameters, options /** * Update the webhook identified by webhook name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} webhookName The webhook name. @@ -708,7 +718,7 @@ function _createOrUpdate(automationAccountName, webhookName, parameters, options * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _update(automationAccountName, webhookName, parameters, options, callback) { +function _update(resourceGroupName, automationAccountName, webhookName, parameters, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -721,13 +731,13 @@ function _update(automationAccountName, webhookName, parameters, options, callba let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -752,7 +762,7 @@ function _update(automationAccountName, webhookName, parameters, options, callba // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/webhooks/{webhookName}'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{webhookName}', encodeURIComponent(webhookName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -857,6 +867,8 @@ function _update(automationAccountName, webhookName, parameters, options, callba /** * Retrieve a list of webhooks. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -879,7 +891,7 @@ function _update(automationAccountName, webhookName, parameters, options, callba * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _listByAutomationAccount(automationAccountName, options, callback) { +function _listByAutomationAccount(resourceGroupName, automationAccountName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -893,13 +905,13 @@ function _listByAutomationAccount(automationAccountName, options, callback) { let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -921,7 +933,7 @@ function _listByAutomationAccount(automationAccountName, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/webhooks'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; @@ -1159,6 +1171,8 @@ class WebhookOperations { /** * Generates a Uri for use in creating a webhook. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -1172,11 +1186,11 @@ class WebhookOperations { * * @reject {Error} - The error object. */ - generateUriWithHttpOperationResponse(automationAccountName, options) { + generateUriWithHttpOperationResponse(resourceGroupName, automationAccountName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._generateUri(automationAccountName, options, (err, result, request, response) => { + self._generateUri(resourceGroupName, automationAccountName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1189,6 +1203,8 @@ class WebhookOperations { /** * Generates a Uri for use in creating a webhook. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -1217,7 +1233,7 @@ class WebhookOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - generateUri(automationAccountName, options, optionalCallback) { + generateUri(resourceGroupName, automationAccountName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1226,20 +1242,22 @@ class WebhookOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._generateUri(automationAccountName, options, (err, result, request, response) => { + self._generateUri(resourceGroupName, automationAccountName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._generateUri(automationAccountName, options, optionalCallback); + return self._generateUri(resourceGroupName, automationAccountName, options, optionalCallback); } } /** * Delete the webhook by name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} webhookName The webhook name. @@ -1255,11 +1273,11 @@ class WebhookOperations { * * @reject {Error} - The error object. */ - deleteMethodWithHttpOperationResponse(automationAccountName, webhookName, options) { + deleteMethodWithHttpOperationResponse(resourceGroupName, automationAccountName, webhookName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._deleteMethod(automationAccountName, webhookName, options, (err, result, request, response) => { + self._deleteMethod(resourceGroupName, automationAccountName, webhookName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1272,6 +1290,8 @@ class WebhookOperations { /** * Delete the webhook by name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} webhookName The webhook name. @@ -1302,7 +1322,7 @@ class WebhookOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(automationAccountName, webhookName, options, optionalCallback) { + deleteMethod(resourceGroupName, automationAccountName, webhookName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1311,20 +1331,22 @@ class WebhookOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._deleteMethod(automationAccountName, webhookName, options, (err, result, request, response) => { + self._deleteMethod(resourceGroupName, automationAccountName, webhookName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._deleteMethod(automationAccountName, webhookName, options, optionalCallback); + return self._deleteMethod(resourceGroupName, automationAccountName, webhookName, options, optionalCallback); } } /** * Retrieve the webhook identified by webhook name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} webhookName The webhook name. @@ -1340,11 +1362,11 @@ class WebhookOperations { * * @reject {Error} - The error object. */ - getWithHttpOperationResponse(automationAccountName, webhookName, options) { + getWithHttpOperationResponse(resourceGroupName, automationAccountName, webhookName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._get(automationAccountName, webhookName, options, (err, result, request, response) => { + self._get(resourceGroupName, automationAccountName, webhookName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1357,6 +1379,8 @@ class WebhookOperations { /** * Retrieve the webhook identified by webhook name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} webhookName The webhook name. @@ -1388,7 +1412,7 @@ class WebhookOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - get(automationAccountName, webhookName, options, optionalCallback) { + get(resourceGroupName, automationAccountName, webhookName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1397,20 +1421,22 @@ class WebhookOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._get(automationAccountName, webhookName, options, (err, result, request, response) => { + self._get(resourceGroupName, automationAccountName, webhookName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._get(automationAccountName, webhookName, options, optionalCallback); + return self._get(resourceGroupName, automationAccountName, webhookName, options, optionalCallback); } } /** * Create the webhook identified by webhook name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} webhookName The webhook name. @@ -1448,11 +1474,11 @@ class WebhookOperations { * * @reject {Error} - The error object. */ - createOrUpdateWithHttpOperationResponse(automationAccountName, webhookName, parameters, options) { + createOrUpdateWithHttpOperationResponse(resourceGroupName, automationAccountName, webhookName, parameters, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._createOrUpdate(automationAccountName, webhookName, parameters, options, (err, result, request, response) => { + self._createOrUpdate(resourceGroupName, automationAccountName, webhookName, parameters, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1465,6 +1491,8 @@ class WebhookOperations { /** * Create the webhook identified by webhook name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} webhookName The webhook name. @@ -1518,7 +1546,7 @@ class WebhookOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - createOrUpdate(automationAccountName, webhookName, parameters, options, optionalCallback) { + createOrUpdate(resourceGroupName, automationAccountName, webhookName, parameters, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1527,20 +1555,22 @@ class WebhookOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._createOrUpdate(automationAccountName, webhookName, parameters, options, (err, result, request, response) => { + self._createOrUpdate(resourceGroupName, automationAccountName, webhookName, parameters, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._createOrUpdate(automationAccountName, webhookName, parameters, options, optionalCallback); + return self._createOrUpdate(resourceGroupName, automationAccountName, webhookName, parameters, options, optionalCallback); } } /** * Update the webhook identified by webhook name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} webhookName The webhook name. @@ -1572,11 +1602,11 @@ class WebhookOperations { * * @reject {Error} - The error object. */ - updateWithHttpOperationResponse(automationAccountName, webhookName, parameters, options) { + updateWithHttpOperationResponse(resourceGroupName, automationAccountName, webhookName, parameters, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._update(automationAccountName, webhookName, parameters, options, (err, result, request, response) => { + self._update(resourceGroupName, automationAccountName, webhookName, parameters, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1589,6 +1619,8 @@ class WebhookOperations { /** * Update the webhook identified by webhook name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} webhookName The webhook name. @@ -1636,7 +1668,7 @@ class WebhookOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - update(automationAccountName, webhookName, parameters, options, optionalCallback) { + update(resourceGroupName, automationAccountName, webhookName, parameters, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1645,20 +1677,22 @@ class WebhookOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._update(automationAccountName, webhookName, parameters, options, (err, result, request, response) => { + self._update(resourceGroupName, automationAccountName, webhookName, parameters, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._update(automationAccountName, webhookName, parameters, options, optionalCallback); + return self._update(resourceGroupName, automationAccountName, webhookName, parameters, options, optionalCallback); } } /** * Retrieve a list of webhooks. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -1674,11 +1708,11 @@ class WebhookOperations { * * @reject {Error} - The error object. */ - listByAutomationAccountWithHttpOperationResponse(automationAccountName, options) { + listByAutomationAccountWithHttpOperationResponse(resourceGroupName, automationAccountName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._listByAutomationAccount(automationAccountName, options, (err, result, request, response) => { + self._listByAutomationAccount(resourceGroupName, automationAccountName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1691,6 +1725,8 @@ class WebhookOperations { /** * Retrieve a list of webhooks. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -1722,7 +1758,7 @@ class WebhookOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - listByAutomationAccount(automationAccountName, options, optionalCallback) { + listByAutomationAccount(resourceGroupName, automationAccountName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1731,14 +1767,14 @@ class WebhookOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._listByAutomationAccount(automationAccountName, options, (err, result, request, response) => { + self._listByAutomationAccount(resourceGroupName, automationAccountName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._listByAutomationAccount(automationAccountName, options, optionalCallback); + return self._listByAutomationAccount(resourceGroupName, automationAccountName, options, optionalCallback); } } From 96e1db9c6199a98a8286c8e21734e3c5dd84ba34 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Fri, 23 Mar 2018 15:20:21 -0700 Subject: [PATCH 3/6] Generated from d55be73815a24c1ea54f397922ac7bc4dc11289a (#2510) Adding patch API for Configurations --- .../dscConfigurationUpdateParameters.js | 129 ++++++ .../lib/models/index.d.ts | 35 ++ .../automationManagement/lib/models/index.js | 1 + .../operations/dscConfigurationOperations.js | 376 ++++++++++++++++++ .../lib/operations/index.d.ts | 139 +++++++ 5 files changed, 680 insertions(+) create mode 100644 lib/services/automationManagement/lib/models/dscConfigurationUpdateParameters.js diff --git a/lib/services/automationManagement/lib/models/dscConfigurationUpdateParameters.js b/lib/services/automationManagement/lib/models/dscConfigurationUpdateParameters.js new file mode 100644 index 0000000000..a0fcd3d36d --- /dev/null +++ b/lib/services/automationManagement/lib/models/dscConfigurationUpdateParameters.js @@ -0,0 +1,129 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * The parameters supplied to the create or update configuration operation. + * + */ +class DscConfigurationUpdateParameters { + /** + * Create a DscConfigurationUpdateParameters. + * @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. + */ + constructor() { + } + + /** + * Defines the metadata of DscConfigurationUpdateParameters + * + * @returns {object} metadata of DscConfigurationUpdateParameters + * + */ + mapper() { + return { + required: false, + serializedName: 'DscConfigurationUpdateParameters', + type: { + name: 'Composite', + className: 'DscConfigurationUpdateParameters', + modelProperties: { + logVerbose: { + required: false, + serializedName: 'properties.logVerbose', + type: { + name: 'Boolean' + } + }, + logProgress: { + required: false, + serializedName: 'properties.logProgress', + type: { + name: 'Boolean' + } + }, + source: { + required: true, + serializedName: 'properties.source', + type: { + name: 'Composite', + className: 'ContentSource' + } + }, + parameters: { + required: false, + serializedName: 'properties.parameters', + type: { + name: 'Dictionary', + value: { + required: false, + serializedName: 'DscConfigurationParameterElementType', + type: { + name: 'Composite', + className: 'DscConfigurationParameter' + } + } + } + }, + description: { + required: false, + serializedName: 'properties.description', + type: { + name: 'String' + } + }, + name: { + required: false, + serializedName: 'name', + type: { + name: 'String' + } + }, + tags: { + required: false, + serializedName: 'tags', + type: { + name: 'Dictionary', + value: { + required: false, + serializedName: 'StringElementType', + type: { + name: 'String' + } + } + } + } + } + } + }; + } +} + +module.exports = DscConfigurationUpdateParameters; diff --git a/lib/services/automationManagement/lib/models/index.d.ts b/lib/services/automationManagement/lib/models/index.d.ts index 040e144b4d..7342540045 100644 --- a/lib/services/automationManagement/lib/models/index.d.ts +++ b/lib/services/automationManagement/lib/models/index.d.ts @@ -1170,6 +1170,41 @@ 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 9f35001d96..81ef88af18 100644 --- a/lib/services/automationManagement/lib/models/index.js +++ b/lib/services/automationManagement/lib/models/index.js @@ -67,6 +67,7 @@ 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/dscConfigurationOperations.js b/lib/services/automationManagement/lib/operations/dscConfigurationOperations.js index 6b19bcf05c..77142250d7 100644 --- a/lib/services/automationManagement/lib/operations/dscConfigurationOperations.js +++ b/lib/services/automationManagement/lib/operations/dscConfigurationOperations.js @@ -539,6 +539,215 @@ function _createOrUpdate(resourceGroupName, automationAccountName, configuration }); } +/** + * 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} callback - The callback. + * + * @returns {function} callback(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. + */ +function _update(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 parameters = (options && options.parameters !== undefined) ? options.parameters : undefined; + let apiVersion = '2015-10-31'; + // Validate + try { + if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { + throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + } + if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { + if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + { + 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 (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}'; + 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. * @@ -991,6 +1200,7 @@ class DscConfigurationOperations { this._deleteMethod = _deleteMethod; this._get = _get; this._createOrUpdate = _createOrUpdate; + this._update = _update; this._getContent = _getContent; this._listByAutomationAccount = _listByAutomationAccount; this._listByAutomationAccountNext = _listByAutomationAccountNext; @@ -1347,6 +1557,172 @@ class DscConfigurationOperations { } } + /** + * 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); + } + } + /** * Retrieve the configuration script identified by configuration name. * diff --git a/lib/services/automationManagement/lib/operations/index.d.ts b/lib/services/automationManagement/lib/operations/index.d.ts index 157a4348c3..0e84521842 100644 --- a/lib/services/automationManagement/lib/operations/index.d.ts +++ b/lib/services/automationManagement/lib/operations/index.d.ts @@ -3133,6 +3133,145 @@ export interface DscConfigurationOperations { 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; + + /** * Retrieve the configuration script identified by configuration name. * From 650bc5efd569c73216bc9c9d9f4df3de06c4cc75 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Mon, 26 Mar 2018 10:47:56 -0700 Subject: [PATCH 4/6] [AutoPR automation/resource-manager] Add new HybridWorkerGroup update example (#2555) * Generated from 1bd0ef3607579b79a6037384a6bc81135d16fec0 Add new HybridWorkerGroup update example * Generated from a31707b308506906c0173c38458c3319469d553a Fix the parameter name in example --- .../lib/automationClient.d.ts | 36 +- .../lib/automationClient.js | 16 +- .../lib/models/index.d.ts | 35 - .../automationManagement/lib/models/index.js | 1 - .../lib/operations/activityOperations.js | 60 +- .../agentRegistrationInformation.js | 60 +- .../lib/operations/certificateOperations.js | 150 +- .../lib/operations/connectionOperations.js | 150 +- .../operations/connectionTypeOperations.js | 120 +- .../lib/operations/credentialOperations.js | 150 +- .../operations/dscCompilationJobOperations.js | 120 +- .../lib/operations/dscCompilationJobStream.js | 30 +- .../operations/dscConfigurationOperations.js | 522 +---- .../dscNodeConfigurationOperations.js | 120 +- .../lib/operations/dscNodeOperations.js | 120 +- .../lib/operations/fields.js | 30 +- .../hybridRunbookWorkerGroupOperations.js | 120 +- .../lib/operations/index.d.ts | 1819 +++++------------ .../lib/operations/jobOperations.js | 498 ++--- .../lib/operations/jobScheduleOperations.js | 120 +- .../lib/operations/jobStreamOperations.js | 138 +- .../operations/linkedWorkspaceOperations.js | 30 +- .../lib/operations/moduleOperations.js | 150 +- .../lib/operations/nodeReports.js | 90 +- .../lib/operations/objectDataTypes.js | 60 +- .../lib/operations/runbookDraftOperations.js | 190 +- .../lib/operations/runbookOperations.js | 180 +- .../lib/operations/scheduleOperations.js | 150 +- .../softwareUpdateConfigurationMachineRuns.js | 120 +- .../softwareUpdateConfigurationRuns.js | 120 +- .../softwareUpdateConfigurations.js | 240 +-- .../lib/operations/sourceControlOperations.js | 150 +- .../sourceControlSyncJobOperations.js | 90 +- .../lib/operations/testJobOperations.js | 150 +- .../lib/operations/testJobStreams.js | 60 +- .../lib/operations/variableOperations.js | 150 +- .../lib/operations/webhookOperations.js | 180 +- 37 files changed, 2146 insertions(+), 4379 deletions(-) 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); } } From 544cfb949a308bb7ec37948c05ce6c9b249f88c8 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Mon, 26 Mar 2018 14:34:49 -0700 Subject: [PATCH 5/6] [AutoPR automation/resource-manager] Adding TestJob suppression linting issues (#2556) * Generated from 51e53725da6e2fcb29836f63c34d629ce31dafeb Adding TestJob suppression linting issues * Generated from 51e53725da6e2fcb29836f63c34d629ce31dafeb Adding TestJob suppression linting issues From 993e1a24f454c8a95bfbc3e4e3c3f398b040db3b Mon Sep 17 00:00:00 2001 From: Dan Schulte Date: Wed, 28 Mar 2018 10:48:03 -0700 Subject: [PATCH 6/6] Increment automation major version and regenerate --- codegen_mappings.json | 2 + lib/services/automationManagement/LICENSE.txt | 4 +- lib/services/automationManagement/README.md | 49 +- .../lib/automationClient.d.ts | 37 +- .../lib/automationClient.js | 17 +- .../lib/models/index.d.ts | 61 + .../automationManagement/lib/models/index.js | 3 + .../automationManagement/lib/models/key.js | 71 + .../lib/models/keyListResult.js | 59 + .../lib/operations/activityOperations.js | 60 +- .../agentRegistrationInformation.js | 60 +- .../lib/operations/certificateOperations.js | 150 +- .../lib/operations/connectionOperations.js | 150 +- .../operations/connectionTypeOperations.js | 120 +- .../lib/operations/credentialOperations.js | 150 +- .../operations/dscCompilationJobOperations.js | 120 +- .../lib/operations/dscCompilationJobStream.js | 30 +- .../operations/dscConfigurationOperations.js | 532 ++++- .../dscNodeConfigurationOperations.js | 120 +- .../lib/operations/dscNodeOperations.js | 120 +- .../lib/operations/fields.js | 30 +- .../hybridRunbookWorkerGroupOperations.js | 120 +- .../lib/operations/index.d.ts | 1915 ++++++++++++----- .../lib/operations/index.js | 1 + .../lib/operations/jobOperations.js | 498 +++-- .../lib/operations/jobScheduleOperations.js | 120 +- .../lib/operations/jobStreamOperations.js | 138 +- .../lib/operations/keys.js | 266 +++ .../operations/linkedWorkspaceOperations.js | 30 +- .../lib/operations/moduleOperations.js | 150 +- .../lib/operations/nodeReports.js | 90 +- .../lib/operations/objectDataTypes.js | 60 +- .../lib/operations/runbookDraftOperations.js | 312 ++- .../lib/operations/runbookOperations.js | 180 +- .../lib/operations/scheduleOperations.js | 150 +- .../softwareUpdateConfigurationMachineRuns.js | 120 +- .../softwareUpdateConfigurationRuns.js | 120 +- .../softwareUpdateConfigurations.js | 240 ++- .../lib/operations/sourceControlOperations.js | 150 +- .../sourceControlSyncJobOperations.js | 90 +- .../lib/operations/testJobOperations.js | 150 +- .../lib/operations/testJobStreams.js | 60 +- .../lib/operations/variableOperations.js | 150 +- .../lib/operations/webhookOperations.js | 180 +- .../automationManagement/package.json | 35 +- 45 files changed, 5040 insertions(+), 2230 deletions(-) create mode 100644 lib/services/automationManagement/lib/models/key.js create mode 100644 lib/services/automationManagement/lib/models/keyListResult.js create mode 100644 lib/services/automationManagement/lib/operations/keys.js diff --git a/codegen_mappings.json b/codegen_mappings.json index bed13f818e..0c4f9f3e3f 100644 --- a/codegen_mappings.json +++ b/codegen_mappings.json @@ -39,6 +39,8 @@ "automation": { "resource-manager": { "packageName": "azure-arm-automation", + "packageVersion": "3.0.0-preview", + "generateReadmeMd": true, "dir": "automationManagement", "source": "automation/resource-manager/readme.md" } diff --git a/lib/services/automationManagement/LICENSE.txt b/lib/services/automationManagement/LICENSE.txt index 0313a903d7..a70e8cf660 100644 --- a/lib/services/automationManagement/LICENSE.txt +++ b/lib/services/automationManagement/LICENSE.txt @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2017 Microsoft +Copyright (c) 2018 Microsoft Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. \ No newline at end of file +SOFTWARE. diff --git a/lib/services/automationManagement/README.md b/lib/services/automationManagement/README.md index 111ab1eb07..b50b50c82c 100644 --- a/lib/services/automationManagement/README.md +++ b/lib/services/automationManagement/README.md @@ -1,7 +1,6 @@ -# Microsoft Azure SDK for Node.js - AutomationManagement - +# Microsoft Azure SDK for Node.js - AutomationClient This project provides a Node.js package for accessing Azure. Right now it supports: -- **Node.js version: 6.x.x or higher** +- **Node.js version 6.x.x or higher** ## Features @@ -12,29 +11,27 @@ This project provides a Node.js package for accessing Azure. Right now it suppor npm install azure-arm-automation ``` -## How to Use - -### Authentication, client creation and listing automation accounts as an example - - ```javascript - const msRestAzure = require('ms-rest-azure'); - const AutomationManagement = require("azure-arm-automation"); - - // Interactive Login - // It provides a url and code that needs to be copied and pasted in a browser and authenticated over there. If successful, - // the user will get a DeviceTokenCredentials object. - msRestAzure.interactiveLogin().then((credentials) => { - let client = new AutomationManagement(credentials, 'your-subscription-id'); - client.automationAccounts.listByResourceGroup('test-rg').then((automationAccounts) => { - console.log('List of Automation Accounts:'); - console.dir(automationAccounts, {depth: null, colors: true}); - }); - }).catch((err) => { - console.log('An error ocurred'); - console.dir(err, {depth: null, colors: true}); - }); -``` +## How to use + +### Authentication, client creation and get automationAccount as an example. + +```javascript +const msRestAzure = require("ms-rest-azure"); +const AutomationClient = require("azure-arm-automation"); +msRestAzure.interactiveLogin().then((creds) => { + const subscriptionId = ""; + const client = new AutomationClient(creds, subscriptionId); + const resourceGroupName = "testresourceGroupName"; + const automationAccountName = "testautomationAccountName"; + return client.automationAccount.get(resourceGroupName, automationAccountName).then((result) => { + console.log("The result is:"); + console.log(result); + }); +}).catch((err) => { + console.log('An error ocurred:'); + console.dir(err, {depth: null, colors: true}); +}); ## Related projects -- [Microsoft Azure SDK for Node.js](https://github.com/Azure/azure-sdk-for-node) \ No newline at end of file +- [Microsoft Azure SDK for Node.js](https://github.com/Azure/azure-sdk-for-node) diff --git a/lib/services/automationManagement/lib/automationClient.d.ts b/lib/services/automationManagement/lib/automationClient.d.ts index fc9ad09913..843ae9f4fc 100644 --- a/lib/services/automationManagement/lib/automationClient.d.ts +++ b/lib/services/automationManagement/lib/automationClient.d.ts @@ -13,28 +13,6 @@ import { AzureServiceClient, AzureServiceClientOptions } from 'ms-rest-azure'; import * as models from "./models"; import * as operations from "./operations"; -/** - * AutomationClientOptions for AutomationClient. - */ -declare interface AutomationClientOptions extends AzureServiceClientOptions { - /** - * @property {string} [clientRequestId] - Identifies this specific client request. - */ - clientRequestId?: string; - /** - * @property {string} [acceptLanguage] - Gets or sets the preferred language for the response. - */ - acceptLanguage?: string; - /** - * @property {number} [longRunningOperationRetryTimeout] - Gets or sets the retry timeout in seconds for Long Running Operations. Default value is 30. - */ - longRunningOperationRetryTimeout?: number; - /** - * @property {boolean} [generateClientRequestId] - When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. - */ - generateClientRequestId?: boolean; -} - export default class AutomationClient extends AzureServiceClient { /** * Initializes a new instance of the AutomationClient class. @@ -45,10 +23,6 @@ export default class AutomationClient extends AzureServiceClient { * * @param {string} subscriptionId - Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. * - * @param {string} resourceGroupName - The resource group name. - * - * @param {string} automationAccountName - The name of the automation account. - * * @param {string} [baseUri] - The base URI of the service. * * @param {object} [options] - The parameter options @@ -60,8 +34,6 @@ export default class AutomationClient extends AzureServiceClient { * * @param {boolean} [options.noRetryPolicy] - If set to true, turn off default retry policy * - * @param {string} [options.clientRequestId] - Identifies this specific client request. - * * @param {string} [options.acceptLanguage] - Gets or sets the preferred language for the response. * * @param {number} [options.longRunningOperationRetryTimeout] - Gets or sets the retry timeout in seconds for Long Running Operations. Default value is 30. @@ -69,18 +41,12 @@ export default class AutomationClient extends AzureServiceClient { * @param {boolean} [options.generateClientRequestId] - When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. * */ - constructor(credentials: ServiceClientCredentials, subscriptionId: string, resourceGroupName: string, automationAccountName: string, baseUri?: string, options?: AutomationClientOptions); + constructor(credentials: ServiceClientCredentials, subscriptionId: string, baseUri?: string, options?: AzureServiceClientOptions); credentials: ServiceClientCredentials; subscriptionId: string; - resourceGroupName: string; - - clientRequestId: string; - - automationAccountName: string; - acceptLanguage: string; longRunningOperationRetryTimeout: number; @@ -92,6 +58,7 @@ export default class AutomationClient extends AzureServiceClient { operations: operations.Operations; statisticsOperations: operations.StatisticsOperations; usages: operations.Usages; + keys: operations.Keys; certificateOperations: operations.CertificateOperations; connectionOperations: operations.ConnectionOperations; connectionTypeOperations: operations.ConnectionTypeOperations; diff --git a/lib/services/automationManagement/lib/automationClient.js b/lib/services/automationManagement/lib/automationClient.js index 59eda98fcc..8b75c829f3 100644 --- a/lib/services/automationManagement/lib/automationClient.js +++ b/lib/services/automationManagement/lib/automationClient.js @@ -28,32 +28,23 @@ class AutomationClient extends ServiceClient { * Create a AutomationClient. * @param {credentials} credentials - Credentials needed for the client to connect to Azure. * @param {string} subscriptionId - Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - * @param {string} resourceGroupName - The resource group name. - * @param {string} automationAccountName - The name of the automation account. * @param {string} [baseUri] - The base URI of the service. * @param {object} [options] - The parameter options * @param {Array} [options.filters] - Filters to be added to the request pipeline * @param {object} [options.requestOptions] - Options for the underlying request object * {@link https://github.com/request/request#requestoptions-callback Options doc} * @param {boolean} [options.noRetryPolicy] - If set to true, turn off default retry policy - * @param {string} [options.clientRequestId] - Identifies this specific client request. * @param {string} [options.acceptLanguage] - Gets or sets the preferred language for the response. * @param {number} [options.longRunningOperationRetryTimeout] - Gets or sets the retry timeout in seconds for Long Running Operations. Default value is 30. * @param {boolean} [options.generateClientRequestId] - When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. */ - constructor(credentials, subscriptionId, resourceGroupName, automationAccountName, baseUri, options) { + constructor(credentials, subscriptionId, baseUri, options) { if (credentials === null || credentials === undefined) { throw new Error('\'credentials\' cannot be null.'); } if (subscriptionId === null || subscriptionId === undefined) { throw new Error('\'subscriptionId\' cannot be null.'); } - if (resourceGroupName === null || resourceGroupName === undefined) { - throw new Error('\'resourceGroupName\' cannot be null.'); - } - if (automationAccountName === null || automationAccountName === undefined) { - throw new Error('\'automationAccountName\' cannot be null.'); - } if (!options) options = {}; @@ -68,14 +59,9 @@ class AutomationClient extends ServiceClient { } this.credentials = credentials; this.subscriptionId = subscriptionId; - this.resourceGroupName = resourceGroupName; - this.automationAccountName = automationAccountName; let packageInfo = this.getPackageJsonInfo(__dirname); this.addUserAgentInfo(`${packageInfo.name}/${packageInfo.version}`); - if(options.clientRequestId !== null && options.clientRequestId !== undefined) { - this.clientRequestId = options.clientRequestId; - } if(options.acceptLanguage !== null && options.acceptLanguage !== undefined) { this.acceptLanguage = options.acceptLanguage; } @@ -89,6 +75,7 @@ class AutomationClient extends ServiceClient { this.operations = new operations.Operations(this); this.statisticsOperations = new operations.StatisticsOperations(this); this.usages = new operations.Usages(this); + this.keys = new operations.Keys(this); this.certificateOperations = new operations.CertificateOperations(this); this.connectionOperations = new operations.ConnectionOperations(this); this.connectionTypeOperations = new operations.ConnectionTypeOperations(this); diff --git a/lib/services/automationManagement/lib/models/index.d.ts b/lib/services/automationManagement/lib/models/index.d.ts index 040e144b4d..86a368df32 100644 --- a/lib/services/automationManagement/lib/models/index.d.ts +++ b/lib/services/automationManagement/lib/models/index.d.ts @@ -31,6 +31,24 @@ export interface ErrorResponse { message?: string; } +/** + * @class + * Initializes a new instance of the Key class. + * @constructor + * Automation key which is used to register a DSC Node + * + * @member {string} [keyName] Automation key name. Possible values include: + * 'primary', 'secondary' + * @member {string} [permissions] Automation key permissions. Possible values + * include: 'Full' + * @member {string} [value] Value of the Automation Key used for registration. + */ +export interface Key { + keyName?: string; + permissions?: string; + value?: string; +} + /** * @class * Initializes a new instance of the UsageCounterName class. @@ -1170,6 +1188,41 @@ 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. @@ -3000,6 +3053,14 @@ export interface StatisticsListResult extends Array { export interface UsageListResult extends Array { } +/** + * @class + * Initializes a new instance of the KeyListResult class. + * @constructor + */ +export interface KeyListResult extends Array { +} + /** * @class * Initializes a new instance of the CertificateListResult class. diff --git a/lib/services/automationManagement/lib/models/index.js b/lib/services/automationManagement/lib/models/index.js index 9f35001d96..01ce48f377 100644 --- a/lib/services/automationManagement/lib/models/index.js +++ b/lib/services/automationManagement/lib/models/index.js @@ -19,6 +19,7 @@ var msRestAzure = require('ms-rest-azure'); exports.BaseResource = msRestAzure.BaseResource; exports.CloudError = msRestAzure.CloudError; exports.ErrorResponse = require('./errorResponse'); +exports.Key = require('./key'); exports.UsageCounterName = require('./usageCounterName'); exports.Usage = require('./usage'); exports.Statistics = require('./statistics'); @@ -67,6 +68,7 @@ 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'); @@ -136,6 +138,7 @@ exports.AutomationAccountListResult = require('./automationAccountListResult'); exports.OperationListResult = require('./operationListResult'); exports.StatisticsListResult = require('./statisticsListResult'); exports.UsageListResult = require('./usageListResult'); +exports.KeyListResult = require('./keyListResult'); exports.CertificateListResult = require('./certificateListResult'); exports.ConnectionListResult = require('./connectionListResult'); exports.ConnectionTypeListResult = require('./connectionTypeListResult'); diff --git a/lib/services/automationManagement/lib/models/key.js b/lib/services/automationManagement/lib/models/key.js new file mode 100644 index 0000000000..95e57f9318 --- /dev/null +++ b/lib/services/automationManagement/lib/models/key.js @@ -0,0 +1,71 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * Automation key which is used to register a DSC Node + * + */ +class Key { + /** + * Create a Key. + * @member {string} [keyName] Automation key name. Possible values include: + * 'primary', 'secondary' + * @member {string} [permissions] Automation key permissions. Possible values + * include: 'Full' + * @member {string} [value] Value of the Automation Key used for + * registration. + */ + constructor() { + } + + /** + * Defines the metadata of Key + * + * @returns {object} metadata of Key + * + */ + mapper() { + return { + required: false, + serializedName: 'Key', + type: { + name: 'Composite', + className: 'Key', + modelProperties: { + keyName: { + required: false, + serializedName: 'keyName', + type: { + name: 'String' + } + }, + permissions: { + required: false, + serializedName: 'permissions', + type: { + name: 'String' + } + }, + value: { + required: false, + serializedName: 'value', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = Key; diff --git a/lib/services/automationManagement/lib/models/keyListResult.js b/lib/services/automationManagement/lib/models/keyListResult.js new file mode 100644 index 0000000000..3bacb69713 --- /dev/null +++ b/lib/services/automationManagement/lib/models/keyListResult.js @@ -0,0 +1,59 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * Class representing a KeyListResult. + */ +class KeyListResult extends Array { + /** + * Create a KeyListResult. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of KeyListResult + * + * @returns {object} metadata of KeyListResult + * + */ + mapper() { + return { + required: false, + serializedName: 'KeyListResult', + type: { + name: 'Composite', + className: 'KeyListResult', + modelProperties: { + value: { + required: false, + serializedName: '', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'KeyElementType', + type: { + name: 'Composite', + className: 'Key' + } + } + } + } + } + } + }; + } +} + +module.exports = KeyListResult; diff --git a/lib/services/automationManagement/lib/operations/activityOperations.js b/lib/services/automationManagement/lib/operations/activityOperations.js index 4a5bc93aa6..7a133d3778 100644 --- a/lib/services/automationManagement/lib/operations/activityOperations.js +++ b/lib/services/automationManagement/lib/operations/activityOperations.js @@ -18,6 +18,8 @@ const WebResource = msRest.WebResource; * Retrieve the activity in the module identified by module name and activity * name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} moduleName The name of module. @@ -42,7 +44,7 @@ const WebResource = msRest.WebResource; * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _get(automationAccountName, moduleName, activityName, options, callback) { +function _get(resourceGroupName, automationAccountName, moduleName, activityName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -55,13 +57,13 @@ function _get(automationAccountName, moduleName, activityName, options, callback let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -86,7 +88,7 @@ function _get(automationAccountName, moduleName, activityName, options, callback // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/modules/{moduleName}/activities/{activityName}'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{moduleName}', encodeURIComponent(moduleName)); requestUrl = requestUrl.replace('{activityName}', encodeURIComponent(activityName)); @@ -178,6 +180,8 @@ function _get(automationAccountName, moduleName, activityName, options, callback /** * Retrieve a list of activities in the module identified by module name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} moduleName The name of module. @@ -200,7 +204,7 @@ function _get(automationAccountName, moduleName, activityName, options, callback * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _listByModule(automationAccountName, moduleName, options, callback) { +function _listByModule(resourceGroupName, automationAccountName, moduleName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -213,13 +217,13 @@ function _listByModule(automationAccountName, moduleName, options, callback) { let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -241,7 +245,7 @@ function _listByModule(automationAccountName, moduleName, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/modules/{moduleName}/activities'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{moduleName}', encodeURIComponent(moduleName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -474,6 +478,8 @@ class ActivityOperations { * Retrieve the activity in the module identified by module name and activity * name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} moduleName The name of module. @@ -491,11 +497,11 @@ class ActivityOperations { * * @reject {Error} - The error object. */ - getWithHttpOperationResponse(automationAccountName, moduleName, activityName, options) { + getWithHttpOperationResponse(resourceGroupName, automationAccountName, moduleName, activityName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._get(automationAccountName, moduleName, activityName, options, (err, result, request, response) => { + self._get(resourceGroupName, automationAccountName, moduleName, activityName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -509,6 +515,8 @@ class ActivityOperations { * Retrieve the activity in the module identified by module name and activity * name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} moduleName The name of module. @@ -542,7 +550,7 @@ class ActivityOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - get(automationAccountName, moduleName, activityName, options, optionalCallback) { + get(resourceGroupName, automationAccountName, moduleName, activityName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -551,20 +559,22 @@ class ActivityOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._get(automationAccountName, moduleName, activityName, options, (err, result, request, response) => { + self._get(resourceGroupName, automationAccountName, moduleName, activityName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._get(automationAccountName, moduleName, activityName, options, optionalCallback); + return self._get(resourceGroupName, automationAccountName, moduleName, activityName, options, optionalCallback); } } /** * Retrieve a list of activities in the module identified by module name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} moduleName The name of module. @@ -580,11 +590,11 @@ class ActivityOperations { * * @reject {Error} - The error object. */ - listByModuleWithHttpOperationResponse(automationAccountName, moduleName, options) { + listByModuleWithHttpOperationResponse(resourceGroupName, automationAccountName, moduleName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._listByModule(automationAccountName, moduleName, options, (err, result, request, response) => { + self._listByModule(resourceGroupName, automationAccountName, moduleName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -597,6 +607,8 @@ class ActivityOperations { /** * Retrieve a list of activities in the module identified by module name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} moduleName The name of module. @@ -628,7 +640,7 @@ class ActivityOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - listByModule(automationAccountName, moduleName, options, optionalCallback) { + listByModule(resourceGroupName, automationAccountName, moduleName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -637,14 +649,14 @@ class ActivityOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._listByModule(automationAccountName, moduleName, options, (err, result, request, response) => { + self._listByModule(resourceGroupName, automationAccountName, moduleName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._listByModule(automationAccountName, moduleName, options, optionalCallback); + return self._listByModule(resourceGroupName, automationAccountName, moduleName, options, optionalCallback); } } diff --git a/lib/services/automationManagement/lib/operations/agentRegistrationInformation.js b/lib/services/automationManagement/lib/operations/agentRegistrationInformation.js index c16cca7b04..f5addd99d9 100644 --- a/lib/services/automationManagement/lib/operations/agentRegistrationInformation.js +++ b/lib/services/automationManagement/lib/operations/agentRegistrationInformation.js @@ -17,6 +17,8 @@ const WebResource = msRest.WebResource; /** * Retrieve the automation agent registration information. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -37,7 +39,7 @@ const WebResource = msRest.WebResource; * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _get(automationAccountName, options, callback) { +function _get(resourceGroupName, automationAccountName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -50,13 +52,13 @@ function _get(automationAccountName, options, callback) { let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -75,7 +77,7 @@ function _get(automationAccountName, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/agentRegistrationInformation'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; @@ -165,6 +167,8 @@ function _get(automationAccountName, options, callback) { /** * Regenerate a primary or secondary agent registration key * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} parameters The name of the agent registration key to be @@ -199,7 +203,7 @@ function _get(automationAccountName, options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _regenerateKey(automationAccountName, parameters, options, callback) { +function _regenerateKey(resourceGroupName, automationAccountName, parameters, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -212,13 +216,13 @@ function _regenerateKey(automationAccountName, parameters, options, callback) { let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -240,7 +244,7 @@ function _regenerateKey(automationAccountName, parameters, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/agentRegistrationInformation/regenerateKey'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; @@ -356,6 +360,8 @@ class AgentRegistrationInformation { /** * Retrieve the automation agent registration information. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -369,11 +375,11 @@ class AgentRegistrationInformation { * * @reject {Error} - The error object. */ - getWithHttpOperationResponse(automationAccountName, options) { + getWithHttpOperationResponse(resourceGroupName, automationAccountName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._get(automationAccountName, options, (err, result, request, response) => { + self._get(resourceGroupName, automationAccountName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -386,6 +392,8 @@ class AgentRegistrationInformation { /** * Retrieve the automation agent registration information. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -415,7 +423,7 @@ class AgentRegistrationInformation { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - get(automationAccountName, options, optionalCallback) { + get(resourceGroupName, automationAccountName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -424,20 +432,22 @@ class AgentRegistrationInformation { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._get(automationAccountName, options, (err, result, request, response) => { + self._get(resourceGroupName, automationAccountName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._get(automationAccountName, options, optionalCallback); + return self._get(resourceGroupName, automationAccountName, options, optionalCallback); } } /** * Regenerate a primary or secondary agent registration key * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} parameters The name of the agent registration key to be @@ -465,11 +475,11 @@ class AgentRegistrationInformation { * * @reject {Error} - The error object. */ - regenerateKeyWithHttpOperationResponse(automationAccountName, parameters, options) { + regenerateKeyWithHttpOperationResponse(resourceGroupName, automationAccountName, parameters, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._regenerateKey(automationAccountName, parameters, options, (err, result, request, response) => { + self._regenerateKey(resourceGroupName, automationAccountName, parameters, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -482,6 +492,8 @@ class AgentRegistrationInformation { /** * Regenerate a primary or secondary agent registration key * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} parameters The name of the agent registration key to be @@ -525,7 +537,7 @@ class AgentRegistrationInformation { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - regenerateKey(automationAccountName, parameters, options, optionalCallback) { + regenerateKey(resourceGroupName, automationAccountName, parameters, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -534,14 +546,14 @@ class AgentRegistrationInformation { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._regenerateKey(automationAccountName, parameters, options, (err, result, request, response) => { + self._regenerateKey(resourceGroupName, automationAccountName, parameters, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._regenerateKey(automationAccountName, parameters, options, optionalCallback); + return self._regenerateKey(resourceGroupName, automationAccountName, parameters, options, optionalCallback); } } diff --git a/lib/services/automationManagement/lib/operations/certificateOperations.js b/lib/services/automationManagement/lib/operations/certificateOperations.js index 85dd4c0f19..9663038a97 100644 --- a/lib/services/automationManagement/lib/operations/certificateOperations.js +++ b/lib/services/automationManagement/lib/operations/certificateOperations.js @@ -17,6 +17,8 @@ const WebResource = msRest.WebResource; /** * Delete the certificate. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} certificateName The name of certificate. @@ -38,7 +40,7 @@ const WebResource = msRest.WebResource; * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _deleteMethod(automationAccountName, certificateName, options, callback) { +function _deleteMethod(resourceGroupName, automationAccountName, certificateName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -51,13 +53,13 @@ function _deleteMethod(automationAccountName, certificateName, options, callback let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -79,7 +81,7 @@ function _deleteMethod(automationAccountName, certificateName, options, callback // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/certificates/{certificateName}'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{certificateName}', encodeURIComponent(certificateName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -153,6 +155,8 @@ function _deleteMethod(automationAccountName, certificateName, options, callback /** * Retrieve the certificate identified by certificate name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} certificateName The name of certificate. @@ -175,7 +179,7 @@ function _deleteMethod(automationAccountName, certificateName, options, callback * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _get(automationAccountName, certificateName, options, callback) { +function _get(resourceGroupName, automationAccountName, certificateName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -188,13 +192,13 @@ function _get(automationAccountName, certificateName, options, callback) { let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -216,7 +220,7 @@ function _get(automationAccountName, certificateName, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/certificates/{certificateName}'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{certificateName}', encodeURIComponent(certificateName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -307,6 +311,8 @@ function _get(automationAccountName, certificateName, options, callback) { /** * Create a certificate. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} certificateName The parameters supplied to the create or @@ -347,7 +353,7 @@ function _get(automationAccountName, certificateName, options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _createOrUpdate(automationAccountName, certificateName, parameters, options, callback) { +function _createOrUpdate(resourceGroupName, automationAccountName, certificateName, parameters, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -360,13 +366,13 @@ function _createOrUpdate(automationAccountName, certificateName, parameters, opt let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -391,7 +397,7 @@ function _createOrUpdate(automationAccountName, certificateName, parameters, opt // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/certificates/{certificateName}'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{certificateName}', encodeURIComponent(certificateName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -513,6 +519,8 @@ function _createOrUpdate(automationAccountName, certificateName, parameters, opt /** * Update a certificate. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} certificateName The parameters supplied to the update @@ -544,7 +552,7 @@ function _createOrUpdate(automationAccountName, certificateName, parameters, opt * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _update(automationAccountName, certificateName, parameters, options, callback) { +function _update(resourceGroupName, automationAccountName, certificateName, parameters, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -557,13 +565,13 @@ function _update(automationAccountName, certificateName, parameters, options, ca let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -588,7 +596,7 @@ function _update(automationAccountName, certificateName, parameters, options, ca // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/certificates/{certificateName}'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{certificateName}', encodeURIComponent(certificateName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -693,6 +701,8 @@ function _update(automationAccountName, certificateName, parameters, options, ca /** * Retrieve a list of certificates. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -713,7 +723,7 @@ function _update(automationAccountName, certificateName, parameters, options, ca * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _listByAutomationAccount(automationAccountName, options, callback) { +function _listByAutomationAccount(resourceGroupName, automationAccountName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -726,13 +736,13 @@ function _listByAutomationAccount(automationAccountName, options, callback) { let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -751,7 +761,7 @@ function _listByAutomationAccount(automationAccountName, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/certificates'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; @@ -985,6 +995,8 @@ class CertificateOperations { /** * Delete the certificate. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} certificateName The name of certificate. @@ -1000,11 +1012,11 @@ class CertificateOperations { * * @reject {Error} - The error object. */ - deleteMethodWithHttpOperationResponse(automationAccountName, certificateName, options) { + deleteMethodWithHttpOperationResponse(resourceGroupName, automationAccountName, certificateName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._deleteMethod(automationAccountName, certificateName, options, (err, result, request, response) => { + self._deleteMethod(resourceGroupName, automationAccountName, certificateName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1017,6 +1029,8 @@ class CertificateOperations { /** * Delete the certificate. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} certificateName The name of certificate. @@ -1047,7 +1061,7 @@ class CertificateOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(automationAccountName, certificateName, options, optionalCallback) { + deleteMethod(resourceGroupName, automationAccountName, certificateName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1056,20 +1070,22 @@ class CertificateOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._deleteMethod(automationAccountName, certificateName, options, (err, result, request, response) => { + self._deleteMethod(resourceGroupName, automationAccountName, certificateName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._deleteMethod(automationAccountName, certificateName, options, optionalCallback); + return self._deleteMethod(resourceGroupName, automationAccountName, certificateName, options, optionalCallback); } } /** * Retrieve the certificate identified by certificate name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} certificateName The name of certificate. @@ -1085,11 +1101,11 @@ class CertificateOperations { * * @reject {Error} - The error object. */ - getWithHttpOperationResponse(automationAccountName, certificateName, options) { + getWithHttpOperationResponse(resourceGroupName, automationAccountName, certificateName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._get(automationAccountName, certificateName, options, (err, result, request, response) => { + self._get(resourceGroupName, automationAccountName, certificateName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1102,6 +1118,8 @@ class CertificateOperations { /** * Retrieve the certificate identified by certificate name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} certificateName The name of certificate. @@ -1133,7 +1151,7 @@ class CertificateOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - get(automationAccountName, certificateName, options, optionalCallback) { + get(resourceGroupName, automationAccountName, certificateName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1142,20 +1160,22 @@ class CertificateOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._get(automationAccountName, certificateName, options, (err, result, request, response) => { + self._get(resourceGroupName, automationAccountName, certificateName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._get(automationAccountName, certificateName, options, optionalCallback); + return self._get(resourceGroupName, automationAccountName, certificateName, options, optionalCallback); } } /** * Create a certificate. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} certificateName The parameters supplied to the create or @@ -1189,11 +1209,11 @@ class CertificateOperations { * * @reject {Error} - The error object. */ - createOrUpdateWithHttpOperationResponse(automationAccountName, certificateName, parameters, options) { + createOrUpdateWithHttpOperationResponse(resourceGroupName, automationAccountName, certificateName, parameters, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._createOrUpdate(automationAccountName, certificateName, parameters, options, (err, result, request, response) => { + self._createOrUpdate(resourceGroupName, automationAccountName, certificateName, parameters, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1206,6 +1226,8 @@ class CertificateOperations { /** * Create a certificate. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} certificateName The parameters supplied to the create or @@ -1255,7 +1277,7 @@ class CertificateOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - createOrUpdate(automationAccountName, certificateName, parameters, options, optionalCallback) { + createOrUpdate(resourceGroupName, automationAccountName, certificateName, parameters, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1264,20 +1286,22 @@ class CertificateOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._createOrUpdate(automationAccountName, certificateName, parameters, options, (err, result, request, response) => { + self._createOrUpdate(resourceGroupName, automationAccountName, certificateName, parameters, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._createOrUpdate(automationAccountName, certificateName, parameters, options, optionalCallback); + return self._createOrUpdate(resourceGroupName, automationAccountName, certificateName, parameters, options, optionalCallback); } } /** * Update a certificate. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} certificateName The parameters supplied to the update @@ -1302,11 +1326,11 @@ class CertificateOperations { * * @reject {Error} - The error object. */ - updateWithHttpOperationResponse(automationAccountName, certificateName, parameters, options) { + updateWithHttpOperationResponse(resourceGroupName, automationAccountName, certificateName, parameters, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._update(automationAccountName, certificateName, parameters, options, (err, result, request, response) => { + self._update(resourceGroupName, automationAccountName, certificateName, parameters, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1319,6 +1343,8 @@ class CertificateOperations { /** * Update a certificate. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} certificateName The parameters supplied to the update @@ -1359,7 +1385,7 @@ class CertificateOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - update(automationAccountName, certificateName, parameters, options, optionalCallback) { + update(resourceGroupName, automationAccountName, certificateName, parameters, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1368,20 +1394,22 @@ class CertificateOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._update(automationAccountName, certificateName, parameters, options, (err, result, request, response) => { + self._update(resourceGroupName, automationAccountName, certificateName, parameters, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._update(automationAccountName, certificateName, parameters, options, optionalCallback); + return self._update(resourceGroupName, automationAccountName, certificateName, parameters, options, optionalCallback); } } /** * Retrieve a list of certificates. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -1395,11 +1423,11 @@ class CertificateOperations { * * @reject {Error} - The error object. */ - listByAutomationAccountWithHttpOperationResponse(automationAccountName, options) { + listByAutomationAccountWithHttpOperationResponse(resourceGroupName, automationAccountName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._listByAutomationAccount(automationAccountName, options, (err, result, request, response) => { + self._listByAutomationAccount(resourceGroupName, automationAccountName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1412,6 +1440,8 @@ class CertificateOperations { /** * Retrieve a list of certificates. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -1441,7 +1471,7 @@ class CertificateOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - listByAutomationAccount(automationAccountName, options, optionalCallback) { + listByAutomationAccount(resourceGroupName, automationAccountName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1450,14 +1480,14 @@ class CertificateOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._listByAutomationAccount(automationAccountName, options, (err, result, request, response) => { + self._listByAutomationAccount(resourceGroupName, automationAccountName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._listByAutomationAccount(automationAccountName, options, optionalCallback); + return self._listByAutomationAccount(resourceGroupName, automationAccountName, options, optionalCallback); } } diff --git a/lib/services/automationManagement/lib/operations/connectionOperations.js b/lib/services/automationManagement/lib/operations/connectionOperations.js index 01927ca169..42da11809a 100644 --- a/lib/services/automationManagement/lib/operations/connectionOperations.js +++ b/lib/services/automationManagement/lib/operations/connectionOperations.js @@ -17,6 +17,8 @@ const WebResource = msRest.WebResource; /** * Delete the connection. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} connectionName The name of connection. @@ -39,7 +41,7 @@ const WebResource = msRest.WebResource; * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _deleteMethod(automationAccountName, connectionName, options, callback) { +function _deleteMethod(resourceGroupName, automationAccountName, connectionName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -52,13 +54,13 @@ function _deleteMethod(automationAccountName, connectionName, options, callback) let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -80,7 +82,7 @@ function _deleteMethod(automationAccountName, connectionName, options, callback) // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/connections/{connectionName}'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{connectionName}', encodeURIComponent(connectionName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -171,6 +173,8 @@ function _deleteMethod(automationAccountName, connectionName, options, callback) /** * Retrieve the connection identified by connection name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} connectionName The name of connection. @@ -193,7 +197,7 @@ function _deleteMethod(automationAccountName, connectionName, options, callback) * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _get(automationAccountName, connectionName, options, callback) { +function _get(resourceGroupName, automationAccountName, connectionName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -206,13 +210,13 @@ function _get(automationAccountName, connectionName, options, callback) { let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -234,7 +238,7 @@ function _get(automationAccountName, connectionName, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/connections/{connectionName}'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{connectionName}', encodeURIComponent(connectionName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -325,6 +329,8 @@ function _get(automationAccountName, connectionName, options, callback) { /** * Create or update a connection. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} connectionName The parameters supplied to the create or @@ -365,7 +371,7 @@ function _get(automationAccountName, connectionName, options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _createOrUpdate(automationAccountName, connectionName, parameters, options, callback) { +function _createOrUpdate(resourceGroupName, automationAccountName, connectionName, parameters, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -378,13 +384,13 @@ function _createOrUpdate(automationAccountName, connectionName, parameters, opti let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -409,7 +415,7 @@ function _createOrUpdate(automationAccountName, connectionName, parameters, opti // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/connections/{connectionName}'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{connectionName}', encodeURIComponent(connectionName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -531,6 +537,8 @@ function _createOrUpdate(automationAccountName, connectionName, parameters, opti /** * Update a connection. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} connectionName The parameters supplied to the update a @@ -565,7 +573,7 @@ function _createOrUpdate(automationAccountName, connectionName, parameters, opti * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _update(automationAccountName, connectionName, parameters, options, callback) { +function _update(resourceGroupName, automationAccountName, connectionName, parameters, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -578,13 +586,13 @@ function _update(automationAccountName, connectionName, parameters, options, cal let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -609,7 +617,7 @@ function _update(automationAccountName, connectionName, parameters, options, cal // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/connections/{connectionName}'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{connectionName}', encodeURIComponent(connectionName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -714,6 +722,8 @@ function _update(automationAccountName, connectionName, parameters, options, cal /** * Retrieve a list of connections. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -734,7 +744,7 @@ function _update(automationAccountName, connectionName, parameters, options, cal * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _listByAutomationAccount(automationAccountName, options, callback) { +function _listByAutomationAccount(resourceGroupName, automationAccountName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -747,13 +757,13 @@ function _listByAutomationAccount(automationAccountName, options, callback) { let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -772,7 +782,7 @@ function _listByAutomationAccount(automationAccountName, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/connections'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; @@ -1006,6 +1016,8 @@ class ConnectionOperations { /** * Delete the connection. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} connectionName The name of connection. @@ -1021,11 +1033,11 @@ class ConnectionOperations { * * @reject {Error} - The error object. */ - deleteMethodWithHttpOperationResponse(automationAccountName, connectionName, options) { + deleteMethodWithHttpOperationResponse(resourceGroupName, automationAccountName, connectionName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._deleteMethod(automationAccountName, connectionName, options, (err, result, request, response) => { + self._deleteMethod(resourceGroupName, automationAccountName, connectionName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1038,6 +1050,8 @@ class ConnectionOperations { /** * Delete the connection. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} connectionName The name of connection. @@ -1069,7 +1083,7 @@ class ConnectionOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(automationAccountName, connectionName, options, optionalCallback) { + deleteMethod(resourceGroupName, automationAccountName, connectionName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1078,20 +1092,22 @@ class ConnectionOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._deleteMethod(automationAccountName, connectionName, options, (err, result, request, response) => { + self._deleteMethod(resourceGroupName, automationAccountName, connectionName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._deleteMethod(automationAccountName, connectionName, options, optionalCallback); + return self._deleteMethod(resourceGroupName, automationAccountName, connectionName, options, optionalCallback); } } /** * Retrieve the connection identified by connection name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} connectionName The name of connection. @@ -1107,11 +1123,11 @@ class ConnectionOperations { * * @reject {Error} - The error object. */ - getWithHttpOperationResponse(automationAccountName, connectionName, options) { + getWithHttpOperationResponse(resourceGroupName, automationAccountName, connectionName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._get(automationAccountName, connectionName, options, (err, result, request, response) => { + self._get(resourceGroupName, automationAccountName, connectionName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1124,6 +1140,8 @@ class ConnectionOperations { /** * Retrieve the connection identified by connection name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} connectionName The name of connection. @@ -1155,7 +1173,7 @@ class ConnectionOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - get(automationAccountName, connectionName, options, optionalCallback) { + get(resourceGroupName, automationAccountName, connectionName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1164,20 +1182,22 @@ class ConnectionOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._get(automationAccountName, connectionName, options, (err, result, request, response) => { + self._get(resourceGroupName, automationAccountName, connectionName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._get(automationAccountName, connectionName, options, optionalCallback); + return self._get(resourceGroupName, automationAccountName, connectionName, options, optionalCallback); } } /** * Create or update a connection. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} connectionName The parameters supplied to the create or @@ -1211,11 +1231,11 @@ class ConnectionOperations { * * @reject {Error} - The error object. */ - createOrUpdateWithHttpOperationResponse(automationAccountName, connectionName, parameters, options) { + createOrUpdateWithHttpOperationResponse(resourceGroupName, automationAccountName, connectionName, parameters, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._createOrUpdate(automationAccountName, connectionName, parameters, options, (err, result, request, response) => { + self._createOrUpdate(resourceGroupName, automationAccountName, connectionName, parameters, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1228,6 +1248,8 @@ class ConnectionOperations { /** * Create or update a connection. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} connectionName The parameters supplied to the create or @@ -1277,7 +1299,7 @@ class ConnectionOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - createOrUpdate(automationAccountName, connectionName, parameters, options, optionalCallback) { + createOrUpdate(resourceGroupName, automationAccountName, connectionName, parameters, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1286,20 +1308,22 @@ class ConnectionOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._createOrUpdate(automationAccountName, connectionName, parameters, options, (err, result, request, response) => { + self._createOrUpdate(resourceGroupName, automationAccountName, connectionName, parameters, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._createOrUpdate(automationAccountName, connectionName, parameters, options, optionalCallback); + return self._createOrUpdate(resourceGroupName, automationAccountName, connectionName, parameters, options, optionalCallback); } } /** * Update a connection. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} connectionName The parameters supplied to the update a @@ -1327,11 +1351,11 @@ class ConnectionOperations { * * @reject {Error} - The error object. */ - updateWithHttpOperationResponse(automationAccountName, connectionName, parameters, options) { + updateWithHttpOperationResponse(resourceGroupName, automationAccountName, connectionName, parameters, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._update(automationAccountName, connectionName, parameters, options, (err, result, request, response) => { + self._update(resourceGroupName, automationAccountName, connectionName, parameters, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1344,6 +1368,8 @@ class ConnectionOperations { /** * Update a connection. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} connectionName The parameters supplied to the update a @@ -1387,7 +1413,7 @@ class ConnectionOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - update(automationAccountName, connectionName, parameters, options, optionalCallback) { + update(resourceGroupName, automationAccountName, connectionName, parameters, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1396,20 +1422,22 @@ class ConnectionOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._update(automationAccountName, connectionName, parameters, options, (err, result, request, response) => { + self._update(resourceGroupName, automationAccountName, connectionName, parameters, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._update(automationAccountName, connectionName, parameters, options, optionalCallback); + return self._update(resourceGroupName, automationAccountName, connectionName, parameters, options, optionalCallback); } } /** * Retrieve a list of connections. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -1423,11 +1451,11 @@ class ConnectionOperations { * * @reject {Error} - The error object. */ - listByAutomationAccountWithHttpOperationResponse(automationAccountName, options) { + listByAutomationAccountWithHttpOperationResponse(resourceGroupName, automationAccountName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._listByAutomationAccount(automationAccountName, options, (err, result, request, response) => { + self._listByAutomationAccount(resourceGroupName, automationAccountName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1440,6 +1468,8 @@ class ConnectionOperations { /** * Retrieve a list of connections. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -1469,7 +1499,7 @@ class ConnectionOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - listByAutomationAccount(automationAccountName, options, optionalCallback) { + listByAutomationAccount(resourceGroupName, automationAccountName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1478,14 +1508,14 @@ class ConnectionOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._listByAutomationAccount(automationAccountName, options, (err, result, request, response) => { + self._listByAutomationAccount(resourceGroupName, automationAccountName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._listByAutomationAccount(automationAccountName, options, optionalCallback); + return self._listByAutomationAccount(resourceGroupName, automationAccountName, options, optionalCallback); } } diff --git a/lib/services/automationManagement/lib/operations/connectionTypeOperations.js b/lib/services/automationManagement/lib/operations/connectionTypeOperations.js index fc53b8f316..5f99b02be3 100644 --- a/lib/services/automationManagement/lib/operations/connectionTypeOperations.js +++ b/lib/services/automationManagement/lib/operations/connectionTypeOperations.js @@ -17,6 +17,8 @@ const WebResource = msRest.WebResource; /** * Delete the connectiontype. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} connectionTypeName The name of connectiontype. @@ -38,7 +40,7 @@ const WebResource = msRest.WebResource; * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _deleteMethod(automationAccountName, connectionTypeName, options, callback) { +function _deleteMethod(resourceGroupName, automationAccountName, connectionTypeName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -51,13 +53,13 @@ function _deleteMethod(automationAccountName, connectionTypeName, options, callb let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -79,7 +81,7 @@ function _deleteMethod(automationAccountName, connectionTypeName, options, callb // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/connectionTypes/{connectionTypeName}'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{connectionTypeName}', encodeURIComponent(connectionTypeName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -153,6 +155,8 @@ function _deleteMethod(automationAccountName, connectionTypeName, options, callb /** * Retrieve the connectiontype identified by connectiontype name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} connectionTypeName The name of connectiontype. @@ -175,7 +179,7 @@ function _deleteMethod(automationAccountName, connectionTypeName, options, callb * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _get(automationAccountName, connectionTypeName, options, callback) { +function _get(resourceGroupName, automationAccountName, connectionTypeName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -188,13 +192,13 @@ function _get(automationAccountName, connectionTypeName, options, callback) { let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -216,7 +220,7 @@ function _get(automationAccountName, connectionTypeName, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/connectionTypes/{connectionTypeName}'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{connectionTypeName}', encodeURIComponent(connectionTypeName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -307,6 +311,8 @@ function _get(automationAccountName, connectionTypeName, options, callback) { /** * Create a connectiontype. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} connectionTypeName The parameters supplied to the create or @@ -342,7 +348,7 @@ function _get(automationAccountName, connectionTypeName, options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _createOrUpdate(automationAccountName, connectionTypeName, parameters, options, callback) { +function _createOrUpdate(resourceGroupName, automationAccountName, connectionTypeName, parameters, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -355,13 +361,13 @@ function _createOrUpdate(automationAccountName, connectionTypeName, parameters, let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -386,7 +392,7 @@ function _createOrUpdate(automationAccountName, connectionTypeName, parameters, // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/connectionTypes/{connectionTypeName}'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{connectionTypeName}', encodeURIComponent(connectionTypeName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -508,6 +514,8 @@ function _createOrUpdate(automationAccountName, connectionTypeName, parameters, /** * Retrieve a list of connectiontypes. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -529,7 +537,7 @@ function _createOrUpdate(automationAccountName, connectionTypeName, parameters, * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _listByAutomationAccount(automationAccountName, options, callback) { +function _listByAutomationAccount(resourceGroupName, automationAccountName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -542,13 +550,13 @@ function _listByAutomationAccount(automationAccountName, options, callback) { let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -567,7 +575,7 @@ function _listByAutomationAccount(automationAccountName, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/connectionTypes'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; @@ -801,6 +809,8 @@ class ConnectionTypeOperations { /** * Delete the connectiontype. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} connectionTypeName The name of connectiontype. @@ -816,11 +826,11 @@ class ConnectionTypeOperations { * * @reject {Error} - The error object. */ - deleteMethodWithHttpOperationResponse(automationAccountName, connectionTypeName, options) { + deleteMethodWithHttpOperationResponse(resourceGroupName, automationAccountName, connectionTypeName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._deleteMethod(automationAccountName, connectionTypeName, options, (err, result, request, response) => { + self._deleteMethod(resourceGroupName, automationAccountName, connectionTypeName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -833,6 +843,8 @@ class ConnectionTypeOperations { /** * Delete the connectiontype. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} connectionTypeName The name of connectiontype. @@ -863,7 +875,7 @@ class ConnectionTypeOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(automationAccountName, connectionTypeName, options, optionalCallback) { + deleteMethod(resourceGroupName, automationAccountName, connectionTypeName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -872,20 +884,22 @@ class ConnectionTypeOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._deleteMethod(automationAccountName, connectionTypeName, options, (err, result, request, response) => { + self._deleteMethod(resourceGroupName, automationAccountName, connectionTypeName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._deleteMethod(automationAccountName, connectionTypeName, options, optionalCallback); + return self._deleteMethod(resourceGroupName, automationAccountName, connectionTypeName, options, optionalCallback); } } /** * Retrieve the connectiontype identified by connectiontype name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} connectionTypeName The name of connectiontype. @@ -901,11 +915,11 @@ class ConnectionTypeOperations { * * @reject {Error} - The error object. */ - getWithHttpOperationResponse(automationAccountName, connectionTypeName, options) { + getWithHttpOperationResponse(resourceGroupName, automationAccountName, connectionTypeName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._get(automationAccountName, connectionTypeName, options, (err, result, request, response) => { + self._get(resourceGroupName, automationAccountName, connectionTypeName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -918,6 +932,8 @@ class ConnectionTypeOperations { /** * Retrieve the connectiontype identified by connectiontype name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} connectionTypeName The name of connectiontype. @@ -949,7 +965,7 @@ class ConnectionTypeOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - get(automationAccountName, connectionTypeName, options, optionalCallback) { + get(resourceGroupName, automationAccountName, connectionTypeName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -958,20 +974,22 @@ class ConnectionTypeOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._get(automationAccountName, connectionTypeName, options, (err, result, request, response) => { + self._get(resourceGroupName, automationAccountName, connectionTypeName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._get(automationAccountName, connectionTypeName, options, optionalCallback); + return self._get(resourceGroupName, automationAccountName, connectionTypeName, options, optionalCallback); } } /** * Create a connectiontype. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} connectionTypeName The parameters supplied to the create or @@ -1000,11 +1018,11 @@ class ConnectionTypeOperations { * * @reject {Error} - The error object. */ - createOrUpdateWithHttpOperationResponse(automationAccountName, connectionTypeName, parameters, options) { + createOrUpdateWithHttpOperationResponse(resourceGroupName, automationAccountName, connectionTypeName, parameters, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._createOrUpdate(automationAccountName, connectionTypeName, parameters, options, (err, result, request, response) => { + self._createOrUpdate(resourceGroupName, automationAccountName, connectionTypeName, parameters, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1017,6 +1035,8 @@ class ConnectionTypeOperations { /** * Create a connectiontype. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} connectionTypeName The parameters supplied to the create or @@ -1061,7 +1081,7 @@ class ConnectionTypeOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - createOrUpdate(automationAccountName, connectionTypeName, parameters, options, optionalCallback) { + createOrUpdate(resourceGroupName, automationAccountName, connectionTypeName, parameters, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1070,20 +1090,22 @@ class ConnectionTypeOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._createOrUpdate(automationAccountName, connectionTypeName, parameters, options, (err, result, request, response) => { + self._createOrUpdate(resourceGroupName, automationAccountName, connectionTypeName, parameters, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._createOrUpdate(automationAccountName, connectionTypeName, parameters, options, optionalCallback); + return self._createOrUpdate(resourceGroupName, automationAccountName, connectionTypeName, parameters, options, optionalCallback); } } /** * Retrieve a list of connectiontypes. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -1097,11 +1119,11 @@ class ConnectionTypeOperations { * * @reject {Error} - The error object. */ - listByAutomationAccountWithHttpOperationResponse(automationAccountName, options) { + listByAutomationAccountWithHttpOperationResponse(resourceGroupName, automationAccountName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._listByAutomationAccount(automationAccountName, options, (err, result, request, response) => { + self._listByAutomationAccount(resourceGroupName, automationAccountName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1114,6 +1136,8 @@ class ConnectionTypeOperations { /** * Retrieve a list of connectiontypes. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -1144,7 +1168,7 @@ class ConnectionTypeOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - listByAutomationAccount(automationAccountName, options, optionalCallback) { + listByAutomationAccount(resourceGroupName, automationAccountName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1153,14 +1177,14 @@ class ConnectionTypeOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._listByAutomationAccount(automationAccountName, options, (err, result, request, response) => { + self._listByAutomationAccount(resourceGroupName, automationAccountName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._listByAutomationAccount(automationAccountName, options, optionalCallback); + return self._listByAutomationAccount(resourceGroupName, automationAccountName, options, optionalCallback); } } diff --git a/lib/services/automationManagement/lib/operations/credentialOperations.js b/lib/services/automationManagement/lib/operations/credentialOperations.js index 2f7b0283a0..68c96bf0b3 100644 --- a/lib/services/automationManagement/lib/operations/credentialOperations.js +++ b/lib/services/automationManagement/lib/operations/credentialOperations.js @@ -17,6 +17,8 @@ const WebResource = msRest.WebResource; /** * Delete the credential. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} credentialName The name of credential. @@ -38,7 +40,7 @@ const WebResource = msRest.WebResource; * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _deleteMethod(automationAccountName, credentialName, options, callback) { +function _deleteMethod(resourceGroupName, automationAccountName, credentialName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -51,13 +53,13 @@ function _deleteMethod(automationAccountName, credentialName, options, callback) let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -79,7 +81,7 @@ function _deleteMethod(automationAccountName, credentialName, options, callback) // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/credentials/{credentialName}'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{credentialName}', encodeURIComponent(credentialName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -153,6 +155,8 @@ function _deleteMethod(automationAccountName, credentialName, options, callback) /** * Retrieve the credential identified by credential name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} credentialName The name of credential. @@ -175,7 +179,7 @@ function _deleteMethod(automationAccountName, credentialName, options, callback) * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _get(automationAccountName, credentialName, options, callback) { +function _get(resourceGroupName, automationAccountName, credentialName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -188,13 +192,13 @@ function _get(automationAccountName, credentialName, options, callback) { let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -216,7 +220,7 @@ function _get(automationAccountName, credentialName, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/credentials/{credentialName}'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{credentialName}', encodeURIComponent(credentialName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -307,6 +311,8 @@ function _get(automationAccountName, credentialName, options, callback) { /** * Create a credential. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} credentialName The parameters supplied to the create or @@ -344,7 +350,7 @@ function _get(automationAccountName, credentialName, options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _createOrUpdate(automationAccountName, credentialName, parameters, options, callback) { +function _createOrUpdate(resourceGroupName, automationAccountName, credentialName, parameters, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -357,13 +363,13 @@ function _createOrUpdate(automationAccountName, credentialName, parameters, opti let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -388,7 +394,7 @@ function _createOrUpdate(automationAccountName, credentialName, parameters, opti // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/credentials/{credentialName}'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{credentialName}', encodeURIComponent(credentialName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -510,6 +516,8 @@ function _createOrUpdate(automationAccountName, credentialName, parameters, opti /** * Update a credential. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} credentialName The parameters supplied to the Update @@ -547,7 +555,7 @@ function _createOrUpdate(automationAccountName, credentialName, parameters, opti * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _update(automationAccountName, credentialName, parameters, options, callback) { +function _update(resourceGroupName, automationAccountName, credentialName, parameters, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -560,13 +568,13 @@ function _update(automationAccountName, credentialName, parameters, options, cal let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -591,7 +599,7 @@ function _update(automationAccountName, credentialName, parameters, options, cal // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/credentials/{credentialName}'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{credentialName}', encodeURIComponent(credentialName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -696,6 +704,8 @@ function _update(automationAccountName, credentialName, parameters, options, cal /** * Retrieve a list of credentials. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -716,7 +726,7 @@ function _update(automationAccountName, credentialName, parameters, options, cal * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _listByAutomationAccount(automationAccountName, options, callback) { +function _listByAutomationAccount(resourceGroupName, automationAccountName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -729,13 +739,13 @@ function _listByAutomationAccount(automationAccountName, options, callback) { let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -754,7 +764,7 @@ function _listByAutomationAccount(automationAccountName, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/credentials'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; @@ -986,6 +996,8 @@ class CredentialOperations { /** * Delete the credential. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} credentialName The name of credential. @@ -1001,11 +1013,11 @@ class CredentialOperations { * * @reject {Error} - The error object. */ - deleteMethodWithHttpOperationResponse(automationAccountName, credentialName, options) { + deleteMethodWithHttpOperationResponse(resourceGroupName, automationAccountName, credentialName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._deleteMethod(automationAccountName, credentialName, options, (err, result, request, response) => { + self._deleteMethod(resourceGroupName, automationAccountName, credentialName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1018,6 +1030,8 @@ class CredentialOperations { /** * Delete the credential. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} credentialName The name of credential. @@ -1048,7 +1062,7 @@ class CredentialOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(automationAccountName, credentialName, options, optionalCallback) { + deleteMethod(resourceGroupName, automationAccountName, credentialName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1057,20 +1071,22 @@ class CredentialOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._deleteMethod(automationAccountName, credentialName, options, (err, result, request, response) => { + self._deleteMethod(resourceGroupName, automationAccountName, credentialName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._deleteMethod(automationAccountName, credentialName, options, optionalCallback); + return self._deleteMethod(resourceGroupName, automationAccountName, credentialName, options, optionalCallback); } } /** * Retrieve the credential identified by credential name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} credentialName The name of credential. @@ -1086,11 +1102,11 @@ class CredentialOperations { * * @reject {Error} - The error object. */ - getWithHttpOperationResponse(automationAccountName, credentialName, options) { + getWithHttpOperationResponse(resourceGroupName, automationAccountName, credentialName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._get(automationAccountName, credentialName, options, (err, result, request, response) => { + self._get(resourceGroupName, automationAccountName, credentialName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1103,6 +1119,8 @@ class CredentialOperations { /** * Retrieve the credential identified by credential name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} credentialName The name of credential. @@ -1134,7 +1152,7 @@ class CredentialOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - get(automationAccountName, credentialName, options, optionalCallback) { + get(resourceGroupName, automationAccountName, credentialName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1143,20 +1161,22 @@ class CredentialOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._get(automationAccountName, credentialName, options, (err, result, request, response) => { + self._get(resourceGroupName, automationAccountName, credentialName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._get(automationAccountName, credentialName, options, optionalCallback); + return self._get(resourceGroupName, automationAccountName, credentialName, options, optionalCallback); } } /** * Create a credential. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} credentialName The parameters supplied to the create or @@ -1187,11 +1207,11 @@ class CredentialOperations { * * @reject {Error} - The error object. */ - createOrUpdateWithHttpOperationResponse(automationAccountName, credentialName, parameters, options) { + createOrUpdateWithHttpOperationResponse(resourceGroupName, automationAccountName, credentialName, parameters, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._createOrUpdate(automationAccountName, credentialName, parameters, options, (err, result, request, response) => { + self._createOrUpdate(resourceGroupName, automationAccountName, credentialName, parameters, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1204,6 +1224,8 @@ class CredentialOperations { /** * Create a credential. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} credentialName The parameters supplied to the create or @@ -1250,7 +1272,7 @@ class CredentialOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - createOrUpdate(automationAccountName, credentialName, parameters, options, optionalCallback) { + createOrUpdate(resourceGroupName, automationAccountName, credentialName, parameters, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1259,20 +1281,22 @@ class CredentialOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._createOrUpdate(automationAccountName, credentialName, parameters, options, (err, result, request, response) => { + self._createOrUpdate(resourceGroupName, automationAccountName, credentialName, parameters, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._createOrUpdate(automationAccountName, credentialName, parameters, options, optionalCallback); + return self._createOrUpdate(resourceGroupName, automationAccountName, credentialName, parameters, options, optionalCallback); } } /** * Update a credential. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} credentialName The parameters supplied to the Update @@ -1303,11 +1327,11 @@ class CredentialOperations { * * @reject {Error} - The error object. */ - updateWithHttpOperationResponse(automationAccountName, credentialName, parameters, options) { + updateWithHttpOperationResponse(resourceGroupName, automationAccountName, credentialName, parameters, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._update(automationAccountName, credentialName, parameters, options, (err, result, request, response) => { + self._update(resourceGroupName, automationAccountName, credentialName, parameters, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1320,6 +1344,8 @@ class CredentialOperations { /** * Update a credential. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} credentialName The parameters supplied to the Update @@ -1366,7 +1392,7 @@ class CredentialOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - update(automationAccountName, credentialName, parameters, options, optionalCallback) { + update(resourceGroupName, automationAccountName, credentialName, parameters, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1375,20 +1401,22 @@ class CredentialOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._update(automationAccountName, credentialName, parameters, options, (err, result, request, response) => { + self._update(resourceGroupName, automationAccountName, credentialName, parameters, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._update(automationAccountName, credentialName, parameters, options, optionalCallback); + return self._update(resourceGroupName, automationAccountName, credentialName, parameters, options, optionalCallback); } } /** * Retrieve a list of credentials. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -1402,11 +1430,11 @@ class CredentialOperations { * * @reject {Error} - The error object. */ - listByAutomationAccountWithHttpOperationResponse(automationAccountName, options) { + listByAutomationAccountWithHttpOperationResponse(resourceGroupName, automationAccountName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._listByAutomationAccount(automationAccountName, options, (err, result, request, response) => { + self._listByAutomationAccount(resourceGroupName, automationAccountName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1419,6 +1447,8 @@ class CredentialOperations { /** * Retrieve a list of credentials. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -1448,7 +1478,7 @@ class CredentialOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - listByAutomationAccount(automationAccountName, options, optionalCallback) { + listByAutomationAccount(resourceGroupName, automationAccountName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1457,14 +1487,14 @@ class CredentialOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._listByAutomationAccount(automationAccountName, options, (err, result, request, response) => { + self._listByAutomationAccount(resourceGroupName, automationAccountName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._listByAutomationAccount(automationAccountName, options, optionalCallback); + return self._listByAutomationAccount(resourceGroupName, automationAccountName, options, optionalCallback); } } diff --git a/lib/services/automationManagement/lib/operations/dscCompilationJobOperations.js b/lib/services/automationManagement/lib/operations/dscCompilationJobOperations.js index 413df5947c..641962720d 100644 --- a/lib/services/automationManagement/lib/operations/dscCompilationJobOperations.js +++ b/lib/services/automationManagement/lib/operations/dscCompilationJobOperations.js @@ -17,6 +17,8 @@ const WebResource = msRest.WebResource; /** * Creates the Dsc compilation job of the configuration. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {uuid} compilationJobId The the DSC configuration Id. @@ -61,7 +63,7 @@ const WebResource = msRest.WebResource; * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _create(automationAccountName, compilationJobId, parameters, options, callback) { +function _create(resourceGroupName, automationAccountName, compilationJobId, parameters, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -74,13 +76,13 @@ function _create(automationAccountName, compilationJobId, parameters, options, c let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -105,7 +107,7 @@ function _create(automationAccountName, compilationJobId, parameters, options, c // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/compilationjobs/{compilationJobId}'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{compilationJobId}', encodeURIComponent(compilationJobId.toString())); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -210,6 +212,8 @@ function _create(automationAccountName, compilationJobId, parameters, options, c /** * Retrieve the Dsc configuration compilation job identified by job id. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {uuid} compilationJobId The Dsc configuration compilation job id. @@ -232,7 +236,7 @@ function _create(automationAccountName, compilationJobId, parameters, options, c * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _get(automationAccountName, compilationJobId, options, callback) { +function _get(resourceGroupName, automationAccountName, compilationJobId, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -245,13 +249,13 @@ function _get(automationAccountName, compilationJobId, options, callback) { let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -273,7 +277,7 @@ function _get(automationAccountName, compilationJobId, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/compilationjobs/{compilationJobId}'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{compilationJobId}', encodeURIComponent(compilationJobId.toString())); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -364,6 +368,8 @@ function _get(automationAccountName, compilationJobId, options, callback) { /** * Retrieve a list of dsc compilation jobs. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -387,7 +393,7 @@ function _get(automationAccountName, compilationJobId, options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _listByAutomationAccount(automationAccountName, options, callback) { +function _listByAutomationAccount(resourceGroupName, automationAccountName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -401,13 +407,13 @@ function _listByAutomationAccount(automationAccountName, options, callback) { let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -429,7 +435,7 @@ function _listByAutomationAccount(automationAccountName, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/compilationjobs'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; @@ -522,6 +528,8 @@ function _listByAutomationAccount(automationAccountName, options, callback) { /** * Retrieve the job stream identified by job stream id. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {uuid} jobId The job id. @@ -546,7 +554,7 @@ function _listByAutomationAccount(automationAccountName, options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _getStream(automationAccountName, jobId, jobStreamId, options, callback) { +function _getStream(resourceGroupName, automationAccountName, jobId, jobStreamId, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -559,13 +567,13 @@ function _getStream(automationAccountName, jobId, jobStreamId, options, callback let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -590,7 +598,7 @@ function _getStream(automationAccountName, jobId, jobStreamId, options, callback // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/compilationjobs/{jobId}/streams/{jobStreamId}'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{jobId}', encodeURIComponent(jobId.toString())); requestUrl = requestUrl.replace('{jobStreamId}', encodeURIComponent(jobStreamId)); @@ -826,6 +834,8 @@ class DscCompilationJobOperations { /** * Creates the Dsc compilation job of the configuration. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {uuid} compilationJobId The the DSC configuration Id. @@ -863,11 +873,11 @@ class DscCompilationJobOperations { * * @reject {Error} - The error object. */ - createWithHttpOperationResponse(automationAccountName, compilationJobId, parameters, options) { + createWithHttpOperationResponse(resourceGroupName, automationAccountName, compilationJobId, parameters, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._create(automationAccountName, compilationJobId, parameters, options, (err, result, request, response) => { + self._create(resourceGroupName, automationAccountName, compilationJobId, parameters, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -880,6 +890,8 @@ class DscCompilationJobOperations { /** * Creates the Dsc compilation job of the configuration. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {uuid} compilationJobId The the DSC configuration Id. @@ -933,7 +945,7 @@ class DscCompilationJobOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - create(automationAccountName, compilationJobId, parameters, options, optionalCallback) { + create(resourceGroupName, automationAccountName, compilationJobId, parameters, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -942,20 +954,22 @@ class DscCompilationJobOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._create(automationAccountName, compilationJobId, parameters, options, (err, result, request, response) => { + self._create(resourceGroupName, automationAccountName, compilationJobId, parameters, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._create(automationAccountName, compilationJobId, parameters, options, optionalCallback); + return self._create(resourceGroupName, automationAccountName, compilationJobId, parameters, options, optionalCallback); } } /** * Retrieve the Dsc configuration compilation job identified by job id. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {uuid} compilationJobId The Dsc configuration compilation job id. @@ -971,11 +985,11 @@ class DscCompilationJobOperations { * * @reject {Error} - The error object. */ - getWithHttpOperationResponse(automationAccountName, compilationJobId, options) { + getWithHttpOperationResponse(resourceGroupName, automationAccountName, compilationJobId, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._get(automationAccountName, compilationJobId, options, (err, result, request, response) => { + self._get(resourceGroupName, automationAccountName, compilationJobId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -988,6 +1002,8 @@ class DscCompilationJobOperations { /** * Retrieve the Dsc configuration compilation job identified by job id. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {uuid} compilationJobId The Dsc configuration compilation job id. @@ -1019,7 +1035,7 @@ class DscCompilationJobOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - get(automationAccountName, compilationJobId, options, optionalCallback) { + get(resourceGroupName, automationAccountName, compilationJobId, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1028,20 +1044,22 @@ class DscCompilationJobOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._get(automationAccountName, compilationJobId, options, (err, result, request, response) => { + self._get(resourceGroupName, automationAccountName, compilationJobId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._get(automationAccountName, compilationJobId, options, optionalCallback); + return self._get(resourceGroupName, automationAccountName, compilationJobId, options, optionalCallback); } } /** * Retrieve a list of dsc compilation jobs. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -1057,11 +1075,11 @@ class DscCompilationJobOperations { * * @reject {Error} - The error object. */ - listByAutomationAccountWithHttpOperationResponse(automationAccountName, options) { + listByAutomationAccountWithHttpOperationResponse(resourceGroupName, automationAccountName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._listByAutomationAccount(automationAccountName, options, (err, result, request, response) => { + self._listByAutomationAccount(resourceGroupName, automationAccountName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1074,6 +1092,8 @@ class DscCompilationJobOperations { /** * Retrieve a list of dsc compilation jobs. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -1106,7 +1126,7 @@ class DscCompilationJobOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - listByAutomationAccount(automationAccountName, options, optionalCallback) { + listByAutomationAccount(resourceGroupName, automationAccountName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1115,20 +1135,22 @@ class DscCompilationJobOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._listByAutomationAccount(automationAccountName, options, (err, result, request, response) => { + self._listByAutomationAccount(resourceGroupName, automationAccountName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._listByAutomationAccount(automationAccountName, options, optionalCallback); + return self._listByAutomationAccount(resourceGroupName, automationAccountName, options, optionalCallback); } } /** * Retrieve the job stream identified by job stream id. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {uuid} jobId The job id. @@ -1146,11 +1168,11 @@ class DscCompilationJobOperations { * * @reject {Error} - The error object. */ - getStreamWithHttpOperationResponse(automationAccountName, jobId, jobStreamId, options) { + getStreamWithHttpOperationResponse(resourceGroupName, automationAccountName, jobId, jobStreamId, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._getStream(automationAccountName, jobId, jobStreamId, options, (err, result, request, response) => { + self._getStream(resourceGroupName, automationAccountName, jobId, jobStreamId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1163,6 +1185,8 @@ class DscCompilationJobOperations { /** * Retrieve the job stream identified by job stream id. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {uuid} jobId The job id. @@ -1196,7 +1220,7 @@ class DscCompilationJobOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getStream(automationAccountName, jobId, jobStreamId, options, optionalCallback) { + getStream(resourceGroupName, automationAccountName, jobId, jobStreamId, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1205,14 +1229,14 @@ class DscCompilationJobOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getStream(automationAccountName, jobId, jobStreamId, options, (err, result, request, response) => { + self._getStream(resourceGroupName, automationAccountName, jobId, jobStreamId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getStream(automationAccountName, jobId, jobStreamId, options, optionalCallback); + return self._getStream(resourceGroupName, automationAccountName, jobId, jobStreamId, options, optionalCallback); } } diff --git a/lib/services/automationManagement/lib/operations/dscCompilationJobStream.js b/lib/services/automationManagement/lib/operations/dscCompilationJobStream.js index 4afe189714..31a252d987 100644 --- a/lib/services/automationManagement/lib/operations/dscCompilationJobStream.js +++ b/lib/services/automationManagement/lib/operations/dscCompilationJobStream.js @@ -17,6 +17,8 @@ const WebResource = msRest.WebResource; /** * Retrieve all the job streams for the compilation Job. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {uuid} jobId The job id. @@ -39,7 +41,7 @@ const WebResource = msRest.WebResource; * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _listByJob(automationAccountName, jobId, options, callback) { +function _listByJob(resourceGroupName, automationAccountName, jobId, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -52,13 +54,13 @@ function _listByJob(automationAccountName, jobId, options, callback) { let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -80,7 +82,7 @@ function _listByJob(automationAccountName, jobId, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/compilationjobs/{jobId}/streams/'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{jobId}', encodeURIComponent(jobId.toString())); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -182,6 +184,8 @@ class DscCompilationJobStream { /** * Retrieve all the job streams for the compilation Job. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {uuid} jobId The job id. @@ -197,11 +201,11 @@ class DscCompilationJobStream { * * @reject {Error} - The error object. */ - listByJobWithHttpOperationResponse(automationAccountName, jobId, options) { + listByJobWithHttpOperationResponse(resourceGroupName, automationAccountName, jobId, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._listByJob(automationAccountName, jobId, options, (err, result, request, response) => { + self._listByJob(resourceGroupName, automationAccountName, jobId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -214,6 +218,8 @@ class DscCompilationJobStream { /** * Retrieve all the job streams for the compilation Job. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {uuid} jobId The job id. @@ -245,7 +251,7 @@ class DscCompilationJobStream { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - listByJob(automationAccountName, jobId, options, optionalCallback) { + listByJob(resourceGroupName, automationAccountName, jobId, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -254,14 +260,14 @@ class DscCompilationJobStream { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._listByJob(automationAccountName, jobId, options, (err, result, request, response) => { + self._listByJob(resourceGroupName, automationAccountName, jobId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._listByJob(automationAccountName, jobId, options, optionalCallback); + return self._listByJob(resourceGroupName, automationAccountName, jobId, options, optionalCallback); } } diff --git a/lib/services/automationManagement/lib/operations/dscConfigurationOperations.js b/lib/services/automationManagement/lib/operations/dscConfigurationOperations.js index c80ee3ac53..a591be58fb 100644 --- a/lib/services/automationManagement/lib/operations/dscConfigurationOperations.js +++ b/lib/services/automationManagement/lib/operations/dscConfigurationOperations.js @@ -17,6 +17,8 @@ const WebResource = msRest.WebResource; /** * Delete the dsc configuration identified by configuration name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} configurationName The configuration name. @@ -38,7 +40,7 @@ const WebResource = msRest.WebResource; * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _deleteMethod(automationAccountName, configurationName, options, callback) { +function _deleteMethod(resourceGroupName, automationAccountName, configurationName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -51,13 +53,13 @@ function _deleteMethod(automationAccountName, configurationName, options, callba let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -79,7 +81,7 @@ function _deleteMethod(automationAccountName, configurationName, options, callba // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/configurations/{configurationName}'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{configurationName}', encodeURIComponent(configurationName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -153,6 +155,8 @@ function _deleteMethod(automationAccountName, configurationName, options, callba /** * Retrieve the configuration identified by configuration name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} configurationName The configuration name. @@ -175,7 +179,7 @@ function _deleteMethod(automationAccountName, configurationName, options, callba * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _get(automationAccountName, configurationName, options, callback) { +function _get(resourceGroupName, automationAccountName, configurationName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -188,13 +192,13 @@ function _get(automationAccountName, configurationName, options, callback) { let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -216,7 +220,7 @@ function _get(automationAccountName, configurationName, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/configurations/{configurationName}'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{configurationName}', encodeURIComponent(configurationName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -307,6 +311,8 @@ function _get(automationAccountName, configurationName, options, callback) { /** * Create the configuration identified by configuration name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} configurationName The create or update parameters for @@ -370,7 +376,7 @@ function _get(automationAccountName, configurationName, options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _createOrUpdate(automationAccountName, configurationName, parameters, options, callback) { +function _createOrUpdate(resourceGroupName, automationAccountName, configurationName, parameters, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -383,13 +389,13 @@ function _createOrUpdate(automationAccountName, configurationName, parameters, o let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -414,7 +420,7 @@ function _createOrUpdate(automationAccountName, configurationName, parameters, o // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/configurations/{configurationName}'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{configurationName}', encodeURIComponent(configurationName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -533,9 +539,222 @@ function _createOrUpdate(automationAccountName, configurationName, parameters, o }); } +/** + * 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 + * 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} callback - The callback. + * + * @returns {function} callback(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. + */ +function _update(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 parameters = (options && options.parameters !== undefined) ? options.parameters : undefined; + 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}'; + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); + requestUrl = requestUrl.replace('{configurationName}', encodeURIComponent(configurationName)); + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + 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. @@ -557,7 +776,7 @@ function _createOrUpdate(automationAccountName, configurationName, parameters, o * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _getContent(automationAccountName, configurationName, options, callback) { +function _getContent(resourceGroupName, automationAccountName, configurationName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -570,13 +789,13 @@ function _getContent(automationAccountName, configurationName, options, callback let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -598,7 +817,7 @@ function _getContent(automationAccountName, configurationName, options, callback // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/configurations/{configurationName}/content'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{configurationName}', encodeURIComponent(configurationName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -695,6 +914,8 @@ function _getContent(automationAccountName, configurationName, options, callback /** * Retrieve a list of configurations. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -716,7 +937,7 @@ function _getContent(automationAccountName, configurationName, options, callback * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _listByAutomationAccount(automationAccountName, options, callback) { +function _listByAutomationAccount(resourceGroupName, automationAccountName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -729,13 +950,13 @@ function _listByAutomationAccount(automationAccountName, options, callback) { let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -754,7 +975,7 @@ function _listByAutomationAccount(automationAccountName, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/configurations'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; @@ -981,6 +1202,7 @@ class DscConfigurationOperations { this._deleteMethod = _deleteMethod; this._get = _get; this._createOrUpdate = _createOrUpdate; + this._update = _update; this._getContent = _getContent; this._listByAutomationAccount = _listByAutomationAccount; this._listByAutomationAccountNext = _listByAutomationAccountNext; @@ -989,6 +1211,8 @@ class DscConfigurationOperations { /** * Delete the dsc configuration identified by configuration name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} configurationName The configuration name. @@ -1004,11 +1228,11 @@ class DscConfigurationOperations { * * @reject {Error} - The error object. */ - deleteMethodWithHttpOperationResponse(automationAccountName, configurationName, options) { + deleteMethodWithHttpOperationResponse(resourceGroupName, automationAccountName, configurationName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._deleteMethod(automationAccountName, configurationName, options, (err, result, request, response) => { + self._deleteMethod(resourceGroupName, automationAccountName, configurationName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1021,6 +1245,8 @@ class DscConfigurationOperations { /** * Delete the dsc configuration identified by configuration name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} configurationName The configuration name. @@ -1051,7 +1277,7 @@ class DscConfigurationOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(automationAccountName, configurationName, options, optionalCallback) { + deleteMethod(resourceGroupName, automationAccountName, configurationName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1060,20 +1286,22 @@ class DscConfigurationOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._deleteMethod(automationAccountName, configurationName, options, (err, result, request, response) => { + self._deleteMethod(resourceGroupName, automationAccountName, configurationName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._deleteMethod(automationAccountName, configurationName, options, optionalCallback); + return self._deleteMethod(resourceGroupName, automationAccountName, configurationName, options, optionalCallback); } } /** * Retrieve the configuration identified by configuration name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} configurationName The configuration name. @@ -1089,11 +1317,11 @@ class DscConfigurationOperations { * * @reject {Error} - The error object. */ - getWithHttpOperationResponse(automationAccountName, configurationName, options) { + getWithHttpOperationResponse(resourceGroupName, automationAccountName, configurationName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._get(automationAccountName, configurationName, options, (err, result, request, response) => { + self._get(resourceGroupName, automationAccountName, configurationName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1106,6 +1334,8 @@ class DscConfigurationOperations { /** * Retrieve the configuration identified by configuration name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} configurationName The configuration name. @@ -1137,7 +1367,7 @@ class DscConfigurationOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - get(automationAccountName, configurationName, options, optionalCallback) { + get(resourceGroupName, automationAccountName, configurationName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1146,20 +1376,22 @@ class DscConfigurationOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._get(automationAccountName, configurationName, options, (err, result, request, response) => { + self._get(resourceGroupName, automationAccountName, configurationName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._get(automationAccountName, configurationName, options, optionalCallback); + return self._get(resourceGroupName, automationAccountName, configurationName, options, optionalCallback); } } /** * Create the configuration identified by configuration name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} configurationName The create or update parameters for @@ -1216,11 +1448,11 @@ class DscConfigurationOperations { * * @reject {Error} - The error object. */ - createOrUpdateWithHttpOperationResponse(automationAccountName, configurationName, parameters, options) { + createOrUpdateWithHttpOperationResponse(resourceGroupName, automationAccountName, configurationName, parameters, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._createOrUpdate(automationAccountName, configurationName, parameters, options, (err, result, request, response) => { + self._createOrUpdate(resourceGroupName, automationAccountName, configurationName, parameters, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1233,6 +1465,8 @@ class DscConfigurationOperations { /** * Create the configuration identified by configuration name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} configurationName The create or update parameters for @@ -1305,7 +1539,7 @@ class DscConfigurationOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - createOrUpdate(automationAccountName, configurationName, parameters, options, optionalCallback) { + createOrUpdate(resourceGroupName, automationAccountName, configurationName, parameters, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1314,20 +1548,192 @@ class DscConfigurationOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._createOrUpdate(automationAccountName, configurationName, parameters, options, (err, result, request, response) => { + self._createOrUpdate(resourceGroupName, automationAccountName, configurationName, parameters, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._createOrUpdate(automationAccountName, configurationName, parameters, options, optionalCallback); + return self._createOrUpdate(resourceGroupName, automationAccountName, configurationName, parameters, options, optionalCallback); + } + } + + /** + * 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 + * 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(resourceGroupName, automationAccountName, configurationName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._update(resourceGroupName, 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} resourceGroupName The resource group 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(resourceGroupName, 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(resourceGroupName, automationAccountName, configurationName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._update(resourceGroupName, automationAccountName, configurationName, options, optionalCallback); } } /** * Retrieve the configuration script identified by configuration name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} configurationName The configuration name. @@ -1343,11 +1749,11 @@ class DscConfigurationOperations { * * @reject {Error} - The error object. */ - getContentWithHttpOperationResponse(automationAccountName, configurationName, options) { + getContentWithHttpOperationResponse(resourceGroupName, automationAccountName, configurationName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._getContent(automationAccountName, configurationName, options, (err, result, request, response) => { + self._getContent(resourceGroupName, automationAccountName, configurationName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1360,6 +1766,8 @@ class DscConfigurationOperations { /** * Retrieve the configuration script identified by configuration name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} configurationName The configuration name. @@ -1390,7 +1798,7 @@ class DscConfigurationOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getContent(automationAccountName, configurationName, options, optionalCallback) { + getContent(resourceGroupName, automationAccountName, configurationName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1399,20 +1807,22 @@ class DscConfigurationOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getContent(automationAccountName, configurationName, options, (err, result, request, response) => { + self._getContent(resourceGroupName, automationAccountName, configurationName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getContent(automationAccountName, configurationName, options, optionalCallback); + return self._getContent(resourceGroupName, automationAccountName, configurationName, options, optionalCallback); } } /** * Retrieve a list of configurations. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -1426,11 +1836,11 @@ class DscConfigurationOperations { * * @reject {Error} - The error object. */ - listByAutomationAccountWithHttpOperationResponse(automationAccountName, options) { + listByAutomationAccountWithHttpOperationResponse(resourceGroupName, automationAccountName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._listByAutomationAccount(automationAccountName, options, (err, result, request, response) => { + self._listByAutomationAccount(resourceGroupName, automationAccountName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1443,6 +1853,8 @@ class DscConfigurationOperations { /** * Retrieve a list of configurations. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -1473,7 +1885,7 @@ class DscConfigurationOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - listByAutomationAccount(automationAccountName, options, optionalCallback) { + listByAutomationAccount(resourceGroupName, automationAccountName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1482,14 +1894,14 @@ class DscConfigurationOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._listByAutomationAccount(automationAccountName, options, (err, result, request, response) => { + self._listByAutomationAccount(resourceGroupName, automationAccountName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._listByAutomationAccount(automationAccountName, options, optionalCallback); + return self._listByAutomationAccount(resourceGroupName, automationAccountName, options, optionalCallback); } } diff --git a/lib/services/automationManagement/lib/operations/dscNodeConfigurationOperations.js b/lib/services/automationManagement/lib/operations/dscNodeConfigurationOperations.js index 324a545465..54dc7f4b1f 100644 --- a/lib/services/automationManagement/lib/operations/dscNodeConfigurationOperations.js +++ b/lib/services/automationManagement/lib/operations/dscNodeConfigurationOperations.js @@ -17,6 +17,8 @@ const WebResource = msRest.WebResource; /** * Delete the Dsc node configurations by node configuration. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} nodeConfigurationName The Dsc node configuration name. @@ -38,7 +40,7 @@ const WebResource = msRest.WebResource; * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _deleteMethod(automationAccountName, nodeConfigurationName, options, callback) { +function _deleteMethod(resourceGroupName, automationAccountName, nodeConfigurationName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -51,13 +53,13 @@ function _deleteMethod(automationAccountName, nodeConfigurationName, options, ca let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -79,7 +81,7 @@ function _deleteMethod(automationAccountName, nodeConfigurationName, options, ca // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/nodeConfigurations/{nodeConfigurationName}'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{nodeConfigurationName}', encodeURIComponent(nodeConfigurationName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -153,6 +155,8 @@ function _deleteMethod(automationAccountName, nodeConfigurationName, options, ca /** * Retrieve the Dsc node configurations by node configuration. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} nodeConfigurationName The Dsc node configuration name. @@ -175,7 +179,7 @@ function _deleteMethod(automationAccountName, nodeConfigurationName, options, ca * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _get(automationAccountName, nodeConfigurationName, options, callback) { +function _get(resourceGroupName, automationAccountName, nodeConfigurationName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -188,13 +192,13 @@ function _get(automationAccountName, nodeConfigurationName, options, callback) { let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -216,7 +220,7 @@ function _get(automationAccountName, nodeConfigurationName, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/nodeConfigurations/{nodeConfigurationName}'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{nodeConfigurationName}', encodeURIComponent(nodeConfigurationName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -307,6 +311,8 @@ function _get(automationAccountName, nodeConfigurationName, options, callback) { /** * Create the node configuration identified by node configuration name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} nodeConfigurationName The create or update parameters for @@ -363,7 +369,7 @@ function _get(automationAccountName, nodeConfigurationName, options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _createOrUpdate(automationAccountName, nodeConfigurationName, parameters, options, callback) { +function _createOrUpdate(resourceGroupName, automationAccountName, nodeConfigurationName, parameters, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -376,13 +382,13 @@ function _createOrUpdate(automationAccountName, nodeConfigurationName, parameter let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -407,7 +413,7 @@ function _createOrUpdate(automationAccountName, nodeConfigurationName, parameter // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/nodeConfigurations/{nodeConfigurationName}'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{nodeConfigurationName}', encodeURIComponent(nodeConfigurationName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -512,6 +518,8 @@ function _createOrUpdate(automationAccountName, nodeConfigurationName, parameter /** * Retrieve a list of dsc node configurations. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -535,7 +543,7 @@ function _createOrUpdate(automationAccountName, nodeConfigurationName, parameter * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _listByAutomationAccount(automationAccountName, options, callback) { +function _listByAutomationAccount(resourceGroupName, automationAccountName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -549,13 +557,13 @@ function _listByAutomationAccount(automationAccountName, options, callback) { let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -577,7 +585,7 @@ function _listByAutomationAccount(automationAccountName, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/nodeConfigurations'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; @@ -814,6 +822,8 @@ class DscNodeConfigurationOperations { /** * Delete the Dsc node configurations by node configuration. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} nodeConfigurationName The Dsc node configuration name. @@ -829,11 +839,11 @@ class DscNodeConfigurationOperations { * * @reject {Error} - The error object. */ - deleteMethodWithHttpOperationResponse(automationAccountName, nodeConfigurationName, options) { + deleteMethodWithHttpOperationResponse(resourceGroupName, automationAccountName, nodeConfigurationName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._deleteMethod(automationAccountName, nodeConfigurationName, options, (err, result, request, response) => { + self._deleteMethod(resourceGroupName, automationAccountName, nodeConfigurationName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -846,6 +856,8 @@ class DscNodeConfigurationOperations { /** * Delete the Dsc node configurations by node configuration. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} nodeConfigurationName The Dsc node configuration name. @@ -876,7 +888,7 @@ class DscNodeConfigurationOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(automationAccountName, nodeConfigurationName, options, optionalCallback) { + deleteMethod(resourceGroupName, automationAccountName, nodeConfigurationName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -885,20 +897,22 @@ class DscNodeConfigurationOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._deleteMethod(automationAccountName, nodeConfigurationName, options, (err, result, request, response) => { + self._deleteMethod(resourceGroupName, automationAccountName, nodeConfigurationName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._deleteMethod(automationAccountName, nodeConfigurationName, options, optionalCallback); + return self._deleteMethod(resourceGroupName, automationAccountName, nodeConfigurationName, options, optionalCallback); } } /** * Retrieve the Dsc node configurations by node configuration. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} nodeConfigurationName The Dsc node configuration name. @@ -914,11 +928,11 @@ class DscNodeConfigurationOperations { * * @reject {Error} - The error object. */ - getWithHttpOperationResponse(automationAccountName, nodeConfigurationName, options) { + getWithHttpOperationResponse(resourceGroupName, automationAccountName, nodeConfigurationName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._get(automationAccountName, nodeConfigurationName, options, (err, result, request, response) => { + self._get(resourceGroupName, automationAccountName, nodeConfigurationName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -931,6 +945,8 @@ class DscNodeConfigurationOperations { /** * Retrieve the Dsc node configurations by node configuration. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} nodeConfigurationName The Dsc node configuration name. @@ -962,7 +978,7 @@ class DscNodeConfigurationOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - get(automationAccountName, nodeConfigurationName, options, optionalCallback) { + get(resourceGroupName, automationAccountName, nodeConfigurationName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -971,20 +987,22 @@ class DscNodeConfigurationOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._get(automationAccountName, nodeConfigurationName, options, (err, result, request, response) => { + self._get(resourceGroupName, automationAccountName, nodeConfigurationName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._get(automationAccountName, nodeConfigurationName, options, optionalCallback); + return self._get(resourceGroupName, automationAccountName, nodeConfigurationName, options, optionalCallback); } } /** * Create the node configuration identified by node configuration name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} nodeConfigurationName The create or update parameters for @@ -1034,11 +1052,11 @@ class DscNodeConfigurationOperations { * * @reject {Error} - The error object. */ - createOrUpdateWithHttpOperationResponse(automationAccountName, nodeConfigurationName, parameters, options) { + createOrUpdateWithHttpOperationResponse(resourceGroupName, automationAccountName, nodeConfigurationName, parameters, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._createOrUpdate(automationAccountName, nodeConfigurationName, parameters, options, (err, result, request, response) => { + self._createOrUpdate(resourceGroupName, automationAccountName, nodeConfigurationName, parameters, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1051,6 +1069,8 @@ class DscNodeConfigurationOperations { /** * Create the node configuration identified by node configuration name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} nodeConfigurationName The create or update parameters for @@ -1116,7 +1136,7 @@ class DscNodeConfigurationOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - createOrUpdate(automationAccountName, nodeConfigurationName, parameters, options, optionalCallback) { + createOrUpdate(resourceGroupName, automationAccountName, nodeConfigurationName, parameters, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1125,20 +1145,22 @@ class DscNodeConfigurationOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._createOrUpdate(automationAccountName, nodeConfigurationName, parameters, options, (err, result, request, response) => { + self._createOrUpdate(resourceGroupName, automationAccountName, nodeConfigurationName, parameters, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._createOrUpdate(automationAccountName, nodeConfigurationName, parameters, options, optionalCallback); + return self._createOrUpdate(resourceGroupName, automationAccountName, nodeConfigurationName, parameters, options, optionalCallback); } } /** * Retrieve a list of dsc node configurations. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -1154,11 +1176,11 @@ class DscNodeConfigurationOperations { * * @reject {Error} - The error object. */ - listByAutomationAccountWithHttpOperationResponse(automationAccountName, options) { + listByAutomationAccountWithHttpOperationResponse(resourceGroupName, automationAccountName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._listByAutomationAccount(automationAccountName, options, (err, result, request, response) => { + self._listByAutomationAccount(resourceGroupName, automationAccountName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1171,6 +1193,8 @@ class DscNodeConfigurationOperations { /** * Retrieve a list of dsc node configurations. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -1203,7 +1227,7 @@ class DscNodeConfigurationOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - listByAutomationAccount(automationAccountName, options, optionalCallback) { + listByAutomationAccount(resourceGroupName, automationAccountName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1212,14 +1236,14 @@ class DscNodeConfigurationOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._listByAutomationAccount(automationAccountName, options, (err, result, request, response) => { + self._listByAutomationAccount(resourceGroupName, automationAccountName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._listByAutomationAccount(automationAccountName, options, optionalCallback); + return self._listByAutomationAccount(resourceGroupName, automationAccountName, options, optionalCallback); } } diff --git a/lib/services/automationManagement/lib/operations/dscNodeOperations.js b/lib/services/automationManagement/lib/operations/dscNodeOperations.js index ad3a2e48e8..de8644ff57 100644 --- a/lib/services/automationManagement/lib/operations/dscNodeOperations.js +++ b/lib/services/automationManagement/lib/operations/dscNodeOperations.js @@ -17,6 +17,8 @@ const WebResource = msRest.WebResource; /** * Delete the dsc node identified by node id. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName Automation account name. * * @param {string} nodeId The node id. @@ -39,7 +41,7 @@ const WebResource = msRest.WebResource; * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _deleteMethod(automationAccountName, nodeId, options, callback) { +function _deleteMethod(resourceGroupName, automationAccountName, nodeId, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -52,13 +54,13 @@ function _deleteMethod(automationAccountName, nodeId, options, callback) { let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -80,7 +82,7 @@ function _deleteMethod(automationAccountName, nodeId, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/nodes/{nodeId}'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{nodeId}', encodeURIComponent(nodeId)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -171,6 +173,8 @@ function _deleteMethod(automationAccountName, nodeId, options, callback) { /** * Retrieve the dsc node identified by node id. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} nodeId The node id. @@ -193,7 +197,7 @@ function _deleteMethod(automationAccountName, nodeId, options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _get(automationAccountName, nodeId, options, callback) { +function _get(resourceGroupName, automationAccountName, nodeId, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -206,13 +210,13 @@ function _get(automationAccountName, nodeId, options, callback) { let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -234,7 +238,7 @@ function _get(automationAccountName, nodeId, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/nodes/{nodeId}'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{nodeId}', encodeURIComponent(nodeId)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -325,6 +329,8 @@ function _get(automationAccountName, nodeId, options, callback) { /** * Update the dsc node. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} nodeId Parameters supplied to the update dsc node. @@ -357,7 +363,7 @@ function _get(automationAccountName, nodeId, options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _update(automationAccountName, nodeId, parameters, options, callback) { +function _update(resourceGroupName, automationAccountName, nodeId, parameters, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -370,13 +376,13 @@ function _update(automationAccountName, nodeId, parameters, options, callback) { let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -401,7 +407,7 @@ function _update(automationAccountName, nodeId, parameters, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/nodes/{nodeId}'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{nodeId}', encodeURIComponent(nodeId)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -506,6 +512,8 @@ function _update(automationAccountName, nodeId, parameters, options, callback) { /** * Retrieve a list of dsc nodes. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -528,7 +536,7 @@ function _update(automationAccountName, nodeId, parameters, options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _listByAutomationAccount(automationAccountName, options, callback) { +function _listByAutomationAccount(resourceGroupName, automationAccountName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -542,13 +550,13 @@ function _listByAutomationAccount(automationAccountName, options, callback) { let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -570,7 +578,7 @@ function _listByAutomationAccount(automationAccountName, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/nodes'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; @@ -806,6 +814,8 @@ class DscNodeOperations { /** * Delete the dsc node identified by node id. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName Automation account name. * * @param {string} nodeId The node id. @@ -821,11 +831,11 @@ class DscNodeOperations { * * @reject {Error} - The error object. */ - deleteMethodWithHttpOperationResponse(automationAccountName, nodeId, options) { + deleteMethodWithHttpOperationResponse(resourceGroupName, automationAccountName, nodeId, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._deleteMethod(automationAccountName, nodeId, options, (err, result, request, response) => { + self._deleteMethod(resourceGroupName, automationAccountName, nodeId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -838,6 +848,8 @@ class DscNodeOperations { /** * Delete the dsc node identified by node id. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName Automation account name. * * @param {string} nodeId The node id. @@ -869,7 +881,7 @@ class DscNodeOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(automationAccountName, nodeId, options, optionalCallback) { + deleteMethod(resourceGroupName, automationAccountName, nodeId, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -878,20 +890,22 @@ class DscNodeOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._deleteMethod(automationAccountName, nodeId, options, (err, result, request, response) => { + self._deleteMethod(resourceGroupName, automationAccountName, nodeId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._deleteMethod(automationAccountName, nodeId, options, optionalCallback); + return self._deleteMethod(resourceGroupName, automationAccountName, nodeId, options, optionalCallback); } } /** * Retrieve the dsc node identified by node id. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} nodeId The node id. @@ -907,11 +921,11 @@ class DscNodeOperations { * * @reject {Error} - The error object. */ - getWithHttpOperationResponse(automationAccountName, nodeId, options) { + getWithHttpOperationResponse(resourceGroupName, automationAccountName, nodeId, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._get(automationAccountName, nodeId, options, (err, result, request, response) => { + self._get(resourceGroupName, automationAccountName, nodeId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -924,6 +938,8 @@ class DscNodeOperations { /** * Retrieve the dsc node identified by node id. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} nodeId The node id. @@ -955,7 +971,7 @@ class DscNodeOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - get(automationAccountName, nodeId, options, optionalCallback) { + get(resourceGroupName, automationAccountName, nodeId, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -964,20 +980,22 @@ class DscNodeOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._get(automationAccountName, nodeId, options, (err, result, request, response) => { + self._get(resourceGroupName, automationAccountName, nodeId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._get(automationAccountName, nodeId, options, optionalCallback); + return self._get(resourceGroupName, automationAccountName, nodeId, options, optionalCallback); } } /** * Update the dsc node. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} nodeId Parameters supplied to the update dsc node. @@ -1003,11 +1021,11 @@ class DscNodeOperations { * * @reject {Error} - The error object. */ - updateWithHttpOperationResponse(automationAccountName, nodeId, parameters, options) { + updateWithHttpOperationResponse(resourceGroupName, automationAccountName, nodeId, parameters, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._update(automationAccountName, nodeId, parameters, options, (err, result, request, response) => { + self._update(resourceGroupName, automationAccountName, nodeId, parameters, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1020,6 +1038,8 @@ class DscNodeOperations { /** * Update the dsc node. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} nodeId Parameters supplied to the update dsc node. @@ -1061,7 +1081,7 @@ class DscNodeOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - update(automationAccountName, nodeId, parameters, options, optionalCallback) { + update(resourceGroupName, automationAccountName, nodeId, parameters, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1070,20 +1090,22 @@ class DscNodeOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._update(automationAccountName, nodeId, parameters, options, (err, result, request, response) => { + self._update(resourceGroupName, automationAccountName, nodeId, parameters, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._update(automationAccountName, nodeId, parameters, options, optionalCallback); + return self._update(resourceGroupName, automationAccountName, nodeId, parameters, options, optionalCallback); } } /** * Retrieve a list of dsc nodes. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -1099,11 +1121,11 @@ class DscNodeOperations { * * @reject {Error} - The error object. */ - listByAutomationAccountWithHttpOperationResponse(automationAccountName, options) { + listByAutomationAccountWithHttpOperationResponse(resourceGroupName, automationAccountName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._listByAutomationAccount(automationAccountName, options, (err, result, request, response) => { + self._listByAutomationAccount(resourceGroupName, automationAccountName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1116,6 +1138,8 @@ class DscNodeOperations { /** * Retrieve a list of dsc nodes. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -1147,7 +1171,7 @@ class DscNodeOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - listByAutomationAccount(automationAccountName, options, optionalCallback) { + listByAutomationAccount(resourceGroupName, automationAccountName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1156,14 +1180,14 @@ class DscNodeOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._listByAutomationAccount(automationAccountName, options, (err, result, request, response) => { + self._listByAutomationAccount(resourceGroupName, automationAccountName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._listByAutomationAccount(automationAccountName, options, optionalCallback); + return self._listByAutomationAccount(resourceGroupName, automationAccountName, options, optionalCallback); } } diff --git a/lib/services/automationManagement/lib/operations/fields.js b/lib/services/automationManagement/lib/operations/fields.js index dcfadd3d8f..bad55aa687 100644 --- a/lib/services/automationManagement/lib/operations/fields.js +++ b/lib/services/automationManagement/lib/operations/fields.js @@ -17,6 +17,8 @@ const WebResource = msRest.WebResource; /** * Retrieve a list of fields of a given type identified by module name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} moduleName The name of module. @@ -41,7 +43,7 @@ const WebResource = msRest.WebResource; * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _listByType(automationAccountName, moduleName, typeName, options, callback) { +function _listByType(resourceGroupName, automationAccountName, moduleName, typeName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -54,13 +56,13 @@ function _listByType(automationAccountName, moduleName, typeName, options, callb let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -85,7 +87,7 @@ function _listByType(automationAccountName, moduleName, typeName, options, callb // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/modules/{moduleName}/types/{typeName}/fields'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{moduleName}', encodeURIComponent(moduleName)); requestUrl = requestUrl.replace('{typeName}', encodeURIComponent(typeName)); @@ -188,6 +190,8 @@ class Fields { /** * Retrieve a list of fields of a given type identified by module name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} moduleName The name of module. @@ -205,11 +209,11 @@ class Fields { * * @reject {Error} - The error object. */ - listByTypeWithHttpOperationResponse(automationAccountName, moduleName, typeName, options) { + listByTypeWithHttpOperationResponse(resourceGroupName, automationAccountName, moduleName, typeName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._listByType(automationAccountName, moduleName, typeName, options, (err, result, request, response) => { + self._listByType(resourceGroupName, automationAccountName, moduleName, typeName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -222,6 +226,8 @@ class Fields { /** * Retrieve a list of fields of a given type identified by module name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} moduleName The name of module. @@ -255,7 +261,7 @@ class Fields { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - listByType(automationAccountName, moduleName, typeName, options, optionalCallback) { + listByType(resourceGroupName, automationAccountName, moduleName, typeName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -264,14 +270,14 @@ class Fields { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._listByType(automationAccountName, moduleName, typeName, options, (err, result, request, response) => { + self._listByType(resourceGroupName, automationAccountName, moduleName, typeName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._listByType(automationAccountName, moduleName, typeName, options, optionalCallback); + return self._listByType(resourceGroupName, automationAccountName, moduleName, typeName, options, optionalCallback); } } diff --git a/lib/services/automationManagement/lib/operations/hybridRunbookWorkerGroupOperations.js b/lib/services/automationManagement/lib/operations/hybridRunbookWorkerGroupOperations.js index 327e721335..a4fe69fd98 100644 --- a/lib/services/automationManagement/lib/operations/hybridRunbookWorkerGroupOperations.js +++ b/lib/services/automationManagement/lib/operations/hybridRunbookWorkerGroupOperations.js @@ -17,6 +17,8 @@ const WebResource = msRest.WebResource; /** * Delete a hybrid runbook worker group. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName Automation account name. * * @param {string} hybridRunbookWorkerGroupName The hybrid runbook worker group @@ -39,7 +41,7 @@ const WebResource = msRest.WebResource; * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _deleteMethod(automationAccountName, hybridRunbookWorkerGroupName, options, callback) { +function _deleteMethod(resourceGroupName, automationAccountName, hybridRunbookWorkerGroupName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -52,13 +54,13 @@ function _deleteMethod(automationAccountName, hybridRunbookWorkerGroupName, opti let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -80,7 +82,7 @@ function _deleteMethod(automationAccountName, hybridRunbookWorkerGroupName, opti // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/hybridRunbookWorkerGroups/{hybridRunbookWorkerGroupName}'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{hybridRunbookWorkerGroupName}', encodeURIComponent(hybridRunbookWorkerGroupName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -154,6 +156,8 @@ function _deleteMethod(automationAccountName, hybridRunbookWorkerGroupName, opti /** * Retrieve a hybrid runbook worker group. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} hybridRunbookWorkerGroupName The hybrid runbook worker group @@ -178,7 +182,7 @@ function _deleteMethod(automationAccountName, hybridRunbookWorkerGroupName, opti * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _get(automationAccountName, hybridRunbookWorkerGroupName, options, callback) { +function _get(resourceGroupName, automationAccountName, hybridRunbookWorkerGroupName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -191,13 +195,13 @@ function _get(automationAccountName, hybridRunbookWorkerGroupName, options, call let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -219,7 +223,7 @@ function _get(automationAccountName, hybridRunbookWorkerGroupName, options, call // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/hybridRunbookWorkerGroups/{hybridRunbookWorkerGroupName}'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{hybridRunbookWorkerGroupName}', encodeURIComponent(hybridRunbookWorkerGroupName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -310,6 +314,8 @@ function _get(automationAccountName, hybridRunbookWorkerGroupName, options, call /** * Update a hybrid runbook worker group. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} hybridRunbookWorkerGroupName The hybrid runbook worker group @@ -342,7 +348,7 @@ function _get(automationAccountName, hybridRunbookWorkerGroupName, options, call * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _update(automationAccountName, hybridRunbookWorkerGroupName, parameters, options, callback) { +function _update(resourceGroupName, automationAccountName, hybridRunbookWorkerGroupName, parameters, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -355,13 +361,13 @@ function _update(automationAccountName, hybridRunbookWorkerGroupName, parameters let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -386,7 +392,7 @@ function _update(automationAccountName, hybridRunbookWorkerGroupName, parameters // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/hybridRunbookWorkerGroups/{hybridRunbookWorkerGroupName}'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{hybridRunbookWorkerGroupName}', encodeURIComponent(hybridRunbookWorkerGroupName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -491,6 +497,8 @@ function _update(automationAccountName, hybridRunbookWorkerGroupName, parameters /** * Retrieve a list of hybrid runbook worker groups. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -512,7 +520,7 @@ function _update(automationAccountName, hybridRunbookWorkerGroupName, parameters * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _listByAutomationAccount(automationAccountName, options, callback) { +function _listByAutomationAccount(resourceGroupName, automationAccountName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -525,13 +533,13 @@ function _listByAutomationAccount(automationAccountName, options, callback) { let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -550,7 +558,7 @@ function _listByAutomationAccount(automationAccountName, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/hybridRunbookWorkerGroups'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; @@ -784,6 +792,8 @@ class HybridRunbookWorkerGroupOperations { /** * Delete a hybrid runbook worker group. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName Automation account name. * * @param {string} hybridRunbookWorkerGroupName The hybrid runbook worker group @@ -800,11 +810,11 @@ class HybridRunbookWorkerGroupOperations { * * @reject {Error} - The error object. */ - deleteMethodWithHttpOperationResponse(automationAccountName, hybridRunbookWorkerGroupName, options) { + deleteMethodWithHttpOperationResponse(resourceGroupName, automationAccountName, hybridRunbookWorkerGroupName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._deleteMethod(automationAccountName, hybridRunbookWorkerGroupName, options, (err, result, request, response) => { + self._deleteMethod(resourceGroupName, automationAccountName, hybridRunbookWorkerGroupName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -817,6 +827,8 @@ class HybridRunbookWorkerGroupOperations { /** * Delete a hybrid runbook worker group. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName Automation account name. * * @param {string} hybridRunbookWorkerGroupName The hybrid runbook worker group @@ -848,7 +860,7 @@ class HybridRunbookWorkerGroupOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(automationAccountName, hybridRunbookWorkerGroupName, options, optionalCallback) { + deleteMethod(resourceGroupName, automationAccountName, hybridRunbookWorkerGroupName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -857,20 +869,22 @@ class HybridRunbookWorkerGroupOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._deleteMethod(automationAccountName, hybridRunbookWorkerGroupName, options, (err, result, request, response) => { + self._deleteMethod(resourceGroupName, automationAccountName, hybridRunbookWorkerGroupName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._deleteMethod(automationAccountName, hybridRunbookWorkerGroupName, options, optionalCallback); + return self._deleteMethod(resourceGroupName, automationAccountName, hybridRunbookWorkerGroupName, options, optionalCallback); } } /** * Retrieve a hybrid runbook worker group. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} hybridRunbookWorkerGroupName The hybrid runbook worker group @@ -887,11 +901,11 @@ class HybridRunbookWorkerGroupOperations { * * @reject {Error} - The error object. */ - getWithHttpOperationResponse(automationAccountName, hybridRunbookWorkerGroupName, options) { + getWithHttpOperationResponse(resourceGroupName, automationAccountName, hybridRunbookWorkerGroupName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._get(automationAccountName, hybridRunbookWorkerGroupName, options, (err, result, request, response) => { + self._get(resourceGroupName, automationAccountName, hybridRunbookWorkerGroupName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -904,6 +918,8 @@ class HybridRunbookWorkerGroupOperations { /** * Retrieve a hybrid runbook worker group. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} hybridRunbookWorkerGroupName The hybrid runbook worker group @@ -937,7 +953,7 @@ class HybridRunbookWorkerGroupOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - get(automationAccountName, hybridRunbookWorkerGroupName, options, optionalCallback) { + get(resourceGroupName, automationAccountName, hybridRunbookWorkerGroupName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -946,20 +962,22 @@ class HybridRunbookWorkerGroupOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._get(automationAccountName, hybridRunbookWorkerGroupName, options, (err, result, request, response) => { + self._get(resourceGroupName, automationAccountName, hybridRunbookWorkerGroupName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._get(automationAccountName, hybridRunbookWorkerGroupName, options, optionalCallback); + return self._get(resourceGroupName, automationAccountName, hybridRunbookWorkerGroupName, options, optionalCallback); } } /** * Update a hybrid runbook worker group. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} hybridRunbookWorkerGroupName The hybrid runbook worker group @@ -984,11 +1002,11 @@ class HybridRunbookWorkerGroupOperations { * * @reject {Error} - The error object. */ - updateWithHttpOperationResponse(automationAccountName, hybridRunbookWorkerGroupName, parameters, options) { + updateWithHttpOperationResponse(resourceGroupName, automationAccountName, hybridRunbookWorkerGroupName, parameters, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._update(automationAccountName, hybridRunbookWorkerGroupName, parameters, options, (err, result, request, response) => { + self._update(resourceGroupName, automationAccountName, hybridRunbookWorkerGroupName, parameters, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1001,6 +1019,8 @@ class HybridRunbookWorkerGroupOperations { /** * Update a hybrid runbook worker group. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} hybridRunbookWorkerGroupName The hybrid runbook worker group @@ -1042,7 +1062,7 @@ class HybridRunbookWorkerGroupOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - update(automationAccountName, hybridRunbookWorkerGroupName, parameters, options, optionalCallback) { + update(resourceGroupName, automationAccountName, hybridRunbookWorkerGroupName, parameters, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1051,20 +1071,22 @@ class HybridRunbookWorkerGroupOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._update(automationAccountName, hybridRunbookWorkerGroupName, parameters, options, (err, result, request, response) => { + self._update(resourceGroupName, automationAccountName, hybridRunbookWorkerGroupName, parameters, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._update(automationAccountName, hybridRunbookWorkerGroupName, parameters, options, optionalCallback); + return self._update(resourceGroupName, automationAccountName, hybridRunbookWorkerGroupName, parameters, options, optionalCallback); } } /** * Retrieve a list of hybrid runbook worker groups. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -1078,11 +1100,11 @@ class HybridRunbookWorkerGroupOperations { * * @reject {Error} - The error object. */ - listByAutomationAccountWithHttpOperationResponse(automationAccountName, options) { + listByAutomationAccountWithHttpOperationResponse(resourceGroupName, automationAccountName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._listByAutomationAccount(automationAccountName, options, (err, result, request, response) => { + self._listByAutomationAccount(resourceGroupName, automationAccountName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1095,6 +1117,8 @@ class HybridRunbookWorkerGroupOperations { /** * Retrieve a list of hybrid runbook worker groups. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -1125,7 +1149,7 @@ class HybridRunbookWorkerGroupOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - listByAutomationAccount(automationAccountName, options, optionalCallback) { + listByAutomationAccount(resourceGroupName, automationAccountName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1134,14 +1158,14 @@ class HybridRunbookWorkerGroupOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._listByAutomationAccount(automationAccountName, options, (err, result, request, response) => { + self._listByAutomationAccount(resourceGroupName, automationAccountName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._listByAutomationAccount(automationAccountName, options, optionalCallback); + return self._listByAutomationAccount(resourceGroupName, automationAccountName, options, optionalCallback); } } diff --git a/lib/services/automationManagement/lib/operations/index.d.ts b/lib/services/automationManagement/lib/operations/index.d.ts index 2041f688c2..79437d8128 100644 --- a/lib/services/automationManagement/lib/operations/index.d.ts +++ b/lib/services/automationManagement/lib/operations/index.d.ts @@ -770,6 +770,74 @@ export interface Usages { listByAutomationAccount(resourceGroupName: string, automationAccountName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; } +/** + * @class + * Keys + * __NOTE__: An instance of this class is automatically created for an + * instance of the AutomationClient. + */ +export interface Keys { + + + /** + * Retrieve the automation keys for an account. + * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The automation account name. + * + * @param {object} [options] Optional Parameters. + * + * @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. + */ + listByAutomationAccountWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Retrieve the automation keys for an account. + * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The automation account name. + * + * @param {object} [options] Optional Parameters. + * + * @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 {KeyListResult} - 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. + * + * {KeyListResult} [result] - The deserialized result object if an error did not occur. + * See {@link KeyListResult} 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. + */ + 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; +} + /** * @class * CertificateOperations @@ -782,6 +850,8 @@ export interface CertificateOperations { /** * Delete the certificate. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} certificateName The name of certificate. @@ -797,11 +867,13 @@ export interface CertificateOperations { * * @reject {Error|ServiceError} - The error object. */ - deleteMethodWithHttpOperationResponse(automationAccountName: string, certificateName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + deleteMethodWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, certificateName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Delete the certificate. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} certificateName The name of certificate. @@ -832,14 +904,16 @@ export interface CertificateOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(automationAccountName: string, certificateName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - deleteMethod(automationAccountName: string, certificateName: string, callback: ServiceCallback): void; - deleteMethod(automationAccountName: string, certificateName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, automationAccountName: string, certificateName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + deleteMethod(resourceGroupName: string, automationAccountName: string, certificateName: string, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, automationAccountName: string, certificateName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Retrieve the certificate identified by certificate name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} certificateName The name of certificate. @@ -855,11 +929,13 @@ export interface CertificateOperations { * * @reject {Error|ServiceError} - The error object. */ - getWithHttpOperationResponse(automationAccountName: string, certificateName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, certificateName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieve the certificate identified by certificate name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} certificateName The name of certificate. @@ -891,14 +967,16 @@ export interface CertificateOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - get(automationAccountName: string, certificateName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - get(automationAccountName: string, certificateName: string, callback: ServiceCallback): void; - get(automationAccountName: string, certificateName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + get(resourceGroupName: string, automationAccountName: string, certificateName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + get(resourceGroupName: string, automationAccountName: string, certificateName: string, callback: ServiceCallback): void; + get(resourceGroupName: string, automationAccountName: string, certificateName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Create a certificate. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} certificateName The parameters supplied to the create or @@ -932,11 +1010,13 @@ export interface CertificateOperations { * * @reject {Error|ServiceError} - The error object. */ - createOrUpdateWithHttpOperationResponse(automationAccountName: string, certificateName: string, parameters: models.CertificateCreateOrUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + createOrUpdateWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, certificateName: string, parameters: models.CertificateCreateOrUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Create a certificate. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} certificateName The parameters supplied to the create or @@ -986,14 +1066,16 @@ export interface CertificateOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - createOrUpdate(automationAccountName: string, certificateName: string, parameters: models.CertificateCreateOrUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - createOrUpdate(automationAccountName: string, certificateName: string, parameters: models.CertificateCreateOrUpdateParameters, callback: ServiceCallback): void; - createOrUpdate(automationAccountName: string, certificateName: string, parameters: models.CertificateCreateOrUpdateParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, automationAccountName: string, certificateName: string, parameters: models.CertificateCreateOrUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + createOrUpdate(resourceGroupName: string, automationAccountName: string, certificateName: string, parameters: models.CertificateCreateOrUpdateParameters, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, automationAccountName: string, certificateName: string, parameters: models.CertificateCreateOrUpdateParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Update a certificate. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} certificateName The parameters supplied to the update @@ -1018,11 +1100,13 @@ export interface CertificateOperations { * * @reject {Error|ServiceError} - The error object. */ - updateWithHttpOperationResponse(automationAccountName: string, certificateName: string, parameters: models.CertificateUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + updateWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, certificateName: string, parameters: models.CertificateUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Update a certificate. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} certificateName The parameters supplied to the update @@ -1063,14 +1147,16 @@ export interface CertificateOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - update(automationAccountName: string, certificateName: string, parameters: models.CertificateUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - update(automationAccountName: string, certificateName: string, parameters: models.CertificateUpdateParameters, callback: ServiceCallback): void; - update(automationAccountName: string, certificateName: string, parameters: models.CertificateUpdateParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + update(resourceGroupName: string, automationAccountName: string, certificateName: string, parameters: models.CertificateUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + update(resourceGroupName: string, automationAccountName: string, certificateName: string, parameters: models.CertificateUpdateParameters, callback: ServiceCallback): void; + update(resourceGroupName: string, automationAccountName: string, certificateName: string, parameters: models.CertificateUpdateParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Retrieve a list of certificates. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -1084,11 +1170,13 @@ export interface CertificateOperations { * * @reject {Error|ServiceError} - The error object. */ - listByAutomationAccountWithHttpOperationResponse(automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listByAutomationAccountWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieve a list of certificates. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -1118,9 +1206,9 @@ export interface CertificateOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listByAutomationAccount(automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listByAutomationAccount(automationAccountName: string, callback: ServiceCallback): void; - listByAutomationAccount(automationAccountName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listByAutomationAccount(resourceGroupName: string, automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listByAutomationAccount(resourceGroupName: string, automationAccountName: string, callback: ServiceCallback): void; + listByAutomationAccount(resourceGroupName: string, automationAccountName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -1192,6 +1280,8 @@ export interface ConnectionOperations { /** * Delete the connection. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} connectionName The name of connection. @@ -1207,11 +1297,13 @@ export interface ConnectionOperations { * * @reject {Error|ServiceError} - The error object. */ - deleteMethodWithHttpOperationResponse(automationAccountName: string, connectionName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + deleteMethodWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, connectionName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Delete the connection. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} connectionName The name of connection. @@ -1243,14 +1335,16 @@ export interface ConnectionOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(automationAccountName: string, connectionName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - deleteMethod(automationAccountName: string, connectionName: string, callback: ServiceCallback): void; - deleteMethod(automationAccountName: string, connectionName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, automationAccountName: string, connectionName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + deleteMethod(resourceGroupName: string, automationAccountName: string, connectionName: string, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, automationAccountName: string, connectionName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Retrieve the connection identified by connection name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} connectionName The name of connection. @@ -1266,11 +1360,13 @@ export interface ConnectionOperations { * * @reject {Error|ServiceError} - The error object. */ - getWithHttpOperationResponse(automationAccountName: string, connectionName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, connectionName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieve the connection identified by connection name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} connectionName The name of connection. @@ -1302,14 +1398,16 @@ export interface ConnectionOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - get(automationAccountName: string, connectionName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - get(automationAccountName: string, connectionName: string, callback: ServiceCallback): void; - get(automationAccountName: string, connectionName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + get(resourceGroupName: string, automationAccountName: string, connectionName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + get(resourceGroupName: string, automationAccountName: string, connectionName: string, callback: ServiceCallback): void; + get(resourceGroupName: string, automationAccountName: string, connectionName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Create or update a connection. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} connectionName The parameters supplied to the create or @@ -1343,11 +1441,13 @@ export interface ConnectionOperations { * * @reject {Error|ServiceError} - The error object. */ - createOrUpdateWithHttpOperationResponse(automationAccountName: string, connectionName: string, parameters: models.ConnectionCreateOrUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + createOrUpdateWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, connectionName: string, parameters: models.ConnectionCreateOrUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Create or update a connection. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} connectionName The parameters supplied to the create or @@ -1397,14 +1497,16 @@ export interface ConnectionOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - createOrUpdate(automationAccountName: string, connectionName: string, parameters: models.ConnectionCreateOrUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - createOrUpdate(automationAccountName: string, connectionName: string, parameters: models.ConnectionCreateOrUpdateParameters, callback: ServiceCallback): void; - createOrUpdate(automationAccountName: string, connectionName: string, parameters: models.ConnectionCreateOrUpdateParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, automationAccountName: string, connectionName: string, parameters: models.ConnectionCreateOrUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + createOrUpdate(resourceGroupName: string, automationAccountName: string, connectionName: string, parameters: models.ConnectionCreateOrUpdateParameters, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, automationAccountName: string, connectionName: string, parameters: models.ConnectionCreateOrUpdateParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Update a connection. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} connectionName The parameters supplied to the update a @@ -1432,11 +1534,13 @@ export interface ConnectionOperations { * * @reject {Error|ServiceError} - The error object. */ - updateWithHttpOperationResponse(automationAccountName: string, connectionName: string, parameters: models.ConnectionUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + updateWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, connectionName: string, parameters: models.ConnectionUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Update a connection. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} connectionName The parameters supplied to the update a @@ -1480,14 +1584,16 @@ export interface ConnectionOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - update(automationAccountName: string, connectionName: string, parameters: models.ConnectionUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - update(automationAccountName: string, connectionName: string, parameters: models.ConnectionUpdateParameters, callback: ServiceCallback): void; - update(automationAccountName: string, connectionName: string, parameters: models.ConnectionUpdateParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + update(resourceGroupName: string, automationAccountName: string, connectionName: string, parameters: models.ConnectionUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + update(resourceGroupName: string, automationAccountName: string, connectionName: string, parameters: models.ConnectionUpdateParameters, callback: ServiceCallback): void; + update(resourceGroupName: string, automationAccountName: string, connectionName: string, parameters: models.ConnectionUpdateParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Retrieve a list of connections. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -1501,11 +1607,13 @@ export interface ConnectionOperations { * * @reject {Error|ServiceError} - The error object. */ - listByAutomationAccountWithHttpOperationResponse(automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listByAutomationAccountWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieve a list of connections. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -1535,9 +1643,9 @@ export interface ConnectionOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listByAutomationAccount(automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listByAutomationAccount(automationAccountName: string, callback: ServiceCallback): void; - listByAutomationAccount(automationAccountName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listByAutomationAccount(resourceGroupName: string, automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listByAutomationAccount(resourceGroupName: string, automationAccountName: string, callback: ServiceCallback): void; + listByAutomationAccount(resourceGroupName: string, automationAccountName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -1609,6 +1717,8 @@ export interface ConnectionTypeOperations { /** * Delete the connectiontype. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} connectionTypeName The name of connectiontype. @@ -1624,11 +1734,13 @@ export interface ConnectionTypeOperations { * * @reject {Error|ServiceError} - The error object. */ - deleteMethodWithHttpOperationResponse(automationAccountName: string, connectionTypeName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + deleteMethodWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, connectionTypeName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Delete the connectiontype. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} connectionTypeName The name of connectiontype. @@ -1659,14 +1771,16 @@ export interface ConnectionTypeOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(automationAccountName: string, connectionTypeName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - deleteMethod(automationAccountName: string, connectionTypeName: string, callback: ServiceCallback): void; - deleteMethod(automationAccountName: string, connectionTypeName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, automationAccountName: string, connectionTypeName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + deleteMethod(resourceGroupName: string, automationAccountName: string, connectionTypeName: string, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, automationAccountName: string, connectionTypeName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Retrieve the connectiontype identified by connectiontype name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} connectionTypeName The name of connectiontype. @@ -1682,11 +1796,13 @@ export interface ConnectionTypeOperations { * * @reject {Error|ServiceError} - The error object. */ - getWithHttpOperationResponse(automationAccountName: string, connectionTypeName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, connectionTypeName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieve the connectiontype identified by connectiontype name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} connectionTypeName The name of connectiontype. @@ -1718,14 +1834,16 @@ export interface ConnectionTypeOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - get(automationAccountName: string, connectionTypeName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - get(automationAccountName: string, connectionTypeName: string, callback: ServiceCallback): void; - get(automationAccountName: string, connectionTypeName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + get(resourceGroupName: string, automationAccountName: string, connectionTypeName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + get(resourceGroupName: string, automationAccountName: string, connectionTypeName: string, callback: ServiceCallback): void; + get(resourceGroupName: string, automationAccountName: string, connectionTypeName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Create a connectiontype. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} connectionTypeName The parameters supplied to the create or @@ -1754,11 +1872,13 @@ export interface ConnectionTypeOperations { * * @reject {Error|ServiceError} - The error object. */ - createOrUpdateWithHttpOperationResponse(automationAccountName: string, connectionTypeName: string, parameters: models.ConnectionTypeCreateOrUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + createOrUpdateWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, connectionTypeName: string, parameters: models.ConnectionTypeCreateOrUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Create a connectiontype. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} connectionTypeName The parameters supplied to the create or @@ -1803,14 +1923,16 @@ export interface ConnectionTypeOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - createOrUpdate(automationAccountName: string, connectionTypeName: string, parameters: models.ConnectionTypeCreateOrUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - createOrUpdate(automationAccountName: string, connectionTypeName: string, parameters: models.ConnectionTypeCreateOrUpdateParameters, callback: ServiceCallback): void; - createOrUpdate(automationAccountName: string, connectionTypeName: string, parameters: models.ConnectionTypeCreateOrUpdateParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, automationAccountName: string, connectionTypeName: string, parameters: models.ConnectionTypeCreateOrUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + createOrUpdate(resourceGroupName: string, automationAccountName: string, connectionTypeName: string, parameters: models.ConnectionTypeCreateOrUpdateParameters, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, automationAccountName: string, connectionTypeName: string, parameters: models.ConnectionTypeCreateOrUpdateParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Retrieve a list of connectiontypes. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -1824,11 +1946,13 @@ export interface ConnectionTypeOperations { * * @reject {Error|ServiceError} - The error object. */ - listByAutomationAccountWithHttpOperationResponse(automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listByAutomationAccountWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieve a list of connectiontypes. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -1859,9 +1983,9 @@ export interface ConnectionTypeOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listByAutomationAccount(automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listByAutomationAccount(automationAccountName: string, callback: ServiceCallback): void; - listByAutomationAccount(automationAccountName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listByAutomationAccount(resourceGroupName: string, automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listByAutomationAccount(resourceGroupName: string, automationAccountName: string, callback: ServiceCallback): void; + listByAutomationAccount(resourceGroupName: string, automationAccountName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -1934,6 +2058,8 @@ export interface CredentialOperations { /** * Delete the credential. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} credentialName The name of credential. @@ -1949,11 +2075,13 @@ export interface CredentialOperations { * * @reject {Error|ServiceError} - The error object. */ - deleteMethodWithHttpOperationResponse(automationAccountName: string, credentialName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + deleteMethodWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, credentialName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Delete the credential. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} credentialName The name of credential. @@ -1984,14 +2112,16 @@ export interface CredentialOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(automationAccountName: string, credentialName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - deleteMethod(automationAccountName: string, credentialName: string, callback: ServiceCallback): void; - deleteMethod(automationAccountName: string, credentialName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, automationAccountName: string, credentialName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + deleteMethod(resourceGroupName: string, automationAccountName: string, credentialName: string, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, automationAccountName: string, credentialName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Retrieve the credential identified by credential name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} credentialName The name of credential. @@ -2007,11 +2137,13 @@ export interface CredentialOperations { * * @reject {Error|ServiceError} - The error object. */ - getWithHttpOperationResponse(automationAccountName: string, credentialName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, credentialName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieve the credential identified by credential name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} credentialName The name of credential. @@ -2043,14 +2175,16 @@ export interface CredentialOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - get(automationAccountName: string, credentialName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - get(automationAccountName: string, credentialName: string, callback: ServiceCallback): void; - get(automationAccountName: string, credentialName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + get(resourceGroupName: string, automationAccountName: string, credentialName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + get(resourceGroupName: string, automationAccountName: string, credentialName: string, callback: ServiceCallback): void; + get(resourceGroupName: string, automationAccountName: string, credentialName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Create a credential. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} credentialName The parameters supplied to the create or @@ -2081,11 +2215,13 @@ export interface CredentialOperations { * * @reject {Error|ServiceError} - The error object. */ - createOrUpdateWithHttpOperationResponse(automationAccountName: string, credentialName: string, parameters: models.CredentialCreateOrUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + createOrUpdateWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, credentialName: string, parameters: models.CredentialCreateOrUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Create a credential. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} credentialName The parameters supplied to the create or @@ -2132,14 +2268,16 @@ export interface CredentialOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - createOrUpdate(automationAccountName: string, credentialName: string, parameters: models.CredentialCreateOrUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - createOrUpdate(automationAccountName: string, credentialName: string, parameters: models.CredentialCreateOrUpdateParameters, callback: ServiceCallback): void; - createOrUpdate(automationAccountName: string, credentialName: string, parameters: models.CredentialCreateOrUpdateParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, automationAccountName: string, credentialName: string, parameters: models.CredentialCreateOrUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + createOrUpdate(resourceGroupName: string, automationAccountName: string, credentialName: string, parameters: models.CredentialCreateOrUpdateParameters, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, automationAccountName: string, credentialName: string, parameters: models.CredentialCreateOrUpdateParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Update a credential. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} credentialName The parameters supplied to the Update @@ -2170,11 +2308,13 @@ export interface CredentialOperations { * * @reject {Error|ServiceError} - The error object. */ - updateWithHttpOperationResponse(automationAccountName: string, credentialName: string, parameters: models.CredentialUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + updateWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, credentialName: string, parameters: models.CredentialUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Update a credential. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} credentialName The parameters supplied to the Update @@ -2221,14 +2361,16 @@ export interface CredentialOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - update(automationAccountName: string, credentialName: string, parameters: models.CredentialUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - update(automationAccountName: string, credentialName: string, parameters: models.CredentialUpdateParameters, callback: ServiceCallback): void; - update(automationAccountName: string, credentialName: string, parameters: models.CredentialUpdateParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + update(resourceGroupName: string, automationAccountName: string, credentialName: string, parameters: models.CredentialUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + update(resourceGroupName: string, automationAccountName: string, credentialName: string, parameters: models.CredentialUpdateParameters, callback: ServiceCallback): void; + update(resourceGroupName: string, automationAccountName: string, credentialName: string, parameters: models.CredentialUpdateParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Retrieve a list of credentials. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -2242,11 +2384,13 @@ export interface CredentialOperations { * * @reject {Error|ServiceError} - The error object. */ - listByAutomationAccountWithHttpOperationResponse(automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listByAutomationAccountWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieve a list of credentials. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -2276,9 +2420,9 @@ export interface CredentialOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listByAutomationAccount(automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listByAutomationAccount(automationAccountName: string, callback: ServiceCallback): void; - listByAutomationAccount(automationAccountName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listByAutomationAccount(resourceGroupName: string, automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listByAutomationAccount(resourceGroupName: string, automationAccountName: string, callback: ServiceCallback): void; + listByAutomationAccount(resourceGroupName: string, automationAccountName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -2350,6 +2494,8 @@ export interface DscCompilationJobOperations { /** * Creates the Dsc compilation job of the configuration. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {uuid} compilationJobId The the DSC configuration Id. @@ -2387,11 +2533,13 @@ export interface DscCompilationJobOperations { * * @reject {Error|ServiceError} - The error object. */ - createWithHttpOperationResponse(automationAccountName: string, compilationJobId: string, parameters: models.DscCompilationJobCreateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + createWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, compilationJobId: string, parameters: models.DscCompilationJobCreateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Creates the Dsc compilation job of the configuration. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {uuid} compilationJobId The the DSC configuration Id. @@ -2445,14 +2593,16 @@ export interface DscCompilationJobOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - create(automationAccountName: string, compilationJobId: string, parameters: models.DscCompilationJobCreateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - create(automationAccountName: string, compilationJobId: string, parameters: models.DscCompilationJobCreateParameters, callback: ServiceCallback): void; - create(automationAccountName: string, compilationJobId: string, parameters: models.DscCompilationJobCreateParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + create(resourceGroupName: string, automationAccountName: string, compilationJobId: string, parameters: models.DscCompilationJobCreateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + create(resourceGroupName: string, automationAccountName: string, compilationJobId: string, parameters: models.DscCompilationJobCreateParameters, callback: ServiceCallback): void; + create(resourceGroupName: string, automationAccountName: string, compilationJobId: string, parameters: models.DscCompilationJobCreateParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Retrieve the Dsc configuration compilation job identified by job id. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {uuid} compilationJobId The Dsc configuration compilation job id. @@ -2468,11 +2618,13 @@ export interface DscCompilationJobOperations { * * @reject {Error|ServiceError} - The error object. */ - getWithHttpOperationResponse(automationAccountName: string, compilationJobId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, compilationJobId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieve the Dsc configuration compilation job identified by job id. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {uuid} compilationJobId The Dsc configuration compilation job id. @@ -2504,14 +2656,16 @@ export interface DscCompilationJobOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - get(automationAccountName: string, compilationJobId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - get(automationAccountName: string, compilationJobId: string, callback: ServiceCallback): void; - get(automationAccountName: string, compilationJobId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + get(resourceGroupName: string, automationAccountName: string, compilationJobId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + get(resourceGroupName: string, automationAccountName: string, compilationJobId: string, callback: ServiceCallback): void; + get(resourceGroupName: string, automationAccountName: string, compilationJobId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Retrieve a list of dsc compilation jobs. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -2527,11 +2681,13 @@ export interface DscCompilationJobOperations { * * @reject {Error|ServiceError} - The error object. */ - listByAutomationAccountWithHttpOperationResponse(automationAccountName: string, options?: { filter? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; + listByAutomationAccountWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, options?: { filter? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieve a list of dsc compilation jobs. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -2564,14 +2720,16 @@ export interface DscCompilationJobOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listByAutomationAccount(automationAccountName: string, options?: { filter? : string, customHeaders? : { [headerName: string]: string; } }): Promise; - listByAutomationAccount(automationAccountName: string, callback: ServiceCallback): void; - listByAutomationAccount(automationAccountName: string, options: { filter? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listByAutomationAccount(resourceGroupName: string, automationAccountName: string, options?: { filter? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + listByAutomationAccount(resourceGroupName: string, automationAccountName: string, callback: ServiceCallback): void; + listByAutomationAccount(resourceGroupName: string, automationAccountName: string, options: { filter? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Retrieve the job stream identified by job stream id. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {uuid} jobId The job id. @@ -2589,11 +2747,13 @@ export interface DscCompilationJobOperations { * * @reject {Error|ServiceError} - The error object. */ - getStreamWithHttpOperationResponse(automationAccountName: string, jobId: string, jobStreamId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getStreamWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, jobId: string, jobStreamId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieve the job stream identified by job stream id. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {uuid} jobId The job id. @@ -2627,9 +2787,9 @@ export interface DscCompilationJobOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - getStream(automationAccountName: string, jobId: string, jobStreamId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - getStream(automationAccountName: string, jobId: string, jobStreamId: string, callback: ServiceCallback): void; - getStream(automationAccountName: string, jobId: string, jobStreamId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + getStream(resourceGroupName: string, automationAccountName: string, jobId: string, jobStreamId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + getStream(resourceGroupName: string, automationAccountName: string, jobId: string, jobStreamId: string, callback: ServiceCallback): void; + getStream(resourceGroupName: string, automationAccountName: string, jobId: string, jobStreamId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -2702,6 +2862,8 @@ export interface DscCompilationJobStream { /** * Retrieve all the job streams for the compilation Job. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {uuid} jobId The job id. @@ -2717,11 +2879,13 @@ export interface DscCompilationJobStream { * * @reject {Error|ServiceError} - The error object. */ - listByJobWithHttpOperationResponse(automationAccountName: string, jobId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listByJobWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, jobId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieve all the job streams for the compilation Job. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {uuid} jobId The job id. @@ -2753,9 +2917,9 @@ export interface DscCompilationJobStream { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listByJob(automationAccountName: string, jobId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listByJob(automationAccountName: string, jobId: string, callback: ServiceCallback): void; - listByJob(automationAccountName: string, jobId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listByJob(resourceGroupName: string, automationAccountName: string, jobId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listByJob(resourceGroupName: string, automationAccountName: string, jobId: string, callback: ServiceCallback): void; + listByJob(resourceGroupName: string, automationAccountName: string, jobId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; } /** @@ -2770,6 +2934,8 @@ export interface DscConfigurationOperations { /** * Delete the dsc configuration identified by configuration name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} configurationName The configuration name. @@ -2785,11 +2951,13 @@ export interface DscConfigurationOperations { * * @reject {Error|ServiceError} - The error object. */ - deleteMethodWithHttpOperationResponse(automationAccountName: string, configurationName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + deleteMethodWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, configurationName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Delete the dsc configuration identified by configuration name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} configurationName The configuration name. @@ -2820,14 +2988,16 @@ export interface DscConfigurationOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(automationAccountName: string, configurationName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - deleteMethod(automationAccountName: string, configurationName: string, callback: ServiceCallback): void; - deleteMethod(automationAccountName: string, configurationName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, automationAccountName: string, configurationName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + deleteMethod(resourceGroupName: string, automationAccountName: string, configurationName: string, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, automationAccountName: string, configurationName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Retrieve the configuration identified by configuration name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} configurationName The configuration name. @@ -2843,11 +3013,13 @@ export interface DscConfigurationOperations { * * @reject {Error|ServiceError} - The error object. */ - getWithHttpOperationResponse(automationAccountName: string, configurationName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, configurationName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieve the configuration identified by configuration name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} configurationName The configuration name. @@ -2879,14 +3051,16 @@ export interface DscConfigurationOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - get(automationAccountName: string, configurationName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - get(automationAccountName: string, configurationName: string, callback: ServiceCallback): void; - get(automationAccountName: string, configurationName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + get(resourceGroupName: string, automationAccountName: string, configurationName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + get(resourceGroupName: string, automationAccountName: string, configurationName: string, callback: ServiceCallback): void; + get(resourceGroupName: string, automationAccountName: string, configurationName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Create the configuration identified by configuration name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} configurationName The create or update parameters for @@ -2943,11 +3117,13 @@ export interface DscConfigurationOperations { * * @reject {Error|ServiceError} - The error object. */ - createOrUpdateWithHttpOperationResponse(automationAccountName: string, configurationName: string, parameters: models.DscConfigurationCreateOrUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + createOrUpdateWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, configurationName: string, parameters: models.DscConfigurationCreateOrUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Create the configuration identified by configuration name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} configurationName The create or update parameters for @@ -3020,14 +3196,159 @@ export interface DscConfigurationOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - createOrUpdate(automationAccountName: string, configurationName: string, parameters: models.DscConfigurationCreateOrUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - createOrUpdate(automationAccountName: string, configurationName: string, parameters: models.DscConfigurationCreateOrUpdateParameters, callback: ServiceCallback): void; - createOrUpdate(automationAccountName: string, configurationName: string, parameters: models.DscConfigurationCreateOrUpdateParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, automationAccountName: string, configurationName: string, parameters: models.DscConfigurationCreateOrUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + createOrUpdate(resourceGroupName: string, automationAccountName: string, configurationName: string, parameters: models.DscConfigurationCreateOrUpdateParameters, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, automationAccountName: string, configurationName: string, parameters: models.DscConfigurationCreateOrUpdateParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * 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 + * 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(resourceGroupName: string, automationAccountName: string, configurationName: string, options?: { parameters? : models.DscConfigurationUpdateParameters, 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 + * 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(resourceGroupName: string, automationAccountName: string, configurationName: string, options?: { parameters? : models.DscConfigurationUpdateParameters, customHeaders? : { [headerName: string]: string; } }): Promise; + update(resourceGroupName: string, automationAccountName: string, configurationName: string, callback: ServiceCallback): void; + update(resourceGroupName: string, automationAccountName: string, configurationName: string, options: { parameters? : models.DscConfigurationUpdateParameters, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Retrieve the configuration script identified by configuration name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} configurationName The configuration name. @@ -3043,11 +3364,13 @@ export interface DscConfigurationOperations { * * @reject {Error|ServiceError} - The error object. */ - getContentWithHttpOperationResponse(automationAccountName: string, configurationName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getContentWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, configurationName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieve the configuration script identified by configuration name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} configurationName The configuration name. @@ -3078,14 +3401,16 @@ export interface DscConfigurationOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - getContent(automationAccountName: string, configurationName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - getContent(automationAccountName: string, configurationName: string, callback: ServiceCallback): void; - getContent(automationAccountName: string, configurationName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + getContent(resourceGroupName: string, automationAccountName: string, configurationName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + getContent(resourceGroupName: string, automationAccountName: string, configurationName: string, callback: ServiceCallback): void; + getContent(resourceGroupName: string, automationAccountName: string, configurationName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Retrieve a list of configurations. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -3099,11 +3424,13 @@ export interface DscConfigurationOperations { * * @reject {Error|ServiceError} - The error object. */ - listByAutomationAccountWithHttpOperationResponse(automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listByAutomationAccountWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieve a list of configurations. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -3134,9 +3461,9 @@ export interface DscConfigurationOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listByAutomationAccount(automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listByAutomationAccount(automationAccountName: string, callback: ServiceCallback): void; - listByAutomationAccount(automationAccountName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listByAutomationAccount(resourceGroupName: string, automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listByAutomationAccount(resourceGroupName: string, automationAccountName: string, callback: ServiceCallback): void; + listByAutomationAccount(resourceGroupName: string, automationAccountName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -3209,6 +3536,8 @@ export interface AgentRegistrationInformation { /** * Retrieve the automation agent registration information. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -3222,11 +3551,13 @@ export interface AgentRegistrationInformation { * * @reject {Error|ServiceError} - The error object. */ - getWithHttpOperationResponse(automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieve the automation agent registration information. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -3256,14 +3587,16 @@ export interface AgentRegistrationInformation { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - get(automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - get(automationAccountName: string, callback: ServiceCallback): void; - get(automationAccountName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + get(resourceGroupName: string, automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + get(resourceGroupName: string, automationAccountName: string, callback: ServiceCallback): void; + get(resourceGroupName: string, automationAccountName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Regenerate a primary or secondary agent registration key * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} parameters The name of the agent registration key to be @@ -3291,11 +3624,13 @@ export interface AgentRegistrationInformation { * * @reject {Error|ServiceError} - The error object. */ - regenerateKeyWithHttpOperationResponse(automationAccountName: string, parameters: models.AgentRegistrationRegenerateKeyParameter, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + regenerateKeyWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, parameters: models.AgentRegistrationRegenerateKeyParameter, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Regenerate a primary or secondary agent registration key * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} parameters The name of the agent registration key to be @@ -3339,9 +3674,9 @@ export interface AgentRegistrationInformation { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - regenerateKey(automationAccountName: string, parameters: models.AgentRegistrationRegenerateKeyParameter, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - regenerateKey(automationAccountName: string, parameters: models.AgentRegistrationRegenerateKeyParameter, callback: ServiceCallback): void; - regenerateKey(automationAccountName: string, parameters: models.AgentRegistrationRegenerateKeyParameter, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + regenerateKey(resourceGroupName: string, automationAccountName: string, parameters: models.AgentRegistrationRegenerateKeyParameter, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + regenerateKey(resourceGroupName: string, automationAccountName: string, parameters: models.AgentRegistrationRegenerateKeyParameter, callback: ServiceCallback): void; + regenerateKey(resourceGroupName: string, automationAccountName: string, parameters: models.AgentRegistrationRegenerateKeyParameter, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; } /** @@ -3356,6 +3691,8 @@ export interface DscNodeOperations { /** * Delete the dsc node identified by node id. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName Automation account name. * * @param {string} nodeId The node id. @@ -3371,11 +3708,13 @@ export interface DscNodeOperations { * * @reject {Error|ServiceError} - The error object. */ - deleteMethodWithHttpOperationResponse(automationAccountName: string, nodeId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + deleteMethodWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, nodeId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Delete the dsc node identified by node id. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName Automation account name. * * @param {string} nodeId The node id. @@ -3407,14 +3746,16 @@ export interface DscNodeOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(automationAccountName: string, nodeId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - deleteMethod(automationAccountName: string, nodeId: string, callback: ServiceCallback): void; - deleteMethod(automationAccountName: string, nodeId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, automationAccountName: string, nodeId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + deleteMethod(resourceGroupName: string, automationAccountName: string, nodeId: string, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, automationAccountName: string, nodeId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Retrieve the dsc node identified by node id. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} nodeId The node id. @@ -3430,11 +3771,13 @@ export interface DscNodeOperations { * * @reject {Error|ServiceError} - The error object. */ - getWithHttpOperationResponse(automationAccountName: string, nodeId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, nodeId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieve the dsc node identified by node id. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} nodeId The node id. @@ -3466,14 +3809,16 @@ export interface DscNodeOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - get(automationAccountName: string, nodeId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - get(automationAccountName: string, nodeId: string, callback: ServiceCallback): void; - get(automationAccountName: string, nodeId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + get(resourceGroupName: string, automationAccountName: string, nodeId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + get(resourceGroupName: string, automationAccountName: string, nodeId: string, callback: ServiceCallback): void; + get(resourceGroupName: string, automationAccountName: string, nodeId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Update the dsc node. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} nodeId Parameters supplied to the update dsc node. @@ -3499,11 +3844,13 @@ export interface DscNodeOperations { * * @reject {Error|ServiceError} - The error object. */ - updateWithHttpOperationResponse(automationAccountName: string, nodeId: string, parameters: models.DscNodeUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + updateWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, nodeId: string, parameters: models.DscNodeUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Update the dsc node. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} nodeId Parameters supplied to the update dsc node. @@ -3545,14 +3892,16 @@ export interface DscNodeOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - update(automationAccountName: string, nodeId: string, parameters: models.DscNodeUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - update(automationAccountName: string, nodeId: string, parameters: models.DscNodeUpdateParameters, callback: ServiceCallback): void; - update(automationAccountName: string, nodeId: string, parameters: models.DscNodeUpdateParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + update(resourceGroupName: string, automationAccountName: string, nodeId: string, parameters: models.DscNodeUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + update(resourceGroupName: string, automationAccountName: string, nodeId: string, parameters: models.DscNodeUpdateParameters, callback: ServiceCallback): void; + update(resourceGroupName: string, automationAccountName: string, nodeId: string, parameters: models.DscNodeUpdateParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Retrieve a list of dsc nodes. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -3568,11 +3917,13 @@ export interface DscNodeOperations { * * @reject {Error|ServiceError} - The error object. */ - listByAutomationAccountWithHttpOperationResponse(automationAccountName: string, options?: { filter? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; + listByAutomationAccountWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, options?: { filter? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieve a list of dsc nodes. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -3604,9 +3955,9 @@ export interface DscNodeOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listByAutomationAccount(automationAccountName: string, options?: { filter? : string, customHeaders? : { [headerName: string]: string; } }): Promise; - listByAutomationAccount(automationAccountName: string, callback: ServiceCallback): void; - listByAutomationAccount(automationAccountName: string, options: { filter? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listByAutomationAccount(resourceGroupName: string, automationAccountName: string, options?: { filter? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + listByAutomationAccount(resourceGroupName: string, automationAccountName: string, callback: ServiceCallback): void; + listByAutomationAccount(resourceGroupName: string, automationAccountName: string, options: { filter? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -3678,6 +4029,8 @@ export interface NodeReports { /** * Retrieve the Dsc node report list by node id. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} nodeId The parameters supplied to the list operation. @@ -3695,11 +4048,13 @@ export interface NodeReports { * * @reject {Error|ServiceError} - The error object. */ - listByNodeWithHttpOperationResponse(automationAccountName: string, nodeId: string, options?: { filter? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; + listByNodeWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, nodeId: string, options?: { filter? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieve the Dsc node report list by node id. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} nodeId The parameters supplied to the list operation. @@ -3734,14 +4089,16 @@ export interface NodeReports { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listByNode(automationAccountName: string, nodeId: string, options?: { filter? : string, customHeaders? : { [headerName: string]: string; } }): Promise; - listByNode(automationAccountName: string, nodeId: string, callback: ServiceCallback): void; - listByNode(automationAccountName: string, nodeId: string, options: { filter? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listByNode(resourceGroupName: string, automationAccountName: string, nodeId: string, options?: { filter? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + listByNode(resourceGroupName: string, automationAccountName: string, nodeId: string, callback: ServiceCallback): void; + listByNode(resourceGroupName: string, automationAccountName: string, nodeId: string, options: { filter? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Retrieve the Dsc node report data by node id and report id. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} nodeId The Dsc node id. @@ -3759,11 +4116,13 @@ export interface NodeReports { * * @reject {Error|ServiceError} - The error object. */ - getWithHttpOperationResponse(automationAccountName: string, nodeId: string, reportId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, nodeId: string, reportId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieve the Dsc node report data by node id and report id. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} nodeId The Dsc node id. @@ -3797,14 +4156,16 @@ export interface NodeReports { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - get(automationAccountName: string, nodeId: string, reportId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - get(automationAccountName: string, nodeId: string, reportId: string, callback: ServiceCallback): void; - get(automationAccountName: string, nodeId: string, reportId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + get(resourceGroupName: string, automationAccountName: string, nodeId: string, reportId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + get(resourceGroupName: string, automationAccountName: string, nodeId: string, reportId: string, callback: ServiceCallback): void; + get(resourceGroupName: string, automationAccountName: string, nodeId: string, reportId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Retrieve the Dsc node reports by node id and report id. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} nodeId The Dsc node id. @@ -3822,11 +4183,13 @@ export interface NodeReports { * * @reject {Error|ServiceError} - The error object. */ - getContentWithHttpOperationResponse(automationAccountName: string, nodeId: string, reportId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getContentWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, nodeId: string, reportId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieve the Dsc node reports by node id and report id. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} nodeId The Dsc node id. @@ -3859,9 +4222,9 @@ export interface NodeReports { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - getContent(automationAccountName: string, nodeId: string, reportId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - getContent(automationAccountName: string, nodeId: string, reportId: string, callback: ServiceCallback): void; - getContent(automationAccountName: string, nodeId: string, reportId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + getContent(resourceGroupName: string, automationAccountName: string, nodeId: string, reportId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + getContent(resourceGroupName: string, automationAccountName: string, nodeId: string, reportId: string, callback: ServiceCallback): void; + getContent(resourceGroupName: string, automationAccountName: string, nodeId: string, reportId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -3934,6 +4297,8 @@ export interface DscNodeConfigurationOperations { /** * Delete the Dsc node configurations by node configuration. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} nodeConfigurationName The Dsc node configuration name. @@ -3949,11 +4314,13 @@ export interface DscNodeConfigurationOperations { * * @reject {Error|ServiceError} - The error object. */ - deleteMethodWithHttpOperationResponse(automationAccountName: string, nodeConfigurationName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + deleteMethodWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, nodeConfigurationName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Delete the Dsc node configurations by node configuration. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} nodeConfigurationName The Dsc node configuration name. @@ -3984,14 +4351,16 @@ export interface DscNodeConfigurationOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(automationAccountName: string, nodeConfigurationName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - deleteMethod(automationAccountName: string, nodeConfigurationName: string, callback: ServiceCallback): void; - deleteMethod(automationAccountName: string, nodeConfigurationName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, automationAccountName: string, nodeConfigurationName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + deleteMethod(resourceGroupName: string, automationAccountName: string, nodeConfigurationName: string, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, automationAccountName: string, nodeConfigurationName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Retrieve the Dsc node configurations by node configuration. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} nodeConfigurationName The Dsc node configuration name. @@ -4007,11 +4376,13 @@ export interface DscNodeConfigurationOperations { * * @reject {Error|ServiceError} - The error object. */ - getWithHttpOperationResponse(automationAccountName: string, nodeConfigurationName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, nodeConfigurationName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieve the Dsc node configurations by node configuration. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} nodeConfigurationName The Dsc node configuration name. @@ -4043,14 +4414,16 @@ export interface DscNodeConfigurationOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - get(automationAccountName: string, nodeConfigurationName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - get(automationAccountName: string, nodeConfigurationName: string, callback: ServiceCallback): void; - get(automationAccountName: string, nodeConfigurationName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + get(resourceGroupName: string, automationAccountName: string, nodeConfigurationName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + get(resourceGroupName: string, automationAccountName: string, nodeConfigurationName: string, callback: ServiceCallback): void; + get(resourceGroupName: string, automationAccountName: string, nodeConfigurationName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Create the node configuration identified by node configuration name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} nodeConfigurationName The create or update parameters for @@ -4100,11 +4473,13 @@ export interface DscNodeConfigurationOperations { * * @reject {Error|ServiceError} - The error object. */ - createOrUpdateWithHttpOperationResponse(automationAccountName: string, nodeConfigurationName: string, parameters: models.DscNodeConfigurationCreateOrUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + createOrUpdateWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, nodeConfigurationName: string, parameters: models.DscNodeConfigurationCreateOrUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Create the node configuration identified by node configuration name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} nodeConfigurationName The create or update parameters for @@ -4170,14 +4545,16 @@ export interface DscNodeConfigurationOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - createOrUpdate(automationAccountName: string, nodeConfigurationName: string, parameters: models.DscNodeConfigurationCreateOrUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - createOrUpdate(automationAccountName: string, nodeConfigurationName: string, parameters: models.DscNodeConfigurationCreateOrUpdateParameters, callback: ServiceCallback): void; - createOrUpdate(automationAccountName: string, nodeConfigurationName: string, parameters: models.DscNodeConfigurationCreateOrUpdateParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, automationAccountName: string, nodeConfigurationName: string, parameters: models.DscNodeConfigurationCreateOrUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + createOrUpdate(resourceGroupName: string, automationAccountName: string, nodeConfigurationName: string, parameters: models.DscNodeConfigurationCreateOrUpdateParameters, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, automationAccountName: string, nodeConfigurationName: string, parameters: models.DscNodeConfigurationCreateOrUpdateParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Retrieve a list of dsc node configurations. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -4193,11 +4570,13 @@ export interface DscNodeConfigurationOperations { * * @reject {Error|ServiceError} - The error object. */ - listByAutomationAccountWithHttpOperationResponse(automationAccountName: string, options?: { filter? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; + listByAutomationAccountWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, options?: { filter? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieve a list of dsc node configurations. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -4230,9 +4609,9 @@ export interface DscNodeConfigurationOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listByAutomationAccount(automationAccountName: string, options?: { filter? : string, customHeaders? : { [headerName: string]: string; } }): Promise; - listByAutomationAccount(automationAccountName: string, callback: ServiceCallback): void; - listByAutomationAccount(automationAccountName: string, options: { filter? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listByAutomationAccount(resourceGroupName: string, automationAccountName: string, options?: { filter? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + listByAutomationAccount(resourceGroupName: string, automationAccountName: string, callback: ServiceCallback): void; + listByAutomationAccount(resourceGroupName: string, automationAccountName: string, options: { filter? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -4305,6 +4684,8 @@ export interface HybridRunbookWorkerGroupOperations { /** * Delete a hybrid runbook worker group. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName Automation account name. * * @param {string} hybridRunbookWorkerGroupName The hybrid runbook worker group @@ -4321,11 +4702,13 @@ export interface HybridRunbookWorkerGroupOperations { * * @reject {Error|ServiceError} - The error object. */ - deleteMethodWithHttpOperationResponse(automationAccountName: string, hybridRunbookWorkerGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + deleteMethodWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, hybridRunbookWorkerGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Delete a hybrid runbook worker group. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName Automation account name. * * @param {string} hybridRunbookWorkerGroupName The hybrid runbook worker group @@ -4357,14 +4740,16 @@ export interface HybridRunbookWorkerGroupOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(automationAccountName: string, hybridRunbookWorkerGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - deleteMethod(automationAccountName: string, hybridRunbookWorkerGroupName: string, callback: ServiceCallback): void; - deleteMethod(automationAccountName: string, hybridRunbookWorkerGroupName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, automationAccountName: string, hybridRunbookWorkerGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + deleteMethod(resourceGroupName: string, automationAccountName: string, hybridRunbookWorkerGroupName: string, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, automationAccountName: string, hybridRunbookWorkerGroupName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Retrieve a hybrid runbook worker group. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} hybridRunbookWorkerGroupName The hybrid runbook worker group @@ -4381,11 +4766,13 @@ export interface HybridRunbookWorkerGroupOperations { * * @reject {Error|ServiceError} - The error object. */ - getWithHttpOperationResponse(automationAccountName: string, hybridRunbookWorkerGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, hybridRunbookWorkerGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieve a hybrid runbook worker group. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} hybridRunbookWorkerGroupName The hybrid runbook worker group @@ -4419,14 +4806,16 @@ export interface HybridRunbookWorkerGroupOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - get(automationAccountName: string, hybridRunbookWorkerGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - get(automationAccountName: string, hybridRunbookWorkerGroupName: string, callback: ServiceCallback): void; - get(automationAccountName: string, hybridRunbookWorkerGroupName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + get(resourceGroupName: string, automationAccountName: string, hybridRunbookWorkerGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + get(resourceGroupName: string, automationAccountName: string, hybridRunbookWorkerGroupName: string, callback: ServiceCallback): void; + get(resourceGroupName: string, automationAccountName: string, hybridRunbookWorkerGroupName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Update a hybrid runbook worker group. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} hybridRunbookWorkerGroupName The hybrid runbook worker group @@ -4451,11 +4840,13 @@ export interface HybridRunbookWorkerGroupOperations { * * @reject {Error|ServiceError} - The error object. */ - updateWithHttpOperationResponse(automationAccountName: string, hybridRunbookWorkerGroupName: string, parameters: models.HybridRunbookWorkerGroupUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + updateWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, hybridRunbookWorkerGroupName: string, parameters: models.HybridRunbookWorkerGroupUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Update a hybrid runbook worker group. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} hybridRunbookWorkerGroupName The hybrid runbook worker group @@ -4497,14 +4888,16 @@ export interface HybridRunbookWorkerGroupOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - update(automationAccountName: string, hybridRunbookWorkerGroupName: string, parameters: models.HybridRunbookWorkerGroupUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - update(automationAccountName: string, hybridRunbookWorkerGroupName: string, parameters: models.HybridRunbookWorkerGroupUpdateParameters, callback: ServiceCallback): void; - update(automationAccountName: string, hybridRunbookWorkerGroupName: string, parameters: models.HybridRunbookWorkerGroupUpdateParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + update(resourceGroupName: string, automationAccountName: string, hybridRunbookWorkerGroupName: string, parameters: models.HybridRunbookWorkerGroupUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + update(resourceGroupName: string, automationAccountName: string, hybridRunbookWorkerGroupName: string, parameters: models.HybridRunbookWorkerGroupUpdateParameters, callback: ServiceCallback): void; + update(resourceGroupName: string, automationAccountName: string, hybridRunbookWorkerGroupName: string, parameters: models.HybridRunbookWorkerGroupUpdateParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Retrieve a list of hybrid runbook worker groups. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -4518,11 +4911,13 @@ export interface HybridRunbookWorkerGroupOperations { * * @reject {Error|ServiceError} - The error object. */ - listByAutomationAccountWithHttpOperationResponse(automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listByAutomationAccountWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieve a list of hybrid runbook worker groups. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -4553,9 +4948,9 @@ export interface HybridRunbookWorkerGroupOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listByAutomationAccount(automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listByAutomationAccount(automationAccountName: string, callback: ServiceCallback): void; - listByAutomationAccount(automationAccountName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listByAutomationAccount(resourceGroupName: string, automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listByAutomationAccount(resourceGroupName: string, automationAccountName: string, callback: ServiceCallback): void; + listByAutomationAccount(resourceGroupName: string, automationAccountName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -4628,6 +5023,8 @@ export interface JobScheduleOperations { /** * Delete the job schedule identified by job schedule name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {uuid} jobScheduleId The job schedule name. @@ -4643,11 +5040,13 @@ export interface JobScheduleOperations { * * @reject {Error|ServiceError} - The error object. */ - deleteMethodWithHttpOperationResponse(automationAccountName: string, jobScheduleId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + deleteMethodWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, jobScheduleId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Delete the job schedule identified by job schedule name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {uuid} jobScheduleId The job schedule name. @@ -4678,14 +5077,16 @@ export interface JobScheduleOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(automationAccountName: string, jobScheduleId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - deleteMethod(automationAccountName: string, jobScheduleId: string, callback: ServiceCallback): void; - deleteMethod(automationAccountName: string, jobScheduleId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, automationAccountName: string, jobScheduleId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + deleteMethod(resourceGroupName: string, automationAccountName: string, jobScheduleId: string, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, automationAccountName: string, jobScheduleId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Retrieve the job schedule identified by job schedule name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {uuid} jobScheduleId The job schedule name. @@ -4701,11 +5102,13 @@ export interface JobScheduleOperations { * * @reject {Error|ServiceError} - The error object. */ - getWithHttpOperationResponse(automationAccountName: string, jobScheduleId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, jobScheduleId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieve the job schedule identified by job schedule name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {uuid} jobScheduleId The job schedule name. @@ -4737,14 +5140,16 @@ export interface JobScheduleOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - get(automationAccountName: string, jobScheduleId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - get(automationAccountName: string, jobScheduleId: string, callback: ServiceCallback): void; - get(automationAccountName: string, jobScheduleId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + get(resourceGroupName: string, automationAccountName: string, jobScheduleId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + get(resourceGroupName: string, automationAccountName: string, jobScheduleId: string, callback: ServiceCallback): void; + get(resourceGroupName: string, automationAccountName: string, jobScheduleId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Create a job schedule. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {uuid} jobScheduleId The job schedule name. @@ -4779,11 +5184,13 @@ export interface JobScheduleOperations { * * @reject {Error|ServiceError} - The error object. */ - createWithHttpOperationResponse(automationAccountName: string, jobScheduleId: string, parameters: models.JobScheduleCreateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + createWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, jobScheduleId: string, parameters: models.JobScheduleCreateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Create a job schedule. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {uuid} jobScheduleId The job schedule name. @@ -4834,14 +5241,16 @@ export interface JobScheduleOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - create(automationAccountName: string, jobScheduleId: string, parameters: models.JobScheduleCreateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - create(automationAccountName: string, jobScheduleId: string, parameters: models.JobScheduleCreateParameters, callback: ServiceCallback): void; - create(automationAccountName: string, jobScheduleId: string, parameters: models.JobScheduleCreateParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + create(resourceGroupName: string, automationAccountName: string, jobScheduleId: string, parameters: models.JobScheduleCreateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + create(resourceGroupName: string, automationAccountName: string, jobScheduleId: string, parameters: models.JobScheduleCreateParameters, callback: ServiceCallback): void; + create(resourceGroupName: string, automationAccountName: string, jobScheduleId: string, parameters: models.JobScheduleCreateParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Retrieve a list of job schedules. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -4855,11 +5264,13 @@ export interface JobScheduleOperations { * * @reject {Error|ServiceError} - The error object. */ - listByAutomationAccountWithHttpOperationResponse(automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listByAutomationAccountWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieve a list of job schedules. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -4889,9 +5300,9 @@ export interface JobScheduleOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listByAutomationAccount(automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listByAutomationAccount(automationAccountName: string, callback: ServiceCallback): void; - listByAutomationAccount(automationAccountName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listByAutomationAccount(resourceGroupName: string, automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listByAutomationAccount(resourceGroupName: string, automationAccountName: string, callback: ServiceCallback): void; + listByAutomationAccount(resourceGroupName: string, automationAccountName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -4963,6 +5374,8 @@ export interface LinkedWorkspaceOperations { /** * Retrieve the linked workspace for the account id. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -4976,11 +5389,13 @@ export interface LinkedWorkspaceOperations { * * @reject {Error|ServiceError} - The error object. */ - getWithHttpOperationResponse(automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieve the linked workspace for the account id. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -5010,9 +5425,9 @@ export interface LinkedWorkspaceOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - get(automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - get(automationAccountName: string, callback: ServiceCallback): void; - get(automationAccountName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + get(resourceGroupName: string, automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + get(resourceGroupName: string, automationAccountName: string, callback: ServiceCallback): void; + get(resourceGroupName: string, automationAccountName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; } /** @@ -5028,6 +5443,8 @@ export interface ActivityOperations { * Retrieve the activity in the module identified by module name and activity * name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} moduleName The name of module. @@ -5045,12 +5462,14 @@ export interface ActivityOperations { * * @reject {Error|ServiceError} - The error object. */ - getWithHttpOperationResponse(automationAccountName: string, moduleName: string, activityName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, moduleName: string, activityName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieve the activity in the module identified by module name and activity * name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} moduleName The name of module. @@ -5084,14 +5503,16 @@ export interface ActivityOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - get(automationAccountName: string, moduleName: string, activityName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - get(automationAccountName: string, moduleName: string, activityName: string, callback: ServiceCallback): void; - get(automationAccountName: string, moduleName: string, activityName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + get(resourceGroupName: string, automationAccountName: string, moduleName: string, activityName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + get(resourceGroupName: string, automationAccountName: string, moduleName: string, activityName: string, callback: ServiceCallback): void; + get(resourceGroupName: string, automationAccountName: string, moduleName: string, activityName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Retrieve a list of activities in the module identified by module name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} moduleName The name of module. @@ -5107,11 +5528,13 @@ export interface ActivityOperations { * * @reject {Error|ServiceError} - The error object. */ - listByModuleWithHttpOperationResponse(automationAccountName: string, moduleName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listByModuleWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, moduleName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieve a list of activities in the module identified by module name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} moduleName The name of module. @@ -5143,9 +5566,9 @@ export interface ActivityOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listByModule(automationAccountName: string, moduleName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listByModule(automationAccountName: string, moduleName: string, callback: ServiceCallback): void; - listByModule(automationAccountName: string, moduleName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listByModule(resourceGroupName: string, automationAccountName: string, moduleName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listByModule(resourceGroupName: string, automationAccountName: string, moduleName: string, callback: ServiceCallback): void; + listByModule(resourceGroupName: string, automationAccountName: string, moduleName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -5217,6 +5640,8 @@ export interface ModuleOperations { /** * Delete the module by name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} moduleName The module name. @@ -5232,11 +5657,13 @@ export interface ModuleOperations { * * @reject {Error|ServiceError} - The error object. */ - deleteMethodWithHttpOperationResponse(automationAccountName: string, moduleName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + deleteMethodWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, moduleName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Delete the module by name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} moduleName The module name. @@ -5267,14 +5694,16 @@ export interface ModuleOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(automationAccountName: string, moduleName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - deleteMethod(automationAccountName: string, moduleName: string, callback: ServiceCallback): void; - deleteMethod(automationAccountName: string, moduleName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, automationAccountName: string, moduleName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + deleteMethod(resourceGroupName: string, automationAccountName: string, moduleName: string, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, automationAccountName: string, moduleName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Retrieve the module identified by module name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} moduleName The module name. @@ -5290,11 +5719,13 @@ export interface ModuleOperations { * * @reject {Error|ServiceError} - The error object. */ - getWithHttpOperationResponse(automationAccountName: string, moduleName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, moduleName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieve the module identified by module name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} moduleName The module name. @@ -5326,14 +5757,16 @@ export interface ModuleOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - get(automationAccountName: string, moduleName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - get(automationAccountName: string, moduleName: string, callback: ServiceCallback): void; - get(automationAccountName: string, moduleName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + get(resourceGroupName: string, automationAccountName: string, moduleName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + get(resourceGroupName: string, automationAccountName: string, moduleName: string, callback: ServiceCallback): void; + get(resourceGroupName: string, automationAccountName: string, moduleName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Create or Update the module identified by module name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} moduleName The name of module. @@ -5375,11 +5808,13 @@ export interface ModuleOperations { * * @reject {Error|ServiceError} - The error object. */ - createOrUpdateWithHttpOperationResponse(automationAccountName: string, moduleName: string, parameters: models.ModuleCreateOrUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + createOrUpdateWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, moduleName: string, parameters: models.ModuleCreateOrUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Create or Update the module identified by module name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} moduleName The name of module. @@ -5437,14 +5872,16 @@ export interface ModuleOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - createOrUpdate(automationAccountName: string, moduleName: string, parameters: models.ModuleCreateOrUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - createOrUpdate(automationAccountName: string, moduleName: string, parameters: models.ModuleCreateOrUpdateParameters, callback: ServiceCallback): void; - createOrUpdate(automationAccountName: string, moduleName: string, parameters: models.ModuleCreateOrUpdateParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, automationAccountName: string, moduleName: string, parameters: models.ModuleCreateOrUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + createOrUpdate(resourceGroupName: string, automationAccountName: string, moduleName: string, parameters: models.ModuleCreateOrUpdateParameters, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, automationAccountName: string, moduleName: string, parameters: models.ModuleCreateOrUpdateParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Update the module identified by module name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} moduleName The name of module. @@ -5487,11 +5924,13 @@ export interface ModuleOperations { * * @reject {Error|ServiceError} - The error object. */ - updateWithHttpOperationResponse(automationAccountName: string, moduleName: string, parameters: models.ModuleUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + updateWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, moduleName: string, parameters: models.ModuleUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Update the module identified by module name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} moduleName The name of module. @@ -5550,14 +5989,16 @@ export interface ModuleOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - update(automationAccountName: string, moduleName: string, parameters: models.ModuleUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - update(automationAccountName: string, moduleName: string, parameters: models.ModuleUpdateParameters, callback: ServiceCallback): void; - update(automationAccountName: string, moduleName: string, parameters: models.ModuleUpdateParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + update(resourceGroupName: string, automationAccountName: string, moduleName: string, parameters: models.ModuleUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + update(resourceGroupName: string, automationAccountName: string, moduleName: string, parameters: models.ModuleUpdateParameters, callback: ServiceCallback): void; + update(resourceGroupName: string, automationAccountName: string, moduleName: string, parameters: models.ModuleUpdateParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Retrieve a list of modules. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -5571,11 +6012,13 @@ export interface ModuleOperations { * * @reject {Error|ServiceError} - The error object. */ - listByAutomationAccountWithHttpOperationResponse(automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listByAutomationAccountWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieve a list of modules. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -5605,9 +6048,9 @@ export interface ModuleOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listByAutomationAccount(automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listByAutomationAccount(automationAccountName: string, callback: ServiceCallback): void; - listByAutomationAccount(automationAccountName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listByAutomationAccount(resourceGroupName: string, automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listByAutomationAccount(resourceGroupName: string, automationAccountName: string, callback: ServiceCallback): void; + listByAutomationAccount(resourceGroupName: string, automationAccountName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -5679,6 +6122,8 @@ export interface ObjectDataTypes { /** * Retrieve a list of fields of a given type identified by module name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} moduleName The name of module. @@ -5696,11 +6141,13 @@ export interface ObjectDataTypes { * * @reject {Error|ServiceError} - The error object. */ - listFieldsByModuleAndTypeWithHttpOperationResponse(automationAccountName: string, moduleName: string, typeName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listFieldsByModuleAndTypeWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, moduleName: string, typeName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieve a list of fields of a given type identified by module name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} moduleName The name of module. @@ -5734,14 +6181,16 @@ export interface ObjectDataTypes { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listFieldsByModuleAndType(automationAccountName: string, moduleName: string, typeName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listFieldsByModuleAndType(automationAccountName: string, moduleName: string, typeName: string, callback: ServiceCallback): void; - listFieldsByModuleAndType(automationAccountName: string, moduleName: string, typeName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listFieldsByModuleAndType(resourceGroupName: string, automationAccountName: string, moduleName: string, typeName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listFieldsByModuleAndType(resourceGroupName: string, automationAccountName: string, moduleName: string, typeName: string, callback: ServiceCallback): void; + listFieldsByModuleAndType(resourceGroupName: string, automationAccountName: string, moduleName: string, typeName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Retrieve a list of fields of a given type across all accessible modules. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} typeName The name of type. @@ -5757,11 +6206,13 @@ export interface ObjectDataTypes { * * @reject {Error|ServiceError} - The error object. */ - listFieldsByTypeWithHttpOperationResponse(automationAccountName: string, typeName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listFieldsByTypeWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, typeName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieve a list of fields of a given type across all accessible modules. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} typeName The name of type. @@ -5793,9 +6244,9 @@ export interface ObjectDataTypes { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listFieldsByType(automationAccountName: string, typeName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listFieldsByType(automationAccountName: string, typeName: string, callback: ServiceCallback): void; - listFieldsByType(automationAccountName: string, typeName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listFieldsByType(resourceGroupName: string, automationAccountName: string, typeName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listFieldsByType(resourceGroupName: string, automationAccountName: string, typeName: string, callback: ServiceCallback): void; + listFieldsByType(resourceGroupName: string, automationAccountName: string, typeName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; } /** @@ -5810,6 +6261,8 @@ export interface Fields { /** * Retrieve a list of fields of a given type identified by module name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} moduleName The name of module. @@ -5827,11 +6280,13 @@ export interface Fields { * * @reject {Error|ServiceError} - The error object. */ - listByTypeWithHttpOperationResponse(automationAccountName: string, moduleName: string, typeName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listByTypeWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, moduleName: string, typeName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieve a list of fields of a given type identified by module name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} moduleName The name of module. @@ -5865,9 +6320,9 @@ export interface Fields { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listByType(automationAccountName: string, moduleName: string, typeName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listByType(automationAccountName: string, moduleName: string, typeName: string, callback: ServiceCallback): void; - listByType(automationAccountName: string, moduleName: string, typeName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listByType(resourceGroupName: string, automationAccountName: string, moduleName: string, typeName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listByType(resourceGroupName: string, automationAccountName: string, moduleName: string, typeName: string, callback: ServiceCallback): void; + listByType(resourceGroupName: string, automationAccountName: string, moduleName: string, typeName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; } /** @@ -5882,6 +6337,8 @@ export interface RunbookDraftOperations { /** * Retrieve the content of runbook draft identified by runbook name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -5897,11 +6354,13 @@ export interface RunbookDraftOperations { * * @reject {Error|ServiceError} - The error object. */ - getContentWithHttpOperationResponse(automationAccountName: string, runbookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getContentWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, runbookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieve the content of runbook draft identified by runbook name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -5932,14 +6391,16 @@ export interface RunbookDraftOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - getContent(automationAccountName: string, runbookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - getContent(automationAccountName: string, runbookName: string, callback: ServiceCallback): void; - getContent(automationAccountName: string, runbookName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + getContent(resourceGroupName: string, automationAccountName: string, runbookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + getContent(resourceGroupName: string, automationAccountName: string, runbookName: string, callback: ServiceCallback): void; + getContent(resourceGroupName: string, automationAccountName: string, runbookName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Replaces the runbook draft content. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -5953,15 +6414,17 @@ export interface RunbookDraftOperations { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - replaceContentWithHttpOperationResponse(automationAccountName: string, runbookName: string, runbookContent: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + replaceContentWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, runbookName: string, runbookContent: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Replaces the runbook draft content. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -5980,7 +6443,7 @@ export interface RunbookDraftOperations { * * {Promise} A promise is returned. * - * @resolve {null} - The deserialized result object. + * @resolve {String} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -5988,20 +6451,22 @@ export interface RunbookDraftOperations { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {String} [result] - The deserialized result object if an error did not occur. * * {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. */ - replaceContent(automationAccountName: string, runbookName: string, runbookContent: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - replaceContent(automationAccountName: string, runbookName: string, runbookContent: string, callback: ServiceCallback): void; - replaceContent(automationAccountName: string, runbookName: string, runbookContent: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + replaceContent(resourceGroupName: string, automationAccountName: string, runbookName: string, runbookContent: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + replaceContent(resourceGroupName: string, automationAccountName: string, runbookName: string, runbookContent: string, callback: ServiceCallback): void; + replaceContent(resourceGroupName: string, automationAccountName: string, runbookName: string, runbookContent: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Retrieve the runbook draft identified by runbook name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -6017,11 +6482,13 @@ export interface RunbookDraftOperations { * * @reject {Error|ServiceError} - The error object. */ - getWithHttpOperationResponse(automationAccountName: string, runbookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, runbookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieve the runbook draft identified by runbook name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -6053,14 +6520,16 @@ export interface RunbookDraftOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - get(automationAccountName: string, runbookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - get(automationAccountName: string, runbookName: string, callback: ServiceCallback): void; - get(automationAccountName: string, runbookName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + get(resourceGroupName: string, automationAccountName: string, runbookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + get(resourceGroupName: string, automationAccountName: string, runbookName: string, callback: ServiceCallback): void; + get(resourceGroupName: string, automationAccountName: string, runbookName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Publish runbook draft. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The parameters supplied to the publish runbook @@ -6073,15 +6542,17 @@ export interface RunbookDraftOperations { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - publishWithHttpOperationResponse(automationAccountName: string, runbookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + publishWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, runbookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Publish runbook draft. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The parameters supplied to the publish runbook @@ -6099,7 +6570,7 @@ export interface RunbookDraftOperations { * * {Promise} A promise is returned. * - * @resolve {null} - The deserialized result object. + * @resolve {String} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -6107,20 +6578,22 @@ export interface RunbookDraftOperations { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {String} [result] - The deserialized result object if an error did not occur. * * {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. */ - publish(automationAccountName: string, runbookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - publish(automationAccountName: string, runbookName: string, callback: ServiceCallback): void; - publish(automationAccountName: string, runbookName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + publish(resourceGroupName: string, automationAccountName: string, runbookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + publish(resourceGroupName: string, automationAccountName: string, runbookName: string, callback: ServiceCallback): void; + publish(resourceGroupName: string, automationAccountName: string, runbookName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Undo draft edit to last known published state identified by runbook name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -6136,11 +6609,13 @@ export interface RunbookDraftOperations { * * @reject {Error|ServiceError} - The error object. */ - undoEditWithHttpOperationResponse(automationAccountName: string, runbookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + undoEditWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, runbookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Undo draft edit to last known published state identified by runbook name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -6173,14 +6648,16 @@ export interface RunbookDraftOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - undoEdit(automationAccountName: string, runbookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - undoEdit(automationAccountName: string, runbookName: string, callback: ServiceCallback): void; - undoEdit(automationAccountName: string, runbookName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + undoEdit(resourceGroupName: string, automationAccountName: string, runbookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + undoEdit(resourceGroupName: string, automationAccountName: string, runbookName: string, callback: ServiceCallback): void; + undoEdit(resourceGroupName: string, automationAccountName: string, runbookName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Replaces the runbook draft content. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -6194,15 +6671,17 @@ export interface RunbookDraftOperations { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - beginReplaceContentWithHttpOperationResponse(automationAccountName: string, runbookName: string, runbookContent: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginReplaceContentWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, runbookName: string, runbookContent: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Replaces the runbook draft content. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -6221,7 +6700,7 @@ export interface RunbookDraftOperations { * * {Promise} A promise is returned. * - * @resolve {null} - The deserialized result object. + * @resolve {String} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -6229,20 +6708,22 @@ export interface RunbookDraftOperations { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {String} [result] - The deserialized result object if an error did not occur. * * {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. */ - beginReplaceContent(automationAccountName: string, runbookName: string, runbookContent: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginReplaceContent(automationAccountName: string, runbookName: string, runbookContent: string, callback: ServiceCallback): void; - beginReplaceContent(automationAccountName: string, runbookName: string, runbookContent: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginReplaceContent(resourceGroupName: string, automationAccountName: string, runbookName: string, runbookContent: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginReplaceContent(resourceGroupName: string, automationAccountName: string, runbookName: string, runbookContent: string, callback: ServiceCallback): void; + beginReplaceContent(resourceGroupName: string, automationAccountName: string, runbookName: string, runbookContent: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Publish runbook draft. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The parameters supplied to the publish runbook @@ -6255,15 +6736,17 @@ export interface RunbookDraftOperations { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - beginPublishWithHttpOperationResponse(automationAccountName: string, runbookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginPublishWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, runbookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Publish runbook draft. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The parameters supplied to the publish runbook @@ -6281,7 +6764,7 @@ export interface RunbookDraftOperations { * * {Promise} A promise is returned. * - * @resolve {null} - The deserialized result object. + * @resolve {String} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -6289,15 +6772,15 @@ export interface RunbookDraftOperations { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {String} [result] - The deserialized result object if an error did not occur. * * {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. */ - beginPublish(automationAccountName: string, runbookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginPublish(automationAccountName: string, runbookName: string, callback: ServiceCallback): void; - beginPublish(automationAccountName: string, runbookName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginPublish(resourceGroupName: string, automationAccountName: string, runbookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginPublish(resourceGroupName: string, automationAccountName: string, runbookName: string, callback: ServiceCallback): void; + beginPublish(resourceGroupName: string, automationAccountName: string, runbookName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; } /** @@ -6312,6 +6795,8 @@ export interface RunbookOperations { /** * Retrieve the content of runbook identified by runbook name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -6327,11 +6812,13 @@ export interface RunbookOperations { * * @reject {Error|ServiceError} - The error object. */ - getContentWithHttpOperationResponse(automationAccountName: string, runbookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getContentWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, runbookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieve the content of runbook identified by runbook name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -6362,14 +6849,16 @@ export interface RunbookOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - getContent(automationAccountName: string, runbookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - getContent(automationAccountName: string, runbookName: string, callback: ServiceCallback): void; - getContent(automationAccountName: string, runbookName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + getContent(resourceGroupName: string, automationAccountName: string, runbookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + getContent(resourceGroupName: string, automationAccountName: string, runbookName: string, callback: ServiceCallback): void; + getContent(resourceGroupName: string, automationAccountName: string, runbookName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Retrieve the runbook identified by runbook name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -6385,11 +6874,13 @@ export interface RunbookOperations { * * @reject {Error|ServiceError} - The error object. */ - getWithHttpOperationResponse(automationAccountName: string, runbookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, runbookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieve the runbook identified by runbook name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -6421,14 +6912,16 @@ export interface RunbookOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - get(automationAccountName: string, runbookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - get(automationAccountName: string, runbookName: string, callback: ServiceCallback): void; - get(automationAccountName: string, runbookName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + get(resourceGroupName: string, automationAccountName: string, runbookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + get(resourceGroupName: string, automationAccountName: string, runbookName: string, callback: ServiceCallback): void; + get(resourceGroupName: string, automationAccountName: string, runbookName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Create the runbook identified by runbook name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -6508,11 +7001,13 @@ export interface RunbookOperations { * * @reject {Error|ServiceError} - The error object. */ - createOrUpdateWithHttpOperationResponse(automationAccountName: string, runbookName: string, parameters: models.RunbookCreateOrUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + createOrUpdateWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, runbookName: string, parameters: models.RunbookCreateOrUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Create the runbook identified by runbook name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -6608,14 +7103,16 @@ export interface RunbookOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - createOrUpdate(automationAccountName: string, runbookName: string, parameters: models.RunbookCreateOrUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - createOrUpdate(automationAccountName: string, runbookName: string, parameters: models.RunbookCreateOrUpdateParameters, callback: ServiceCallback): void; - createOrUpdate(automationAccountName: string, runbookName: string, parameters: models.RunbookCreateOrUpdateParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, automationAccountName: string, runbookName: string, parameters: models.RunbookCreateOrUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + createOrUpdate(resourceGroupName: string, automationAccountName: string, runbookName: string, parameters: models.RunbookCreateOrUpdateParameters, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, automationAccountName: string, runbookName: string, parameters: models.RunbookCreateOrUpdateParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Update the runbook identified by runbook name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -6651,11 +7148,13 @@ export interface RunbookOperations { * * @reject {Error|ServiceError} - The error object. */ - updateWithHttpOperationResponse(automationAccountName: string, runbookName: string, parameters: models.RunbookUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + updateWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, runbookName: string, parameters: models.RunbookUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Update the runbook identified by runbook name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -6707,14 +7206,16 @@ export interface RunbookOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - update(automationAccountName: string, runbookName: string, parameters: models.RunbookUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - update(automationAccountName: string, runbookName: string, parameters: models.RunbookUpdateParameters, callback: ServiceCallback): void; - update(automationAccountName: string, runbookName: string, parameters: models.RunbookUpdateParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + update(resourceGroupName: string, automationAccountName: string, runbookName: string, parameters: models.RunbookUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + update(resourceGroupName: string, automationAccountName: string, runbookName: string, parameters: models.RunbookUpdateParameters, callback: ServiceCallback): void; + update(resourceGroupName: string, automationAccountName: string, runbookName: string, parameters: models.RunbookUpdateParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Delete the runbook by name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -6730,11 +7231,13 @@ export interface RunbookOperations { * * @reject {Error|ServiceError} - The error object. */ - deleteMethodWithHttpOperationResponse(automationAccountName: string, runbookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + deleteMethodWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, runbookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Delete the runbook by name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -6765,14 +7268,16 @@ export interface RunbookOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(automationAccountName: string, runbookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - deleteMethod(automationAccountName: string, runbookName: string, callback: ServiceCallback): void; - deleteMethod(automationAccountName: string, runbookName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, automationAccountName: string, runbookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + deleteMethod(resourceGroupName: string, automationAccountName: string, runbookName: string, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, automationAccountName: string, runbookName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Retrieve a list of runbooks. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -6786,11 +7291,13 @@ export interface RunbookOperations { * * @reject {Error|ServiceError} - The error object. */ - listByAutomationAccountWithHttpOperationResponse(automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listByAutomationAccountWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieve a list of runbooks. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -6820,9 +7327,9 @@ export interface RunbookOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listByAutomationAccount(automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listByAutomationAccount(automationAccountName: string, callback: ServiceCallback): void; - listByAutomationAccount(automationAccountName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listByAutomationAccount(resourceGroupName: string, automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listByAutomationAccount(resourceGroupName: string, automationAccountName: string, callback: ServiceCallback): void; + listByAutomationAccount(resourceGroupName: string, automationAccountName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -6895,6 +7402,8 @@ export interface TestJobStreams { * Retrieve a test job stream of the test job identified by runbook name and * stream id. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -6912,12 +7421,14 @@ export interface TestJobStreams { * * @reject {Error|ServiceError} - The error object. */ - getWithHttpOperationResponse(automationAccountName: string, runbookName: string, jobStreamId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, runbookName: string, jobStreamId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieve a test job stream of the test job identified by runbook name and * stream id. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -6951,14 +7462,16 @@ export interface TestJobStreams { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - get(automationAccountName: string, runbookName: string, jobStreamId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - get(automationAccountName: string, runbookName: string, jobStreamId: string, callback: ServiceCallback): void; - get(automationAccountName: string, runbookName: string, jobStreamId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + get(resourceGroupName: string, automationAccountName: string, runbookName: string, jobStreamId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + get(resourceGroupName: string, automationAccountName: string, runbookName: string, jobStreamId: string, callback: ServiceCallback): void; + get(resourceGroupName: string, automationAccountName: string, runbookName: string, jobStreamId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Retrieve a list of test job streams identified by runbook name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -6976,11 +7489,13 @@ export interface TestJobStreams { * * @reject {Error|ServiceError} - The error object. */ - listByTestJobWithHttpOperationResponse(automationAccountName: string, runbookName: string, options?: { filter? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; + listByTestJobWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, runbookName: string, options?: { filter? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieve a list of test job streams identified by runbook name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -7014,9 +7529,9 @@ export interface TestJobStreams { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listByTestJob(automationAccountName: string, runbookName: string, options?: { filter? : string, customHeaders? : { [headerName: string]: string; } }): Promise; - listByTestJob(automationAccountName: string, runbookName: string, callback: ServiceCallback): void; - listByTestJob(automationAccountName: string, runbookName: string, options: { filter? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listByTestJob(resourceGroupName: string, automationAccountName: string, runbookName: string, options?: { filter? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + listByTestJob(resourceGroupName: string, automationAccountName: string, runbookName: string, callback: ServiceCallback): void; + listByTestJob(resourceGroupName: string, automationAccountName: string, runbookName: string, options: { filter? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -7088,6 +7603,8 @@ export interface TestJobOperations { /** * Create a test job of the runbook. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The parameters supplied to the create test job @@ -7113,11 +7630,13 @@ export interface TestJobOperations { * * @reject {Error|ServiceError} - The error object. */ - createWithHttpOperationResponse(automationAccountName: string, runbookName: string, parameters: models.TestJobCreateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + createWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, runbookName: string, parameters: models.TestJobCreateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Create a test job of the runbook. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The parameters supplied to the create test job @@ -7159,14 +7678,16 @@ export interface TestJobOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - create(automationAccountName: string, runbookName: string, parameters: models.TestJobCreateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - create(automationAccountName: string, runbookName: string, parameters: models.TestJobCreateParameters, callback: ServiceCallback): void; - create(automationAccountName: string, runbookName: string, parameters: models.TestJobCreateParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + create(resourceGroupName: string, automationAccountName: string, runbookName: string, parameters: models.TestJobCreateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + create(resourceGroupName: string, automationAccountName: string, runbookName: string, parameters: models.TestJobCreateParameters, callback: ServiceCallback): void; + create(resourceGroupName: string, automationAccountName: string, runbookName: string, parameters: models.TestJobCreateParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Retrieve the test job for the specified runbook. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -7182,11 +7703,13 @@ export interface TestJobOperations { * * @reject {Error|ServiceError} - The error object. */ - getWithHttpOperationResponse(automationAccountName: string, runbookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, runbookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieve the test job for the specified runbook. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -7218,14 +7741,16 @@ export interface TestJobOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - get(automationAccountName: string, runbookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - get(automationAccountName: string, runbookName: string, callback: ServiceCallback): void; - get(automationAccountName: string, runbookName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + get(resourceGroupName: string, automationAccountName: string, runbookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + get(resourceGroupName: string, automationAccountName: string, runbookName: string, callback: ServiceCallback): void; + get(resourceGroupName: string, automationAccountName: string, runbookName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Resume the test job. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -7241,11 +7766,13 @@ export interface TestJobOperations { * * @reject {Error|ServiceError} - The error object. */ - resumeWithHttpOperationResponse(automationAccountName: string, runbookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + resumeWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, runbookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Resume the test job. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -7276,14 +7803,16 @@ export interface TestJobOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - resume(automationAccountName: string, runbookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - resume(automationAccountName: string, runbookName: string, callback: ServiceCallback): void; - resume(automationAccountName: string, runbookName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + resume(resourceGroupName: string, automationAccountName: string, runbookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + resume(resourceGroupName: string, automationAccountName: string, runbookName: string, callback: ServiceCallback): void; + resume(resourceGroupName: string, automationAccountName: string, runbookName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Stop the test job. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -7299,11 +7828,13 @@ export interface TestJobOperations { * * @reject {Error|ServiceError} - The error object. */ - stopWithHttpOperationResponse(automationAccountName: string, runbookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + stopWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, runbookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Stop the test job. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -7334,14 +7865,16 @@ export interface TestJobOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - stop(automationAccountName: string, runbookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - stop(automationAccountName: string, runbookName: string, callback: ServiceCallback): void; - stop(automationAccountName: string, runbookName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + stop(resourceGroupName: string, automationAccountName: string, runbookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + stop(resourceGroupName: string, automationAccountName: string, runbookName: string, callback: ServiceCallback): void; + stop(resourceGroupName: string, automationAccountName: string, runbookName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Suspend the test job. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -7357,11 +7890,13 @@ export interface TestJobOperations { * * @reject {Error|ServiceError} - The error object. */ - suspendWithHttpOperationResponse(automationAccountName: string, runbookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + suspendWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, runbookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Suspend the test job. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -7392,9 +7927,9 @@ export interface TestJobOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - suspend(automationAccountName: string, runbookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - suspend(automationAccountName: string, runbookName: string, callback: ServiceCallback): void; - suspend(automationAccountName: string, runbookName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + suspend(resourceGroupName: string, automationAccountName: string, runbookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + suspend(resourceGroupName: string, automationAccountName: string, runbookName: string, callback: ServiceCallback): void; + suspend(resourceGroupName: string, automationAccountName: string, runbookName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; } /** @@ -7409,6 +7944,8 @@ export interface ScheduleOperations { /** * Create a schedule. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} scheduleName The schedule name. @@ -7459,11 +7996,13 @@ export interface ScheduleOperations { * * @reject {Error|ServiceError} - The error object. */ - createOrUpdateWithHttpOperationResponse(automationAccountName: string, scheduleName: string, parameters: models.ScheduleCreateOrUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + createOrUpdateWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, scheduleName: string, parameters: models.ScheduleCreateOrUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Create a schedule. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} scheduleName The schedule name. @@ -7530,14 +8069,16 @@ export interface ScheduleOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - createOrUpdate(automationAccountName: string, scheduleName: string, parameters: models.ScheduleCreateOrUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - createOrUpdate(automationAccountName: string, scheduleName: string, parameters: models.ScheduleCreateOrUpdateParameters, callback: ServiceCallback): void; - createOrUpdate(automationAccountName: string, scheduleName: string, parameters: models.ScheduleCreateOrUpdateParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, automationAccountName: string, scheduleName: string, parameters: models.ScheduleCreateOrUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + createOrUpdate(resourceGroupName: string, automationAccountName: string, scheduleName: string, parameters: models.ScheduleCreateOrUpdateParameters, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, automationAccountName: string, scheduleName: string, parameters: models.ScheduleCreateOrUpdateParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Update the schedule identified by schedule name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} scheduleName The schedule name. @@ -7564,11 +8105,13 @@ export interface ScheduleOperations { * * @reject {Error|ServiceError} - The error object. */ - updateWithHttpOperationResponse(automationAccountName: string, scheduleName: string, parameters: models.ScheduleUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + updateWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, scheduleName: string, parameters: models.ScheduleUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Update the schedule identified by schedule name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} scheduleName The schedule name. @@ -7611,14 +8154,16 @@ export interface ScheduleOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - update(automationAccountName: string, scheduleName: string, parameters: models.ScheduleUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - update(automationAccountName: string, scheduleName: string, parameters: models.ScheduleUpdateParameters, callback: ServiceCallback): void; - update(automationAccountName: string, scheduleName: string, parameters: models.ScheduleUpdateParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + update(resourceGroupName: string, automationAccountName: string, scheduleName: string, parameters: models.ScheduleUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + update(resourceGroupName: string, automationAccountName: string, scheduleName: string, parameters: models.ScheduleUpdateParameters, callback: ServiceCallback): void; + update(resourceGroupName: string, automationAccountName: string, scheduleName: string, parameters: models.ScheduleUpdateParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Retrieve the schedule identified by schedule name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} scheduleName The schedule name. @@ -7634,11 +8179,13 @@ export interface ScheduleOperations { * * @reject {Error|ServiceError} - The error object. */ - getWithHttpOperationResponse(automationAccountName: string, scheduleName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, scheduleName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieve the schedule identified by schedule name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} scheduleName The schedule name. @@ -7670,14 +8217,16 @@ export interface ScheduleOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - get(automationAccountName: string, scheduleName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - get(automationAccountName: string, scheduleName: string, callback: ServiceCallback): void; - get(automationAccountName: string, scheduleName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + get(resourceGroupName: string, automationAccountName: string, scheduleName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + get(resourceGroupName: string, automationAccountName: string, scheduleName: string, callback: ServiceCallback): void; + get(resourceGroupName: string, automationAccountName: string, scheduleName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Delete the schedule identified by schedule name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} scheduleName The schedule name. @@ -7693,11 +8242,13 @@ export interface ScheduleOperations { * * @reject {Error|ServiceError} - The error object. */ - deleteMethodWithHttpOperationResponse(automationAccountName: string, scheduleName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + deleteMethodWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, scheduleName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Delete the schedule identified by schedule name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} scheduleName The schedule name. @@ -7728,14 +8279,16 @@ export interface ScheduleOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(automationAccountName: string, scheduleName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - deleteMethod(automationAccountName: string, scheduleName: string, callback: ServiceCallback): void; - deleteMethod(automationAccountName: string, scheduleName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, automationAccountName: string, scheduleName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + deleteMethod(resourceGroupName: string, automationAccountName: string, scheduleName: string, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, automationAccountName: string, scheduleName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Retrieve a list of schedules. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -7749,11 +8302,13 @@ export interface ScheduleOperations { * * @reject {Error|ServiceError} - The error object. */ - listByAutomationAccountWithHttpOperationResponse(automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listByAutomationAccountWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieve a list of schedules. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -7783,9 +8338,9 @@ export interface ScheduleOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listByAutomationAccount(automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listByAutomationAccount(automationAccountName: string, callback: ServiceCallback): void; - listByAutomationAccount(automationAccountName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listByAutomationAccount(resourceGroupName: string, automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listByAutomationAccount(resourceGroupName: string, automationAccountName: string, callback: ServiceCallback): void; + listByAutomationAccount(resourceGroupName: string, automationAccountName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -7857,6 +8412,8 @@ export interface VariableOperations { /** * Create a variable. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} variableName The variable name. @@ -7885,11 +8442,13 @@ export interface VariableOperations { * * @reject {Error|ServiceError} - The error object. */ - createOrUpdateWithHttpOperationResponse(automationAccountName: string, variableName: string, parameters: models.VariableCreateOrUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + createOrUpdateWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, variableName: string, parameters: models.VariableCreateOrUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Create a variable. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} variableName The variable name. @@ -7934,14 +8493,16 @@ export interface VariableOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - createOrUpdate(automationAccountName: string, variableName: string, parameters: models.VariableCreateOrUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - createOrUpdate(automationAccountName: string, variableName: string, parameters: models.VariableCreateOrUpdateParameters, callback: ServiceCallback): void; - createOrUpdate(automationAccountName: string, variableName: string, parameters: models.VariableCreateOrUpdateParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, automationAccountName: string, variableName: string, parameters: models.VariableCreateOrUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + createOrUpdate(resourceGroupName: string, automationAccountName: string, variableName: string, parameters: models.VariableCreateOrUpdateParameters, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, automationAccountName: string, variableName: string, parameters: models.VariableCreateOrUpdateParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Update a variable. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} variableName The variable name. @@ -7967,11 +8528,13 @@ export interface VariableOperations { * * @reject {Error|ServiceError} - The error object. */ - updateWithHttpOperationResponse(automationAccountName: string, variableName: string, parameters: models.VariableUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + updateWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, variableName: string, parameters: models.VariableUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Update a variable. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} variableName The variable name. @@ -8013,14 +8576,16 @@ export interface VariableOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - update(automationAccountName: string, variableName: string, parameters: models.VariableUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - update(automationAccountName: string, variableName: string, parameters: models.VariableUpdateParameters, callback: ServiceCallback): void; - update(automationAccountName: string, variableName: string, parameters: models.VariableUpdateParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + update(resourceGroupName: string, automationAccountName: string, variableName: string, parameters: models.VariableUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + update(resourceGroupName: string, automationAccountName: string, variableName: string, parameters: models.VariableUpdateParameters, callback: ServiceCallback): void; + update(resourceGroupName: string, automationAccountName: string, variableName: string, parameters: models.VariableUpdateParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Delete the variable. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} variableName The name of variable. @@ -8036,11 +8601,13 @@ export interface VariableOperations { * * @reject {Error|ServiceError} - The error object. */ - deleteMethodWithHttpOperationResponse(automationAccountName: string, variableName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + deleteMethodWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, variableName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Delete the variable. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} variableName The name of variable. @@ -8071,14 +8638,16 @@ export interface VariableOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(automationAccountName: string, variableName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - deleteMethod(automationAccountName: string, variableName: string, callback: ServiceCallback): void; - deleteMethod(automationAccountName: string, variableName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, automationAccountName: string, variableName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + deleteMethod(resourceGroupName: string, automationAccountName: string, variableName: string, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, automationAccountName: string, variableName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Retrieve the variable identified by variable name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} variableName The name of variable. @@ -8094,11 +8663,13 @@ export interface VariableOperations { * * @reject {Error|ServiceError} - The error object. */ - getWithHttpOperationResponse(automationAccountName: string, variableName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, variableName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieve the variable identified by variable name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} variableName The name of variable. @@ -8130,14 +8701,16 @@ export interface VariableOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - get(automationAccountName: string, variableName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - get(automationAccountName: string, variableName: string, callback: ServiceCallback): void; - get(automationAccountName: string, variableName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + get(resourceGroupName: string, automationAccountName: string, variableName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + get(resourceGroupName: string, automationAccountName: string, variableName: string, callback: ServiceCallback): void; + get(resourceGroupName: string, automationAccountName: string, variableName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Retrieve a list of variables. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -8151,11 +8724,13 @@ export interface VariableOperations { * * @reject {Error|ServiceError} - The error object. */ - listByAutomationAccountWithHttpOperationResponse(automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listByAutomationAccountWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieve a list of variables. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -8185,9 +8760,9 @@ export interface VariableOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listByAutomationAccount(automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listByAutomationAccount(automationAccountName: string, callback: ServiceCallback): void; - listByAutomationAccount(automationAccountName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listByAutomationAccount(resourceGroupName: string, automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listByAutomationAccount(resourceGroupName: string, automationAccountName: string, callback: ServiceCallback): void; + listByAutomationAccount(resourceGroupName: string, automationAccountName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -8259,6 +8834,8 @@ export interface WebhookOperations { /** * Generates a Uri for use in creating a webhook. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -8272,11 +8849,13 @@ export interface WebhookOperations { * * @reject {Error|ServiceError} - The error object. */ - generateUriWithHttpOperationResponse(automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + generateUriWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Generates a Uri for use in creating a webhook. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -8305,14 +8884,16 @@ export interface WebhookOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - generateUri(automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - generateUri(automationAccountName: string, callback: ServiceCallback): void; - generateUri(automationAccountName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + generateUri(resourceGroupName: string, automationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + generateUri(resourceGroupName: string, automationAccountName: string, callback: ServiceCallback): void; + generateUri(resourceGroupName: string, automationAccountName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Delete the webhook by name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} webhookName The webhook name. @@ -8328,11 +8909,13 @@ export interface WebhookOperations { * * @reject {Error|ServiceError} - The error object. */ - deleteMethodWithHttpOperationResponse(automationAccountName: string, webhookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + deleteMethodWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, webhookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Delete the webhook by name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} webhookName The webhook name. @@ -8363,14 +8946,16 @@ export interface WebhookOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(automationAccountName: string, webhookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - deleteMethod(automationAccountName: string, webhookName: string, callback: ServiceCallback): void; - deleteMethod(automationAccountName: string, webhookName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, automationAccountName: string, webhookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + deleteMethod(resourceGroupName: string, automationAccountName: string, webhookName: string, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, automationAccountName: string, webhookName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Retrieve the webhook identified by webhook name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} webhookName The webhook name. @@ -8386,11 +8971,13 @@ export interface WebhookOperations { * * @reject {Error|ServiceError} - The error object. */ - getWithHttpOperationResponse(automationAccountName: string, webhookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, webhookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieve the webhook identified by webhook name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} webhookName The webhook name. @@ -8422,14 +9009,16 @@ export interface WebhookOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - get(automationAccountName: string, webhookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - get(automationAccountName: string, webhookName: string, callback: ServiceCallback): void; - get(automationAccountName: string, webhookName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + get(resourceGroupName: string, automationAccountName: string, webhookName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + get(resourceGroupName: string, automationAccountName: string, webhookName: string, callback: ServiceCallback): void; + get(resourceGroupName: string, automationAccountName: string, webhookName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Create the webhook identified by webhook name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} webhookName The webhook name. @@ -8467,11 +9056,13 @@ export interface WebhookOperations { * * @reject {Error|ServiceError} - The error object. */ - createOrUpdateWithHttpOperationResponse(automationAccountName: string, webhookName: string, parameters: models.WebhookCreateOrUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + createOrUpdateWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, webhookName: string, parameters: models.WebhookCreateOrUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Create the webhook identified by webhook name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} webhookName The webhook name. @@ -8525,14 +9116,16 @@ export interface WebhookOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - createOrUpdate(automationAccountName: string, webhookName: string, parameters: models.WebhookCreateOrUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - createOrUpdate(automationAccountName: string, webhookName: string, parameters: models.WebhookCreateOrUpdateParameters, callback: ServiceCallback): void; - createOrUpdate(automationAccountName: string, webhookName: string, parameters: models.WebhookCreateOrUpdateParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, automationAccountName: string, webhookName: string, parameters: models.WebhookCreateOrUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + createOrUpdate(resourceGroupName: string, automationAccountName: string, webhookName: string, parameters: models.WebhookCreateOrUpdateParameters, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, automationAccountName: string, webhookName: string, parameters: models.WebhookCreateOrUpdateParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Update the webhook identified by webhook name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} webhookName The webhook name. @@ -8564,11 +9157,13 @@ export interface WebhookOperations { * * @reject {Error|ServiceError} - The error object. */ - updateWithHttpOperationResponse(automationAccountName: string, webhookName: string, parameters: models.WebhookUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + updateWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, webhookName: string, parameters: models.WebhookUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Update the webhook identified by webhook name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} webhookName The webhook name. @@ -8616,14 +9211,16 @@ export interface WebhookOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - update(automationAccountName: string, webhookName: string, parameters: models.WebhookUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - update(automationAccountName: string, webhookName: string, parameters: models.WebhookUpdateParameters, callback: ServiceCallback): void; - update(automationAccountName: string, webhookName: string, parameters: models.WebhookUpdateParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + update(resourceGroupName: string, automationAccountName: string, webhookName: string, parameters: models.WebhookUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + update(resourceGroupName: string, automationAccountName: string, webhookName: string, parameters: models.WebhookUpdateParameters, callback: ServiceCallback): void; + update(resourceGroupName: string, automationAccountName: string, webhookName: string, parameters: models.WebhookUpdateParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Retrieve a list of webhooks. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -8639,11 +9236,13 @@ export interface WebhookOperations { * * @reject {Error|ServiceError} - The error object. */ - listByAutomationAccountWithHttpOperationResponse(automationAccountName: string, options?: { filter? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; + listByAutomationAccountWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, options?: { filter? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieve a list of webhooks. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -8675,9 +9274,9 @@ export interface WebhookOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listByAutomationAccount(automationAccountName: string, options?: { filter? : string, customHeaders? : { [headerName: string]: string; } }): Promise; - listByAutomationAccount(automationAccountName: string, callback: ServiceCallback): void; - listByAutomationAccount(automationAccountName: string, options: { filter? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listByAutomationAccount(resourceGroupName: string, automationAccountName: string, options?: { filter? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + listByAutomationAccount(resourceGroupName: string, automationAccountName: string, callback: ServiceCallback): void; + listByAutomationAccount(resourceGroupName: string, automationAccountName: string, options: { filter? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -8749,6 +9348,10 @@ export interface SoftwareUpdateConfigurations { /** * Create a new software update configuration with the name given in the URI. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {string} softwareUpdateConfigurationName The name of the software * update configuration to be created. * @@ -8858,6 +9461,9 @@ export interface SoftwareUpdateConfigurations { * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -8867,11 +9473,15 @@ export interface SoftwareUpdateConfigurations { * * @reject {Error|ServiceError} - The error object. */ - createWithHttpOperationResponse(softwareUpdateConfigurationName: string, parameters: models.SoftwareUpdateConfiguration, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + createWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, softwareUpdateConfigurationName: string, parameters: models.SoftwareUpdateConfiguration, options?: { clientRequestId? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Create a new software update configuration with the name given in the URI. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {string} softwareUpdateConfigurationName The name of the software * update configuration to be created. * @@ -8981,6 +9591,9 @@ export interface SoftwareUpdateConfigurations { * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -9007,19 +9620,26 @@ export interface SoftwareUpdateConfigurations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - create(softwareUpdateConfigurationName: string, parameters: models.SoftwareUpdateConfiguration, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - create(softwareUpdateConfigurationName: string, parameters: models.SoftwareUpdateConfiguration, callback: ServiceCallback): void; - create(softwareUpdateConfigurationName: string, parameters: models.SoftwareUpdateConfiguration, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + create(resourceGroupName: string, automationAccountName: string, softwareUpdateConfigurationName: string, parameters: models.SoftwareUpdateConfiguration, options?: { clientRequestId? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + create(resourceGroupName: string, automationAccountName: string, softwareUpdateConfigurationName: string, parameters: models.SoftwareUpdateConfiguration, callback: ServiceCallback): void; + create(resourceGroupName: string, automationAccountName: string, softwareUpdateConfigurationName: string, parameters: models.SoftwareUpdateConfiguration, options: { clientRequestId? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Get a single software update configuration by name. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {string} softwareUpdateConfigurationName The name of the software * update configuration to be created. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -9029,16 +9649,23 @@ export interface SoftwareUpdateConfigurations { * * @reject {Error|ServiceError} - The error object. */ - getByNameWithHttpOperationResponse(softwareUpdateConfigurationName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getByNameWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, softwareUpdateConfigurationName: string, options?: { clientRequestId? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Get a single software update configuration by name. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {string} softwareUpdateConfigurationName The name of the software * update configuration to be created. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -9065,19 +9692,26 @@ export interface SoftwareUpdateConfigurations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - getByName(softwareUpdateConfigurationName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - getByName(softwareUpdateConfigurationName: string, callback: ServiceCallback): void; - getByName(softwareUpdateConfigurationName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + getByName(resourceGroupName: string, automationAccountName: string, softwareUpdateConfigurationName: string, options?: { clientRequestId? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + getByName(resourceGroupName: string, automationAccountName: string, softwareUpdateConfigurationName: string, callback: ServiceCallback): void; + getByName(resourceGroupName: string, automationAccountName: string, softwareUpdateConfigurationName: string, options: { clientRequestId? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * delete a specific software update configuration. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {string} softwareUpdateConfigurationName The name of the software * update configuration to be created. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -9087,16 +9721,23 @@ export interface SoftwareUpdateConfigurations { * * @reject {Error|ServiceError} - The error object. */ - deleteMethodWithHttpOperationResponse(softwareUpdateConfigurationName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + deleteMethodWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, softwareUpdateConfigurationName: string, options?: { clientRequestId? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; /** * delete a specific software update configuration. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {string} softwareUpdateConfigurationName The name of the software * update configuration to be created. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -9121,16 +9762,23 @@ export interface SoftwareUpdateConfigurations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(softwareUpdateConfigurationName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - deleteMethod(softwareUpdateConfigurationName: string, callback: ServiceCallback): void; - deleteMethod(softwareUpdateConfigurationName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, automationAccountName: string, softwareUpdateConfigurationName: string, options?: { clientRequestId? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + deleteMethod(resourceGroupName: string, automationAccountName: string, softwareUpdateConfigurationName: string, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, automationAccountName: string, softwareUpdateConfigurationName: string, options: { clientRequestId? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Get all software update configurations for the account. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {string} [options.filter] The filter to apply on the operation. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -9142,13 +9790,20 @@ export interface SoftwareUpdateConfigurations { * * @reject {Error|ServiceError} - The error object. */ - listWithHttpOperationResponse(options?: { filter? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; + listWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, options?: { clientRequestId? : string, filter? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Get all software update configurations for the account. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {string} [options.filter] The filter to apply on the operation. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -9177,9 +9832,9 @@ export interface SoftwareUpdateConfigurations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - list(options?: { filter? : string, customHeaders? : { [headerName: string]: string; } }): Promise; - list(callback: ServiceCallback): void; - list(options: { filter? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + list(resourceGroupName: string, automationAccountName: string, options?: { clientRequestId? : string, filter? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + list(resourceGroupName: string, automationAccountName: string, callback: ServiceCallback): void; + list(resourceGroupName: string, automationAccountName: string, options: { clientRequestId? : string, filter? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; } /** @@ -9194,11 +9849,18 @@ export interface SoftwareUpdateConfigurationRuns { /** * Get a single software update configuration Run by Id. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {uuid} softwareUpdateConfigurationRunId The Id of the software update * configuration run. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -9208,16 +9870,23 @@ export interface SoftwareUpdateConfigurationRuns { * * @reject {Error|ServiceError} - The error object. */ - getByIdWithHttpOperationResponse(softwareUpdateConfigurationRunId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getByIdWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, softwareUpdateConfigurationRunId: string, options?: { clientRequestId? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Get a single software update configuration Run by Id. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {uuid} softwareUpdateConfigurationRunId The Id of the software update * configuration run. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -9244,16 +9913,23 @@ export interface SoftwareUpdateConfigurationRuns { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - getById(softwareUpdateConfigurationRunId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - getById(softwareUpdateConfigurationRunId: string, callback: ServiceCallback): void; - getById(softwareUpdateConfigurationRunId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + getById(resourceGroupName: string, automationAccountName: string, softwareUpdateConfigurationRunId: string, options?: { clientRequestId? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + getById(resourceGroupName: string, automationAccountName: string, softwareUpdateConfigurationRunId: string, callback: ServiceCallback): void; + getById(resourceGroupName: string, automationAccountName: string, softwareUpdateConfigurationRunId: string, options: { clientRequestId? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Return list of software update configuration runs * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {string} [options.filter] The filter to apply on the operation. You * can use the following filters: 'properties/osType', 'properties/status', * 'properties/startTime', and 'properties/softwareUpdateConfiguration/name' @@ -9273,13 +9949,20 @@ export interface SoftwareUpdateConfigurationRuns { * * @reject {Error|ServiceError} - The error object. */ - listWithHttpOperationResponse(options?: { filter? : string, skip? : string, top? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; + listWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, options?: { clientRequestId? : string, filter? : string, skip? : string, top? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Return list of software update configuration runs * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {string} [options.filter] The filter to apply on the operation. You * can use the following filters: 'properties/osType', 'properties/status', * 'properties/startTime', and 'properties/softwareUpdateConfiguration/name' @@ -9316,9 +9999,9 @@ export interface SoftwareUpdateConfigurationRuns { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - list(options?: { filter? : string, skip? : string, top? : string, customHeaders? : { [headerName: string]: string; } }): Promise; - list(callback: ServiceCallback): void; - list(options: { filter? : string, skip? : string, top? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + list(resourceGroupName: string, automationAccountName: string, options?: { clientRequestId? : string, filter? : string, skip? : string, top? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + list(resourceGroupName: string, automationAccountName: string, callback: ServiceCallback): void; + list(resourceGroupName: string, automationAccountName: string, options: { clientRequestId? : string, filter? : string, skip? : string, top? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; } /** @@ -9333,11 +10016,18 @@ export interface SoftwareUpdateConfigurationMachineRuns { /** * Get a single software update configuration machine run by Id. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {uuid} softwareUpdateConfigurationMachineRunId The Id of the software * update configuration machine run. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -9347,16 +10037,23 @@ export interface SoftwareUpdateConfigurationMachineRuns { * * @reject {Error|ServiceError} - The error object. */ - getByIdWithHttpOperationResponse(softwareUpdateConfigurationMachineRunId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getByIdWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, softwareUpdateConfigurationMachineRunId: string, options?: { clientRequestId? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Get a single software update configuration machine run by Id. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {uuid} softwareUpdateConfigurationMachineRunId The Id of the software * update configuration machine run. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -9383,16 +10080,23 @@ export interface SoftwareUpdateConfigurationMachineRuns { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - getById(softwareUpdateConfigurationMachineRunId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - getById(softwareUpdateConfigurationMachineRunId: string, callback: ServiceCallback): void; - getById(softwareUpdateConfigurationMachineRunId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + getById(resourceGroupName: string, automationAccountName: string, softwareUpdateConfigurationMachineRunId: string, options?: { clientRequestId? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + getById(resourceGroupName: string, automationAccountName: string, softwareUpdateConfigurationMachineRunId: string, callback: ServiceCallback): void; + getById(resourceGroupName: string, automationAccountName: string, softwareUpdateConfigurationMachineRunId: string, options: { clientRequestId? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Return list of software update configuration machine runs * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {string} [options.filter] The filter to apply on the operation. You * can use the following filters: 'properties/osType', 'properties/status', * 'properties/startTime', and 'properties/softwareUpdateConfiguration/name' @@ -9412,13 +10116,20 @@ export interface SoftwareUpdateConfigurationMachineRuns { * * @reject {Error|ServiceError} - The error object. */ - listWithHttpOperationResponse(options?: { filter? : string, skip? : string, top? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; + listWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, options?: { clientRequestId? : string, filter? : string, skip? : string, top? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Return list of software update configuration machine runs * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {string} [options.filter] The filter to apply on the operation. You * can use the following filters: 'properties/osType', 'properties/status', * 'properties/startTime', and 'properties/softwareUpdateConfiguration/name' @@ -9456,9 +10167,9 @@ export interface SoftwareUpdateConfigurationMachineRuns { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - list(options?: { filter? : string, skip? : string, top? : string, customHeaders? : { [headerName: string]: string; } }): Promise; - list(callback: ServiceCallback): void; - list(options: { filter? : string, skip? : string, top? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + list(resourceGroupName: string, automationAccountName: string, options?: { clientRequestId? : string, filter? : string, skip? : string, top? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + list(resourceGroupName: string, automationAccountName: string, callback: ServiceCallback): void; + list(resourceGroupName: string, automationAccountName: string, options: { clientRequestId? : string, filter? : string, skip? : string, top? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; } /** @@ -9473,6 +10184,8 @@ export interface SourceControlOperations { /** * Create a source control. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} sourceControlName The source control name. @@ -9516,11 +10229,13 @@ export interface SourceControlOperations { * * @reject {Error|ServiceError} - The error object. */ - createOrUpdateWithHttpOperationResponse(automationAccountName: string, sourceControlName: string, parameters: models.SourceControlCreateOrUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + createOrUpdateWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, sourceControlName: string, parameters: models.SourceControlCreateOrUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Create a source control. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} sourceControlName The source control name. @@ -9580,14 +10295,16 @@ export interface SourceControlOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - createOrUpdate(automationAccountName: string, sourceControlName: string, parameters: models.SourceControlCreateOrUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - createOrUpdate(automationAccountName: string, sourceControlName: string, parameters: models.SourceControlCreateOrUpdateParameters, callback: ServiceCallback): void; - createOrUpdate(automationAccountName: string, sourceControlName: string, parameters: models.SourceControlCreateOrUpdateParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, automationAccountName: string, sourceControlName: string, parameters: models.SourceControlCreateOrUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + createOrUpdate(resourceGroupName: string, automationAccountName: string, sourceControlName: string, parameters: models.SourceControlCreateOrUpdateParameters, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, automationAccountName: string, sourceControlName: string, parameters: models.SourceControlCreateOrUpdateParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Update a source control. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} sourceControlName The source control name. @@ -9624,11 +10341,13 @@ export interface SourceControlOperations { * * @reject {Error|ServiceError} - The error object. */ - updateWithHttpOperationResponse(automationAccountName: string, sourceControlName: string, parameters: models.SourceControlUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + updateWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, sourceControlName: string, parameters: models.SourceControlUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Update a source control. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} sourceControlName The source control name. @@ -9681,14 +10400,16 @@ export interface SourceControlOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - update(automationAccountName: string, sourceControlName: string, parameters: models.SourceControlUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - update(automationAccountName: string, sourceControlName: string, parameters: models.SourceControlUpdateParameters, callback: ServiceCallback): void; - update(automationAccountName: string, sourceControlName: string, parameters: models.SourceControlUpdateParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + update(resourceGroupName: string, automationAccountName: string, sourceControlName: string, parameters: models.SourceControlUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + update(resourceGroupName: string, automationAccountName: string, sourceControlName: string, parameters: models.SourceControlUpdateParameters, callback: ServiceCallback): void; + update(resourceGroupName: string, automationAccountName: string, sourceControlName: string, parameters: models.SourceControlUpdateParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Delete the source control. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} sourceControlName The name of source control. @@ -9704,11 +10425,13 @@ export interface SourceControlOperations { * * @reject {Error|ServiceError} - The error object. */ - deleteMethodWithHttpOperationResponse(automationAccountName: string, sourceControlName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + deleteMethodWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, sourceControlName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Delete the source control. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} sourceControlName The name of source control. @@ -9739,14 +10462,16 @@ export interface SourceControlOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(automationAccountName: string, sourceControlName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - deleteMethod(automationAccountName: string, sourceControlName: string, callback: ServiceCallback): void; - deleteMethod(automationAccountName: string, sourceControlName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, automationAccountName: string, sourceControlName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + deleteMethod(resourceGroupName: string, automationAccountName: string, sourceControlName: string, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, automationAccountName: string, sourceControlName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Retrieve the source control identified by source control name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} sourceControlName The name of source control. @@ -9762,11 +10487,13 @@ export interface SourceControlOperations { * * @reject {Error|ServiceError} - The error object. */ - getWithHttpOperationResponse(automationAccountName: string, sourceControlName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, sourceControlName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieve the source control identified by source control name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} sourceControlName The name of source control. @@ -9798,14 +10525,16 @@ export interface SourceControlOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - get(automationAccountName: string, sourceControlName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - get(automationAccountName: string, sourceControlName: string, callback: ServiceCallback): void; - get(automationAccountName: string, sourceControlName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + get(resourceGroupName: string, automationAccountName: string, sourceControlName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + get(resourceGroupName: string, automationAccountName: string, sourceControlName: string, callback: ServiceCallback): void; + get(resourceGroupName: string, automationAccountName: string, sourceControlName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Retrieve a list of source controls. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -9821,11 +10550,13 @@ export interface SourceControlOperations { * * @reject {Error|ServiceError} - The error object. */ - listByAutomationAccountWithHttpOperationResponse(automationAccountName: string, options?: { filter? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; + listByAutomationAccountWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, options?: { filter? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieve a list of source controls. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -9858,9 +10589,9 @@ export interface SourceControlOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listByAutomationAccount(automationAccountName: string, options?: { filter? : string, customHeaders? : { [headerName: string]: string; } }): Promise; - listByAutomationAccount(automationAccountName: string, callback: ServiceCallback): void; - listByAutomationAccount(automationAccountName: string, options: { filter? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listByAutomationAccount(resourceGroupName: string, automationAccountName: string, options?: { filter? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + listByAutomationAccount(resourceGroupName: string, automationAccountName: string, callback: ServiceCallback): void; + listByAutomationAccount(resourceGroupName: string, automationAccountName: string, options: { filter? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -9933,6 +10664,8 @@ export interface SourceControlSyncJobOperations { /** * Creates the sync job for a source control. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} sourceControlName The source control name. @@ -9950,11 +10683,13 @@ export interface SourceControlSyncJobOperations { * * @reject {Error|ServiceError} - The error object. */ - createWithHttpOperationResponse(automationAccountName: string, sourceControlName: string, sourceControlSyncJobId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + createWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, sourceControlName: string, sourceControlSyncJobId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Creates the sync job for a source control. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} sourceControlName The source control name. @@ -9988,14 +10723,16 @@ export interface SourceControlSyncJobOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - create(automationAccountName: string, sourceControlName: string, sourceControlSyncJobId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - create(automationAccountName: string, sourceControlName: string, sourceControlSyncJobId: string, callback: ServiceCallback): void; - create(automationAccountName: string, sourceControlName: string, sourceControlSyncJobId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + create(resourceGroupName: string, automationAccountName: string, sourceControlName: string, sourceControlSyncJobId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + create(resourceGroupName: string, automationAccountName: string, sourceControlName: string, sourceControlSyncJobId: string, callback: ServiceCallback): void; + create(resourceGroupName: string, automationAccountName: string, sourceControlName: string, sourceControlSyncJobId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Retrieve the source control sync job identified by job id. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} sourceControlName The source control name. @@ -10013,11 +10750,13 @@ export interface SourceControlSyncJobOperations { * * @reject {Error|ServiceError} - The error object. */ - getWithHttpOperationResponse(automationAccountName: string, sourceControlName: string, sourceControlSyncJobId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, sourceControlName: string, sourceControlSyncJobId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieve the source control sync job identified by job id. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} sourceControlName The source control name. @@ -10052,14 +10791,16 @@ export interface SourceControlSyncJobOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - get(automationAccountName: string, sourceControlName: string, sourceControlSyncJobId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - get(automationAccountName: string, sourceControlName: string, sourceControlSyncJobId: string, callback: ServiceCallback): void; - get(automationAccountName: string, sourceControlName: string, sourceControlSyncJobId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + get(resourceGroupName: string, automationAccountName: string, sourceControlName: string, sourceControlSyncJobId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + get(resourceGroupName: string, automationAccountName: string, sourceControlName: string, sourceControlSyncJobId: string, callback: ServiceCallback): void; + get(resourceGroupName: string, automationAccountName: string, sourceControlName: string, sourceControlSyncJobId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Retrieve a list of source control sync jobs. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} sourceControlName The source control name. @@ -10077,11 +10818,13 @@ export interface SourceControlSyncJobOperations { * * @reject {Error|ServiceError} - The error object. */ - listByAutomationAccountWithHttpOperationResponse(automationAccountName: string, sourceControlName: string, options?: { filter? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; + listByAutomationAccountWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, sourceControlName: string, options?: { filter? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieve a list of source control sync jobs. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} sourceControlName The source control name. @@ -10116,9 +10859,9 @@ export interface SourceControlSyncJobOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listByAutomationAccount(automationAccountName: string, sourceControlName: string, options?: { filter? : string, customHeaders? : { [headerName: string]: string; } }): Promise; - listByAutomationAccount(automationAccountName: string, sourceControlName: string, callback: ServiceCallback): void; - listByAutomationAccount(automationAccountName: string, sourceControlName: string, options: { filter? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listByAutomationAccount(resourceGroupName: string, automationAccountName: string, sourceControlName: string, options?: { filter? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + listByAutomationAccount(resourceGroupName: string, automationAccountName: string, sourceControlName: string, callback: ServiceCallback): void; + listByAutomationAccount(resourceGroupName: string, automationAccountName: string, sourceControlName: string, options: { filter? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -10191,10 +10934,17 @@ export interface JobOperations { /** * Retrieve the job output identified by job name. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {string} jobName The name of the job to be created. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -10204,15 +10954,22 @@ export interface JobOperations { * * @reject {Error|ServiceError} - The error object. */ - getOutputWithHttpOperationResponse(jobName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getOutputWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, jobName: string, options?: { clientRequestId? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieve the job output identified by job name. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {string} jobName The name of the job to be created. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -10237,18 +10994,25 @@ export interface JobOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - getOutput(jobName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - getOutput(jobName: string, callback: ServiceCallback): void; - getOutput(jobName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + getOutput(resourceGroupName: string, automationAccountName: string, jobName: string, options?: { clientRequestId? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + getOutput(resourceGroupName: string, automationAccountName: string, jobName: string, callback: ServiceCallback): void; + getOutput(resourceGroupName: string, automationAccountName: string, jobName: string, options: { clientRequestId? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Retrieve the runbook content of the job identified by job name. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {string} jobName The job name. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -10258,15 +11022,22 @@ export interface JobOperations { * * @reject {Error|ServiceError} - The error object. */ - getRunbookContentWithHttpOperationResponse(jobName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getRunbookContentWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, jobName: string, options?: { clientRequestId? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieve the runbook content of the job identified by job name. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {string} jobName The job name. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -10291,18 +11062,25 @@ export interface JobOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - getRunbookContent(jobName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - getRunbookContent(jobName: string, callback: ServiceCallback): void; - getRunbookContent(jobName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + getRunbookContent(resourceGroupName: string, automationAccountName: string, jobName: string, options?: { clientRequestId? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + getRunbookContent(resourceGroupName: string, automationAccountName: string, jobName: string, callback: ServiceCallback): void; + getRunbookContent(resourceGroupName: string, automationAccountName: string, jobName: string, options: { clientRequestId? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Suspend the job identified by job name. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {string} jobName The job name. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -10312,15 +11090,22 @@ export interface JobOperations { * * @reject {Error|ServiceError} - The error object. */ - suspendWithHttpOperationResponse(jobName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + suspendWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, jobName: string, options?: { clientRequestId? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Suspend the job identified by job name. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {string} jobName The job name. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -10345,18 +11130,25 @@ export interface JobOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - suspend(jobName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - suspend(jobName: string, callback: ServiceCallback): void; - suspend(jobName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + suspend(resourceGroupName: string, automationAccountName: string, jobName: string, options?: { clientRequestId? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + suspend(resourceGroupName: string, automationAccountName: string, jobName: string, callback: ServiceCallback): void; + suspend(resourceGroupName: string, automationAccountName: string, jobName: string, options: { clientRequestId? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Stop the job identified by jobName. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {string} jobName The job name. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -10366,15 +11158,22 @@ export interface JobOperations { * * @reject {Error|ServiceError} - The error object. */ - stopWithHttpOperationResponse(jobName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + stopWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, jobName: string, options?: { clientRequestId? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Stop the job identified by jobName. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {string} jobName The job name. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -10399,18 +11198,25 @@ export interface JobOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - stop(jobName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - stop(jobName: string, callback: ServiceCallback): void; - stop(jobName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + stop(resourceGroupName: string, automationAccountName: string, jobName: string, options?: { clientRequestId? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + stop(resourceGroupName: string, automationAccountName: string, jobName: string, callback: ServiceCallback): void; + stop(resourceGroupName: string, automationAccountName: string, jobName: string, options: { clientRequestId? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Retrieve the job identified by job name. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {string} jobName The job name. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -10420,15 +11226,22 @@ export interface JobOperations { * * @reject {Error|ServiceError} - The error object. */ - getWithHttpOperationResponse(jobName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, jobName: string, options?: { clientRequestId? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieve the job identified by job name. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {string} jobName The job name. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -10454,14 +11267,18 @@ export interface JobOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - get(jobName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - get(jobName: string, callback: ServiceCallback): void; - get(jobName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + get(resourceGroupName: string, automationAccountName: string, jobName: string, options?: { clientRequestId? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + get(resourceGroupName: string, automationAccountName: string, jobName: string, callback: ServiceCallback): void; + get(resourceGroupName: string, automationAccountName: string, jobName: string, options: { clientRequestId? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Create a job of the runbook. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {string} jobName The job name. * * @param {object} parameters The parameters supplied to the create job @@ -10480,6 +11297,9 @@ export interface JobOperations { * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -10489,11 +11309,15 @@ export interface JobOperations { * * @reject {Error|ServiceError} - The error object. */ - createWithHttpOperationResponse(jobName: string, parameters: models.JobCreateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + createWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, jobName: string, parameters: models.JobCreateParameters, options?: { clientRequestId? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Create a job of the runbook. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {string} jobName The job name. * * @param {object} parameters The parameters supplied to the create job @@ -10512,6 +11336,9 @@ export interface JobOperations { * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -10537,18 +11364,25 @@ export interface JobOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - create(jobName: string, parameters: models.JobCreateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - create(jobName: string, parameters: models.JobCreateParameters, callback: ServiceCallback): void; - create(jobName: string, parameters: models.JobCreateParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + create(resourceGroupName: string, automationAccountName: string, jobName: string, parameters: models.JobCreateParameters, options?: { clientRequestId? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + create(resourceGroupName: string, automationAccountName: string, jobName: string, parameters: models.JobCreateParameters, callback: ServiceCallback): void; + create(resourceGroupName: string, automationAccountName: string, jobName: string, parameters: models.JobCreateParameters, options: { clientRequestId? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Retrieve a list of jobs. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {object} [options] Optional Parameters. * * @param {string} [options.filter] The filter to apply on the operation. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -10558,15 +11392,22 @@ export interface JobOperations { * * @reject {Error|ServiceError} - The error object. */ - listByAutomationAccountWithHttpOperationResponse(options?: { filter? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; + listByAutomationAccountWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, options?: { filter? : string, clientRequestId? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieve a list of jobs. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {object} [options] Optional Parameters. * * @param {string} [options.filter] The filter to apply on the operation. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -10592,18 +11433,25 @@ export interface JobOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listByAutomationAccount(options?: { filter? : string, customHeaders? : { [headerName: string]: string; } }): Promise; - listByAutomationAccount(callback: ServiceCallback): void; - listByAutomationAccount(options: { filter? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listByAutomationAccount(resourceGroupName: string, automationAccountName: string, options?: { filter? : string, clientRequestId? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + listByAutomationAccount(resourceGroupName: string, automationAccountName: string, callback: ServiceCallback): void; + listByAutomationAccount(resourceGroupName: string, automationAccountName: string, options: { filter? : string, clientRequestId? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Resume the job identified by jobName. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {string} jobName The job name. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -10613,15 +11461,22 @@ export interface JobOperations { * * @reject {Error|ServiceError} - The error object. */ - resumeWithHttpOperationResponse(jobName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + resumeWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, jobName: string, options?: { clientRequestId? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Resume the job identified by jobName. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {string} jobName The job name. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -10646,9 +11501,9 @@ export interface JobOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - resume(jobName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - resume(jobName: string, callback: ServiceCallback): void; - resume(jobName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + resume(resourceGroupName: string, automationAccountName: string, jobName: string, options?: { clientRequestId? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + resume(resourceGroupName: string, automationAccountName: string, jobName: string, callback: ServiceCallback): void; + resume(resourceGroupName: string, automationAccountName: string, jobName: string, options: { clientRequestId? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -10659,6 +11514,9 @@ export interface JobOperations { * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -10668,7 +11526,7 @@ export interface JobOperations { * * @reject {Error|ServiceError} - The error object. */ - listByAutomationAccountNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listByAutomationAccountNextWithHttpOperationResponse(nextPageLink: string, options?: { clientRequestId? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieve a list of jobs. @@ -10678,6 +11536,9 @@ export interface JobOperations { * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -10703,9 +11564,9 @@ export interface JobOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listByAutomationAccountNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listByAutomationAccountNext(nextPageLink: string, options?: { clientRequestId? : string, customHeaders? : { [headerName: string]: string; } }): Promise; listByAutomationAccountNext(nextPageLink: string, callback: ServiceCallback): void; - listByAutomationAccountNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listByAutomationAccountNext(nextPageLink: string, options: { clientRequestId? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; } /** @@ -10720,12 +11581,19 @@ export interface JobStreamOperations { /** * Retrieve the job stream identified by job stream id. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {string} jobName The job name. * * @param {string} jobStreamId The job stream id. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -10735,17 +11603,24 @@ export interface JobStreamOperations { * * @reject {Error|ServiceError} - The error object. */ - getWithHttpOperationResponse(jobName: string, jobStreamId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, jobName: string, jobStreamId: string, options?: { clientRequestId? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieve the job stream identified by job stream id. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {string} jobName The job name. * * @param {string} jobStreamId The job stream id. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -10771,20 +11646,27 @@ export interface JobStreamOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - get(jobName: string, jobStreamId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - get(jobName: string, jobStreamId: string, callback: ServiceCallback): void; - get(jobName: string, jobStreamId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + get(resourceGroupName: string, automationAccountName: string, jobName: string, jobStreamId: string, options?: { clientRequestId? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + get(resourceGroupName: string, automationAccountName: string, jobName: string, jobStreamId: string, callback: ServiceCallback): void; + get(resourceGroupName: string, automationAccountName: string, jobName: string, jobStreamId: string, options: { clientRequestId? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Retrieve a list of jobs streams identified by job name. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {string} jobName The job name. * * @param {object} [options] Optional Parameters. * * @param {string} [options.filter] The filter to apply on the operation. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -10794,17 +11676,24 @@ export interface JobStreamOperations { * * @reject {Error|ServiceError} - The error object. */ - listByJobWithHttpOperationResponse(jobName: string, options?: { filter? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; + listByJobWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, jobName: string, options?: { filter? : string, clientRequestId? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieve a list of jobs streams identified by job name. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {string} jobName The job name. * * @param {object} [options] Optional Parameters. * * @param {string} [options.filter] The filter to apply on the operation. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -10830,9 +11719,9 @@ export interface JobStreamOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listByJob(jobName: string, options?: { filter? : string, customHeaders? : { [headerName: string]: string; } }): Promise; - listByJob(jobName: string, callback: ServiceCallback): void; - listByJob(jobName: string, options: { filter? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listByJob(resourceGroupName: string, automationAccountName: string, jobName: string, options?: { filter? : string, clientRequestId? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + listByJob(resourceGroupName: string, automationAccountName: string, jobName: string, callback: ServiceCallback): void; + listByJob(resourceGroupName: string, automationAccountName: string, jobName: string, options: { filter? : string, clientRequestId? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -10843,6 +11732,9 @@ export interface JobStreamOperations { * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -10852,7 +11744,7 @@ export interface JobStreamOperations { * * @reject {Error|ServiceError} - The error object. */ - listByJobNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listByJobNextWithHttpOperationResponse(nextPageLink: string, options?: { clientRequestId? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Retrieve a list of jobs streams identified by job name. @@ -10862,6 +11754,9 @@ export interface JobStreamOperations { * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -10887,7 +11782,7 @@ export interface JobStreamOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listByJobNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listByJobNext(nextPageLink: string, options?: { clientRequestId? : string, customHeaders? : { [headerName: string]: string; } }): Promise; listByJobNext(nextPageLink: string, callback: ServiceCallback): void; - listByJobNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listByJobNext(nextPageLink: string, options: { clientRequestId? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; } diff --git a/lib/services/automationManagement/lib/operations/index.js b/lib/services/automationManagement/lib/operations/index.js index 0d74e3cdb1..67df415494 100644 --- a/lib/services/automationManagement/lib/operations/index.js +++ b/lib/services/automationManagement/lib/operations/index.js @@ -18,6 +18,7 @@ exports.AutomationAccountOperations = require('./automationAccountOperations'); exports.Operations = require('./operations'); exports.StatisticsOperations = require('./statisticsOperations'); exports.Usages = require('./usages'); +exports.Keys = require('./keys'); exports.CertificateOperations = require('./certificateOperations'); exports.ConnectionOperations = require('./connectionOperations'); exports.ConnectionTypeOperations = require('./connectionTypeOperations'); diff --git a/lib/services/automationManagement/lib/operations/jobOperations.js b/lib/services/automationManagement/lib/operations/jobOperations.js index 05c64386ee..fac6162054 100644 --- a/lib/services/automationManagement/lib/operations/jobOperations.js +++ b/lib/services/automationManagement/lib/operations/jobOperations.js @@ -17,10 +17,17 @@ const WebResource = msRest.WebResource; /** * Retrieve the job output identified by job name. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {string} jobName The name of the job to be created. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -36,7 +43,7 @@ const WebResource = msRest.WebResource; * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _getOutput(jobName, options, callback) { +function _getOutput(resourceGroupName, automationAccountName, jobName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -46,29 +53,30 @@ function _getOutput(jobName, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } + let clientRequestId = (options && options.clientRequestId !== undefined) ? options.clientRequestId : undefined; let apiVersion = '2017-05-15-preview'; // Validate try { if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } - if (this.client.automationAccountName === null || this.client.automationAccountName === undefined || typeof this.client.automationAccountName.valueOf() !== 'string') { - throw new Error('this.client.automationAccountName cannot be null or undefined and it must be of type string.'); + if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { + throw new Error('automationAccountName cannot be null or undefined and it must be of type string.'); } if (jobName === null || jobName === undefined || typeof jobName.valueOf() !== 'string') { throw new Error('jobName cannot be null or undefined and it must be of type string.'); } - if (this.client.clientRequestId !== null && this.client.clientRequestId !== undefined && typeof this.client.clientRequestId.valueOf() !== 'string') { - throw new Error('this.client.clientRequestId must be of type string.'); + if (clientRequestId !== null && clientRequestId !== undefined && typeof clientRequestId.valueOf() !== 'string') { + throw new Error('clientRequestId must be of type string.'); } if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { throw new Error('this.client.acceptLanguage must be of type string.'); @@ -81,8 +89,8 @@ function _getOutput(jobName, options, callback) { let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/jobs/{jobName}/output'; requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); - requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(this.client.automationAccountName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{jobName}', encodeURIComponent(jobName)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); @@ -100,8 +108,8 @@ function _getOutput(jobName, options, callback) { if (this.client.generateClientRequestId) { httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); } - if (this.client.clientRequestId !== undefined && this.client.clientRequestId !== null) { - httpRequest.headers['clientRequestId'] = this.client.clientRequestId; + if (clientRequestId !== undefined && clientRequestId !== null) { + httpRequest.headers['clientRequestId'] = clientRequestId; } if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { httpRequest.headers['accept-language'] = this.client.acceptLanguage; @@ -179,10 +187,17 @@ function _getOutput(jobName, options, callback) { /** * Retrieve the runbook content of the job identified by job name. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {string} jobName The job name. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -198,7 +213,7 @@ function _getOutput(jobName, options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _getRunbookContent(jobName, options, callback) { +function _getRunbookContent(resourceGroupName, automationAccountName, jobName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -208,29 +223,30 @@ function _getRunbookContent(jobName, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } + let clientRequestId = (options && options.clientRequestId !== undefined) ? options.clientRequestId : undefined; let apiVersion = '2017-05-15-preview'; // Validate try { if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } - if (this.client.automationAccountName === null || this.client.automationAccountName === undefined || typeof this.client.automationAccountName.valueOf() !== 'string') { - throw new Error('this.client.automationAccountName cannot be null or undefined and it must be of type string.'); + if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { + throw new Error('automationAccountName cannot be null or undefined and it must be of type string.'); } if (jobName === null || jobName === undefined || typeof jobName.valueOf() !== 'string') { throw new Error('jobName cannot be null or undefined and it must be of type string.'); } - if (this.client.clientRequestId !== null && this.client.clientRequestId !== undefined && typeof this.client.clientRequestId.valueOf() !== 'string') { - throw new Error('this.client.clientRequestId must be of type string.'); + if (clientRequestId !== null && clientRequestId !== undefined && typeof clientRequestId.valueOf() !== 'string') { + throw new Error('clientRequestId must be of type string.'); } if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { throw new Error('this.client.acceptLanguage must be of type string.'); @@ -243,8 +259,8 @@ function _getRunbookContent(jobName, options, callback) { let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/jobs/{jobName}/runbookContent'; requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); - requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(this.client.automationAccountName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{jobName}', encodeURIComponent(jobName)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); @@ -262,8 +278,8 @@ function _getRunbookContent(jobName, options, callback) { if (this.client.generateClientRequestId) { httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); } - if (this.client.clientRequestId !== undefined && this.client.clientRequestId !== null) { - httpRequest.headers['clientRequestId'] = this.client.clientRequestId; + if (clientRequestId !== undefined && clientRequestId !== null) { + httpRequest.headers['clientRequestId'] = clientRequestId; } if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { httpRequest.headers['accept-language'] = this.client.acceptLanguage; @@ -341,10 +357,17 @@ function _getRunbookContent(jobName, options, callback) { /** * Suspend the job identified by job name. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {string} jobName The job name. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -360,7 +383,7 @@ function _getRunbookContent(jobName, options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _suspend(jobName, options, callback) { +function _suspend(resourceGroupName, automationAccountName, jobName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -370,29 +393,30 @@ function _suspend(jobName, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } + let clientRequestId = (options && options.clientRequestId !== undefined) ? options.clientRequestId : undefined; let apiVersion = '2017-05-15-preview'; // Validate try { if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } - if (this.client.automationAccountName === null || this.client.automationAccountName === undefined || typeof this.client.automationAccountName.valueOf() !== 'string') { - throw new Error('this.client.automationAccountName cannot be null or undefined and it must be of type string.'); + if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { + throw new Error('automationAccountName cannot be null or undefined and it must be of type string.'); } if (jobName === null || jobName === undefined || typeof jobName.valueOf() !== 'string') { throw new Error('jobName cannot be null or undefined and it must be of type string.'); } - if (this.client.clientRequestId !== null && this.client.clientRequestId !== undefined && typeof this.client.clientRequestId.valueOf() !== 'string') { - throw new Error('this.client.clientRequestId must be of type string.'); + if (clientRequestId !== null && clientRequestId !== undefined && typeof clientRequestId.valueOf() !== 'string') { + throw new Error('clientRequestId must be of type string.'); } if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { throw new Error('this.client.acceptLanguage must be of type string.'); @@ -405,8 +429,8 @@ function _suspend(jobName, options, callback) { let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/jobs/{jobName}/suspend'; requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); - requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(this.client.automationAccountName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{jobName}', encodeURIComponent(jobName)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); @@ -424,8 +448,8 @@ function _suspend(jobName, options, callback) { if (this.client.generateClientRequestId) { httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); } - if (this.client.clientRequestId !== undefined && this.client.clientRequestId !== null) { - httpRequest.headers['clientRequestId'] = this.client.clientRequestId; + if (clientRequestId !== undefined && clientRequestId !== null) { + httpRequest.headers['clientRequestId'] = clientRequestId; } if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { httpRequest.headers['accept-language'] = this.client.acceptLanguage; @@ -481,10 +505,17 @@ function _suspend(jobName, options, callback) { /** * Stop the job identified by jobName. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {string} jobName The job name. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -500,7 +531,7 @@ function _suspend(jobName, options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _stop(jobName, options, callback) { +function _stop(resourceGroupName, automationAccountName, jobName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -510,20 +541,21 @@ function _stop(jobName, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } + let clientRequestId = (options && options.clientRequestId !== undefined) ? options.clientRequestId : undefined; let apiVersion = '2017-05-15-preview'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } - if (this.client.automationAccountName === null || this.client.automationAccountName === undefined || typeof this.client.automationAccountName.valueOf() !== 'string') { - throw new Error('this.client.automationAccountName cannot be null or undefined and it must be of type string.'); + if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { + throw new Error('automationAccountName cannot be null or undefined and it must be of type string.'); } if (jobName === null || jobName === undefined || typeof jobName.valueOf() !== 'string') { throw new Error('jobName cannot be null or undefined and it must be of type string.'); @@ -531,8 +563,8 @@ function _stop(jobName, options, callback) { if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); } - if (this.client.clientRequestId !== null && this.client.clientRequestId !== undefined && typeof this.client.clientRequestId.valueOf() !== 'string') { - throw new Error('this.client.clientRequestId must be of type string.'); + if (clientRequestId !== null && clientRequestId !== undefined && typeof clientRequestId.valueOf() !== 'string') { + throw new Error('clientRequestId must be of type string.'); } if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { throw new Error('this.client.acceptLanguage must be of type string.'); @@ -544,8 +576,8 @@ function _stop(jobName, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/jobs/{jobName}/stop'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); - requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(this.client.automationAccountName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{jobName}', encodeURIComponent(jobName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; @@ -564,8 +596,8 @@ function _stop(jobName, options, callback) { if (this.client.generateClientRequestId) { httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); } - if (this.client.clientRequestId !== undefined && this.client.clientRequestId !== null) { - httpRequest.headers['clientRequestId'] = this.client.clientRequestId; + if (clientRequestId !== undefined && clientRequestId !== null) { + httpRequest.headers['clientRequestId'] = clientRequestId; } if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { httpRequest.headers['accept-language'] = this.client.acceptLanguage; @@ -621,10 +653,17 @@ function _stop(jobName, options, callback) { /** * Retrieve the job identified by job name. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {string} jobName The job name. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -641,7 +680,7 @@ function _stop(jobName, options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _get(jobName, options, callback) { +function _get(resourceGroupName, automationAccountName, jobName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -651,29 +690,30 @@ function _get(jobName, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } + let clientRequestId = (options && options.clientRequestId !== undefined) ? options.clientRequestId : undefined; let apiVersion = '2017-05-15-preview'; // Validate try { if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } - if (this.client.automationAccountName === null || this.client.automationAccountName === undefined || typeof this.client.automationAccountName.valueOf() !== 'string') { - throw new Error('this.client.automationAccountName cannot be null or undefined and it must be of type string.'); + if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { + throw new Error('automationAccountName cannot be null or undefined and it must be of type string.'); } if (jobName === null || jobName === undefined || typeof jobName.valueOf() !== 'string') { throw new Error('jobName cannot be null or undefined and it must be of type string.'); } - if (this.client.clientRequestId !== null && this.client.clientRequestId !== undefined && typeof this.client.clientRequestId.valueOf() !== 'string') { - throw new Error('this.client.clientRequestId must be of type string.'); + if (clientRequestId !== null && clientRequestId !== undefined && typeof clientRequestId.valueOf() !== 'string') { + throw new Error('clientRequestId must be of type string.'); } if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { throw new Error('this.client.acceptLanguage must be of type string.'); @@ -686,8 +726,8 @@ function _get(jobName, options, callback) { let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/jobs/{jobName}'; requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); - requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(this.client.automationAccountName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{jobName}', encodeURIComponent(jobName)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); @@ -705,8 +745,8 @@ function _get(jobName, options, callback) { if (this.client.generateClientRequestId) { httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); } - if (this.client.clientRequestId !== undefined && this.client.clientRequestId !== null) { - httpRequest.headers['clientRequestId'] = this.client.clientRequestId; + if (clientRequestId !== undefined && clientRequestId !== null) { + httpRequest.headers['clientRequestId'] = clientRequestId; } if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { httpRequest.headers['accept-language'] = this.client.acceptLanguage; @@ -779,6 +819,10 @@ function _get(jobName, options, callback) { /** * Create a job of the runbook. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {string} jobName The job name. * * @param {object} parameters The parameters supplied to the create job @@ -797,6 +841,9 @@ function _get(jobName, options, callback) { * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -813,7 +860,7 @@ function _get(jobName, options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _create(jobName, parameters, options, callback) { +function _create(resourceGroupName, automationAccountName, jobName, parameters, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -823,23 +870,24 @@ function _create(jobName, parameters, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } + let clientRequestId = (options && options.clientRequestId !== undefined) ? options.clientRequestId : undefined; let apiVersion = '2017-05-15-preview'; // Validate try { if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } - if (this.client.automationAccountName === null || this.client.automationAccountName === undefined || typeof this.client.automationAccountName.valueOf() !== 'string') { - throw new Error('this.client.automationAccountName cannot be null or undefined and it must be of type string.'); + if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { + throw new Error('automationAccountName cannot be null or undefined and it must be of type string.'); } if (jobName === null || jobName === undefined || typeof jobName.valueOf() !== 'string') { throw new Error('jobName cannot be null or undefined and it must be of type string.'); @@ -847,8 +895,8 @@ function _create(jobName, parameters, options, callback) { if (parameters === null || parameters === undefined) { throw new Error('parameters cannot be null or undefined.'); } - if (this.client.clientRequestId !== null && this.client.clientRequestId !== undefined && typeof this.client.clientRequestId.valueOf() !== 'string') { - throw new Error('this.client.clientRequestId must be of type string.'); + if (clientRequestId !== null && clientRequestId !== undefined && typeof clientRequestId.valueOf() !== 'string') { + throw new Error('clientRequestId must be of type string.'); } if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { throw new Error('this.client.acceptLanguage must be of type string.'); @@ -861,8 +909,8 @@ function _create(jobName, parameters, options, callback) { let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/jobs/{jobName}'; requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); - requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(this.client.automationAccountName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{jobName}', encodeURIComponent(jobName)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); @@ -880,8 +928,8 @@ function _create(jobName, parameters, options, callback) { if (this.client.generateClientRequestId) { httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); } - if (this.client.clientRequestId !== undefined && this.client.clientRequestId !== null) { - httpRequest.headers['clientRequestId'] = this.client.clientRequestId; + if (clientRequestId !== undefined && clientRequestId !== null) { + httpRequest.headers['clientRequestId'] = clientRequestId; } if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { httpRequest.headers['accept-language'] = this.client.acceptLanguage; @@ -968,10 +1016,17 @@ function _create(jobName, parameters, options, callback) { /** * Retrieve a list of jobs. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {object} [options] Optional Parameters. * * @param {string} [options.filter] The filter to apply on the operation. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -988,7 +1043,7 @@ function _create(jobName, parameters, options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _listByAutomationAccount(options, callback) { +function _listByAutomationAccount(resourceGroupName, automationAccountName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -999,20 +1054,21 @@ function _listByAutomationAccount(options, callback) { throw new Error('callback cannot be null.'); } let filter = (options && options.filter !== undefined) ? options.filter : undefined; + let clientRequestId = (options && options.clientRequestId !== undefined) ? options.clientRequestId : undefined; let apiVersion = '2017-05-15-preview'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } - if (this.client.automationAccountName === null || this.client.automationAccountName === undefined || typeof this.client.automationAccountName.valueOf() !== 'string') { - throw new Error('this.client.automationAccountName cannot be null or undefined and it must be of type string.'); + if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { + throw new Error('automationAccountName cannot be null or undefined and it must be of type string.'); } if (filter !== null && filter !== undefined && typeof filter.valueOf() !== 'string') { throw new Error('filter must be of type string.'); @@ -1020,8 +1076,8 @@ function _listByAutomationAccount(options, callback) { if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); } - if (this.client.clientRequestId !== null && this.client.clientRequestId !== undefined && typeof this.client.clientRequestId.valueOf() !== 'string') { - throw new Error('this.client.clientRequestId must be of type string.'); + if (clientRequestId !== null && clientRequestId !== undefined && typeof clientRequestId.valueOf() !== 'string') { + throw new Error('clientRequestId must be of type string.'); } if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { throw new Error('this.client.acceptLanguage must be of type string.'); @@ -1033,8 +1089,8 @@ function _listByAutomationAccount(options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/jobs'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); - requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(this.client.automationAccountName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; if (filter !== null && filter !== undefined) { @@ -1055,8 +1111,8 @@ function _listByAutomationAccount(options, callback) { if (this.client.generateClientRequestId) { httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); } - if (this.client.clientRequestId !== undefined && this.client.clientRequestId !== null) { - httpRequest.headers['clientRequestId'] = this.client.clientRequestId; + if (clientRequestId !== undefined && clientRequestId !== null) { + httpRequest.headers['clientRequestId'] = clientRequestId; } if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { httpRequest.headers['accept-language'] = this.client.acceptLanguage; @@ -1129,10 +1185,17 @@ function _listByAutomationAccount(options, callback) { /** * Resume the job identified by jobName. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {string} jobName The job name. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -1148,7 +1211,7 @@ function _listByAutomationAccount(options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _resume(jobName, options, callback) { +function _resume(resourceGroupName, automationAccountName, jobName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -1158,20 +1221,21 @@ function _resume(jobName, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } + let clientRequestId = (options && options.clientRequestId !== undefined) ? options.clientRequestId : undefined; let apiVersion = '2017-05-15-preview'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } - if (this.client.automationAccountName === null || this.client.automationAccountName === undefined || typeof this.client.automationAccountName.valueOf() !== 'string') { - throw new Error('this.client.automationAccountName cannot be null or undefined and it must be of type string.'); + if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { + throw new Error('automationAccountName cannot be null or undefined and it must be of type string.'); } if (jobName === null || jobName === undefined || typeof jobName.valueOf() !== 'string') { throw new Error('jobName cannot be null or undefined and it must be of type string.'); @@ -1179,8 +1243,8 @@ function _resume(jobName, options, callback) { if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); } - if (this.client.clientRequestId !== null && this.client.clientRequestId !== undefined && typeof this.client.clientRequestId.valueOf() !== 'string') { - throw new Error('this.client.clientRequestId must be of type string.'); + if (clientRequestId !== null && clientRequestId !== undefined && typeof clientRequestId.valueOf() !== 'string') { + throw new Error('clientRequestId must be of type string.'); } if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { throw new Error('this.client.acceptLanguage must be of type string.'); @@ -1192,8 +1256,8 @@ function _resume(jobName, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/jobs/{jobName}/resume'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); - requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(this.client.automationAccountName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{jobName}', encodeURIComponent(jobName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; @@ -1212,8 +1276,8 @@ function _resume(jobName, options, callback) { if (this.client.generateClientRequestId) { httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); } - if (this.client.clientRequestId !== undefined && this.client.clientRequestId !== null) { - httpRequest.headers['clientRequestId'] = this.client.clientRequestId; + if (clientRequestId !== undefined && clientRequestId !== null) { + httpRequest.headers['clientRequestId'] = clientRequestId; } if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { httpRequest.headers['accept-language'] = this.client.acceptLanguage; @@ -1274,6 +1338,9 @@ function _resume(jobName, options, callback) { * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -1300,13 +1367,14 @@ function _listByAutomationAccountNext(nextPageLink, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } + let clientRequestId = (options && options.clientRequestId !== undefined) ? options.clientRequestId : undefined; // Validate try { if (nextPageLink === null || nextPageLink === undefined || typeof nextPageLink.valueOf() !== 'string') { throw new Error('nextPageLink cannot be null or undefined and it must be of type string.'); } - if (this.client.clientRequestId !== null && this.client.clientRequestId !== undefined && typeof this.client.clientRequestId.valueOf() !== 'string') { - throw new Error('this.client.clientRequestId must be of type string.'); + if (clientRequestId !== null && clientRequestId !== undefined && typeof clientRequestId.valueOf() !== 'string') { + throw new Error('clientRequestId must be of type string.'); } if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { throw new Error('this.client.acceptLanguage must be of type string.'); @@ -1329,8 +1397,8 @@ function _listByAutomationAccountNext(nextPageLink, options, callback) { if (this.client.generateClientRequestId) { httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); } - if (this.client.clientRequestId !== undefined && this.client.clientRequestId !== null) { - httpRequest.headers['clientRequestId'] = this.client.clientRequestId; + if (clientRequestId !== undefined && clientRequestId !== null) { + httpRequest.headers['clientRequestId'] = clientRequestId; } if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { httpRequest.headers['accept-language'] = this.client.acceptLanguage; @@ -1422,10 +1490,17 @@ class JobOperations { /** * Retrieve the job output identified by job name. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {string} jobName The name of the job to be created. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -1435,11 +1510,11 @@ class JobOperations { * * @reject {Error} - The error object. */ - getOutputWithHttpOperationResponse(jobName, options) { + getOutputWithHttpOperationResponse(resourceGroupName, automationAccountName, jobName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._getOutput(jobName, options, (err, result, request, response) => { + self._getOutput(resourceGroupName, automationAccountName, jobName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1452,10 +1527,17 @@ class JobOperations { /** * Retrieve the job output identified by job name. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {string} jobName The name of the job to be created. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -1480,7 +1562,7 @@ class JobOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getOutput(jobName, options, optionalCallback) { + getOutput(resourceGroupName, automationAccountName, jobName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1489,24 +1571,31 @@ class JobOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getOutput(jobName, options, (err, result, request, response) => { + self._getOutput(resourceGroupName, automationAccountName, jobName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getOutput(jobName, options, optionalCallback); + return self._getOutput(resourceGroupName, automationAccountName, jobName, options, optionalCallback); } } /** * Retrieve the runbook content of the job identified by job name. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {string} jobName The job name. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -1516,11 +1605,11 @@ class JobOperations { * * @reject {Error} - The error object. */ - getRunbookContentWithHttpOperationResponse(jobName, options) { + getRunbookContentWithHttpOperationResponse(resourceGroupName, automationAccountName, jobName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._getRunbookContent(jobName, options, (err, result, request, response) => { + self._getRunbookContent(resourceGroupName, automationAccountName, jobName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1533,10 +1622,17 @@ class JobOperations { /** * Retrieve the runbook content of the job identified by job name. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {string} jobName The job name. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -1561,7 +1657,7 @@ class JobOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getRunbookContent(jobName, options, optionalCallback) { + getRunbookContent(resourceGroupName, automationAccountName, jobName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1570,24 +1666,31 @@ class JobOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getRunbookContent(jobName, options, (err, result, request, response) => { + self._getRunbookContent(resourceGroupName, automationAccountName, jobName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getRunbookContent(jobName, options, optionalCallback); + return self._getRunbookContent(resourceGroupName, automationAccountName, jobName, options, optionalCallback); } } /** * Suspend the job identified by job name. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {string} jobName The job name. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -1597,11 +1700,11 @@ class JobOperations { * * @reject {Error} - The error object. */ - suspendWithHttpOperationResponse(jobName, options) { + suspendWithHttpOperationResponse(resourceGroupName, automationAccountName, jobName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._suspend(jobName, options, (err, result, request, response) => { + self._suspend(resourceGroupName, automationAccountName, jobName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1614,10 +1717,17 @@ class JobOperations { /** * Suspend the job identified by job name. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {string} jobName The job name. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -1642,7 +1752,7 @@ class JobOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - suspend(jobName, options, optionalCallback) { + suspend(resourceGroupName, automationAccountName, jobName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1651,24 +1761,31 @@ class JobOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._suspend(jobName, options, (err, result, request, response) => { + self._suspend(resourceGroupName, automationAccountName, jobName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._suspend(jobName, options, optionalCallback); + return self._suspend(resourceGroupName, automationAccountName, jobName, options, optionalCallback); } } /** * Stop the job identified by jobName. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {string} jobName The job name. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -1678,11 +1795,11 @@ class JobOperations { * * @reject {Error} - The error object. */ - stopWithHttpOperationResponse(jobName, options) { + stopWithHttpOperationResponse(resourceGroupName, automationAccountName, jobName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._stop(jobName, options, (err, result, request, response) => { + self._stop(resourceGroupName, automationAccountName, jobName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1695,10 +1812,17 @@ class JobOperations { /** * Stop the job identified by jobName. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {string} jobName The job name. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -1723,7 +1847,7 @@ class JobOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - stop(jobName, options, optionalCallback) { + stop(resourceGroupName, automationAccountName, jobName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1732,24 +1856,31 @@ class JobOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._stop(jobName, options, (err, result, request, response) => { + self._stop(resourceGroupName, automationAccountName, jobName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._stop(jobName, options, optionalCallback); + return self._stop(resourceGroupName, automationAccountName, jobName, options, optionalCallback); } } /** * Retrieve the job identified by job name. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {string} jobName The job name. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -1759,11 +1890,11 @@ class JobOperations { * * @reject {Error} - The error object. */ - getWithHttpOperationResponse(jobName, options) { + getWithHttpOperationResponse(resourceGroupName, automationAccountName, jobName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._get(jobName, options, (err, result, request, response) => { + self._get(resourceGroupName, automationAccountName, jobName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1776,10 +1907,17 @@ class JobOperations { /** * Retrieve the job identified by job name. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {string} jobName The job name. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -1805,7 +1943,7 @@ class JobOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - get(jobName, options, optionalCallback) { + get(resourceGroupName, automationAccountName, jobName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1814,20 +1952,24 @@ class JobOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._get(jobName, options, (err, result, request, response) => { + self._get(resourceGroupName, automationAccountName, jobName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._get(jobName, options, optionalCallback); + return self._get(resourceGroupName, automationAccountName, jobName, options, optionalCallback); } } /** * Create a job of the runbook. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {string} jobName The job name. * * @param {object} parameters The parameters supplied to the create job @@ -1846,6 +1988,9 @@ class JobOperations { * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -1855,11 +2000,11 @@ class JobOperations { * * @reject {Error} - The error object. */ - createWithHttpOperationResponse(jobName, parameters, options) { + createWithHttpOperationResponse(resourceGroupName, automationAccountName, jobName, parameters, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._create(jobName, parameters, options, (err, result, request, response) => { + self._create(resourceGroupName, automationAccountName, jobName, parameters, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1872,6 +2017,10 @@ class JobOperations { /** * Create a job of the runbook. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {string} jobName The job name. * * @param {object} parameters The parameters supplied to the create job @@ -1890,6 +2039,9 @@ class JobOperations { * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -1915,7 +2067,7 @@ class JobOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - create(jobName, parameters, options, optionalCallback) { + create(resourceGroupName, automationAccountName, jobName, parameters, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1924,24 +2076,31 @@ class JobOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._create(jobName, parameters, options, (err, result, request, response) => { + self._create(resourceGroupName, automationAccountName, jobName, parameters, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._create(jobName, parameters, options, optionalCallback); + return self._create(resourceGroupName, automationAccountName, jobName, parameters, options, optionalCallback); } } /** * Retrieve a list of jobs. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {object} [options] Optional Parameters. * * @param {string} [options.filter] The filter to apply on the operation. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -1951,11 +2110,11 @@ class JobOperations { * * @reject {Error} - The error object. */ - listByAutomationAccountWithHttpOperationResponse(options) { + listByAutomationAccountWithHttpOperationResponse(resourceGroupName, automationAccountName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._listByAutomationAccount(options, (err, result, request, response) => { + self._listByAutomationAccount(resourceGroupName, automationAccountName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1968,10 +2127,17 @@ class JobOperations { /** * Retrieve a list of jobs. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {object} [options] Optional Parameters. * * @param {string} [options.filter] The filter to apply on the operation. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -1997,7 +2163,7 @@ class JobOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - listByAutomationAccount(options, optionalCallback) { + listByAutomationAccount(resourceGroupName, automationAccountName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -2006,24 +2172,31 @@ class JobOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._listByAutomationAccount(options, (err, result, request, response) => { + self._listByAutomationAccount(resourceGroupName, automationAccountName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._listByAutomationAccount(options, optionalCallback); + return self._listByAutomationAccount(resourceGroupName, automationAccountName, options, optionalCallback); } } /** * Resume the job identified by jobName. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {string} jobName The job name. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -2033,11 +2206,11 @@ class JobOperations { * * @reject {Error} - The error object. */ - resumeWithHttpOperationResponse(jobName, options) { + resumeWithHttpOperationResponse(resourceGroupName, automationAccountName, jobName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._resume(jobName, options, (err, result, request, response) => { + self._resume(resourceGroupName, automationAccountName, jobName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -2050,10 +2223,17 @@ class JobOperations { /** * Resume the job identified by jobName. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {string} jobName The job name. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -2078,7 +2258,7 @@ class JobOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - resume(jobName, options, optionalCallback) { + resume(resourceGroupName, automationAccountName, jobName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -2087,14 +2267,14 @@ class JobOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._resume(jobName, options, (err, result, request, response) => { + self._resume(resourceGroupName, automationAccountName, jobName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._resume(jobName, options, optionalCallback); + return self._resume(resourceGroupName, automationAccountName, jobName, options, optionalCallback); } } @@ -2106,6 +2286,9 @@ class JobOperations { * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -2137,6 +2320,9 @@ class JobOperations { * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * diff --git a/lib/services/automationManagement/lib/operations/jobScheduleOperations.js b/lib/services/automationManagement/lib/operations/jobScheduleOperations.js index 073d28a536..1d2333cd93 100644 --- a/lib/services/automationManagement/lib/operations/jobScheduleOperations.js +++ b/lib/services/automationManagement/lib/operations/jobScheduleOperations.js @@ -17,6 +17,8 @@ const WebResource = msRest.WebResource; /** * Delete the job schedule identified by job schedule name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {uuid} jobScheduleId The job schedule name. @@ -38,7 +40,7 @@ const WebResource = msRest.WebResource; * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _deleteMethod(automationAccountName, jobScheduleId, options, callback) { +function _deleteMethod(resourceGroupName, automationAccountName, jobScheduleId, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -51,13 +53,13 @@ function _deleteMethod(automationAccountName, jobScheduleId, options, callback) let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -79,7 +81,7 @@ function _deleteMethod(automationAccountName, jobScheduleId, options, callback) // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/jobSchedules/{jobScheduleId}'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{jobScheduleId}', encodeURIComponent(jobScheduleId.toString())); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -153,6 +155,8 @@ function _deleteMethod(automationAccountName, jobScheduleId, options, callback) /** * Retrieve the job schedule identified by job schedule name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {uuid} jobScheduleId The job schedule name. @@ -175,7 +179,7 @@ function _deleteMethod(automationAccountName, jobScheduleId, options, callback) * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _get(automationAccountName, jobScheduleId, options, callback) { +function _get(resourceGroupName, automationAccountName, jobScheduleId, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -188,13 +192,13 @@ function _get(automationAccountName, jobScheduleId, options, callback) { let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -216,7 +220,7 @@ function _get(automationAccountName, jobScheduleId, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/jobSchedules/{jobScheduleId}'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{jobScheduleId}', encodeURIComponent(jobScheduleId.toString())); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -307,6 +311,8 @@ function _get(automationAccountName, jobScheduleId, options, callback) { /** * Create a job schedule. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {uuid} jobScheduleId The job schedule name. @@ -348,7 +354,7 @@ function _get(automationAccountName, jobScheduleId, options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _create(automationAccountName, jobScheduleId, parameters, options, callback) { +function _create(resourceGroupName, automationAccountName, jobScheduleId, parameters, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -361,13 +367,13 @@ function _create(automationAccountName, jobScheduleId, parameters, options, call let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -392,7 +398,7 @@ function _create(automationAccountName, jobScheduleId, parameters, options, call // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/jobSchedules/{jobScheduleId}'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{jobScheduleId}', encodeURIComponent(jobScheduleId.toString())); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -497,6 +503,8 @@ function _create(automationAccountName, jobScheduleId, parameters, options, call /** * Retrieve a list of job schedules. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -517,7 +525,7 @@ function _create(automationAccountName, jobScheduleId, parameters, options, call * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _listByAutomationAccount(automationAccountName, options, callback) { +function _listByAutomationAccount(resourceGroupName, automationAccountName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -530,13 +538,13 @@ function _listByAutomationAccount(automationAccountName, options, callback) { let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -555,7 +563,7 @@ function _listByAutomationAccount(automationAccountName, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/jobSchedules'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; @@ -788,6 +796,8 @@ class JobScheduleOperations { /** * Delete the job schedule identified by job schedule name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {uuid} jobScheduleId The job schedule name. @@ -803,11 +813,11 @@ class JobScheduleOperations { * * @reject {Error} - The error object. */ - deleteMethodWithHttpOperationResponse(automationAccountName, jobScheduleId, options) { + deleteMethodWithHttpOperationResponse(resourceGroupName, automationAccountName, jobScheduleId, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._deleteMethod(automationAccountName, jobScheduleId, options, (err, result, request, response) => { + self._deleteMethod(resourceGroupName, automationAccountName, jobScheduleId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -820,6 +830,8 @@ class JobScheduleOperations { /** * Delete the job schedule identified by job schedule name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {uuid} jobScheduleId The job schedule name. @@ -850,7 +862,7 @@ class JobScheduleOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(automationAccountName, jobScheduleId, options, optionalCallback) { + deleteMethod(resourceGroupName, automationAccountName, jobScheduleId, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -859,20 +871,22 @@ class JobScheduleOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._deleteMethod(automationAccountName, jobScheduleId, options, (err, result, request, response) => { + self._deleteMethod(resourceGroupName, automationAccountName, jobScheduleId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._deleteMethod(automationAccountName, jobScheduleId, options, optionalCallback); + return self._deleteMethod(resourceGroupName, automationAccountName, jobScheduleId, options, optionalCallback); } } /** * Retrieve the job schedule identified by job schedule name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {uuid} jobScheduleId The job schedule name. @@ -888,11 +902,11 @@ class JobScheduleOperations { * * @reject {Error} - The error object. */ - getWithHttpOperationResponse(automationAccountName, jobScheduleId, options) { + getWithHttpOperationResponse(resourceGroupName, automationAccountName, jobScheduleId, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._get(automationAccountName, jobScheduleId, options, (err, result, request, response) => { + self._get(resourceGroupName, automationAccountName, jobScheduleId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -905,6 +919,8 @@ class JobScheduleOperations { /** * Retrieve the job schedule identified by job schedule name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {uuid} jobScheduleId The job schedule name. @@ -936,7 +952,7 @@ class JobScheduleOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - get(automationAccountName, jobScheduleId, options, optionalCallback) { + get(resourceGroupName, automationAccountName, jobScheduleId, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -945,20 +961,22 @@ class JobScheduleOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._get(automationAccountName, jobScheduleId, options, (err, result, request, response) => { + self._get(resourceGroupName, automationAccountName, jobScheduleId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._get(automationAccountName, jobScheduleId, options, optionalCallback); + return self._get(resourceGroupName, automationAccountName, jobScheduleId, options, optionalCallback); } } /** * Create a job schedule. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {uuid} jobScheduleId The job schedule name. @@ -993,11 +1011,11 @@ class JobScheduleOperations { * * @reject {Error} - The error object. */ - createWithHttpOperationResponse(automationAccountName, jobScheduleId, parameters, options) { + createWithHttpOperationResponse(resourceGroupName, automationAccountName, jobScheduleId, parameters, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._create(automationAccountName, jobScheduleId, parameters, options, (err, result, request, response) => { + self._create(resourceGroupName, automationAccountName, jobScheduleId, parameters, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1010,6 +1028,8 @@ class JobScheduleOperations { /** * Create a job schedule. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {uuid} jobScheduleId The job schedule name. @@ -1060,7 +1080,7 @@ class JobScheduleOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - create(automationAccountName, jobScheduleId, parameters, options, optionalCallback) { + create(resourceGroupName, automationAccountName, jobScheduleId, parameters, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1069,20 +1089,22 @@ class JobScheduleOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._create(automationAccountName, jobScheduleId, parameters, options, (err, result, request, response) => { + self._create(resourceGroupName, automationAccountName, jobScheduleId, parameters, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._create(automationAccountName, jobScheduleId, parameters, options, optionalCallback); + return self._create(resourceGroupName, automationAccountName, jobScheduleId, parameters, options, optionalCallback); } } /** * Retrieve a list of job schedules. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -1096,11 +1118,11 @@ class JobScheduleOperations { * * @reject {Error} - The error object. */ - listByAutomationAccountWithHttpOperationResponse(automationAccountName, options) { + listByAutomationAccountWithHttpOperationResponse(resourceGroupName, automationAccountName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._listByAutomationAccount(automationAccountName, options, (err, result, request, response) => { + self._listByAutomationAccount(resourceGroupName, automationAccountName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1113,6 +1135,8 @@ class JobScheduleOperations { /** * Retrieve a list of job schedules. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -1142,7 +1166,7 @@ class JobScheduleOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - listByAutomationAccount(automationAccountName, options, optionalCallback) { + listByAutomationAccount(resourceGroupName, automationAccountName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1151,14 +1175,14 @@ class JobScheduleOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._listByAutomationAccount(automationAccountName, options, (err, result, request, response) => { + self._listByAutomationAccount(resourceGroupName, automationAccountName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._listByAutomationAccount(automationAccountName, options, optionalCallback); + return self._listByAutomationAccount(resourceGroupName, automationAccountName, options, optionalCallback); } } diff --git a/lib/services/automationManagement/lib/operations/jobStreamOperations.js b/lib/services/automationManagement/lib/operations/jobStreamOperations.js index 75db40543f..7527b8fad3 100644 --- a/lib/services/automationManagement/lib/operations/jobStreamOperations.js +++ b/lib/services/automationManagement/lib/operations/jobStreamOperations.js @@ -17,12 +17,19 @@ const WebResource = msRest.WebResource; /** * Retrieve the job stream identified by job stream id. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {string} jobName The job name. * * @param {string} jobStreamId The job stream id. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -39,7 +46,7 @@ const WebResource = msRest.WebResource; * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _get(jobName, jobStreamId, options, callback) { +function _get(resourceGroupName, automationAccountName, jobName, jobStreamId, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -49,23 +56,24 @@ function _get(jobName, jobStreamId, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } + let clientRequestId = (options && options.clientRequestId !== undefined) ? options.clientRequestId : undefined; let apiVersion = '2017-05-15-preview'; // Validate try { if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } - if (this.client.automationAccountName === null || this.client.automationAccountName === undefined || typeof this.client.automationAccountName.valueOf() !== 'string') { - throw new Error('this.client.automationAccountName cannot be null or undefined and it must be of type string.'); + if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { + throw new Error('automationAccountName cannot be null or undefined and it must be of type string.'); } if (jobName === null || jobName === undefined || typeof jobName.valueOf() !== 'string') { throw new Error('jobName cannot be null or undefined and it must be of type string.'); @@ -73,8 +81,8 @@ function _get(jobName, jobStreamId, options, callback) { if (jobStreamId === null || jobStreamId === undefined || typeof jobStreamId.valueOf() !== 'string') { throw new Error('jobStreamId cannot be null or undefined and it must be of type string.'); } - if (this.client.clientRequestId !== null && this.client.clientRequestId !== undefined && typeof this.client.clientRequestId.valueOf() !== 'string') { - throw new Error('this.client.clientRequestId must be of type string.'); + if (clientRequestId !== null && clientRequestId !== undefined && typeof clientRequestId.valueOf() !== 'string') { + throw new Error('clientRequestId must be of type string.'); } if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { throw new Error('this.client.acceptLanguage must be of type string.'); @@ -87,8 +95,8 @@ function _get(jobName, jobStreamId, options, callback) { let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/jobs/{jobName}/streams/{jobStreamId}'; requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); - requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(this.client.automationAccountName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{jobName}', encodeURIComponent(jobName)); requestUrl = requestUrl.replace('{jobStreamId}', encodeURIComponent(jobStreamId)); let queryParameters = []; @@ -107,8 +115,8 @@ function _get(jobName, jobStreamId, options, callback) { if (this.client.generateClientRequestId) { httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); } - if (this.client.clientRequestId !== undefined && this.client.clientRequestId !== null) { - httpRequest.headers['clientRequestId'] = this.client.clientRequestId; + if (clientRequestId !== undefined && clientRequestId !== null) { + httpRequest.headers['clientRequestId'] = clientRequestId; } if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { httpRequest.headers['accept-language'] = this.client.acceptLanguage; @@ -181,12 +189,19 @@ function _get(jobName, jobStreamId, options, callback) { /** * Retrieve a list of jobs streams identified by job name. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {string} jobName The job name. * * @param {object} [options] Optional Parameters. * * @param {string} [options.filter] The filter to apply on the operation. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -203,7 +218,7 @@ function _get(jobName, jobStreamId, options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _listByJob(jobName, options, callback) { +function _listByJob(resourceGroupName, automationAccountName, jobName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -214,20 +229,21 @@ function _listByJob(jobName, options, callback) { throw new Error('callback cannot be null.'); } let filter = (options && options.filter !== undefined) ? options.filter : undefined; + let clientRequestId = (options && options.clientRequestId !== undefined) ? options.clientRequestId : undefined; let apiVersion = '2017-05-15-preview'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } - if (this.client.automationAccountName === null || this.client.automationAccountName === undefined || typeof this.client.automationAccountName.valueOf() !== 'string') { - throw new Error('this.client.automationAccountName cannot be null or undefined and it must be of type string.'); + if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { + throw new Error('automationAccountName cannot be null or undefined and it must be of type string.'); } if (jobName === null || jobName === undefined || typeof jobName.valueOf() !== 'string') { throw new Error('jobName cannot be null or undefined and it must be of type string.'); @@ -238,8 +254,8 @@ function _listByJob(jobName, options, callback) { if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); } - if (this.client.clientRequestId !== null && this.client.clientRequestId !== undefined && typeof this.client.clientRequestId.valueOf() !== 'string') { - throw new Error('this.client.clientRequestId must be of type string.'); + if (clientRequestId !== null && clientRequestId !== undefined && typeof clientRequestId.valueOf() !== 'string') { + throw new Error('clientRequestId must be of type string.'); } if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { throw new Error('this.client.acceptLanguage must be of type string.'); @@ -251,8 +267,8 @@ function _listByJob(jobName, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/jobs/{jobName}/streams'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); - requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(this.client.automationAccountName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{jobName}', encodeURIComponent(jobName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; @@ -274,8 +290,8 @@ function _listByJob(jobName, options, callback) { if (this.client.generateClientRequestId) { httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); } - if (this.client.clientRequestId !== undefined && this.client.clientRequestId !== null) { - httpRequest.headers['clientRequestId'] = this.client.clientRequestId; + if (clientRequestId !== undefined && clientRequestId !== null) { + httpRequest.headers['clientRequestId'] = clientRequestId; } if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { httpRequest.headers['accept-language'] = this.client.acceptLanguage; @@ -353,6 +369,9 @@ function _listByJob(jobName, options, callback) { * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -379,13 +398,14 @@ function _listByJobNext(nextPageLink, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } + let clientRequestId = (options && options.clientRequestId !== undefined) ? options.clientRequestId : undefined; // Validate try { if (nextPageLink === null || nextPageLink === undefined || typeof nextPageLink.valueOf() !== 'string') { throw new Error('nextPageLink cannot be null or undefined and it must be of type string.'); } - if (this.client.clientRequestId !== null && this.client.clientRequestId !== undefined && typeof this.client.clientRequestId.valueOf() !== 'string') { - throw new Error('this.client.clientRequestId must be of type string.'); + if (clientRequestId !== null && clientRequestId !== undefined && typeof clientRequestId.valueOf() !== 'string') { + throw new Error('clientRequestId must be of type string.'); } if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { throw new Error('this.client.acceptLanguage must be of type string.'); @@ -408,8 +428,8 @@ function _listByJobNext(nextPageLink, options, callback) { if (this.client.generateClientRequestId) { httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); } - if (this.client.clientRequestId !== undefined && this.client.clientRequestId !== null) { - httpRequest.headers['clientRequestId'] = this.client.clientRequestId; + if (clientRequestId !== undefined && clientRequestId !== null) { + httpRequest.headers['clientRequestId'] = clientRequestId; } if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { httpRequest.headers['accept-language'] = this.client.acceptLanguage; @@ -495,12 +515,19 @@ class JobStreamOperations { /** * Retrieve the job stream identified by job stream id. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {string} jobName The job name. * * @param {string} jobStreamId The job stream id. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -510,11 +537,11 @@ class JobStreamOperations { * * @reject {Error} - The error object. */ - getWithHttpOperationResponse(jobName, jobStreamId, options) { + getWithHttpOperationResponse(resourceGroupName, automationAccountName, jobName, jobStreamId, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._get(jobName, jobStreamId, options, (err, result, request, response) => { + self._get(resourceGroupName, automationAccountName, jobName, jobStreamId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -527,12 +554,19 @@ class JobStreamOperations { /** * Retrieve the job stream identified by job stream id. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {string} jobName The job name. * * @param {string} jobStreamId The job stream id. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -558,7 +592,7 @@ class JobStreamOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - get(jobName, jobStreamId, options, optionalCallback) { + get(resourceGroupName, automationAccountName, jobName, jobStreamId, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -567,26 +601,33 @@ class JobStreamOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._get(jobName, jobStreamId, options, (err, result, request, response) => { + self._get(resourceGroupName, automationAccountName, jobName, jobStreamId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._get(jobName, jobStreamId, options, optionalCallback); + return self._get(resourceGroupName, automationAccountName, jobName, jobStreamId, options, optionalCallback); } } /** * Retrieve a list of jobs streams identified by job name. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {string} jobName The job name. * * @param {object} [options] Optional Parameters. * * @param {string} [options.filter] The filter to apply on the operation. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -596,11 +637,11 @@ class JobStreamOperations { * * @reject {Error} - The error object. */ - listByJobWithHttpOperationResponse(jobName, options) { + listByJobWithHttpOperationResponse(resourceGroupName, automationAccountName, jobName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._listByJob(jobName, options, (err, result, request, response) => { + self._listByJob(resourceGroupName, automationAccountName, jobName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -613,12 +654,19 @@ class JobStreamOperations { /** * Retrieve a list of jobs streams identified by job name. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {string} jobName The job name. * * @param {object} [options] Optional Parameters. * * @param {string} [options.filter] The filter to apply on the operation. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -644,7 +692,7 @@ class JobStreamOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - listByJob(jobName, options, optionalCallback) { + listByJob(resourceGroupName, automationAccountName, jobName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -653,14 +701,14 @@ class JobStreamOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._listByJob(jobName, options, (err, result, request, response) => { + self._listByJob(resourceGroupName, automationAccountName, jobName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._listByJob(jobName, options, optionalCallback); + return self._listByJob(resourceGroupName, automationAccountName, jobName, options, optionalCallback); } } @@ -672,6 +720,9 @@ class JobStreamOperations { * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -703,6 +754,9 @@ class JobStreamOperations { * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * diff --git a/lib/services/automationManagement/lib/operations/keys.js b/lib/services/automationManagement/lib/operations/keys.js new file mode 100644 index 0000000000..635b11a5e7 --- /dev/null +++ b/lib/services/automationManagement/lib/operations/keys.js @@ -0,0 +1,266 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const msRest = require('ms-rest'); +const msRestAzure = require('ms-rest-azure'); +const WebResource = msRest.WebResource; + +/** + * Retrieve the automation keys for an account. + * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The automation account 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. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link KeyListResult} 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. + */ +function _listByAutomationAccount(resourceGroupName, automationAccountName, 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 (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}/listKeys'; + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); + 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 = 'POST'; + 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]; + } + } + } + httpRequest.body = null; + // 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['KeyListResult']().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); + }); +} + +/** Class representing a Keys. */ +class Keys { + /** + * Create a Keys. + * @param {AutomationClient} client Reference to the service client. + */ + constructor(client) { + this.client = client; + this._listByAutomationAccount = _listByAutomationAccount; + } + + /** + * Retrieve the automation keys for an account. + * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The automation account name. + * + * @param {object} [options] Optional Parameters. + * + * @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. + */ + listByAutomationAccountWithHttpOperationResponse(resourceGroupName, automationAccountName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._listByAutomationAccount(resourceGroupName, automationAccountName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Retrieve the automation keys for an account. + * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The automation account name. + * + * @param {object} [options] Optional Parameters. + * + * @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 {KeyListResult} - 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 KeyListResult} 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. + */ + listByAutomationAccount(resourceGroupName, automationAccountName, 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._listByAutomationAccount(resourceGroupName, automationAccountName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._listByAutomationAccount(resourceGroupName, automationAccountName, options, optionalCallback); + } + } + +} + +module.exports = Keys; diff --git a/lib/services/automationManagement/lib/operations/linkedWorkspaceOperations.js b/lib/services/automationManagement/lib/operations/linkedWorkspaceOperations.js index 1853bbf687..29ae1f29af 100644 --- a/lib/services/automationManagement/lib/operations/linkedWorkspaceOperations.js +++ b/lib/services/automationManagement/lib/operations/linkedWorkspaceOperations.js @@ -17,6 +17,8 @@ const WebResource = msRest.WebResource; /** * Retrieve the linked workspace for the account id. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -37,7 +39,7 @@ const WebResource = msRest.WebResource; * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _get(automationAccountName, options, callback) { +function _get(resourceGroupName, automationAccountName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -50,13 +52,13 @@ function _get(automationAccountName, options, callback) { let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -75,7 +77,7 @@ function _get(automationAccountName, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/linkedWorkspace'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; @@ -176,6 +178,8 @@ class LinkedWorkspaceOperations { /** * Retrieve the linked workspace for the account id. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -189,11 +193,11 @@ class LinkedWorkspaceOperations { * * @reject {Error} - The error object. */ - getWithHttpOperationResponse(automationAccountName, options) { + getWithHttpOperationResponse(resourceGroupName, automationAccountName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._get(automationAccountName, options, (err, result, request, response) => { + self._get(resourceGroupName, automationAccountName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -206,6 +210,8 @@ class LinkedWorkspaceOperations { /** * Retrieve the linked workspace for the account id. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -235,7 +241,7 @@ class LinkedWorkspaceOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - get(automationAccountName, options, optionalCallback) { + get(resourceGroupName, automationAccountName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -244,14 +250,14 @@ class LinkedWorkspaceOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._get(automationAccountName, options, (err, result, request, response) => { + self._get(resourceGroupName, automationAccountName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._get(automationAccountName, options, optionalCallback); + return self._get(resourceGroupName, automationAccountName, options, optionalCallback); } } diff --git a/lib/services/automationManagement/lib/operations/moduleOperations.js b/lib/services/automationManagement/lib/operations/moduleOperations.js index edef4bcdce..54438c961e 100644 --- a/lib/services/automationManagement/lib/operations/moduleOperations.js +++ b/lib/services/automationManagement/lib/operations/moduleOperations.js @@ -17,6 +17,8 @@ const WebResource = msRest.WebResource; /** * Delete the module by name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} moduleName The module name. @@ -38,7 +40,7 @@ const WebResource = msRest.WebResource; * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _deleteMethod(automationAccountName, moduleName, options, callback) { +function _deleteMethod(resourceGroupName, automationAccountName, moduleName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -51,13 +53,13 @@ function _deleteMethod(automationAccountName, moduleName, options, callback) { let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -79,7 +81,7 @@ function _deleteMethod(automationAccountName, moduleName, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/modules/{moduleName}'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{moduleName}', encodeURIComponent(moduleName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -153,6 +155,8 @@ function _deleteMethod(automationAccountName, moduleName, options, callback) { /** * Retrieve the module identified by module name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} moduleName The module name. @@ -175,7 +179,7 @@ function _deleteMethod(automationAccountName, moduleName, options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _get(automationAccountName, moduleName, options, callback) { +function _get(resourceGroupName, automationAccountName, moduleName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -188,13 +192,13 @@ function _get(automationAccountName, moduleName, options, callback) { let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -216,7 +220,7 @@ function _get(automationAccountName, moduleName, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/modules/{moduleName}'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{moduleName}', encodeURIComponent(moduleName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -307,6 +311,8 @@ function _get(automationAccountName, moduleName, options, callback) { /** * Create or Update the module identified by module name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} moduleName The name of module. @@ -355,7 +361,7 @@ function _get(automationAccountName, moduleName, options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _createOrUpdate(automationAccountName, moduleName, parameters, options, callback) { +function _createOrUpdate(resourceGroupName, automationAccountName, moduleName, parameters, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -368,13 +374,13 @@ function _createOrUpdate(automationAccountName, moduleName, parameters, options, let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -399,7 +405,7 @@ function _createOrUpdate(automationAccountName, moduleName, parameters, options, // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/modules/{moduleName}'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{moduleName}', encodeURIComponent(moduleName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -521,6 +527,8 @@ function _createOrUpdate(automationAccountName, moduleName, parameters, options, /** * Update the module identified by module name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} moduleName The name of module. @@ -570,7 +578,7 @@ function _createOrUpdate(automationAccountName, moduleName, parameters, options, * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _update(automationAccountName, moduleName, parameters, options, callback) { +function _update(resourceGroupName, automationAccountName, moduleName, parameters, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -583,13 +591,13 @@ function _update(automationAccountName, moduleName, parameters, options, callbac let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -614,7 +622,7 @@ function _update(automationAccountName, moduleName, parameters, options, callbac // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/modules/{moduleName}'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{moduleName}', encodeURIComponent(moduleName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -719,6 +727,8 @@ function _update(automationAccountName, moduleName, parameters, options, callbac /** * Retrieve a list of modules. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -739,7 +749,7 @@ function _update(automationAccountName, moduleName, parameters, options, callbac * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _listByAutomationAccount(automationAccountName, options, callback) { +function _listByAutomationAccount(resourceGroupName, automationAccountName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -752,13 +762,13 @@ function _listByAutomationAccount(automationAccountName, options, callback) { let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -777,7 +787,7 @@ function _listByAutomationAccount(automationAccountName, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/modules'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; @@ -1011,6 +1021,8 @@ class ModuleOperations { /** * Delete the module by name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} moduleName The module name. @@ -1026,11 +1038,11 @@ class ModuleOperations { * * @reject {Error} - The error object. */ - deleteMethodWithHttpOperationResponse(automationAccountName, moduleName, options) { + deleteMethodWithHttpOperationResponse(resourceGroupName, automationAccountName, moduleName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._deleteMethod(automationAccountName, moduleName, options, (err, result, request, response) => { + self._deleteMethod(resourceGroupName, automationAccountName, moduleName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1043,6 +1055,8 @@ class ModuleOperations { /** * Delete the module by name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} moduleName The module name. @@ -1073,7 +1087,7 @@ class ModuleOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(automationAccountName, moduleName, options, optionalCallback) { + deleteMethod(resourceGroupName, automationAccountName, moduleName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1082,20 +1096,22 @@ class ModuleOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._deleteMethod(automationAccountName, moduleName, options, (err, result, request, response) => { + self._deleteMethod(resourceGroupName, automationAccountName, moduleName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._deleteMethod(automationAccountName, moduleName, options, optionalCallback); + return self._deleteMethod(resourceGroupName, automationAccountName, moduleName, options, optionalCallback); } } /** * Retrieve the module identified by module name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} moduleName The module name. @@ -1111,11 +1127,11 @@ class ModuleOperations { * * @reject {Error} - The error object. */ - getWithHttpOperationResponse(automationAccountName, moduleName, options) { + getWithHttpOperationResponse(resourceGroupName, automationAccountName, moduleName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._get(automationAccountName, moduleName, options, (err, result, request, response) => { + self._get(resourceGroupName, automationAccountName, moduleName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1128,6 +1144,8 @@ class ModuleOperations { /** * Retrieve the module identified by module name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} moduleName The module name. @@ -1159,7 +1177,7 @@ class ModuleOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - get(automationAccountName, moduleName, options, optionalCallback) { + get(resourceGroupName, automationAccountName, moduleName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1168,20 +1186,22 @@ class ModuleOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._get(automationAccountName, moduleName, options, (err, result, request, response) => { + self._get(resourceGroupName, automationAccountName, moduleName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._get(automationAccountName, moduleName, options, optionalCallback); + return self._get(resourceGroupName, automationAccountName, moduleName, options, optionalCallback); } } /** * Create or Update the module identified by module name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} moduleName The name of module. @@ -1223,11 +1243,11 @@ class ModuleOperations { * * @reject {Error} - The error object. */ - createOrUpdateWithHttpOperationResponse(automationAccountName, moduleName, parameters, options) { + createOrUpdateWithHttpOperationResponse(resourceGroupName, automationAccountName, moduleName, parameters, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._createOrUpdate(automationAccountName, moduleName, parameters, options, (err, result, request, response) => { + self._createOrUpdate(resourceGroupName, automationAccountName, moduleName, parameters, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1240,6 +1260,8 @@ class ModuleOperations { /** * Create or Update the module identified by module name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} moduleName The name of module. @@ -1297,7 +1319,7 @@ class ModuleOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - createOrUpdate(automationAccountName, moduleName, parameters, options, optionalCallback) { + createOrUpdate(resourceGroupName, automationAccountName, moduleName, parameters, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1306,20 +1328,22 @@ class ModuleOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._createOrUpdate(automationAccountName, moduleName, parameters, options, (err, result, request, response) => { + self._createOrUpdate(resourceGroupName, automationAccountName, moduleName, parameters, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._createOrUpdate(automationAccountName, moduleName, parameters, options, optionalCallback); + return self._createOrUpdate(resourceGroupName, automationAccountName, moduleName, parameters, options, optionalCallback); } } /** * Update the module identified by module name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} moduleName The name of module. @@ -1362,11 +1386,11 @@ class ModuleOperations { * * @reject {Error} - The error object. */ - updateWithHttpOperationResponse(automationAccountName, moduleName, parameters, options) { + updateWithHttpOperationResponse(resourceGroupName, automationAccountName, moduleName, parameters, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._update(automationAccountName, moduleName, parameters, options, (err, result, request, response) => { + self._update(resourceGroupName, automationAccountName, moduleName, parameters, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1379,6 +1403,8 @@ class ModuleOperations { /** * Update the module identified by module name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} moduleName The name of module. @@ -1437,7 +1463,7 @@ class ModuleOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - update(automationAccountName, moduleName, parameters, options, optionalCallback) { + update(resourceGroupName, automationAccountName, moduleName, parameters, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1446,20 +1472,22 @@ class ModuleOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._update(automationAccountName, moduleName, parameters, options, (err, result, request, response) => { + self._update(resourceGroupName, automationAccountName, moduleName, parameters, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._update(automationAccountName, moduleName, parameters, options, optionalCallback); + return self._update(resourceGroupName, automationAccountName, moduleName, parameters, options, optionalCallback); } } /** * Retrieve a list of modules. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -1473,11 +1501,11 @@ class ModuleOperations { * * @reject {Error} - The error object. */ - listByAutomationAccountWithHttpOperationResponse(automationAccountName, options) { + listByAutomationAccountWithHttpOperationResponse(resourceGroupName, automationAccountName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._listByAutomationAccount(automationAccountName, options, (err, result, request, response) => { + self._listByAutomationAccount(resourceGroupName, automationAccountName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1490,6 +1518,8 @@ class ModuleOperations { /** * Retrieve a list of modules. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -1519,7 +1549,7 @@ class ModuleOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - listByAutomationAccount(automationAccountName, options, optionalCallback) { + listByAutomationAccount(resourceGroupName, automationAccountName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1528,14 +1558,14 @@ class ModuleOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._listByAutomationAccount(automationAccountName, options, (err, result, request, response) => { + self._listByAutomationAccount(resourceGroupName, automationAccountName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._listByAutomationAccount(automationAccountName, options, optionalCallback); + return self._listByAutomationAccount(resourceGroupName, automationAccountName, options, optionalCallback); } } diff --git a/lib/services/automationManagement/lib/operations/nodeReports.js b/lib/services/automationManagement/lib/operations/nodeReports.js index aea8ef8eb3..49e13fd659 100644 --- a/lib/services/automationManagement/lib/operations/nodeReports.js +++ b/lib/services/automationManagement/lib/operations/nodeReports.js @@ -17,6 +17,8 @@ const WebResource = msRest.WebResource; /** * Retrieve the Dsc node report list by node id. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} nodeId The parameters supplied to the list operation. @@ -42,7 +44,7 @@ const WebResource = msRest.WebResource; * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _listByNode(automationAccountName, nodeId, options, callback) { +function _listByNode(resourceGroupName, automationAccountName, nodeId, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -56,13 +58,13 @@ function _listByNode(automationAccountName, nodeId, options, callback) { let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -87,7 +89,7 @@ function _listByNode(automationAccountName, nodeId, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/nodes/{nodeId}/reports'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{nodeId}', encodeURIComponent(nodeId)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -181,6 +183,8 @@ function _listByNode(automationAccountName, nodeId, options, callback) { /** * Retrieve the Dsc node report data by node id and report id. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} nodeId The Dsc node id. @@ -205,7 +209,7 @@ function _listByNode(automationAccountName, nodeId, options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _get(automationAccountName, nodeId, reportId, options, callback) { +function _get(resourceGroupName, automationAccountName, nodeId, reportId, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -218,13 +222,13 @@ function _get(automationAccountName, nodeId, reportId, options, callback) { let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -249,7 +253,7 @@ function _get(automationAccountName, nodeId, reportId, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/nodes/{nodeId}/reports/{reportId}'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{nodeId}', encodeURIComponent(nodeId)); requestUrl = requestUrl.replace('{reportId}', encodeURIComponent(reportId)); @@ -341,6 +345,8 @@ function _get(automationAccountName, nodeId, reportId, options, callback) { /** * Retrieve the Dsc node reports by node id and report id. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} nodeId The Dsc node id. @@ -364,7 +370,7 @@ function _get(automationAccountName, nodeId, reportId, options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _getContent(automationAccountName, nodeId, reportId, options, callback) { +function _getContent(resourceGroupName, automationAccountName, nodeId, reportId, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -377,13 +383,13 @@ function _getContent(automationAccountName, nodeId, reportId, options, callback) let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -408,7 +414,7 @@ function _getContent(automationAccountName, nodeId, reportId, options, callback) // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/nodes/{nodeId}/reports/{reportId}/content'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{nodeId}', encodeURIComponent(nodeId)); requestUrl = requestUrl.replace('{reportId}', encodeURIComponent(reportId)); @@ -649,6 +655,8 @@ class NodeReports { /** * Retrieve the Dsc node report list by node id. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} nodeId The parameters supplied to the list operation. @@ -666,11 +674,11 @@ class NodeReports { * * @reject {Error} - The error object. */ - listByNodeWithHttpOperationResponse(automationAccountName, nodeId, options) { + listByNodeWithHttpOperationResponse(resourceGroupName, automationAccountName, nodeId, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._listByNode(automationAccountName, nodeId, options, (err, result, request, response) => { + self._listByNode(resourceGroupName, automationAccountName, nodeId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -683,6 +691,8 @@ class NodeReports { /** * Retrieve the Dsc node report list by node id. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} nodeId The parameters supplied to the list operation. @@ -717,7 +727,7 @@ class NodeReports { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - listByNode(automationAccountName, nodeId, options, optionalCallback) { + listByNode(resourceGroupName, automationAccountName, nodeId, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -726,20 +736,22 @@ class NodeReports { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._listByNode(automationAccountName, nodeId, options, (err, result, request, response) => { + self._listByNode(resourceGroupName, automationAccountName, nodeId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._listByNode(automationAccountName, nodeId, options, optionalCallback); + return self._listByNode(resourceGroupName, automationAccountName, nodeId, options, optionalCallback); } } /** * Retrieve the Dsc node report data by node id and report id. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} nodeId The Dsc node id. @@ -757,11 +769,11 @@ class NodeReports { * * @reject {Error} - The error object. */ - getWithHttpOperationResponse(automationAccountName, nodeId, reportId, options) { + getWithHttpOperationResponse(resourceGroupName, automationAccountName, nodeId, reportId, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._get(automationAccountName, nodeId, reportId, options, (err, result, request, response) => { + self._get(resourceGroupName, automationAccountName, nodeId, reportId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -774,6 +786,8 @@ class NodeReports { /** * Retrieve the Dsc node report data by node id and report id. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} nodeId The Dsc node id. @@ -807,7 +821,7 @@ class NodeReports { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - get(automationAccountName, nodeId, reportId, options, optionalCallback) { + get(resourceGroupName, automationAccountName, nodeId, reportId, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -816,20 +830,22 @@ class NodeReports { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._get(automationAccountName, nodeId, reportId, options, (err, result, request, response) => { + self._get(resourceGroupName, automationAccountName, nodeId, reportId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._get(automationAccountName, nodeId, reportId, options, optionalCallback); + return self._get(resourceGroupName, automationAccountName, nodeId, reportId, options, optionalCallback); } } /** * Retrieve the Dsc node reports by node id and report id. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} nodeId The Dsc node id. @@ -847,11 +863,11 @@ class NodeReports { * * @reject {Error} - The error object. */ - getContentWithHttpOperationResponse(automationAccountName, nodeId, reportId, options) { + getContentWithHttpOperationResponse(resourceGroupName, automationAccountName, nodeId, reportId, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._getContent(automationAccountName, nodeId, reportId, options, (err, result, request, response) => { + self._getContent(resourceGroupName, automationAccountName, nodeId, reportId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -864,6 +880,8 @@ class NodeReports { /** * Retrieve the Dsc node reports by node id and report id. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} nodeId The Dsc node id. @@ -896,7 +914,7 @@ class NodeReports { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getContent(automationAccountName, nodeId, reportId, options, optionalCallback) { + getContent(resourceGroupName, automationAccountName, nodeId, reportId, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -905,14 +923,14 @@ class NodeReports { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getContent(automationAccountName, nodeId, reportId, options, (err, result, request, response) => { + self._getContent(resourceGroupName, automationAccountName, nodeId, reportId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getContent(automationAccountName, nodeId, reportId, options, optionalCallback); + return self._getContent(resourceGroupName, automationAccountName, nodeId, reportId, options, optionalCallback); } } diff --git a/lib/services/automationManagement/lib/operations/objectDataTypes.js b/lib/services/automationManagement/lib/operations/objectDataTypes.js index 86d9aad839..5b3a4f44f7 100644 --- a/lib/services/automationManagement/lib/operations/objectDataTypes.js +++ b/lib/services/automationManagement/lib/operations/objectDataTypes.js @@ -17,6 +17,8 @@ const WebResource = msRest.WebResource; /** * Retrieve a list of fields of a given type identified by module name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} moduleName The name of module. @@ -41,7 +43,7 @@ const WebResource = msRest.WebResource; * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _listFieldsByModuleAndType(automationAccountName, moduleName, typeName, options, callback) { +function _listFieldsByModuleAndType(resourceGroupName, automationAccountName, moduleName, typeName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -54,13 +56,13 @@ function _listFieldsByModuleAndType(automationAccountName, moduleName, typeName, let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -85,7 +87,7 @@ function _listFieldsByModuleAndType(automationAccountName, moduleName, typeName, // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/modules/{moduleName}/objectDataTypes/{typeName}/fields'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{moduleName}', encodeURIComponent(moduleName)); requestUrl = requestUrl.replace('{typeName}', encodeURIComponent(typeName)); @@ -177,6 +179,8 @@ function _listFieldsByModuleAndType(automationAccountName, moduleName, typeName, /** * Retrieve a list of fields of a given type across all accessible modules. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} typeName The name of type. @@ -199,7 +203,7 @@ function _listFieldsByModuleAndType(automationAccountName, moduleName, typeName, * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _listFieldsByType(automationAccountName, typeName, options, callback) { +function _listFieldsByType(resourceGroupName, automationAccountName, typeName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -212,13 +216,13 @@ function _listFieldsByType(automationAccountName, typeName, options, callback) { let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -240,7 +244,7 @@ function _listFieldsByType(automationAccountName, typeName, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/objectDataTypes/{typeName}/fields'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{typeName}', encodeURIComponent(typeName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -343,6 +347,8 @@ class ObjectDataTypes { /** * Retrieve a list of fields of a given type identified by module name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} moduleName The name of module. @@ -360,11 +366,11 @@ class ObjectDataTypes { * * @reject {Error} - The error object. */ - listFieldsByModuleAndTypeWithHttpOperationResponse(automationAccountName, moduleName, typeName, options) { + listFieldsByModuleAndTypeWithHttpOperationResponse(resourceGroupName, automationAccountName, moduleName, typeName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._listFieldsByModuleAndType(automationAccountName, moduleName, typeName, options, (err, result, request, response) => { + self._listFieldsByModuleAndType(resourceGroupName, automationAccountName, moduleName, typeName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -377,6 +383,8 @@ class ObjectDataTypes { /** * Retrieve a list of fields of a given type identified by module name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} moduleName The name of module. @@ -410,7 +418,7 @@ class ObjectDataTypes { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - listFieldsByModuleAndType(automationAccountName, moduleName, typeName, options, optionalCallback) { + listFieldsByModuleAndType(resourceGroupName, automationAccountName, moduleName, typeName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -419,20 +427,22 @@ class ObjectDataTypes { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._listFieldsByModuleAndType(automationAccountName, moduleName, typeName, options, (err, result, request, response) => { + self._listFieldsByModuleAndType(resourceGroupName, automationAccountName, moduleName, typeName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._listFieldsByModuleAndType(automationAccountName, moduleName, typeName, options, optionalCallback); + return self._listFieldsByModuleAndType(resourceGroupName, automationAccountName, moduleName, typeName, options, optionalCallback); } } /** * Retrieve a list of fields of a given type across all accessible modules. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} typeName The name of type. @@ -448,11 +458,11 @@ class ObjectDataTypes { * * @reject {Error} - The error object. */ - listFieldsByTypeWithHttpOperationResponse(automationAccountName, typeName, options) { + listFieldsByTypeWithHttpOperationResponse(resourceGroupName, automationAccountName, typeName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._listFieldsByType(automationAccountName, typeName, options, (err, result, request, response) => { + self._listFieldsByType(resourceGroupName, automationAccountName, typeName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -465,6 +475,8 @@ class ObjectDataTypes { /** * Retrieve a list of fields of a given type across all accessible modules. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} typeName The name of type. @@ -496,7 +508,7 @@ class ObjectDataTypes { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - listFieldsByType(automationAccountName, typeName, options, optionalCallback) { + listFieldsByType(resourceGroupName, automationAccountName, typeName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -505,14 +517,14 @@ class ObjectDataTypes { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._listFieldsByType(automationAccountName, typeName, options, (err, result, request, response) => { + self._listFieldsByType(resourceGroupName, automationAccountName, typeName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._listFieldsByType(automationAccountName, typeName, options, optionalCallback); + return self._listFieldsByType(resourceGroupName, automationAccountName, typeName, options, optionalCallback); } } diff --git a/lib/services/automationManagement/lib/operations/runbookDraftOperations.js b/lib/services/automationManagement/lib/operations/runbookDraftOperations.js index e4e627796f..54b60d51ba 100644 --- a/lib/services/automationManagement/lib/operations/runbookDraftOperations.js +++ b/lib/services/automationManagement/lib/operations/runbookDraftOperations.js @@ -17,6 +17,8 @@ const WebResource = msRest.WebResource; /** * Retrieve the content of runbook draft identified by runbook name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -38,7 +40,7 @@ const WebResource = msRest.WebResource; * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _getContent(automationAccountName, runbookName, options, callback) { +function _getContent(resourceGroupName, automationAccountName, runbookName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -54,13 +56,13 @@ function _getContent(automationAccountName, runbookName, options, callback) { if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -80,7 +82,7 @@ function _getContent(automationAccountName, runbookName, options, callback) { let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/runbooks/{runbookName}/draft/content'; requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{runbookName}', encodeURIComponent(runbookName)); let queryParameters = []; @@ -176,6 +178,8 @@ function _getContent(automationAccountName, runbookName, options, callback) { /** * Replaces the runbook draft content. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -193,13 +197,13 @@ function _getContent(automationAccountName, runbookName, options, callback) { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {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 _replaceContent(automationAccountName, runbookName, runbookContent, options, callback) { +function _replaceContent(resourceGroupName, automationAccountName, runbookName, runbookContent, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -212,7 +216,7 @@ function _replaceContent(automationAccountName, runbookName, runbookContent, opt } // Send request - this.beginReplaceContent(automationAccountName, runbookName, runbookContent, options, (err, parsedResult, httpRequest, response) => { + this.beginReplaceContent(resourceGroupName, automationAccountName, runbookName, runbookContent, options, (err, parsedResult, httpRequest, response) => { if (err) return callback(err); let initialResult = new msRest.HttpOperationResponse(); @@ -231,6 +235,26 @@ function _replaceContent(automationAccountName, runbookName, runbookContent, opt if (responseBody === '') responseBody = null; // Deserialize Response + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = { + required: false, + serializedName: 'parsedResponse', + type: { + name: 'String' + } + }; + 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); }); @@ -240,6 +264,8 @@ function _replaceContent(automationAccountName, runbookName, runbookContent, opt /** * Retrieve the runbook draft identified by runbook name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -262,7 +288,7 @@ function _replaceContent(automationAccountName, runbookName, runbookContent, opt * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _get(automationAccountName, runbookName, options, callback) { +function _get(resourceGroupName, automationAccountName, runbookName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -278,13 +304,13 @@ function _get(automationAccountName, runbookName, options, callback) { if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -304,7 +330,7 @@ function _get(automationAccountName, runbookName, options, callback) { let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/runbooks/{runbookName}/draft'; requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{runbookName}', encodeURIComponent(runbookName)); let queryParameters = []; @@ -395,6 +421,8 @@ function _get(automationAccountName, runbookName, options, callback) { /** * Publish runbook draft. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The parameters supplied to the publish runbook @@ -411,13 +439,13 @@ function _get(automationAccountName, runbookName, options, callback) { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {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 _publish(automationAccountName, runbookName, options, callback) { +function _publish(resourceGroupName, automationAccountName, runbookName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -430,7 +458,7 @@ function _publish(automationAccountName, runbookName, options, callback) { } // Send request - this.beginPublish(automationAccountName, runbookName, options, (err, parsedResult, httpRequest, response) => { + this.beginPublish(resourceGroupName, automationAccountName, runbookName, options, (err, parsedResult, httpRequest, response) => { if (err) return callback(err); let initialResult = new msRest.HttpOperationResponse(); @@ -449,6 +477,26 @@ function _publish(automationAccountName, runbookName, options, callback) { if (responseBody === '') responseBody = null; // Deserialize Response + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = { + required: false, + serializedName: 'parsedResponse', + type: { + name: 'String' + } + }; + 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); }); @@ -458,6 +506,8 @@ function _publish(automationAccountName, runbookName, options, callback) { /** * Undo draft edit to last known published state identified by runbook name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -481,7 +531,7 @@ function _publish(automationAccountName, runbookName, options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _undoEdit(automationAccountName, runbookName, options, callback) { +function _undoEdit(resourceGroupName, automationAccountName, runbookName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -497,13 +547,13 @@ function _undoEdit(automationAccountName, runbookName, options, callback) { if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -523,7 +573,7 @@ function _undoEdit(automationAccountName, runbookName, options, callback) { let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/runbooks/{runbookName}/draft/undoEdit'; requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{runbookName}', encodeURIComponent(runbookName)); let queryParameters = []; @@ -613,6 +663,8 @@ function _undoEdit(automationAccountName, runbookName, options, callback) { /** * Replaces the runbook draft content. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -630,13 +682,13 @@ function _undoEdit(automationAccountName, runbookName, options, callback) { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {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 _beginReplaceContent(automationAccountName, runbookName, runbookContent, options, callback) { +function _beginReplaceContent(resourceGroupName, automationAccountName, runbookName, runbookContent, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -652,13 +704,13 @@ function _beginReplaceContent(automationAccountName, runbookName, runbookContent if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -681,7 +733,7 @@ function _beginReplaceContent(automationAccountName, runbookName, runbookContent let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/runbooks/{runbookName}/draft/content'; requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{runbookName}', encodeURIComponent(runbookName)); let queryParameters = []; @@ -737,7 +789,7 @@ function _beginReplaceContent(automationAccountName, runbookName, runbookContent return callback(err); } let statusCode = response.statusCode; - if (statusCode !== 202) { + if (statusCode !== 200 && statusCode !== 202) { let error = new Error(responseBody); error.statusCode = response.statusCode; error.request = msRest.stripRequest(httpRequest); @@ -766,6 +818,29 @@ function _beginReplaceContent(automationAccountName, runbookName, runbookContent // 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 = { + required: false, + serializedName: 'parsedResponse', + type: { + name: 'String' + } + }; + 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); }); @@ -774,6 +849,8 @@ function _beginReplaceContent(automationAccountName, runbookName, runbookContent /** * Publish runbook draft. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The parameters supplied to the publish runbook @@ -790,13 +867,13 @@ function _beginReplaceContent(automationAccountName, runbookName, runbookContent * * {Error} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {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 _beginPublish(automationAccountName, runbookName, options, callback) { +function _beginPublish(resourceGroupName, automationAccountName, runbookName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -812,13 +889,13 @@ function _beginPublish(automationAccountName, runbookName, options, callback) { if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -838,7 +915,7 @@ function _beginPublish(automationAccountName, runbookName, options, callback) { let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/runbooks/{runbookName}/draft/publish'; requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{runbookName}', encodeURIComponent(runbookName)); let queryParameters = []; @@ -874,7 +951,7 @@ function _beginPublish(automationAccountName, runbookName, options, callback) { return callback(err); } let statusCode = response.statusCode; - if (statusCode !== 202) { + if (statusCode !== 200 && statusCode !== 202) { let error = new Error(responseBody); error.statusCode = response.statusCode; error.request = msRest.stripRequest(httpRequest); @@ -903,6 +980,29 @@ function _beginPublish(automationAccountName, runbookName, options, callback) { // 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 = { + required: false, + serializedName: 'parsedResponse', + type: { + name: 'String' + } + }; + 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); }); @@ -928,6 +1028,8 @@ class RunbookDraftOperations { /** * Retrieve the content of runbook draft identified by runbook name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -943,11 +1045,11 @@ class RunbookDraftOperations { * * @reject {Error} - The error object. */ - getContentWithHttpOperationResponse(automationAccountName, runbookName, options) { + getContentWithHttpOperationResponse(resourceGroupName, automationAccountName, runbookName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._getContent(automationAccountName, runbookName, options, (err, result, request, response) => { + self._getContent(resourceGroupName, automationAccountName, runbookName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -960,6 +1062,8 @@ class RunbookDraftOperations { /** * Retrieve the content of runbook draft identified by runbook name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -990,7 +1094,7 @@ class RunbookDraftOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getContent(automationAccountName, runbookName, options, optionalCallback) { + getContent(resourceGroupName, automationAccountName, runbookName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -999,20 +1103,22 @@ class RunbookDraftOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getContent(automationAccountName, runbookName, options, (err, result, request, response) => { + self._getContent(resourceGroupName, automationAccountName, runbookName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getContent(automationAccountName, runbookName, options, optionalCallback); + return self._getContent(resourceGroupName, automationAccountName, runbookName, options, optionalCallback); } } /** * Replaces the runbook draft content. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -1026,15 +1132,15 @@ class RunbookDraftOperations { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - replaceContentWithHttpOperationResponse(automationAccountName, runbookName, runbookContent, options) { + replaceContentWithHttpOperationResponse(resourceGroupName, automationAccountName, runbookName, runbookContent, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._replaceContent(automationAccountName, runbookName, runbookContent, options, (err, result, request, response) => { + self._replaceContent(resourceGroupName, automationAccountName, runbookName, runbookContent, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1047,6 +1153,8 @@ class RunbookDraftOperations { /** * Replaces the runbook draft content. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -1065,7 +1173,7 @@ class RunbookDraftOperations { * * {Promise} A promise is returned * - * @resolve {null} - The deserialized result object. + * @resolve {String} - The deserialized result object. * * @reject {Error} - The error object. * @@ -1073,13 +1181,13 @@ class RunbookDraftOperations { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {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. */ - replaceContent(automationAccountName, runbookName, runbookContent, options, optionalCallback) { + replaceContent(resourceGroupName, automationAccountName, runbookName, runbookContent, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1088,20 +1196,22 @@ class RunbookDraftOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._replaceContent(automationAccountName, runbookName, runbookContent, options, (err, result, request, response) => { + self._replaceContent(resourceGroupName, automationAccountName, runbookName, runbookContent, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._replaceContent(automationAccountName, runbookName, runbookContent, options, optionalCallback); + return self._replaceContent(resourceGroupName, automationAccountName, runbookName, runbookContent, options, optionalCallback); } } /** * Retrieve the runbook draft identified by runbook name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -1117,11 +1227,11 @@ class RunbookDraftOperations { * * @reject {Error} - The error object. */ - getWithHttpOperationResponse(automationAccountName, runbookName, options) { + getWithHttpOperationResponse(resourceGroupName, automationAccountName, runbookName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._get(automationAccountName, runbookName, options, (err, result, request, response) => { + self._get(resourceGroupName, automationAccountName, runbookName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1134,6 +1244,8 @@ class RunbookDraftOperations { /** * Retrieve the runbook draft identified by runbook name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -1165,7 +1277,7 @@ class RunbookDraftOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - get(automationAccountName, runbookName, options, optionalCallback) { + get(resourceGroupName, automationAccountName, runbookName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1174,20 +1286,22 @@ class RunbookDraftOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._get(automationAccountName, runbookName, options, (err, result, request, response) => { + self._get(resourceGroupName, automationAccountName, runbookName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._get(automationAccountName, runbookName, options, optionalCallback); + return self._get(resourceGroupName, automationAccountName, runbookName, options, optionalCallback); } } /** * Publish runbook draft. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The parameters supplied to the publish runbook @@ -1200,15 +1314,15 @@ class RunbookDraftOperations { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - publishWithHttpOperationResponse(automationAccountName, runbookName, options) { + publishWithHttpOperationResponse(resourceGroupName, automationAccountName, runbookName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._publish(automationAccountName, runbookName, options, (err, result, request, response) => { + self._publish(resourceGroupName, automationAccountName, runbookName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1221,6 +1335,8 @@ class RunbookDraftOperations { /** * Publish runbook draft. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The parameters supplied to the publish runbook @@ -1238,7 +1354,7 @@ class RunbookDraftOperations { * * {Promise} A promise is returned * - * @resolve {null} - The deserialized result object. + * @resolve {String} - The deserialized result object. * * @reject {Error} - The error object. * @@ -1246,13 +1362,13 @@ class RunbookDraftOperations { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {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. */ - publish(automationAccountName, runbookName, options, optionalCallback) { + publish(resourceGroupName, automationAccountName, runbookName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1261,20 +1377,22 @@ class RunbookDraftOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._publish(automationAccountName, runbookName, options, (err, result, request, response) => { + self._publish(resourceGroupName, automationAccountName, runbookName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._publish(automationAccountName, runbookName, options, optionalCallback); + return self._publish(resourceGroupName, automationAccountName, runbookName, options, optionalCallback); } } /** * Undo draft edit to last known published state identified by runbook name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -1290,11 +1408,11 @@ class RunbookDraftOperations { * * @reject {Error} - The error object. */ - undoEditWithHttpOperationResponse(automationAccountName, runbookName, options) { + undoEditWithHttpOperationResponse(resourceGroupName, automationAccountName, runbookName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._undoEdit(automationAccountName, runbookName, options, (err, result, request, response) => { + self._undoEdit(resourceGroupName, automationAccountName, runbookName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1307,6 +1425,8 @@ class RunbookDraftOperations { /** * Undo draft edit to last known published state identified by runbook name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -1339,7 +1459,7 @@ class RunbookDraftOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - undoEdit(automationAccountName, runbookName, options, optionalCallback) { + undoEdit(resourceGroupName, automationAccountName, runbookName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1348,20 +1468,22 @@ class RunbookDraftOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._undoEdit(automationAccountName, runbookName, options, (err, result, request, response) => { + self._undoEdit(resourceGroupName, automationAccountName, runbookName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._undoEdit(automationAccountName, runbookName, options, optionalCallback); + return self._undoEdit(resourceGroupName, automationAccountName, runbookName, options, optionalCallback); } } /** * Replaces the runbook draft content. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -1375,15 +1497,15 @@ class RunbookDraftOperations { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - beginReplaceContentWithHttpOperationResponse(automationAccountName, runbookName, runbookContent, options) { + beginReplaceContentWithHttpOperationResponse(resourceGroupName, automationAccountName, runbookName, runbookContent, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._beginReplaceContent(automationAccountName, runbookName, runbookContent, options, (err, result, request, response) => { + self._beginReplaceContent(resourceGroupName, automationAccountName, runbookName, runbookContent, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1396,6 +1518,8 @@ class RunbookDraftOperations { /** * Replaces the runbook draft content. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -1414,7 +1538,7 @@ class RunbookDraftOperations { * * {Promise} A promise is returned * - * @resolve {null} - The deserialized result object. + * @resolve {String} - The deserialized result object. * * @reject {Error} - The error object. * @@ -1422,13 +1546,13 @@ class RunbookDraftOperations { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {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. */ - beginReplaceContent(automationAccountName, runbookName, runbookContent, options, optionalCallback) { + beginReplaceContent(resourceGroupName, automationAccountName, runbookName, runbookContent, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1437,20 +1561,22 @@ class RunbookDraftOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._beginReplaceContent(automationAccountName, runbookName, runbookContent, options, (err, result, request, response) => { + self._beginReplaceContent(resourceGroupName, automationAccountName, runbookName, runbookContent, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._beginReplaceContent(automationAccountName, runbookName, runbookContent, options, optionalCallback); + return self._beginReplaceContent(resourceGroupName, automationAccountName, runbookName, runbookContent, options, optionalCallback); } } /** * Publish runbook draft. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The parameters supplied to the publish runbook @@ -1463,15 +1589,15 @@ class RunbookDraftOperations { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - beginPublishWithHttpOperationResponse(automationAccountName, runbookName, options) { + beginPublishWithHttpOperationResponse(resourceGroupName, automationAccountName, runbookName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._beginPublish(automationAccountName, runbookName, options, (err, result, request, response) => { + self._beginPublish(resourceGroupName, automationAccountName, runbookName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1484,6 +1610,8 @@ class RunbookDraftOperations { /** * Publish runbook draft. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The parameters supplied to the publish runbook @@ -1501,7 +1629,7 @@ class RunbookDraftOperations { * * {Promise} A promise is returned * - * @resolve {null} - The deserialized result object. + * @resolve {String} - The deserialized result object. * * @reject {Error} - The error object. * @@ -1509,13 +1637,13 @@ class RunbookDraftOperations { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {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. */ - beginPublish(automationAccountName, runbookName, options, optionalCallback) { + beginPublish(resourceGroupName, automationAccountName, runbookName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1524,14 +1652,14 @@ class RunbookDraftOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._beginPublish(automationAccountName, runbookName, options, (err, result, request, response) => { + self._beginPublish(resourceGroupName, automationAccountName, runbookName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._beginPublish(automationAccountName, runbookName, options, optionalCallback); + return self._beginPublish(resourceGroupName, automationAccountName, runbookName, options, optionalCallback); } } diff --git a/lib/services/automationManagement/lib/operations/runbookOperations.js b/lib/services/automationManagement/lib/operations/runbookOperations.js index 727f2c4ed7..bc857a50b5 100644 --- a/lib/services/automationManagement/lib/operations/runbookOperations.js +++ b/lib/services/automationManagement/lib/operations/runbookOperations.js @@ -17,6 +17,8 @@ const WebResource = msRest.WebResource; /** * Retrieve the content of runbook identified by runbook name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -38,7 +40,7 @@ const WebResource = msRest.WebResource; * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _getContent(automationAccountName, runbookName, options, callback) { +function _getContent(resourceGroupName, automationAccountName, runbookName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -54,13 +56,13 @@ function _getContent(automationAccountName, runbookName, options, callback) { if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -80,7 +82,7 @@ function _getContent(automationAccountName, runbookName, options, callback) { let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/runbooks/{runbookName}/content'; requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{runbookName}', encodeURIComponent(runbookName)); let queryParameters = []; @@ -175,6 +177,8 @@ function _getContent(automationAccountName, runbookName, options, callback) { /** * Retrieve the runbook identified by runbook name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -197,7 +201,7 @@ function _getContent(automationAccountName, runbookName, options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _get(automationAccountName, runbookName, options, callback) { +function _get(resourceGroupName, automationAccountName, runbookName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -213,13 +217,13 @@ function _get(automationAccountName, runbookName, options, callback) { if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -239,7 +243,7 @@ function _get(automationAccountName, runbookName, options, callback) { let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/runbooks/{runbookName}'; requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{runbookName}', encodeURIComponent(runbookName)); let queryParameters = []; @@ -329,6 +333,8 @@ function _get(automationAccountName, runbookName, options, callback) { /** * Create the runbook identified by runbook name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -415,7 +421,7 @@ function _get(automationAccountName, runbookName, options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _createOrUpdate(automationAccountName, runbookName, parameters, options, callback) { +function _createOrUpdate(resourceGroupName, automationAccountName, runbookName, parameters, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -431,13 +437,13 @@ function _createOrUpdate(automationAccountName, runbookName, parameters, options if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -460,7 +466,7 @@ function _createOrUpdate(automationAccountName, runbookName, parameters, options let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/runbooks/{runbookName}'; requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{runbookName}', encodeURIComponent(runbookName)); let queryParameters = []; @@ -581,6 +587,8 @@ function _createOrUpdate(automationAccountName, runbookName, parameters, options /** * Update the runbook identified by runbook name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -623,7 +631,7 @@ function _createOrUpdate(automationAccountName, runbookName, parameters, options * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _update(automationAccountName, runbookName, parameters, options, callback) { +function _update(resourceGroupName, automationAccountName, runbookName, parameters, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -639,13 +647,13 @@ function _update(automationAccountName, runbookName, parameters, options, callba if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -668,7 +676,7 @@ function _update(automationAccountName, runbookName, parameters, options, callba let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/runbooks/{runbookName}'; requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{runbookName}', encodeURIComponent(runbookName)); let queryParameters = []; @@ -772,6 +780,8 @@ function _update(automationAccountName, runbookName, parameters, options, callba /** * Delete the runbook by name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -793,7 +803,7 @@ function _update(automationAccountName, runbookName, parameters, options, callba * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _deleteMethod(automationAccountName, runbookName, options, callback) { +function _deleteMethod(resourceGroupName, automationAccountName, runbookName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -809,13 +819,13 @@ function _deleteMethod(automationAccountName, runbookName, options, callback) { if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -835,7 +845,7 @@ function _deleteMethod(automationAccountName, runbookName, options, callback) { let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/runbooks/{runbookName}'; requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{runbookName}', encodeURIComponent(runbookName)); let queryParameters = []; @@ -908,6 +918,8 @@ function _deleteMethod(automationAccountName, runbookName, options, callback) { /** * Retrieve a list of runbooks. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -928,7 +940,7 @@ function _deleteMethod(automationAccountName, runbookName, options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _listByAutomationAccount(automationAccountName, options, callback) { +function _listByAutomationAccount(resourceGroupName, automationAccountName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -944,13 +956,13 @@ function _listByAutomationAccount(automationAccountName, options, callback) { if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -967,7 +979,7 @@ function _listByAutomationAccount(automationAccountName, options, callback) { let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/runbooks'; requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); @@ -1201,6 +1213,8 @@ class RunbookOperations { /** * Retrieve the content of runbook identified by runbook name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -1216,11 +1230,11 @@ class RunbookOperations { * * @reject {Error} - The error object. */ - getContentWithHttpOperationResponse(automationAccountName, runbookName, options) { + getContentWithHttpOperationResponse(resourceGroupName, automationAccountName, runbookName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._getContent(automationAccountName, runbookName, options, (err, result, request, response) => { + self._getContent(resourceGroupName, automationAccountName, runbookName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1233,6 +1247,8 @@ class RunbookOperations { /** * Retrieve the content of runbook identified by runbook name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -1263,7 +1279,7 @@ class RunbookOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getContent(automationAccountName, runbookName, options, optionalCallback) { + getContent(resourceGroupName, automationAccountName, runbookName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1272,20 +1288,22 @@ class RunbookOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getContent(automationAccountName, runbookName, options, (err, result, request, response) => { + self._getContent(resourceGroupName, automationAccountName, runbookName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getContent(automationAccountName, runbookName, options, optionalCallback); + return self._getContent(resourceGroupName, automationAccountName, runbookName, options, optionalCallback); } } /** * Retrieve the runbook identified by runbook name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -1301,11 +1319,11 @@ class RunbookOperations { * * @reject {Error} - The error object. */ - getWithHttpOperationResponse(automationAccountName, runbookName, options) { + getWithHttpOperationResponse(resourceGroupName, automationAccountName, runbookName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._get(automationAccountName, runbookName, options, (err, result, request, response) => { + self._get(resourceGroupName, automationAccountName, runbookName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1318,6 +1336,8 @@ class RunbookOperations { /** * Retrieve the runbook identified by runbook name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -1349,7 +1369,7 @@ class RunbookOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - get(automationAccountName, runbookName, options, optionalCallback) { + get(resourceGroupName, automationAccountName, runbookName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1358,20 +1378,22 @@ class RunbookOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._get(automationAccountName, runbookName, options, (err, result, request, response) => { + self._get(resourceGroupName, automationAccountName, runbookName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._get(automationAccountName, runbookName, options, optionalCallback); + return self._get(resourceGroupName, automationAccountName, runbookName, options, optionalCallback); } } /** * Create the runbook identified by runbook name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -1451,11 +1473,11 @@ class RunbookOperations { * * @reject {Error} - The error object. */ - createOrUpdateWithHttpOperationResponse(automationAccountName, runbookName, parameters, options) { + createOrUpdateWithHttpOperationResponse(resourceGroupName, automationAccountName, runbookName, parameters, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._createOrUpdate(automationAccountName, runbookName, parameters, options, (err, result, request, response) => { + self._createOrUpdate(resourceGroupName, automationAccountName, runbookName, parameters, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1468,6 +1490,8 @@ class RunbookOperations { /** * Create the runbook identified by runbook name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -1563,7 +1587,7 @@ class RunbookOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - createOrUpdate(automationAccountName, runbookName, parameters, options, optionalCallback) { + createOrUpdate(resourceGroupName, automationAccountName, runbookName, parameters, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1572,20 +1596,22 @@ class RunbookOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._createOrUpdate(automationAccountName, runbookName, parameters, options, (err, result, request, response) => { + self._createOrUpdate(resourceGroupName, automationAccountName, runbookName, parameters, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._createOrUpdate(automationAccountName, runbookName, parameters, options, optionalCallback); + return self._createOrUpdate(resourceGroupName, automationAccountName, runbookName, parameters, options, optionalCallback); } } /** * Update the runbook identified by runbook name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -1621,11 +1647,11 @@ class RunbookOperations { * * @reject {Error} - The error object. */ - updateWithHttpOperationResponse(automationAccountName, runbookName, parameters, options) { + updateWithHttpOperationResponse(resourceGroupName, automationAccountName, runbookName, parameters, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._update(automationAccountName, runbookName, parameters, options, (err, result, request, response) => { + self._update(resourceGroupName, automationAccountName, runbookName, parameters, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1638,6 +1664,8 @@ class RunbookOperations { /** * Update the runbook identified by runbook name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -1689,7 +1717,7 @@ class RunbookOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - update(automationAccountName, runbookName, parameters, options, optionalCallback) { + update(resourceGroupName, automationAccountName, runbookName, parameters, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1698,20 +1726,22 @@ class RunbookOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._update(automationAccountName, runbookName, parameters, options, (err, result, request, response) => { + self._update(resourceGroupName, automationAccountName, runbookName, parameters, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._update(automationAccountName, runbookName, parameters, options, optionalCallback); + return self._update(resourceGroupName, automationAccountName, runbookName, parameters, options, optionalCallback); } } /** * Delete the runbook by name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -1727,11 +1757,11 @@ class RunbookOperations { * * @reject {Error} - The error object. */ - deleteMethodWithHttpOperationResponse(automationAccountName, runbookName, options) { + deleteMethodWithHttpOperationResponse(resourceGroupName, automationAccountName, runbookName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._deleteMethod(automationAccountName, runbookName, options, (err, result, request, response) => { + self._deleteMethod(resourceGroupName, automationAccountName, runbookName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1744,6 +1774,8 @@ class RunbookOperations { /** * Delete the runbook by name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -1774,7 +1806,7 @@ class RunbookOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(automationAccountName, runbookName, options, optionalCallback) { + deleteMethod(resourceGroupName, automationAccountName, runbookName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1783,20 +1815,22 @@ class RunbookOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._deleteMethod(automationAccountName, runbookName, options, (err, result, request, response) => { + self._deleteMethod(resourceGroupName, automationAccountName, runbookName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._deleteMethod(automationAccountName, runbookName, options, optionalCallback); + return self._deleteMethod(resourceGroupName, automationAccountName, runbookName, options, optionalCallback); } } /** * Retrieve a list of runbooks. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -1810,11 +1844,11 @@ class RunbookOperations { * * @reject {Error} - The error object. */ - listByAutomationAccountWithHttpOperationResponse(automationAccountName, options) { + listByAutomationAccountWithHttpOperationResponse(resourceGroupName, automationAccountName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._listByAutomationAccount(automationAccountName, options, (err, result, request, response) => { + self._listByAutomationAccount(resourceGroupName, automationAccountName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1827,6 +1861,8 @@ class RunbookOperations { /** * Retrieve a list of runbooks. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -1856,7 +1892,7 @@ class RunbookOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - listByAutomationAccount(automationAccountName, options, optionalCallback) { + listByAutomationAccount(resourceGroupName, automationAccountName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1865,14 +1901,14 @@ class RunbookOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._listByAutomationAccount(automationAccountName, options, (err, result, request, response) => { + self._listByAutomationAccount(resourceGroupName, automationAccountName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._listByAutomationAccount(automationAccountName, options, optionalCallback); + return self._listByAutomationAccount(resourceGroupName, automationAccountName, options, optionalCallback); } } diff --git a/lib/services/automationManagement/lib/operations/scheduleOperations.js b/lib/services/automationManagement/lib/operations/scheduleOperations.js index 48f5c87207..ab725860f2 100644 --- a/lib/services/automationManagement/lib/operations/scheduleOperations.js +++ b/lib/services/automationManagement/lib/operations/scheduleOperations.js @@ -17,6 +17,8 @@ const WebResource = msRest.WebResource; /** * Create a schedule. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} scheduleName The schedule name. @@ -74,7 +76,7 @@ const WebResource = msRest.WebResource; * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _createOrUpdate(automationAccountName, scheduleName, parameters, options, callback) { +function _createOrUpdate(resourceGroupName, automationAccountName, scheduleName, parameters, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -87,13 +89,13 @@ function _createOrUpdate(automationAccountName, scheduleName, parameters, option let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -118,7 +120,7 @@ function _createOrUpdate(automationAccountName, scheduleName, parameters, option // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/schedules/{scheduleName}'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{scheduleName}', encodeURIComponent(scheduleName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -223,6 +225,8 @@ function _createOrUpdate(automationAccountName, scheduleName, parameters, option /** * Update the schedule identified by schedule name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} scheduleName The schedule name. @@ -256,7 +260,7 @@ function _createOrUpdate(automationAccountName, scheduleName, parameters, option * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _update(automationAccountName, scheduleName, parameters, options, callback) { +function _update(resourceGroupName, automationAccountName, scheduleName, parameters, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -269,13 +273,13 @@ function _update(automationAccountName, scheduleName, parameters, options, callb let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -300,7 +304,7 @@ function _update(automationAccountName, scheduleName, parameters, options, callb // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/schedules/{scheduleName}'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{scheduleName}', encodeURIComponent(scheduleName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -405,6 +409,8 @@ function _update(automationAccountName, scheduleName, parameters, options, callb /** * Retrieve the schedule identified by schedule name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} scheduleName The schedule name. @@ -427,7 +433,7 @@ function _update(automationAccountName, scheduleName, parameters, options, callb * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _get(automationAccountName, scheduleName, options, callback) { +function _get(resourceGroupName, automationAccountName, scheduleName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -440,13 +446,13 @@ function _get(automationAccountName, scheduleName, options, callback) { let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -468,7 +474,7 @@ function _get(automationAccountName, scheduleName, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/schedules/{scheduleName}'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{scheduleName}', encodeURIComponent(scheduleName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -559,6 +565,8 @@ function _get(automationAccountName, scheduleName, options, callback) { /** * Delete the schedule identified by schedule name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} scheduleName The schedule name. @@ -580,7 +588,7 @@ function _get(automationAccountName, scheduleName, options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _deleteMethod(automationAccountName, scheduleName, options, callback) { +function _deleteMethod(resourceGroupName, automationAccountName, scheduleName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -593,13 +601,13 @@ function _deleteMethod(automationAccountName, scheduleName, options, callback) { let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -621,7 +629,7 @@ function _deleteMethod(automationAccountName, scheduleName, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/schedules/{scheduleName}'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{scheduleName}', encodeURIComponent(scheduleName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -695,6 +703,8 @@ function _deleteMethod(automationAccountName, scheduleName, options, callback) { /** * Retrieve a list of schedules. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -715,7 +725,7 @@ function _deleteMethod(automationAccountName, scheduleName, options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _listByAutomationAccount(automationAccountName, options, callback) { +function _listByAutomationAccount(resourceGroupName, automationAccountName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -728,13 +738,13 @@ function _listByAutomationAccount(automationAccountName, options, callback) { let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -753,7 +763,7 @@ function _listByAutomationAccount(automationAccountName, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/schedules'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; @@ -987,6 +997,8 @@ class ScheduleOperations { /** * Create a schedule. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} scheduleName The schedule name. @@ -1037,11 +1049,11 @@ class ScheduleOperations { * * @reject {Error} - The error object. */ - createOrUpdateWithHttpOperationResponse(automationAccountName, scheduleName, parameters, options) { + createOrUpdateWithHttpOperationResponse(resourceGroupName, automationAccountName, scheduleName, parameters, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._createOrUpdate(automationAccountName, scheduleName, parameters, options, (err, result, request, response) => { + self._createOrUpdate(resourceGroupName, automationAccountName, scheduleName, parameters, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1054,6 +1066,8 @@ class ScheduleOperations { /** * Create a schedule. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} scheduleName The schedule name. @@ -1120,7 +1134,7 @@ class ScheduleOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - createOrUpdate(automationAccountName, scheduleName, parameters, options, optionalCallback) { + createOrUpdate(resourceGroupName, automationAccountName, scheduleName, parameters, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1129,20 +1143,22 @@ class ScheduleOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._createOrUpdate(automationAccountName, scheduleName, parameters, options, (err, result, request, response) => { + self._createOrUpdate(resourceGroupName, automationAccountName, scheduleName, parameters, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._createOrUpdate(automationAccountName, scheduleName, parameters, options, optionalCallback); + return self._createOrUpdate(resourceGroupName, automationAccountName, scheduleName, parameters, options, optionalCallback); } } /** * Update the schedule identified by schedule name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} scheduleName The schedule name. @@ -1169,11 +1185,11 @@ class ScheduleOperations { * * @reject {Error} - The error object. */ - updateWithHttpOperationResponse(automationAccountName, scheduleName, parameters, options) { + updateWithHttpOperationResponse(resourceGroupName, automationAccountName, scheduleName, parameters, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._update(automationAccountName, scheduleName, parameters, options, (err, result, request, response) => { + self._update(resourceGroupName, automationAccountName, scheduleName, parameters, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1186,6 +1202,8 @@ class ScheduleOperations { /** * Update the schedule identified by schedule name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} scheduleName The schedule name. @@ -1228,7 +1246,7 @@ class ScheduleOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - update(automationAccountName, scheduleName, parameters, options, optionalCallback) { + update(resourceGroupName, automationAccountName, scheduleName, parameters, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1237,20 +1255,22 @@ class ScheduleOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._update(automationAccountName, scheduleName, parameters, options, (err, result, request, response) => { + self._update(resourceGroupName, automationAccountName, scheduleName, parameters, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._update(automationAccountName, scheduleName, parameters, options, optionalCallback); + return self._update(resourceGroupName, automationAccountName, scheduleName, parameters, options, optionalCallback); } } /** * Retrieve the schedule identified by schedule name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} scheduleName The schedule name. @@ -1266,11 +1286,11 @@ class ScheduleOperations { * * @reject {Error} - The error object. */ - getWithHttpOperationResponse(automationAccountName, scheduleName, options) { + getWithHttpOperationResponse(resourceGroupName, automationAccountName, scheduleName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._get(automationAccountName, scheduleName, options, (err, result, request, response) => { + self._get(resourceGroupName, automationAccountName, scheduleName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1283,6 +1303,8 @@ class ScheduleOperations { /** * Retrieve the schedule identified by schedule name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} scheduleName The schedule name. @@ -1314,7 +1336,7 @@ class ScheduleOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - get(automationAccountName, scheduleName, options, optionalCallback) { + get(resourceGroupName, automationAccountName, scheduleName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1323,20 +1345,22 @@ class ScheduleOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._get(automationAccountName, scheduleName, options, (err, result, request, response) => { + self._get(resourceGroupName, automationAccountName, scheduleName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._get(automationAccountName, scheduleName, options, optionalCallback); + return self._get(resourceGroupName, automationAccountName, scheduleName, options, optionalCallback); } } /** * Delete the schedule identified by schedule name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} scheduleName The schedule name. @@ -1352,11 +1376,11 @@ class ScheduleOperations { * * @reject {Error} - The error object. */ - deleteMethodWithHttpOperationResponse(automationAccountName, scheduleName, options) { + deleteMethodWithHttpOperationResponse(resourceGroupName, automationAccountName, scheduleName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._deleteMethod(automationAccountName, scheduleName, options, (err, result, request, response) => { + self._deleteMethod(resourceGroupName, automationAccountName, scheduleName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1369,6 +1393,8 @@ class ScheduleOperations { /** * Delete the schedule identified by schedule name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} scheduleName The schedule name. @@ -1399,7 +1425,7 @@ class ScheduleOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(automationAccountName, scheduleName, options, optionalCallback) { + deleteMethod(resourceGroupName, automationAccountName, scheduleName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1408,20 +1434,22 @@ class ScheduleOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._deleteMethod(automationAccountName, scheduleName, options, (err, result, request, response) => { + self._deleteMethod(resourceGroupName, automationAccountName, scheduleName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._deleteMethod(automationAccountName, scheduleName, options, optionalCallback); + return self._deleteMethod(resourceGroupName, automationAccountName, scheduleName, options, optionalCallback); } } /** * Retrieve a list of schedules. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -1435,11 +1463,11 @@ class ScheduleOperations { * * @reject {Error} - The error object. */ - listByAutomationAccountWithHttpOperationResponse(automationAccountName, options) { + listByAutomationAccountWithHttpOperationResponse(resourceGroupName, automationAccountName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._listByAutomationAccount(automationAccountName, options, (err, result, request, response) => { + self._listByAutomationAccount(resourceGroupName, automationAccountName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1452,6 +1480,8 @@ class ScheduleOperations { /** * Retrieve a list of schedules. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -1481,7 +1511,7 @@ class ScheduleOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - listByAutomationAccount(automationAccountName, options, optionalCallback) { + listByAutomationAccount(resourceGroupName, automationAccountName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1490,14 +1520,14 @@ class ScheduleOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._listByAutomationAccount(automationAccountName, options, (err, result, request, response) => { + self._listByAutomationAccount(resourceGroupName, automationAccountName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._listByAutomationAccount(automationAccountName, options, optionalCallback); + return self._listByAutomationAccount(resourceGroupName, automationAccountName, options, optionalCallback); } } diff --git a/lib/services/automationManagement/lib/operations/softwareUpdateConfigurationMachineRuns.js b/lib/services/automationManagement/lib/operations/softwareUpdateConfigurationMachineRuns.js index 0e7ecad27e..e70e258544 100644 --- a/lib/services/automationManagement/lib/operations/softwareUpdateConfigurationMachineRuns.js +++ b/lib/services/automationManagement/lib/operations/softwareUpdateConfigurationMachineRuns.js @@ -17,11 +17,18 @@ const WebResource = msRest.WebResource; /** * Get a single software update configuration machine run by Id. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {uuid} softwareUpdateConfigurationMachineRunId The Id of the software * update configuration machine run. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -39,7 +46,7 @@ const WebResource = msRest.WebResource; * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _getById(softwareUpdateConfigurationMachineRunId, options, callback) { +function _getById(resourceGroupName, automationAccountName, softwareUpdateConfigurationMachineRunId, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -49,29 +56,30 @@ function _getById(softwareUpdateConfigurationMachineRunId, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } + let clientRequestId = (options && options.clientRequestId !== undefined) ? options.clientRequestId : undefined; let apiVersion = '2017-05-15-preview'; // Validate try { if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } - if (this.client.automationAccountName === null || this.client.automationAccountName === undefined || typeof this.client.automationAccountName.valueOf() !== 'string') { - throw new Error('this.client.automationAccountName cannot be null or undefined and it must be of type string.'); + if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { + throw new Error('automationAccountName cannot be null or undefined and it must be of type string.'); } if (softwareUpdateConfigurationMachineRunId === null || softwareUpdateConfigurationMachineRunId === undefined || typeof softwareUpdateConfigurationMachineRunId.valueOf() !== 'string' || !msRest.isValidUuid(softwareUpdateConfigurationMachineRunId)) { throw new Error('softwareUpdateConfigurationMachineRunId cannot be null or undefined and it must be of type string and must be a valid uuid.'); } - if (this.client.clientRequestId !== null && this.client.clientRequestId !== undefined && typeof this.client.clientRequestId.valueOf() !== 'string') { - throw new Error('this.client.clientRequestId must be of type string.'); + if (clientRequestId !== null && clientRequestId !== undefined && typeof clientRequestId.valueOf() !== 'string') { + throw new Error('clientRequestId must be of type string.'); } if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { throw new Error('this.client.acceptLanguage must be of type string.'); @@ -84,8 +92,8 @@ function _getById(softwareUpdateConfigurationMachineRunId, options, callback) { let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/softwareUpdateConfigurationMachineRuns/{softwareUpdateConfigurationMachineRunId}'; requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); - requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(this.client.automationAccountName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{softwareUpdateConfigurationMachineRunId}', encodeURIComponent(softwareUpdateConfigurationMachineRunId.toString())); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); @@ -103,8 +111,8 @@ function _getById(softwareUpdateConfigurationMachineRunId, options, callback) { if (this.client.generateClientRequestId) { httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); } - if (this.client.clientRequestId !== undefined && this.client.clientRequestId !== null) { - httpRequest.headers['clientRequestId'] = this.client.clientRequestId; + if (clientRequestId !== undefined && clientRequestId !== null) { + httpRequest.headers['clientRequestId'] = clientRequestId; } if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { httpRequest.headers['accept-language'] = this.client.acceptLanguage; @@ -176,8 +184,15 @@ function _getById(softwareUpdateConfigurationMachineRunId, options, callback) { /** * Return list of software update configuration machine runs * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {string} [options.filter] The filter to apply on the operation. You * can use the following filters: 'properties/osType', 'properties/status', * 'properties/startTime', and 'properties/softwareUpdateConfiguration/name' @@ -206,7 +221,7 @@ function _getById(softwareUpdateConfigurationMachineRunId, options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _list(options, callback) { +function _list(resourceGroupName, automationAccountName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -216,6 +231,7 @@ function _list(options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } + let clientRequestId = (options && options.clientRequestId !== undefined) ? options.clientRequestId : undefined; let filter = (options && options.filter !== undefined) ? options.filter : undefined; let skip = (options && options.skip !== undefined) ? options.skip : undefined; let top = (options && options.top !== undefined) ? options.top : undefined; @@ -225,20 +241,20 @@ function _list(options, callback) { if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } - if (this.client.automationAccountName === null || this.client.automationAccountName === undefined || typeof this.client.automationAccountName.valueOf() !== 'string') { - throw new Error('this.client.automationAccountName cannot be null or undefined and it must be of type string.'); + if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { + throw new Error('automationAccountName cannot be null or undefined and it must be of type string.'); } - if (this.client.clientRequestId !== null && this.client.clientRequestId !== undefined && typeof this.client.clientRequestId.valueOf() !== 'string') { - throw new Error('this.client.clientRequestId must be of type string.'); + if (clientRequestId !== null && clientRequestId !== undefined && typeof clientRequestId.valueOf() !== 'string') { + throw new Error('clientRequestId must be of type string.'); } if (filter !== null && filter !== undefined && typeof filter.valueOf() !== 'string') { throw new Error('filter must be of type string.'); @@ -260,8 +276,8 @@ function _list(options, callback) { let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/softwareUpdateConfigurationMachineRuns'; requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); - requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(this.client.automationAccountName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); if (filter !== null && filter !== undefined) { @@ -287,8 +303,8 @@ function _list(options, callback) { if (this.client.generateClientRequestId) { httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); } - if (this.client.clientRequestId !== undefined && this.client.clientRequestId !== null) { - httpRequest.headers['clientRequestId'] = this.client.clientRequestId; + if (clientRequestId !== undefined && clientRequestId !== null) { + httpRequest.headers['clientRequestId'] = clientRequestId; } if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { httpRequest.headers['accept-language'] = this.client.acceptLanguage; @@ -372,11 +388,18 @@ class SoftwareUpdateConfigurationMachineRuns { /** * Get a single software update configuration machine run by Id. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {uuid} softwareUpdateConfigurationMachineRunId The Id of the software * update configuration machine run. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -386,11 +409,11 @@ class SoftwareUpdateConfigurationMachineRuns { * * @reject {Error} - The error object. */ - getByIdWithHttpOperationResponse(softwareUpdateConfigurationMachineRunId, options) { + getByIdWithHttpOperationResponse(resourceGroupName, automationAccountName, softwareUpdateConfigurationMachineRunId, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._getById(softwareUpdateConfigurationMachineRunId, options, (err, result, request, response) => { + self._getById(resourceGroupName, automationAccountName, softwareUpdateConfigurationMachineRunId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -403,11 +426,18 @@ class SoftwareUpdateConfigurationMachineRuns { /** * Get a single software update configuration machine run by Id. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {uuid} softwareUpdateConfigurationMachineRunId The Id of the software * update configuration machine run. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -434,7 +464,7 @@ class SoftwareUpdateConfigurationMachineRuns { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getById(softwareUpdateConfigurationMachineRunId, options, optionalCallback) { + getById(resourceGroupName, automationAccountName, softwareUpdateConfigurationMachineRunId, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -443,22 +473,29 @@ class SoftwareUpdateConfigurationMachineRuns { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getById(softwareUpdateConfigurationMachineRunId, options, (err, result, request, response) => { + self._getById(resourceGroupName, automationAccountName, softwareUpdateConfigurationMachineRunId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getById(softwareUpdateConfigurationMachineRunId, options, optionalCallback); + return self._getById(resourceGroupName, automationAccountName, softwareUpdateConfigurationMachineRunId, options, optionalCallback); } } /** * Return list of software update configuration machine runs * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {string} [options.filter] The filter to apply on the operation. You * can use the following filters: 'properties/osType', 'properties/status', * 'properties/startTime', and 'properties/softwareUpdateConfiguration/name' @@ -478,11 +515,11 @@ class SoftwareUpdateConfigurationMachineRuns { * * @reject {Error} - The error object. */ - listWithHttpOperationResponse(options) { + listWithHttpOperationResponse(resourceGroupName, automationAccountName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._list(options, (err, result, request, response) => { + self._list(resourceGroupName, automationAccountName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -495,8 +532,15 @@ class SoftwareUpdateConfigurationMachineRuns { /** * Return list of software update configuration machine runs * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {string} [options.filter] The filter to apply on the operation. You * can use the following filters: 'properties/osType', 'properties/status', * 'properties/startTime', and 'properties/softwareUpdateConfiguration/name' @@ -534,7 +578,7 @@ class SoftwareUpdateConfigurationMachineRuns { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - list(options, optionalCallback) { + list(resourceGroupName, automationAccountName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -543,14 +587,14 @@ class SoftwareUpdateConfigurationMachineRuns { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._list(options, (err, result, request, response) => { + self._list(resourceGroupName, automationAccountName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._list(options, optionalCallback); + return self._list(resourceGroupName, automationAccountName, options, optionalCallback); } } diff --git a/lib/services/automationManagement/lib/operations/softwareUpdateConfigurationRuns.js b/lib/services/automationManagement/lib/operations/softwareUpdateConfigurationRuns.js index ed70966f40..0aaec32ede 100644 --- a/lib/services/automationManagement/lib/operations/softwareUpdateConfigurationRuns.js +++ b/lib/services/automationManagement/lib/operations/softwareUpdateConfigurationRuns.js @@ -17,11 +17,18 @@ const WebResource = msRest.WebResource; /** * Get a single software update configuration Run by Id. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {uuid} softwareUpdateConfigurationRunId The Id of the software update * configuration run. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -39,7 +46,7 @@ const WebResource = msRest.WebResource; * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _getById(softwareUpdateConfigurationRunId, options, callback) { +function _getById(resourceGroupName, automationAccountName, softwareUpdateConfigurationRunId, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -49,29 +56,30 @@ function _getById(softwareUpdateConfigurationRunId, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } + let clientRequestId = (options && options.clientRequestId !== undefined) ? options.clientRequestId : undefined; let apiVersion = '2017-05-15-preview'; // Validate try { if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } - if (this.client.automationAccountName === null || this.client.automationAccountName === undefined || typeof this.client.automationAccountName.valueOf() !== 'string') { - throw new Error('this.client.automationAccountName cannot be null or undefined and it must be of type string.'); + if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { + throw new Error('automationAccountName cannot be null or undefined and it must be of type string.'); } if (softwareUpdateConfigurationRunId === null || softwareUpdateConfigurationRunId === undefined || typeof softwareUpdateConfigurationRunId.valueOf() !== 'string' || !msRest.isValidUuid(softwareUpdateConfigurationRunId)) { throw new Error('softwareUpdateConfigurationRunId cannot be null or undefined and it must be of type string and must be a valid uuid.'); } - if (this.client.clientRequestId !== null && this.client.clientRequestId !== undefined && typeof this.client.clientRequestId.valueOf() !== 'string') { - throw new Error('this.client.clientRequestId must be of type string.'); + if (clientRequestId !== null && clientRequestId !== undefined && typeof clientRequestId.valueOf() !== 'string') { + throw new Error('clientRequestId must be of type string.'); } if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { throw new Error('this.client.acceptLanguage must be of type string.'); @@ -84,8 +92,8 @@ function _getById(softwareUpdateConfigurationRunId, options, callback) { let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/softwareUpdateConfigurationRuns/{softwareUpdateConfigurationRunId}'; requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); - requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(this.client.automationAccountName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{softwareUpdateConfigurationRunId}', encodeURIComponent(softwareUpdateConfigurationRunId.toString())); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); @@ -103,8 +111,8 @@ function _getById(softwareUpdateConfigurationRunId, options, callback) { if (this.client.generateClientRequestId) { httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); } - if (this.client.clientRequestId !== undefined && this.client.clientRequestId !== null) { - httpRequest.headers['clientRequestId'] = this.client.clientRequestId; + if (clientRequestId !== undefined && clientRequestId !== null) { + httpRequest.headers['clientRequestId'] = clientRequestId; } if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { httpRequest.headers['accept-language'] = this.client.acceptLanguage; @@ -176,8 +184,15 @@ function _getById(softwareUpdateConfigurationRunId, options, callback) { /** * Return list of software update configuration runs * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {string} [options.filter] The filter to apply on the operation. You * can use the following filters: 'properties/osType', 'properties/status', * 'properties/startTime', and 'properties/softwareUpdateConfiguration/name' @@ -205,7 +220,7 @@ function _getById(softwareUpdateConfigurationRunId, options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _list(options, callback) { +function _list(resourceGroupName, automationAccountName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -215,6 +230,7 @@ function _list(options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } + let clientRequestId = (options && options.clientRequestId !== undefined) ? options.clientRequestId : undefined; let filter = (options && options.filter !== undefined) ? options.filter : undefined; let skip = (options && options.skip !== undefined) ? options.skip : undefined; let top = (options && options.top !== undefined) ? options.top : undefined; @@ -224,20 +240,20 @@ function _list(options, callback) { if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } - if (this.client.automationAccountName === null || this.client.automationAccountName === undefined || typeof this.client.automationAccountName.valueOf() !== 'string') { - throw new Error('this.client.automationAccountName cannot be null or undefined and it must be of type string.'); + if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { + throw new Error('automationAccountName cannot be null or undefined and it must be of type string.'); } - if (this.client.clientRequestId !== null && this.client.clientRequestId !== undefined && typeof this.client.clientRequestId.valueOf() !== 'string') { - throw new Error('this.client.clientRequestId must be of type string.'); + if (clientRequestId !== null && clientRequestId !== undefined && typeof clientRequestId.valueOf() !== 'string') { + throw new Error('clientRequestId must be of type string.'); } if (filter !== null && filter !== undefined && typeof filter.valueOf() !== 'string') { throw new Error('filter must be of type string.'); @@ -259,8 +275,8 @@ function _list(options, callback) { let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/softwareUpdateConfigurationRuns'; requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); - requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(this.client.automationAccountName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); if (filter !== null && filter !== undefined) { @@ -286,8 +302,8 @@ function _list(options, callback) { if (this.client.generateClientRequestId) { httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); } - if (this.client.clientRequestId !== undefined && this.client.clientRequestId !== null) { - httpRequest.headers['clientRequestId'] = this.client.clientRequestId; + if (clientRequestId !== undefined && clientRequestId !== null) { + httpRequest.headers['clientRequestId'] = clientRequestId; } if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { httpRequest.headers['accept-language'] = this.client.acceptLanguage; @@ -371,11 +387,18 @@ class SoftwareUpdateConfigurationRuns { /** * Get a single software update configuration Run by Id. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {uuid} softwareUpdateConfigurationRunId The Id of the software update * configuration run. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -385,11 +408,11 @@ class SoftwareUpdateConfigurationRuns { * * @reject {Error} - The error object. */ - getByIdWithHttpOperationResponse(softwareUpdateConfigurationRunId, options) { + getByIdWithHttpOperationResponse(resourceGroupName, automationAccountName, softwareUpdateConfigurationRunId, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._getById(softwareUpdateConfigurationRunId, options, (err, result, request, response) => { + self._getById(resourceGroupName, automationAccountName, softwareUpdateConfigurationRunId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -402,11 +425,18 @@ class SoftwareUpdateConfigurationRuns { /** * Get a single software update configuration Run by Id. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {uuid} softwareUpdateConfigurationRunId The Id of the software update * configuration run. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -433,7 +463,7 @@ class SoftwareUpdateConfigurationRuns { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getById(softwareUpdateConfigurationRunId, options, optionalCallback) { + getById(resourceGroupName, automationAccountName, softwareUpdateConfigurationRunId, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -442,22 +472,29 @@ class SoftwareUpdateConfigurationRuns { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getById(softwareUpdateConfigurationRunId, options, (err, result, request, response) => { + self._getById(resourceGroupName, automationAccountName, softwareUpdateConfigurationRunId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getById(softwareUpdateConfigurationRunId, options, optionalCallback); + return self._getById(resourceGroupName, automationAccountName, softwareUpdateConfigurationRunId, options, optionalCallback); } } /** * Return list of software update configuration runs * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {string} [options.filter] The filter to apply on the operation. You * can use the following filters: 'properties/osType', 'properties/status', * 'properties/startTime', and 'properties/softwareUpdateConfiguration/name' @@ -477,11 +514,11 @@ class SoftwareUpdateConfigurationRuns { * * @reject {Error} - The error object. */ - listWithHttpOperationResponse(options) { + listWithHttpOperationResponse(resourceGroupName, automationAccountName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._list(options, (err, result, request, response) => { + self._list(resourceGroupName, automationAccountName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -494,8 +531,15 @@ class SoftwareUpdateConfigurationRuns { /** * Return list of software update configuration runs * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {string} [options.filter] The filter to apply on the operation. You * can use the following filters: 'properties/osType', 'properties/status', * 'properties/startTime', and 'properties/softwareUpdateConfiguration/name' @@ -532,7 +576,7 @@ class SoftwareUpdateConfigurationRuns { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - list(options, optionalCallback) { + list(resourceGroupName, automationAccountName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -541,14 +585,14 @@ class SoftwareUpdateConfigurationRuns { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._list(options, (err, result, request, response) => { + self._list(resourceGroupName, automationAccountName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._list(options, optionalCallback); + return self._list(resourceGroupName, automationAccountName, options, optionalCallback); } } diff --git a/lib/services/automationManagement/lib/operations/softwareUpdateConfigurations.js b/lib/services/automationManagement/lib/operations/softwareUpdateConfigurations.js index 2bac5ec8b4..24f7f61710 100644 --- a/lib/services/automationManagement/lib/operations/softwareUpdateConfigurations.js +++ b/lib/services/automationManagement/lib/operations/softwareUpdateConfigurations.js @@ -17,6 +17,10 @@ const WebResource = msRest.WebResource; /** * Create a new software update configuration with the name given in the URI. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {string} softwareUpdateConfigurationName The name of the software * update configuration to be created. * @@ -126,6 +130,9 @@ const WebResource = msRest.WebResource; * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -143,7 +150,7 @@ const WebResource = msRest.WebResource; * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _create(softwareUpdateConfigurationName, parameters, options, callback) { +function _create(resourceGroupName, automationAccountName, softwareUpdateConfigurationName, parameters, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -153,29 +160,30 @@ function _create(softwareUpdateConfigurationName, parameters, options, callback) if (!callback) { throw new Error('callback cannot be null.'); } + let clientRequestId = (options && options.clientRequestId !== undefined) ? options.clientRequestId : undefined; let apiVersion = '2017-05-15-preview'; // Validate try { if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } - if (this.client.automationAccountName === null || this.client.automationAccountName === undefined || typeof this.client.automationAccountName.valueOf() !== 'string') { - throw new Error('this.client.automationAccountName cannot be null or undefined and it must be of type string.'); + if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { + throw new Error('automationAccountName cannot be null or undefined and it must be of type string.'); } if (softwareUpdateConfigurationName === null || softwareUpdateConfigurationName === undefined || typeof softwareUpdateConfigurationName.valueOf() !== 'string') { throw new Error('softwareUpdateConfigurationName cannot be null or undefined and it must be of type string.'); } - if (this.client.clientRequestId !== null && this.client.clientRequestId !== undefined && typeof this.client.clientRequestId.valueOf() !== 'string') { - throw new Error('this.client.clientRequestId must be of type string.'); + if (clientRequestId !== null && clientRequestId !== undefined && typeof clientRequestId.valueOf() !== 'string') { + throw new Error('clientRequestId must be of type string.'); } if (parameters === null || parameters === undefined) { throw new Error('parameters cannot be null or undefined.'); @@ -191,8 +199,8 @@ function _create(softwareUpdateConfigurationName, parameters, options, callback) let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/softwareUpdateConfigurations/{softwareUpdateConfigurationName}'; requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); - requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(this.client.automationAccountName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{softwareUpdateConfigurationName}', encodeURIComponent(softwareUpdateConfigurationName)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); @@ -210,8 +218,8 @@ function _create(softwareUpdateConfigurationName, parameters, options, callback) if (this.client.generateClientRequestId) { httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); } - if (this.client.clientRequestId !== undefined && this.client.clientRequestId !== null) { - httpRequest.headers['clientRequestId'] = this.client.clientRequestId; + if (clientRequestId !== undefined && clientRequestId !== null) { + httpRequest.headers['clientRequestId'] = clientRequestId; } if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { httpRequest.headers['accept-language'] = this.client.acceptLanguage; @@ -314,11 +322,18 @@ function _create(softwareUpdateConfigurationName, parameters, options, callback) /** * Get a single software update configuration by name. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {string} softwareUpdateConfigurationName The name of the software * update configuration to be created. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -336,7 +351,7 @@ function _create(softwareUpdateConfigurationName, parameters, options, callback) * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _getByName(softwareUpdateConfigurationName, options, callback) { +function _getByName(resourceGroupName, automationAccountName, softwareUpdateConfigurationName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -346,29 +361,30 @@ function _getByName(softwareUpdateConfigurationName, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } + let clientRequestId = (options && options.clientRequestId !== undefined) ? options.clientRequestId : undefined; let apiVersion = '2017-05-15-preview'; // Validate try { if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } - if (this.client.automationAccountName === null || this.client.automationAccountName === undefined || typeof this.client.automationAccountName.valueOf() !== 'string') { - throw new Error('this.client.automationAccountName cannot be null or undefined and it must be of type string.'); + if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { + throw new Error('automationAccountName cannot be null or undefined and it must be of type string.'); } if (softwareUpdateConfigurationName === null || softwareUpdateConfigurationName === undefined || typeof softwareUpdateConfigurationName.valueOf() !== 'string') { throw new Error('softwareUpdateConfigurationName cannot be null or undefined and it must be of type string.'); } - if (this.client.clientRequestId !== null && this.client.clientRequestId !== undefined && typeof this.client.clientRequestId.valueOf() !== 'string') { - throw new Error('this.client.clientRequestId must be of type string.'); + if (clientRequestId !== null && clientRequestId !== undefined && typeof clientRequestId.valueOf() !== 'string') { + throw new Error('clientRequestId must be of type string.'); } if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { throw new Error('this.client.acceptLanguage must be of type string.'); @@ -381,8 +397,8 @@ function _getByName(softwareUpdateConfigurationName, options, callback) { let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/softwareUpdateConfigurations/{softwareUpdateConfigurationName}'; requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); - requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(this.client.automationAccountName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{softwareUpdateConfigurationName}', encodeURIComponent(softwareUpdateConfigurationName)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); @@ -400,8 +416,8 @@ function _getByName(softwareUpdateConfigurationName, options, callback) { if (this.client.generateClientRequestId) { httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); } - if (this.client.clientRequestId !== undefined && this.client.clientRequestId !== null) { - httpRequest.headers['clientRequestId'] = this.client.clientRequestId; + if (clientRequestId !== undefined && clientRequestId !== null) { + httpRequest.headers['clientRequestId'] = clientRequestId; } if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { httpRequest.headers['accept-language'] = this.client.acceptLanguage; @@ -473,11 +489,18 @@ function _getByName(softwareUpdateConfigurationName, options, callback) { /** * delete a specific software update configuration. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {string} softwareUpdateConfigurationName The name of the software * update configuration to be created. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -493,7 +516,7 @@ function _getByName(softwareUpdateConfigurationName, options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _deleteMethod(softwareUpdateConfigurationName, options, callback) { +function _deleteMethod(resourceGroupName, automationAccountName, softwareUpdateConfigurationName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -503,29 +526,30 @@ function _deleteMethod(softwareUpdateConfigurationName, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } + let clientRequestId = (options && options.clientRequestId !== undefined) ? options.clientRequestId : undefined; let apiVersion = '2017-05-15-preview'; // Validate try { if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } - if (this.client.automationAccountName === null || this.client.automationAccountName === undefined || typeof this.client.automationAccountName.valueOf() !== 'string') { - throw new Error('this.client.automationAccountName cannot be null or undefined and it must be of type string.'); + if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { + throw new Error('automationAccountName cannot be null or undefined and it must be of type string.'); } if (softwareUpdateConfigurationName === null || softwareUpdateConfigurationName === undefined || typeof softwareUpdateConfigurationName.valueOf() !== 'string') { throw new Error('softwareUpdateConfigurationName cannot be null or undefined and it must be of type string.'); } - if (this.client.clientRequestId !== null && this.client.clientRequestId !== undefined && typeof this.client.clientRequestId.valueOf() !== 'string') { - throw new Error('this.client.clientRequestId must be of type string.'); + if (clientRequestId !== null && clientRequestId !== undefined && typeof clientRequestId.valueOf() !== 'string') { + throw new Error('clientRequestId must be of type string.'); } if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { throw new Error('this.client.acceptLanguage must be of type string.'); @@ -538,8 +562,8 @@ function _deleteMethod(softwareUpdateConfigurationName, options, callback) { let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/softwareUpdateConfigurations/{softwareUpdateConfigurationName}'; requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); - requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(this.client.automationAccountName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{softwareUpdateConfigurationName}', encodeURIComponent(softwareUpdateConfigurationName)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); @@ -557,8 +581,8 @@ function _deleteMethod(softwareUpdateConfigurationName, options, callback) { if (this.client.generateClientRequestId) { httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); } - if (this.client.clientRequestId !== undefined && this.client.clientRequestId !== null) { - httpRequest.headers['clientRequestId'] = this.client.clientRequestId; + if (clientRequestId !== undefined && clientRequestId !== null) { + httpRequest.headers['clientRequestId'] = clientRequestId; } if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { httpRequest.headers['accept-language'] = this.client.acceptLanguage; @@ -613,8 +637,15 @@ function _deleteMethod(softwareUpdateConfigurationName, options, callback) { /** * Get all software update configurations for the account. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {string} [options.filter] The filter to apply on the operation. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -634,7 +665,7 @@ function _deleteMethod(softwareUpdateConfigurationName, options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _list(options, callback) { +function _list(resourceGroupName, automationAccountName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -644,6 +675,7 @@ function _list(options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } + let clientRequestId = (options && options.clientRequestId !== undefined) ? options.clientRequestId : undefined; let filter = (options && options.filter !== undefined) ? options.filter : undefined; let apiVersion = '2017-05-15-preview'; // Validate @@ -651,20 +683,20 @@ function _list(options, callback) { if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } - if (this.client.automationAccountName === null || this.client.automationAccountName === undefined || typeof this.client.automationAccountName.valueOf() !== 'string') { - throw new Error('this.client.automationAccountName cannot be null or undefined and it must be of type string.'); + if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { + throw new Error('automationAccountName cannot be null or undefined and it must be of type string.'); } - if (this.client.clientRequestId !== null && this.client.clientRequestId !== undefined && typeof this.client.clientRequestId.valueOf() !== 'string') { - throw new Error('this.client.clientRequestId must be of type string.'); + if (clientRequestId !== null && clientRequestId !== undefined && typeof clientRequestId.valueOf() !== 'string') { + throw new Error('clientRequestId must be of type string.'); } if (filter !== null && filter !== undefined && typeof filter.valueOf() !== 'string') { throw new Error('filter must be of type string.'); @@ -680,8 +712,8 @@ function _list(options, callback) { let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/softwareUpdateConfigurations'; requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); - requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(this.client.automationAccountName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); if (filter !== null && filter !== undefined) { @@ -701,8 +733,8 @@ function _list(options, callback) { if (this.client.generateClientRequestId) { httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); } - if (this.client.clientRequestId !== undefined && this.client.clientRequestId !== null) { - httpRequest.headers['clientRequestId'] = this.client.clientRequestId; + if (clientRequestId !== undefined && clientRequestId !== null) { + httpRequest.headers['clientRequestId'] = clientRequestId; } if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { httpRequest.headers['accept-language'] = this.client.acceptLanguage; @@ -788,6 +820,10 @@ class SoftwareUpdateConfigurations { /** * Create a new software update configuration with the name given in the URI. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {string} softwareUpdateConfigurationName The name of the software * update configuration to be created. * @@ -897,6 +933,9 @@ class SoftwareUpdateConfigurations { * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -906,11 +945,11 @@ class SoftwareUpdateConfigurations { * * @reject {Error} - The error object. */ - createWithHttpOperationResponse(softwareUpdateConfigurationName, parameters, options) { + createWithHttpOperationResponse(resourceGroupName, automationAccountName, softwareUpdateConfigurationName, parameters, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._create(softwareUpdateConfigurationName, parameters, options, (err, result, request, response) => { + self._create(resourceGroupName, automationAccountName, softwareUpdateConfigurationName, parameters, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -923,6 +962,10 @@ class SoftwareUpdateConfigurations { /** * Create a new software update configuration with the name given in the URI. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {string} softwareUpdateConfigurationName The name of the software * update configuration to be created. * @@ -1032,6 +1075,9 @@ class SoftwareUpdateConfigurations { * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -1058,7 +1104,7 @@ class SoftwareUpdateConfigurations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - create(softwareUpdateConfigurationName, parameters, options, optionalCallback) { + create(resourceGroupName, automationAccountName, softwareUpdateConfigurationName, parameters, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1067,25 +1113,32 @@ class SoftwareUpdateConfigurations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._create(softwareUpdateConfigurationName, parameters, options, (err, result, request, response) => { + self._create(resourceGroupName, automationAccountName, softwareUpdateConfigurationName, parameters, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._create(softwareUpdateConfigurationName, parameters, options, optionalCallback); + return self._create(resourceGroupName, automationAccountName, softwareUpdateConfigurationName, parameters, options, optionalCallback); } } /** * Get a single software update configuration by name. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {string} softwareUpdateConfigurationName The name of the software * update configuration to be created. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -1095,11 +1148,11 @@ class SoftwareUpdateConfigurations { * * @reject {Error} - The error object. */ - getByNameWithHttpOperationResponse(softwareUpdateConfigurationName, options) { + getByNameWithHttpOperationResponse(resourceGroupName, automationAccountName, softwareUpdateConfigurationName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._getByName(softwareUpdateConfigurationName, options, (err, result, request, response) => { + self._getByName(resourceGroupName, automationAccountName, softwareUpdateConfigurationName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1112,11 +1165,18 @@ class SoftwareUpdateConfigurations { /** * Get a single software update configuration by name. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {string} softwareUpdateConfigurationName The name of the software * update configuration to be created. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -1143,7 +1203,7 @@ class SoftwareUpdateConfigurations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getByName(softwareUpdateConfigurationName, options, optionalCallback) { + getByName(resourceGroupName, automationAccountName, softwareUpdateConfigurationName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1152,25 +1212,32 @@ class SoftwareUpdateConfigurations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getByName(softwareUpdateConfigurationName, options, (err, result, request, response) => { + self._getByName(resourceGroupName, automationAccountName, softwareUpdateConfigurationName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getByName(softwareUpdateConfigurationName, options, optionalCallback); + return self._getByName(resourceGroupName, automationAccountName, softwareUpdateConfigurationName, options, optionalCallback); } } /** * delete a specific software update configuration. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {string} softwareUpdateConfigurationName The name of the software * update configuration to be created. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -1180,11 +1247,11 @@ class SoftwareUpdateConfigurations { * * @reject {Error} - The error object. */ - deleteMethodWithHttpOperationResponse(softwareUpdateConfigurationName, options) { + deleteMethodWithHttpOperationResponse(resourceGroupName, automationAccountName, softwareUpdateConfigurationName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._deleteMethod(softwareUpdateConfigurationName, options, (err, result, request, response) => { + self._deleteMethod(resourceGroupName, automationAccountName, softwareUpdateConfigurationName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1197,11 +1264,18 @@ class SoftwareUpdateConfigurations { /** * delete a specific software update configuration. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {string} softwareUpdateConfigurationName The name of the software * update configuration to be created. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -1226,7 +1300,7 @@ class SoftwareUpdateConfigurations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(softwareUpdateConfigurationName, options, optionalCallback) { + deleteMethod(resourceGroupName, automationAccountName, softwareUpdateConfigurationName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1235,22 +1309,29 @@ class SoftwareUpdateConfigurations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._deleteMethod(softwareUpdateConfigurationName, options, (err, result, request, response) => { + self._deleteMethod(resourceGroupName, automationAccountName, softwareUpdateConfigurationName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._deleteMethod(softwareUpdateConfigurationName, options, optionalCallback); + return self._deleteMethod(resourceGroupName, automationAccountName, softwareUpdateConfigurationName, options, optionalCallback); } } /** * Get all software update configurations for the account. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {string} [options.filter] The filter to apply on the operation. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -1262,11 +1343,11 @@ class SoftwareUpdateConfigurations { * * @reject {Error} - The error object. */ - listWithHttpOperationResponse(options) { + listWithHttpOperationResponse(resourceGroupName, automationAccountName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._list(options, (err, result, request, response) => { + self._list(resourceGroupName, automationAccountName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1279,8 +1360,15 @@ class SoftwareUpdateConfigurations { /** * Get all software update configurations for the account. * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} automationAccountName The name of the automation account. + * * @param {object} [options] Optional Parameters. * + * @param {string} [options.clientRequestId] Identifies this specific client + * request. + * * @param {string} [options.filter] The filter to apply on the operation. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -1309,7 +1397,7 @@ class SoftwareUpdateConfigurations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - list(options, optionalCallback) { + list(resourceGroupName, automationAccountName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1318,14 +1406,14 @@ class SoftwareUpdateConfigurations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._list(options, (err, result, request, response) => { + self._list(resourceGroupName, automationAccountName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._list(options, optionalCallback); + return self._list(resourceGroupName, automationAccountName, options, optionalCallback); } } diff --git a/lib/services/automationManagement/lib/operations/sourceControlOperations.js b/lib/services/automationManagement/lib/operations/sourceControlOperations.js index cc165f3f21..45f6f96beb 100644 --- a/lib/services/automationManagement/lib/operations/sourceControlOperations.js +++ b/lib/services/automationManagement/lib/operations/sourceControlOperations.js @@ -17,6 +17,8 @@ const WebResource = msRest.WebResource; /** * Create a source control. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} sourceControlName The source control name. @@ -67,7 +69,7 @@ const WebResource = msRest.WebResource; * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _createOrUpdate(automationAccountName, sourceControlName, parameters, options, callback) { +function _createOrUpdate(resourceGroupName, automationAccountName, sourceControlName, parameters, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -80,13 +82,13 @@ function _createOrUpdate(automationAccountName, sourceControlName, parameters, o let apiVersion = '2017-05-15-preview'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -111,7 +113,7 @@ function _createOrUpdate(automationAccountName, sourceControlName, parameters, o // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/sourceControls/{sourceControlName}'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{sourceControlName}', encodeURIComponent(sourceControlName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -233,6 +235,8 @@ function _createOrUpdate(automationAccountName, sourceControlName, parameters, o /** * Update a source control. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} sourceControlName The source control name. @@ -276,7 +280,7 @@ function _createOrUpdate(automationAccountName, sourceControlName, parameters, o * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _update(automationAccountName, sourceControlName, parameters, options, callback) { +function _update(resourceGroupName, automationAccountName, sourceControlName, parameters, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -289,13 +293,13 @@ function _update(automationAccountName, sourceControlName, parameters, options, let apiVersion = '2017-05-15-preview'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -320,7 +324,7 @@ function _update(automationAccountName, sourceControlName, parameters, options, // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/sourceControls/{sourceControlName}'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{sourceControlName}', encodeURIComponent(sourceControlName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -425,6 +429,8 @@ function _update(automationAccountName, sourceControlName, parameters, options, /** * Delete the source control. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} sourceControlName The name of source control. @@ -446,7 +452,7 @@ function _update(automationAccountName, sourceControlName, parameters, options, * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _deleteMethod(automationAccountName, sourceControlName, options, callback) { +function _deleteMethod(resourceGroupName, automationAccountName, sourceControlName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -459,13 +465,13 @@ function _deleteMethod(automationAccountName, sourceControlName, options, callba let apiVersion = '2017-05-15-preview'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -487,7 +493,7 @@ function _deleteMethod(automationAccountName, sourceControlName, options, callba // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/sourceControls/{sourceControlName}'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{sourceControlName}', encodeURIComponent(sourceControlName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -561,6 +567,8 @@ function _deleteMethod(automationAccountName, sourceControlName, options, callba /** * Retrieve the source control identified by source control name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} sourceControlName The name of source control. @@ -583,7 +591,7 @@ function _deleteMethod(automationAccountName, sourceControlName, options, callba * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _get(automationAccountName, sourceControlName, options, callback) { +function _get(resourceGroupName, automationAccountName, sourceControlName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -596,13 +604,13 @@ function _get(automationAccountName, sourceControlName, options, callback) { let apiVersion = '2017-05-15-preview'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -624,7 +632,7 @@ function _get(automationAccountName, sourceControlName, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/sourceControls/{sourceControlName}'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{sourceControlName}', encodeURIComponent(sourceControlName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -715,6 +723,8 @@ function _get(automationAccountName, sourceControlName, options, callback) { /** * Retrieve a list of source controls. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -738,7 +748,7 @@ function _get(automationAccountName, sourceControlName, options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _listByAutomationAccount(automationAccountName, options, callback) { +function _listByAutomationAccount(resourceGroupName, automationAccountName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -752,13 +762,13 @@ function _listByAutomationAccount(automationAccountName, options, callback) { let apiVersion = '2017-05-15-preview'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -780,7 +790,7 @@ function _listByAutomationAccount(automationAccountName, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/sourceControls'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; @@ -1018,6 +1028,8 @@ class SourceControlOperations { /** * Create a source control. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} sourceControlName The source control name. @@ -1061,11 +1073,11 @@ class SourceControlOperations { * * @reject {Error} - The error object. */ - createOrUpdateWithHttpOperationResponse(automationAccountName, sourceControlName, parameters, options) { + createOrUpdateWithHttpOperationResponse(resourceGroupName, automationAccountName, sourceControlName, parameters, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._createOrUpdate(automationAccountName, sourceControlName, parameters, options, (err, result, request, response) => { + self._createOrUpdate(resourceGroupName, automationAccountName, sourceControlName, parameters, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1078,6 +1090,8 @@ class SourceControlOperations { /** * Create a source control. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} sourceControlName The source control name. @@ -1137,7 +1151,7 @@ class SourceControlOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - createOrUpdate(automationAccountName, sourceControlName, parameters, options, optionalCallback) { + createOrUpdate(resourceGroupName, automationAccountName, sourceControlName, parameters, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1146,20 +1160,22 @@ class SourceControlOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._createOrUpdate(automationAccountName, sourceControlName, parameters, options, (err, result, request, response) => { + self._createOrUpdate(resourceGroupName, automationAccountName, sourceControlName, parameters, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._createOrUpdate(automationAccountName, sourceControlName, parameters, options, optionalCallback); + return self._createOrUpdate(resourceGroupName, automationAccountName, sourceControlName, parameters, options, optionalCallback); } } /** * Update a source control. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} sourceControlName The source control name. @@ -1196,11 +1212,11 @@ class SourceControlOperations { * * @reject {Error} - The error object. */ - updateWithHttpOperationResponse(automationAccountName, sourceControlName, parameters, options) { + updateWithHttpOperationResponse(resourceGroupName, automationAccountName, sourceControlName, parameters, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._update(automationAccountName, sourceControlName, parameters, options, (err, result, request, response) => { + self._update(resourceGroupName, automationAccountName, sourceControlName, parameters, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1213,6 +1229,8 @@ class SourceControlOperations { /** * Update a source control. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} sourceControlName The source control name. @@ -1265,7 +1283,7 @@ class SourceControlOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - update(automationAccountName, sourceControlName, parameters, options, optionalCallback) { + update(resourceGroupName, automationAccountName, sourceControlName, parameters, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1274,20 +1292,22 @@ class SourceControlOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._update(automationAccountName, sourceControlName, parameters, options, (err, result, request, response) => { + self._update(resourceGroupName, automationAccountName, sourceControlName, parameters, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._update(automationAccountName, sourceControlName, parameters, options, optionalCallback); + return self._update(resourceGroupName, automationAccountName, sourceControlName, parameters, options, optionalCallback); } } /** * Delete the source control. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} sourceControlName The name of source control. @@ -1303,11 +1323,11 @@ class SourceControlOperations { * * @reject {Error} - The error object. */ - deleteMethodWithHttpOperationResponse(automationAccountName, sourceControlName, options) { + deleteMethodWithHttpOperationResponse(resourceGroupName, automationAccountName, sourceControlName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._deleteMethod(automationAccountName, sourceControlName, options, (err, result, request, response) => { + self._deleteMethod(resourceGroupName, automationAccountName, sourceControlName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1320,6 +1340,8 @@ class SourceControlOperations { /** * Delete the source control. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} sourceControlName The name of source control. @@ -1350,7 +1372,7 @@ class SourceControlOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(automationAccountName, sourceControlName, options, optionalCallback) { + deleteMethod(resourceGroupName, automationAccountName, sourceControlName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1359,20 +1381,22 @@ class SourceControlOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._deleteMethod(automationAccountName, sourceControlName, options, (err, result, request, response) => { + self._deleteMethod(resourceGroupName, automationAccountName, sourceControlName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._deleteMethod(automationAccountName, sourceControlName, options, optionalCallback); + return self._deleteMethod(resourceGroupName, automationAccountName, sourceControlName, options, optionalCallback); } } /** * Retrieve the source control identified by source control name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} sourceControlName The name of source control. @@ -1388,11 +1412,11 @@ class SourceControlOperations { * * @reject {Error} - The error object. */ - getWithHttpOperationResponse(automationAccountName, sourceControlName, options) { + getWithHttpOperationResponse(resourceGroupName, automationAccountName, sourceControlName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._get(automationAccountName, sourceControlName, options, (err, result, request, response) => { + self._get(resourceGroupName, automationAccountName, sourceControlName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1405,6 +1429,8 @@ class SourceControlOperations { /** * Retrieve the source control identified by source control name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} sourceControlName The name of source control. @@ -1436,7 +1462,7 @@ class SourceControlOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - get(automationAccountName, sourceControlName, options, optionalCallback) { + get(resourceGroupName, automationAccountName, sourceControlName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1445,20 +1471,22 @@ class SourceControlOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._get(automationAccountName, sourceControlName, options, (err, result, request, response) => { + self._get(resourceGroupName, automationAccountName, sourceControlName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._get(automationAccountName, sourceControlName, options, optionalCallback); + return self._get(resourceGroupName, automationAccountName, sourceControlName, options, optionalCallback); } } /** * Retrieve a list of source controls. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -1474,11 +1502,11 @@ class SourceControlOperations { * * @reject {Error} - The error object. */ - listByAutomationAccountWithHttpOperationResponse(automationAccountName, options) { + listByAutomationAccountWithHttpOperationResponse(resourceGroupName, automationAccountName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._listByAutomationAccount(automationAccountName, options, (err, result, request, response) => { + self._listByAutomationAccount(resourceGroupName, automationAccountName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1491,6 +1519,8 @@ class SourceControlOperations { /** * Retrieve a list of source controls. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -1523,7 +1553,7 @@ class SourceControlOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - listByAutomationAccount(automationAccountName, options, optionalCallback) { + listByAutomationAccount(resourceGroupName, automationAccountName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1532,14 +1562,14 @@ class SourceControlOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._listByAutomationAccount(automationAccountName, options, (err, result, request, response) => { + self._listByAutomationAccount(resourceGroupName, automationAccountName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._listByAutomationAccount(automationAccountName, options, optionalCallback); + return self._listByAutomationAccount(resourceGroupName, automationAccountName, options, optionalCallback); } } diff --git a/lib/services/automationManagement/lib/operations/sourceControlSyncJobOperations.js b/lib/services/automationManagement/lib/operations/sourceControlSyncJobOperations.js index 9c083f2028..d0159af758 100644 --- a/lib/services/automationManagement/lib/operations/sourceControlSyncJobOperations.js +++ b/lib/services/automationManagement/lib/operations/sourceControlSyncJobOperations.js @@ -17,6 +17,8 @@ const WebResource = msRest.WebResource; /** * Creates the sync job for a source control. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} sourceControlName The source control name. @@ -41,7 +43,7 @@ const WebResource = msRest.WebResource; * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _create(automationAccountName, sourceControlName, sourceControlSyncJobId, options, callback) { +function _create(resourceGroupName, automationAccountName, sourceControlName, sourceControlSyncJobId, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -54,13 +56,13 @@ function _create(automationAccountName, sourceControlName, sourceControlSyncJobI let apiVersion = '2017-05-15-preview'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -85,7 +87,7 @@ function _create(automationAccountName, sourceControlName, sourceControlSyncJobI // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/sourceControls/{sourceControlName}/sourceControlSyncJobs/{sourceControlSyncJobId}'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{sourceControlName}', encodeURIComponent(sourceControlName)); requestUrl = requestUrl.replace('{sourceControlSyncJobId}', encodeURIComponent(sourceControlSyncJobId.toString())); @@ -177,6 +179,8 @@ function _create(automationAccountName, sourceControlName, sourceControlSyncJobI /** * Retrieve the source control sync job identified by job id. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} sourceControlName The source control name. @@ -202,7 +206,7 @@ function _create(automationAccountName, sourceControlName, sourceControlSyncJobI * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _get(automationAccountName, sourceControlName, sourceControlSyncJobId, options, callback) { +function _get(resourceGroupName, automationAccountName, sourceControlName, sourceControlSyncJobId, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -215,13 +219,13 @@ function _get(automationAccountName, sourceControlName, sourceControlSyncJobId, let apiVersion = '2017-05-15-preview'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -246,7 +250,7 @@ function _get(automationAccountName, sourceControlName, sourceControlSyncJobId, // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/sourceControls/{sourceControlName}/sourceControlSyncJobs/{sourceControlSyncJobId}'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{sourceControlName}', encodeURIComponent(sourceControlName)); requestUrl = requestUrl.replace('{sourceControlSyncJobId}', encodeURIComponent(sourceControlSyncJobId.toString())); @@ -338,6 +342,8 @@ function _get(automationAccountName, sourceControlName, sourceControlSyncJobId, /** * Retrieve a list of source control sync jobs. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} sourceControlName The source control name. @@ -363,7 +369,7 @@ function _get(automationAccountName, sourceControlName, sourceControlSyncJobId, * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _listByAutomationAccount(automationAccountName, sourceControlName, options, callback) { +function _listByAutomationAccount(resourceGroupName, automationAccountName, sourceControlName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -377,13 +383,13 @@ function _listByAutomationAccount(automationAccountName, sourceControlName, opti let apiVersion = '2017-05-15-preview'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -408,7 +414,7 @@ function _listByAutomationAccount(automationAccountName, sourceControlName, opti // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/sourceControls/{sourceControlName}/sourceControlSyncJobs'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{sourceControlName}', encodeURIComponent(sourceControlName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -645,6 +651,8 @@ class SourceControlSyncJobOperations { /** * Creates the sync job for a source control. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} sourceControlName The source control name. @@ -662,11 +670,11 @@ class SourceControlSyncJobOperations { * * @reject {Error} - The error object. */ - createWithHttpOperationResponse(automationAccountName, sourceControlName, sourceControlSyncJobId, options) { + createWithHttpOperationResponse(resourceGroupName, automationAccountName, sourceControlName, sourceControlSyncJobId, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._create(automationAccountName, sourceControlName, sourceControlSyncJobId, options, (err, result, request, response) => { + self._create(resourceGroupName, automationAccountName, sourceControlName, sourceControlSyncJobId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -679,6 +687,8 @@ class SourceControlSyncJobOperations { /** * Creates the sync job for a source control. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} sourceControlName The source control name. @@ -712,7 +722,7 @@ class SourceControlSyncJobOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - create(automationAccountName, sourceControlName, sourceControlSyncJobId, options, optionalCallback) { + create(resourceGroupName, automationAccountName, sourceControlName, sourceControlSyncJobId, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -721,20 +731,22 @@ class SourceControlSyncJobOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._create(automationAccountName, sourceControlName, sourceControlSyncJobId, options, (err, result, request, response) => { + self._create(resourceGroupName, automationAccountName, sourceControlName, sourceControlSyncJobId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._create(automationAccountName, sourceControlName, sourceControlSyncJobId, options, optionalCallback); + return self._create(resourceGroupName, automationAccountName, sourceControlName, sourceControlSyncJobId, options, optionalCallback); } } /** * Retrieve the source control sync job identified by job id. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} sourceControlName The source control name. @@ -752,11 +764,11 @@ class SourceControlSyncJobOperations { * * @reject {Error} - The error object. */ - getWithHttpOperationResponse(automationAccountName, sourceControlName, sourceControlSyncJobId, options) { + getWithHttpOperationResponse(resourceGroupName, automationAccountName, sourceControlName, sourceControlSyncJobId, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._get(automationAccountName, sourceControlName, sourceControlSyncJobId, options, (err, result, request, response) => { + self._get(resourceGroupName, automationAccountName, sourceControlName, sourceControlSyncJobId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -769,6 +781,8 @@ class SourceControlSyncJobOperations { /** * Retrieve the source control sync job identified by job id. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} sourceControlName The source control name. @@ -803,7 +817,7 @@ class SourceControlSyncJobOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - get(automationAccountName, sourceControlName, sourceControlSyncJobId, options, optionalCallback) { + get(resourceGroupName, automationAccountName, sourceControlName, sourceControlSyncJobId, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -812,20 +826,22 @@ class SourceControlSyncJobOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._get(automationAccountName, sourceControlName, sourceControlSyncJobId, options, (err, result, request, response) => { + self._get(resourceGroupName, automationAccountName, sourceControlName, sourceControlSyncJobId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._get(automationAccountName, sourceControlName, sourceControlSyncJobId, options, optionalCallback); + return self._get(resourceGroupName, automationAccountName, sourceControlName, sourceControlSyncJobId, options, optionalCallback); } } /** * Retrieve a list of source control sync jobs. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} sourceControlName The source control name. @@ -843,11 +859,11 @@ class SourceControlSyncJobOperations { * * @reject {Error} - The error object. */ - listByAutomationAccountWithHttpOperationResponse(automationAccountName, sourceControlName, options) { + listByAutomationAccountWithHttpOperationResponse(resourceGroupName, automationAccountName, sourceControlName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._listByAutomationAccount(automationAccountName, sourceControlName, options, (err, result, request, response) => { + self._listByAutomationAccount(resourceGroupName, automationAccountName, sourceControlName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -860,6 +876,8 @@ class SourceControlSyncJobOperations { /** * Retrieve a list of source control sync jobs. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} sourceControlName The source control name. @@ -894,7 +912,7 @@ class SourceControlSyncJobOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - listByAutomationAccount(automationAccountName, sourceControlName, options, optionalCallback) { + listByAutomationAccount(resourceGroupName, automationAccountName, sourceControlName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -903,14 +921,14 @@ class SourceControlSyncJobOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._listByAutomationAccount(automationAccountName, sourceControlName, options, (err, result, request, response) => { + self._listByAutomationAccount(resourceGroupName, automationAccountName, sourceControlName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._listByAutomationAccount(automationAccountName, sourceControlName, options, optionalCallback); + return self._listByAutomationAccount(resourceGroupName, automationAccountName, sourceControlName, options, optionalCallback); } } diff --git a/lib/services/automationManagement/lib/operations/testJobOperations.js b/lib/services/automationManagement/lib/operations/testJobOperations.js index fe584dc175..d6bdd29dcc 100644 --- a/lib/services/automationManagement/lib/operations/testJobOperations.js +++ b/lib/services/automationManagement/lib/operations/testJobOperations.js @@ -17,6 +17,8 @@ const WebResource = msRest.WebResource; /** * Create a test job of the runbook. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The parameters supplied to the create test job @@ -49,7 +51,7 @@ const WebResource = msRest.WebResource; * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _create(automationAccountName, runbookName, parameters, options, callback) { +function _create(resourceGroupName, automationAccountName, runbookName, parameters, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -65,13 +67,13 @@ function _create(automationAccountName, runbookName, parameters, options, callba if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -94,7 +96,7 @@ function _create(automationAccountName, runbookName, parameters, options, callba let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/runbooks/{runbookName}/draft/testJob'; requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{runbookName}', encodeURIComponent(runbookName)); let queryParameters = []; @@ -198,6 +200,8 @@ function _create(automationAccountName, runbookName, parameters, options, callba /** * Retrieve the test job for the specified runbook. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -220,7 +224,7 @@ function _create(automationAccountName, runbookName, parameters, options, callba * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _get(automationAccountName, runbookName, options, callback) { +function _get(resourceGroupName, automationAccountName, runbookName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -236,13 +240,13 @@ function _get(automationAccountName, runbookName, options, callback) { if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -262,7 +266,7 @@ function _get(automationAccountName, runbookName, options, callback) { let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/runbooks/{runbookName}/draft/testJob'; requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{runbookName}', encodeURIComponent(runbookName)); let queryParameters = []; @@ -352,6 +356,8 @@ function _get(automationAccountName, runbookName, options, callback) { /** * Resume the test job. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -373,7 +379,7 @@ function _get(automationAccountName, runbookName, options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _resume(automationAccountName, runbookName, options, callback) { +function _resume(resourceGroupName, automationAccountName, runbookName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -389,13 +395,13 @@ function _resume(automationAccountName, runbookName, options, callback) { if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -415,7 +421,7 @@ function _resume(automationAccountName, runbookName, options, callback) { let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/runbooks/{runbookName}/draft/testJob/resume'; requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{runbookName}', encodeURIComponent(runbookName)); let queryParameters = []; @@ -488,6 +494,8 @@ function _resume(automationAccountName, runbookName, options, callback) { /** * Stop the test job. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -509,7 +517,7 @@ function _resume(automationAccountName, runbookName, options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _stop(automationAccountName, runbookName, options, callback) { +function _stop(resourceGroupName, automationAccountName, runbookName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -525,13 +533,13 @@ function _stop(automationAccountName, runbookName, options, callback) { if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -551,7 +559,7 @@ function _stop(automationAccountName, runbookName, options, callback) { let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/runbooks/{runbookName}/draft/testJob/stop'; requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{runbookName}', encodeURIComponent(runbookName)); let queryParameters = []; @@ -624,6 +632,8 @@ function _stop(automationAccountName, runbookName, options, callback) { /** * Suspend the test job. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -645,7 +655,7 @@ function _stop(automationAccountName, runbookName, options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _suspend(automationAccountName, runbookName, options, callback) { +function _suspend(resourceGroupName, automationAccountName, runbookName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -661,13 +671,13 @@ function _suspend(automationAccountName, runbookName, options, callback) { if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -687,7 +697,7 @@ function _suspend(automationAccountName, runbookName, options, callback) { let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/runbooks/{runbookName}/draft/testJob/suspend'; requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{runbookName}', encodeURIComponent(runbookName)); let queryParameters = []; @@ -775,6 +785,8 @@ class TestJobOperations { /** * Create a test job of the runbook. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The parameters supplied to the create test job @@ -800,11 +812,11 @@ class TestJobOperations { * * @reject {Error} - The error object. */ - createWithHttpOperationResponse(automationAccountName, runbookName, parameters, options) { + createWithHttpOperationResponse(resourceGroupName, automationAccountName, runbookName, parameters, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._create(automationAccountName, runbookName, parameters, options, (err, result, request, response) => { + self._create(resourceGroupName, automationAccountName, runbookName, parameters, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -817,6 +829,8 @@ class TestJobOperations { /** * Create a test job of the runbook. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The parameters supplied to the create test job @@ -858,7 +872,7 @@ class TestJobOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - create(automationAccountName, runbookName, parameters, options, optionalCallback) { + create(resourceGroupName, automationAccountName, runbookName, parameters, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -867,20 +881,22 @@ class TestJobOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._create(automationAccountName, runbookName, parameters, options, (err, result, request, response) => { + self._create(resourceGroupName, automationAccountName, runbookName, parameters, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._create(automationAccountName, runbookName, parameters, options, optionalCallback); + return self._create(resourceGroupName, automationAccountName, runbookName, parameters, options, optionalCallback); } } /** * Retrieve the test job for the specified runbook. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -896,11 +912,11 @@ class TestJobOperations { * * @reject {Error} - The error object. */ - getWithHttpOperationResponse(automationAccountName, runbookName, options) { + getWithHttpOperationResponse(resourceGroupName, automationAccountName, runbookName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._get(automationAccountName, runbookName, options, (err, result, request, response) => { + self._get(resourceGroupName, automationAccountName, runbookName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -913,6 +929,8 @@ class TestJobOperations { /** * Retrieve the test job for the specified runbook. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -944,7 +962,7 @@ class TestJobOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - get(automationAccountName, runbookName, options, optionalCallback) { + get(resourceGroupName, automationAccountName, runbookName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -953,20 +971,22 @@ class TestJobOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._get(automationAccountName, runbookName, options, (err, result, request, response) => { + self._get(resourceGroupName, automationAccountName, runbookName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._get(automationAccountName, runbookName, options, optionalCallback); + return self._get(resourceGroupName, automationAccountName, runbookName, options, optionalCallback); } } /** * Resume the test job. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -982,11 +1002,11 @@ class TestJobOperations { * * @reject {Error} - The error object. */ - resumeWithHttpOperationResponse(automationAccountName, runbookName, options) { + resumeWithHttpOperationResponse(resourceGroupName, automationAccountName, runbookName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._resume(automationAccountName, runbookName, options, (err, result, request, response) => { + self._resume(resourceGroupName, automationAccountName, runbookName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -999,6 +1019,8 @@ class TestJobOperations { /** * Resume the test job. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -1029,7 +1051,7 @@ class TestJobOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - resume(automationAccountName, runbookName, options, optionalCallback) { + resume(resourceGroupName, automationAccountName, runbookName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1038,20 +1060,22 @@ class TestJobOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._resume(automationAccountName, runbookName, options, (err, result, request, response) => { + self._resume(resourceGroupName, automationAccountName, runbookName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._resume(automationAccountName, runbookName, options, optionalCallback); + return self._resume(resourceGroupName, automationAccountName, runbookName, options, optionalCallback); } } /** * Stop the test job. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -1067,11 +1091,11 @@ class TestJobOperations { * * @reject {Error} - The error object. */ - stopWithHttpOperationResponse(automationAccountName, runbookName, options) { + stopWithHttpOperationResponse(resourceGroupName, automationAccountName, runbookName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._stop(automationAccountName, runbookName, options, (err, result, request, response) => { + self._stop(resourceGroupName, automationAccountName, runbookName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1084,6 +1108,8 @@ class TestJobOperations { /** * Stop the test job. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -1114,7 +1140,7 @@ class TestJobOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - stop(automationAccountName, runbookName, options, optionalCallback) { + stop(resourceGroupName, automationAccountName, runbookName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1123,20 +1149,22 @@ class TestJobOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._stop(automationAccountName, runbookName, options, (err, result, request, response) => { + self._stop(resourceGroupName, automationAccountName, runbookName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._stop(automationAccountName, runbookName, options, optionalCallback); + return self._stop(resourceGroupName, automationAccountName, runbookName, options, optionalCallback); } } /** * Suspend the test job. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -1152,11 +1180,11 @@ class TestJobOperations { * * @reject {Error} - The error object. */ - suspendWithHttpOperationResponse(automationAccountName, runbookName, options) { + suspendWithHttpOperationResponse(resourceGroupName, automationAccountName, runbookName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._suspend(automationAccountName, runbookName, options, (err, result, request, response) => { + self._suspend(resourceGroupName, automationAccountName, runbookName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1169,6 +1197,8 @@ class TestJobOperations { /** * Suspend the test job. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -1199,7 +1229,7 @@ class TestJobOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - suspend(automationAccountName, runbookName, options, optionalCallback) { + suspend(resourceGroupName, automationAccountName, runbookName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1208,14 +1238,14 @@ class TestJobOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._suspend(automationAccountName, runbookName, options, (err, result, request, response) => { + self._suspend(resourceGroupName, automationAccountName, runbookName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._suspend(automationAccountName, runbookName, options, optionalCallback); + return self._suspend(resourceGroupName, automationAccountName, runbookName, options, optionalCallback); } } diff --git a/lib/services/automationManagement/lib/operations/testJobStreams.js b/lib/services/automationManagement/lib/operations/testJobStreams.js index 028a130fda..7ca01bb89b 100644 --- a/lib/services/automationManagement/lib/operations/testJobStreams.js +++ b/lib/services/automationManagement/lib/operations/testJobStreams.js @@ -18,6 +18,8 @@ const WebResource = msRest.WebResource; * Retrieve a test job stream of the test job identified by runbook name and * stream id. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -42,7 +44,7 @@ const WebResource = msRest.WebResource; * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _get(automationAccountName, runbookName, jobStreamId, options, callback) { +function _get(resourceGroupName, automationAccountName, runbookName, jobStreamId, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -58,13 +60,13 @@ function _get(automationAccountName, runbookName, jobStreamId, options, callback if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -87,7 +89,7 @@ function _get(automationAccountName, runbookName, jobStreamId, options, callback let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/runbooks/{runbookName}/draft/testJob/streams/{jobStreamId}'; requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{runbookName}', encodeURIComponent(runbookName)); requestUrl = requestUrl.replace('{jobStreamId}', encodeURIComponent(jobStreamId)); @@ -178,6 +180,8 @@ function _get(automationAccountName, runbookName, jobStreamId, options, callback /** * Retrieve a list of test job streams identified by runbook name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -202,7 +206,7 @@ function _get(automationAccountName, runbookName, jobStreamId, options, callback * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _listByTestJob(automationAccountName, runbookName, options, callback) { +function _listByTestJob(resourceGroupName, automationAccountName, runbookName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -219,13 +223,13 @@ function _listByTestJob(automationAccountName, runbookName, options, callback) { if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -248,7 +252,7 @@ function _listByTestJob(automationAccountName, runbookName, options, callback) { let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/runbooks/{runbookName}/draft/testJob/streams'; requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{runbookName}', encodeURIComponent(runbookName)); let queryParameters = []; @@ -483,6 +487,8 @@ class TestJobStreams { * Retrieve a test job stream of the test job identified by runbook name and * stream id. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -500,11 +506,11 @@ class TestJobStreams { * * @reject {Error} - The error object. */ - getWithHttpOperationResponse(automationAccountName, runbookName, jobStreamId, options) { + getWithHttpOperationResponse(resourceGroupName, automationAccountName, runbookName, jobStreamId, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._get(automationAccountName, runbookName, jobStreamId, options, (err, result, request, response) => { + self._get(resourceGroupName, automationAccountName, runbookName, jobStreamId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -518,6 +524,8 @@ class TestJobStreams { * Retrieve a test job stream of the test job identified by runbook name and * stream id. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -551,7 +559,7 @@ class TestJobStreams { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - get(automationAccountName, runbookName, jobStreamId, options, optionalCallback) { + get(resourceGroupName, automationAccountName, runbookName, jobStreamId, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -560,20 +568,22 @@ class TestJobStreams { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._get(automationAccountName, runbookName, jobStreamId, options, (err, result, request, response) => { + self._get(resourceGroupName, automationAccountName, runbookName, jobStreamId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._get(automationAccountName, runbookName, jobStreamId, options, optionalCallback); + return self._get(resourceGroupName, automationAccountName, runbookName, jobStreamId, options, optionalCallback); } } /** * Retrieve a list of test job streams identified by runbook name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -591,11 +601,11 @@ class TestJobStreams { * * @reject {Error} - The error object. */ - listByTestJobWithHttpOperationResponse(automationAccountName, runbookName, options) { + listByTestJobWithHttpOperationResponse(resourceGroupName, automationAccountName, runbookName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._listByTestJob(automationAccountName, runbookName, options, (err, result, request, response) => { + self._listByTestJob(resourceGroupName, automationAccountName, runbookName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -608,6 +618,8 @@ class TestJobStreams { /** * Retrieve a list of test job streams identified by runbook name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} runbookName The runbook name. @@ -641,7 +653,7 @@ class TestJobStreams { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - listByTestJob(automationAccountName, runbookName, options, optionalCallback) { + listByTestJob(resourceGroupName, automationAccountName, runbookName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -650,14 +662,14 @@ class TestJobStreams { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._listByTestJob(automationAccountName, runbookName, options, (err, result, request, response) => { + self._listByTestJob(resourceGroupName, automationAccountName, runbookName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._listByTestJob(automationAccountName, runbookName, options, optionalCallback); + return self._listByTestJob(resourceGroupName, automationAccountName, runbookName, options, optionalCallback); } } diff --git a/lib/services/automationManagement/lib/operations/variableOperations.js b/lib/services/automationManagement/lib/operations/variableOperations.js index 704a306729..8717c55b1e 100644 --- a/lib/services/automationManagement/lib/operations/variableOperations.js +++ b/lib/services/automationManagement/lib/operations/variableOperations.js @@ -17,6 +17,8 @@ const WebResource = msRest.WebResource; /** * Create a variable. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} variableName The variable name. @@ -52,7 +54,7 @@ const WebResource = msRest.WebResource; * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _createOrUpdate(automationAccountName, variableName, parameters, options, callback) { +function _createOrUpdate(resourceGroupName, automationAccountName, variableName, parameters, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -65,13 +67,13 @@ function _createOrUpdate(automationAccountName, variableName, parameters, option let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -96,7 +98,7 @@ function _createOrUpdate(automationAccountName, variableName, parameters, option // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/variables/{variableName}'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{variableName}', encodeURIComponent(variableName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -218,6 +220,8 @@ function _createOrUpdate(automationAccountName, variableName, parameters, option /** * Update a variable. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} variableName The variable name. @@ -250,7 +254,7 @@ function _createOrUpdate(automationAccountName, variableName, parameters, option * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _update(automationAccountName, variableName, parameters, options, callback) { +function _update(resourceGroupName, automationAccountName, variableName, parameters, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -263,13 +267,13 @@ function _update(automationAccountName, variableName, parameters, options, callb let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -294,7 +298,7 @@ function _update(automationAccountName, variableName, parameters, options, callb // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/variables/{variableName}'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{variableName}', encodeURIComponent(variableName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -399,6 +403,8 @@ function _update(automationAccountName, variableName, parameters, options, callb /** * Delete the variable. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} variableName The name of variable. @@ -420,7 +426,7 @@ function _update(automationAccountName, variableName, parameters, options, callb * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _deleteMethod(automationAccountName, variableName, options, callback) { +function _deleteMethod(resourceGroupName, automationAccountName, variableName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -433,13 +439,13 @@ function _deleteMethod(automationAccountName, variableName, options, callback) { let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -461,7 +467,7 @@ function _deleteMethod(automationAccountName, variableName, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/variables/{variableName}'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{variableName}', encodeURIComponent(variableName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -535,6 +541,8 @@ function _deleteMethod(automationAccountName, variableName, options, callback) { /** * Retrieve the variable identified by variable name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} variableName The name of variable. @@ -557,7 +565,7 @@ function _deleteMethod(automationAccountName, variableName, options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _get(automationAccountName, variableName, options, callback) { +function _get(resourceGroupName, automationAccountName, variableName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -570,13 +578,13 @@ function _get(automationAccountName, variableName, options, callback) { let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -598,7 +606,7 @@ function _get(automationAccountName, variableName, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/variables/{variableName}'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{variableName}', encodeURIComponent(variableName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -689,6 +697,8 @@ function _get(automationAccountName, variableName, options, callback) { /** * Retrieve a list of variables. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -709,7 +719,7 @@ function _get(automationAccountName, variableName, options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _listByAutomationAccount(automationAccountName, options, callback) { +function _listByAutomationAccount(resourceGroupName, automationAccountName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -722,13 +732,13 @@ function _listByAutomationAccount(automationAccountName, options, callback) { let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -747,7 +757,7 @@ function _listByAutomationAccount(automationAccountName, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/variables'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; @@ -981,6 +991,8 @@ class VariableOperations { /** * Create a variable. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} variableName The variable name. @@ -1009,11 +1021,11 @@ class VariableOperations { * * @reject {Error} - The error object. */ - createOrUpdateWithHttpOperationResponse(automationAccountName, variableName, parameters, options) { + createOrUpdateWithHttpOperationResponse(resourceGroupName, automationAccountName, variableName, parameters, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._createOrUpdate(automationAccountName, variableName, parameters, options, (err, result, request, response) => { + self._createOrUpdate(resourceGroupName, automationAccountName, variableName, parameters, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1026,6 +1038,8 @@ class VariableOperations { /** * Create a variable. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} variableName The variable name. @@ -1070,7 +1084,7 @@ class VariableOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - createOrUpdate(automationAccountName, variableName, parameters, options, optionalCallback) { + createOrUpdate(resourceGroupName, automationAccountName, variableName, parameters, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1079,20 +1093,22 @@ class VariableOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._createOrUpdate(automationAccountName, variableName, parameters, options, (err, result, request, response) => { + self._createOrUpdate(resourceGroupName, automationAccountName, variableName, parameters, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._createOrUpdate(automationAccountName, variableName, parameters, options, optionalCallback); + return self._createOrUpdate(resourceGroupName, automationAccountName, variableName, parameters, options, optionalCallback); } } /** * Update a variable. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} variableName The variable name. @@ -1118,11 +1134,11 @@ class VariableOperations { * * @reject {Error} - The error object. */ - updateWithHttpOperationResponse(automationAccountName, variableName, parameters, options) { + updateWithHttpOperationResponse(resourceGroupName, automationAccountName, variableName, parameters, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._update(automationAccountName, variableName, parameters, options, (err, result, request, response) => { + self._update(resourceGroupName, automationAccountName, variableName, parameters, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1135,6 +1151,8 @@ class VariableOperations { /** * Update a variable. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} variableName The variable name. @@ -1176,7 +1194,7 @@ class VariableOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - update(automationAccountName, variableName, parameters, options, optionalCallback) { + update(resourceGroupName, automationAccountName, variableName, parameters, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1185,20 +1203,22 @@ class VariableOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._update(automationAccountName, variableName, parameters, options, (err, result, request, response) => { + self._update(resourceGroupName, automationAccountName, variableName, parameters, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._update(automationAccountName, variableName, parameters, options, optionalCallback); + return self._update(resourceGroupName, automationAccountName, variableName, parameters, options, optionalCallback); } } /** * Delete the variable. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} variableName The name of variable. @@ -1214,11 +1234,11 @@ class VariableOperations { * * @reject {Error} - The error object. */ - deleteMethodWithHttpOperationResponse(automationAccountName, variableName, options) { + deleteMethodWithHttpOperationResponse(resourceGroupName, automationAccountName, variableName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._deleteMethod(automationAccountName, variableName, options, (err, result, request, response) => { + self._deleteMethod(resourceGroupName, automationAccountName, variableName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1231,6 +1251,8 @@ class VariableOperations { /** * Delete the variable. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} variableName The name of variable. @@ -1261,7 +1283,7 @@ class VariableOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(automationAccountName, variableName, options, optionalCallback) { + deleteMethod(resourceGroupName, automationAccountName, variableName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1270,20 +1292,22 @@ class VariableOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._deleteMethod(automationAccountName, variableName, options, (err, result, request, response) => { + self._deleteMethod(resourceGroupName, automationAccountName, variableName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._deleteMethod(automationAccountName, variableName, options, optionalCallback); + return self._deleteMethod(resourceGroupName, automationAccountName, variableName, options, optionalCallback); } } /** * Retrieve the variable identified by variable name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} variableName The name of variable. @@ -1299,11 +1323,11 @@ class VariableOperations { * * @reject {Error} - The error object. */ - getWithHttpOperationResponse(automationAccountName, variableName, options) { + getWithHttpOperationResponse(resourceGroupName, automationAccountName, variableName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._get(automationAccountName, variableName, options, (err, result, request, response) => { + self._get(resourceGroupName, automationAccountName, variableName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1316,6 +1340,8 @@ class VariableOperations { /** * Retrieve the variable identified by variable name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} variableName The name of variable. @@ -1347,7 +1373,7 @@ class VariableOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - get(automationAccountName, variableName, options, optionalCallback) { + get(resourceGroupName, automationAccountName, variableName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1356,20 +1382,22 @@ class VariableOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._get(automationAccountName, variableName, options, (err, result, request, response) => { + self._get(resourceGroupName, automationAccountName, variableName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._get(automationAccountName, variableName, options, optionalCallback); + return self._get(resourceGroupName, automationAccountName, variableName, options, optionalCallback); } } /** * Retrieve a list of variables. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -1383,11 +1411,11 @@ class VariableOperations { * * @reject {Error} - The error object. */ - listByAutomationAccountWithHttpOperationResponse(automationAccountName, options) { + listByAutomationAccountWithHttpOperationResponse(resourceGroupName, automationAccountName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._listByAutomationAccount(automationAccountName, options, (err, result, request, response) => { + self._listByAutomationAccount(resourceGroupName, automationAccountName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1400,6 +1428,8 @@ class VariableOperations { /** * Retrieve a list of variables. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -1429,7 +1459,7 @@ class VariableOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - listByAutomationAccount(automationAccountName, options, optionalCallback) { + listByAutomationAccount(resourceGroupName, automationAccountName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1438,14 +1468,14 @@ class VariableOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._listByAutomationAccount(automationAccountName, options, (err, result, request, response) => { + self._listByAutomationAccount(resourceGroupName, automationAccountName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._listByAutomationAccount(automationAccountName, options, optionalCallback); + return self._listByAutomationAccount(resourceGroupName, automationAccountName, options, optionalCallback); } } diff --git a/lib/services/automationManagement/lib/operations/webhookOperations.js b/lib/services/automationManagement/lib/operations/webhookOperations.js index b10646ad9d..ce2de10941 100644 --- a/lib/services/automationManagement/lib/operations/webhookOperations.js +++ b/lib/services/automationManagement/lib/operations/webhookOperations.js @@ -17,6 +17,8 @@ const WebResource = msRest.WebResource; /** * Generates a Uri for use in creating a webhook. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -36,7 +38,7 @@ const WebResource = msRest.WebResource; * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _generateUri(automationAccountName, options, callback) { +function _generateUri(resourceGroupName, automationAccountName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -49,13 +51,13 @@ function _generateUri(automationAccountName, options, callback) { let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -74,7 +76,7 @@ function _generateUri(automationAccountName, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/webhooks/generateUri'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; @@ -170,6 +172,8 @@ function _generateUri(automationAccountName, options, callback) { /** * Delete the webhook by name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} webhookName The webhook name. @@ -191,7 +195,7 @@ function _generateUri(automationAccountName, options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _deleteMethod(automationAccountName, webhookName, options, callback) { +function _deleteMethod(resourceGroupName, automationAccountName, webhookName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -204,13 +208,13 @@ function _deleteMethod(automationAccountName, webhookName, options, callback) { let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -232,7 +236,7 @@ function _deleteMethod(automationAccountName, webhookName, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/webhooks/{webhookName}'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{webhookName}', encodeURIComponent(webhookName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -306,6 +310,8 @@ function _deleteMethod(automationAccountName, webhookName, options, callback) { /** * Retrieve the webhook identified by webhook name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} webhookName The webhook name. @@ -328,7 +334,7 @@ function _deleteMethod(automationAccountName, webhookName, options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _get(automationAccountName, webhookName, options, callback) { +function _get(resourceGroupName, automationAccountName, webhookName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -341,13 +347,13 @@ function _get(automationAccountName, webhookName, options, callback) { let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -369,7 +375,7 @@ function _get(automationAccountName, webhookName, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/webhooks/{webhookName}'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{webhookName}', encodeURIComponent(webhookName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -460,6 +466,8 @@ function _get(automationAccountName, webhookName, options, callback) { /** * Create the webhook identified by webhook name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} webhookName The webhook name. @@ -504,7 +512,7 @@ function _get(automationAccountName, webhookName, options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _createOrUpdate(automationAccountName, webhookName, parameters, options, callback) { +function _createOrUpdate(resourceGroupName, automationAccountName, webhookName, parameters, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -517,13 +525,13 @@ function _createOrUpdate(automationAccountName, webhookName, parameters, options let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -548,7 +556,7 @@ function _createOrUpdate(automationAccountName, webhookName, parameters, options // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/webhooks/{webhookName}'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{webhookName}', encodeURIComponent(webhookName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -670,6 +678,8 @@ function _createOrUpdate(automationAccountName, webhookName, parameters, options /** * Update the webhook identified by webhook name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} webhookName The webhook name. @@ -708,7 +718,7 @@ function _createOrUpdate(automationAccountName, webhookName, parameters, options * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _update(automationAccountName, webhookName, parameters, options, callback) { +function _update(resourceGroupName, automationAccountName, webhookName, parameters, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -721,13 +731,13 @@ function _update(automationAccountName, webhookName, parameters, options, callba let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -752,7 +762,7 @@ function _update(automationAccountName, webhookName, parameters, options, callba // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/webhooks/{webhookName}'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{webhookName}', encodeURIComponent(webhookName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -857,6 +867,8 @@ function _update(automationAccountName, webhookName, parameters, options, callba /** * Retrieve a list of webhooks. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -879,7 +891,7 @@ function _update(automationAccountName, webhookName, parameters, options, callba * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _listByAutomationAccount(automationAccountName, options, callback) { +function _listByAutomationAccount(resourceGroupName, automationAccountName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -893,13 +905,13 @@ function _listByAutomationAccount(automationAccountName, options, callback) { let apiVersion = '2015-10-31'; // Validate try { - if (this.client.resourceGroupName === null || this.client.resourceGroupName === undefined || typeof this.client.resourceGroupName.valueOf() !== 'string') { - throw new Error('this.client.resourceGroupName cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (this.client.resourceGroupName !== null && this.client.resourceGroupName !== undefined) { - if (this.client.resourceGroupName.match(/^[-\w\._]+$/) === null) + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.match(/^[-\w\._]+$/) === null) { - throw new Error('"this.client.resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } if (automationAccountName === null || automationAccountName === undefined || typeof automationAccountName.valueOf() !== 'string') { @@ -921,7 +933,7 @@ function _listByAutomationAccount(automationAccountName, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/webhooks'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(this.client.resourceGroupName)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{automationAccountName}', encodeURIComponent(automationAccountName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; @@ -1159,6 +1171,8 @@ class WebhookOperations { /** * Generates a Uri for use in creating a webhook. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -1172,11 +1186,11 @@ class WebhookOperations { * * @reject {Error} - The error object. */ - generateUriWithHttpOperationResponse(automationAccountName, options) { + generateUriWithHttpOperationResponse(resourceGroupName, automationAccountName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._generateUri(automationAccountName, options, (err, result, request, response) => { + self._generateUri(resourceGroupName, automationAccountName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1189,6 +1203,8 @@ class WebhookOperations { /** * Generates a Uri for use in creating a webhook. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -1217,7 +1233,7 @@ class WebhookOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - generateUri(automationAccountName, options, optionalCallback) { + generateUri(resourceGroupName, automationAccountName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1226,20 +1242,22 @@ class WebhookOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._generateUri(automationAccountName, options, (err, result, request, response) => { + self._generateUri(resourceGroupName, automationAccountName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._generateUri(automationAccountName, options, optionalCallback); + return self._generateUri(resourceGroupName, automationAccountName, options, optionalCallback); } } /** * Delete the webhook by name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} webhookName The webhook name. @@ -1255,11 +1273,11 @@ class WebhookOperations { * * @reject {Error} - The error object. */ - deleteMethodWithHttpOperationResponse(automationAccountName, webhookName, options) { + deleteMethodWithHttpOperationResponse(resourceGroupName, automationAccountName, webhookName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._deleteMethod(automationAccountName, webhookName, options, (err, result, request, response) => { + self._deleteMethod(resourceGroupName, automationAccountName, webhookName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1272,6 +1290,8 @@ class WebhookOperations { /** * Delete the webhook by name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} webhookName The webhook name. @@ -1302,7 +1322,7 @@ class WebhookOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(automationAccountName, webhookName, options, optionalCallback) { + deleteMethod(resourceGroupName, automationAccountName, webhookName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1311,20 +1331,22 @@ class WebhookOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._deleteMethod(automationAccountName, webhookName, options, (err, result, request, response) => { + self._deleteMethod(resourceGroupName, automationAccountName, webhookName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._deleteMethod(automationAccountName, webhookName, options, optionalCallback); + return self._deleteMethod(resourceGroupName, automationAccountName, webhookName, options, optionalCallback); } } /** * Retrieve the webhook identified by webhook name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} webhookName The webhook name. @@ -1340,11 +1362,11 @@ class WebhookOperations { * * @reject {Error} - The error object. */ - getWithHttpOperationResponse(automationAccountName, webhookName, options) { + getWithHttpOperationResponse(resourceGroupName, automationAccountName, webhookName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._get(automationAccountName, webhookName, options, (err, result, request, response) => { + self._get(resourceGroupName, automationAccountName, webhookName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1357,6 +1379,8 @@ class WebhookOperations { /** * Retrieve the webhook identified by webhook name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} webhookName The webhook name. @@ -1388,7 +1412,7 @@ class WebhookOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - get(automationAccountName, webhookName, options, optionalCallback) { + get(resourceGroupName, automationAccountName, webhookName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1397,20 +1421,22 @@ class WebhookOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._get(automationAccountName, webhookName, options, (err, result, request, response) => { + self._get(resourceGroupName, automationAccountName, webhookName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._get(automationAccountName, webhookName, options, optionalCallback); + return self._get(resourceGroupName, automationAccountName, webhookName, options, optionalCallback); } } /** * Create the webhook identified by webhook name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} webhookName The webhook name. @@ -1448,11 +1474,11 @@ class WebhookOperations { * * @reject {Error} - The error object. */ - createOrUpdateWithHttpOperationResponse(automationAccountName, webhookName, parameters, options) { + createOrUpdateWithHttpOperationResponse(resourceGroupName, automationAccountName, webhookName, parameters, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._createOrUpdate(automationAccountName, webhookName, parameters, options, (err, result, request, response) => { + self._createOrUpdate(resourceGroupName, automationAccountName, webhookName, parameters, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1465,6 +1491,8 @@ class WebhookOperations { /** * Create the webhook identified by webhook name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} webhookName The webhook name. @@ -1518,7 +1546,7 @@ class WebhookOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - createOrUpdate(automationAccountName, webhookName, parameters, options, optionalCallback) { + createOrUpdate(resourceGroupName, automationAccountName, webhookName, parameters, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1527,20 +1555,22 @@ class WebhookOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._createOrUpdate(automationAccountName, webhookName, parameters, options, (err, result, request, response) => { + self._createOrUpdate(resourceGroupName, automationAccountName, webhookName, parameters, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._createOrUpdate(automationAccountName, webhookName, parameters, options, optionalCallback); + return self._createOrUpdate(resourceGroupName, automationAccountName, webhookName, parameters, options, optionalCallback); } } /** * Update the webhook identified by webhook name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} webhookName The webhook name. @@ -1572,11 +1602,11 @@ class WebhookOperations { * * @reject {Error} - The error object. */ - updateWithHttpOperationResponse(automationAccountName, webhookName, parameters, options) { + updateWithHttpOperationResponse(resourceGroupName, automationAccountName, webhookName, parameters, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._update(automationAccountName, webhookName, parameters, options, (err, result, request, response) => { + self._update(resourceGroupName, automationAccountName, webhookName, parameters, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1589,6 +1619,8 @@ class WebhookOperations { /** * Update the webhook identified by webhook name. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {string} webhookName The webhook name. @@ -1636,7 +1668,7 @@ class WebhookOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - update(automationAccountName, webhookName, parameters, options, optionalCallback) { + update(resourceGroupName, automationAccountName, webhookName, parameters, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1645,20 +1677,22 @@ class WebhookOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._update(automationAccountName, webhookName, parameters, options, (err, result, request, response) => { + self._update(resourceGroupName, automationAccountName, webhookName, parameters, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._update(automationAccountName, webhookName, parameters, options, optionalCallback); + return self._update(resourceGroupName, automationAccountName, webhookName, parameters, options, optionalCallback); } } /** * Retrieve a list of webhooks. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -1674,11 +1708,11 @@ class WebhookOperations { * * @reject {Error} - The error object. */ - listByAutomationAccountWithHttpOperationResponse(automationAccountName, options) { + listByAutomationAccountWithHttpOperationResponse(resourceGroupName, automationAccountName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._listByAutomationAccount(automationAccountName, options, (err, result, request, response) => { + self._listByAutomationAccount(resourceGroupName, automationAccountName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1691,6 +1725,8 @@ class WebhookOperations { /** * Retrieve a list of webhooks. * + * @param {string} resourceGroupName The resource group name. + * * @param {string} automationAccountName The automation account name. * * @param {object} [options] Optional Parameters. @@ -1722,7 +1758,7 @@ class WebhookOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - listByAutomationAccount(automationAccountName, options, optionalCallback) { + listByAutomationAccount(resourceGroupName, automationAccountName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1731,14 +1767,14 @@ class WebhookOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._listByAutomationAccount(automationAccountName, options, (err, result, request, response) => { + self._listByAutomationAccount(resourceGroupName, automationAccountName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._listByAutomationAccount(automationAccountName, options, optionalCallback); + return self._listByAutomationAccount(resourceGroupName, automationAccountName, options, optionalCallback); } } diff --git a/lib/services/automationManagement/package.json b/lib/services/automationManagement/package.json index 01d494be38..c8340085cd 100644 --- a/lib/services/automationManagement/package.json +++ b/lib/services/automationManagement/package.json @@ -1,35 +1,22 @@ { "name": "azure-arm-automation", "author": "Microsoft Corporation", - "contributors": [ - - "Lingaiah, Viv ", - "Krishnan, Balaji ", - "Zavery, Amar