diff --git a/lib/services/batchManagement/README.md b/lib/services/batchManagement/README.md index 97713d7413..69b54f07d1 100644 --- a/lib/services/batchManagement/README.md +++ b/lib/services/batchManagement/README.md @@ -3,40 +3,43 @@ uid: azure-arm-batch summary: *content --- -# Microsoft Azure SDK for Node.js - BatchManagementClient +**This SDK will be deprecated next year and will be replaced by a new TypeScript-based isomorphic SDK (found at https://github.com/Azure/azure-sdk-for-js) which works on Node.js and browsers.** +## Microsoft Azure SDK for Node.js - BatchManagementClient + This project provides a Node.js package for accessing Azure. Right now it supports: - **Node.js version 6.x.x or higher** -## Features +### Features -## How to Install +### How to Install ```bash npm install azure-arm-batch ``` -## How to use +### How to use -### Authentication, client creation and get batchAccount as an example. +#### Authentication, client creation, and get batchAccount as an example. ```javascript const msRestAzure = require("ms-rest-azure"); const BatchManagementClient = require("azure-arm-batch"); msRestAzure.interactiveLogin().then((creds) => { - const subscriptionId = ""; - const client = new BatchManagementClient(creds, subscriptionId); - const resourceGroupName = "testresourceGroupName"; - const accountName = "testaccountName"; - return client.batchAccount.get(resourceGroupName, accountName).then((result) => { - console.log("The result is:"); - console.log(result); - }); + const subscriptionId = ""; + const client = new BatchManagementClient(creds, subscriptionId); + const resourceGroupName = "testresourceGroupName"; + const accountName = "testaccountName"; + + return client.batchAccount.get(resourceGroupName, accountName).then((result) => { + console.log("The result is:"); + console.log(result); + }); }).catch((err) => { console.log('An error occurred:'); console.dir(err, {depth: null, colors: true}); }); - -## Related projects +``` +### Related projects - [Microsoft Azure SDK for Node.js](https://github.com/Azure/azure-sdk-for-node) diff --git a/lib/services/batchManagement/lib/batchManagementClient.js b/lib/services/batchManagement/lib/batchManagementClient.js index 5e1c734b60..14c48a56ef 100644 --- a/lib/services/batchManagement/lib/batchManagementClient.js +++ b/lib/services/batchManagement/lib/batchManagementClient.js @@ -50,7 +50,7 @@ class BatchManagementClient extends ServiceClient { super(credentials, options); - this.apiVersion = '2018-12-01'; + this.apiVersion = '2018-02-02'; this.acceptLanguage = 'en-US'; this.longRunningOperationRetryTimeout = 30; this.generateClientRequestId = true; diff --git a/lib/services/batchManagement/lib/models/application.js b/lib/services/batchManagement/lib/models/application.js index 41d229edf4..83c91bc6ff 100644 --- a/lib/services/batchManagement/lib/models/application.js +++ b/lib/services/batchManagement/lib/models/application.js @@ -10,25 +10,23 @@ 'use strict'; -const models = require('./index'); - /** * Contains information about an application in a Batch account. * - * @extends models['ProxyResource'] */ -class Application extends models['ProxyResource'] { +class Application { /** * Create a Application. + * @property {string} [id] A string that uniquely identifies the application + * within the account. * @property {string} [displayName] The display name for the application. + * @property {array} [packages] The list of packages under this application. * @property {boolean} [allowUpdates] A value indicating whether packages * within the application may be overwritten using the same version string. * @property {string} [defaultVersion] The package to use if a client - * requests the application but does not specify a version. This property can - * only be set to the name of an existing package. + * requests the application but does not specify a version. */ constructor() { - super(); } /** @@ -47,53 +45,43 @@ class Application extends models['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' - } - }, - etag: { + displayName: { required: false, - readOnly: true, - serializedName: 'etag', + serializedName: 'displayName', type: { name: 'String' } }, - displayName: { + packages: { required: false, - serializedName: 'properties.displayName', + serializedName: 'packages', type: { - name: 'String' + name: 'Sequence', + element: { + required: false, + serializedName: 'ApplicationPackageElementType', + type: { + name: 'Composite', + className: 'ApplicationPackage' + } + } } }, allowUpdates: { required: false, - serializedName: 'properties.allowUpdates', + serializedName: 'allowUpdates', type: { name: 'Boolean' } }, defaultVersion: { required: false, - serializedName: 'properties.defaultVersion', + serializedName: 'defaultVersion', type: { name: 'String' } diff --git a/lib/services/batchManagement/lib/models/applicationCreateParameters.js b/lib/services/batchManagement/lib/models/applicationCreateParameters.js new file mode 100644 index 0000000000..1a89b84696 --- /dev/null +++ b/lib/services/batchManagement/lib/models/applicationCreateParameters.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'; + +/** + * Parameters for adding an Application. + * + */ +class ApplicationCreateParameters { + /** + * Create a ApplicationCreateParameters. + * @property {boolean} [allowUpdates] A value indicating whether packages + * within the application may be overwritten using the same version string. + * @property {string} [displayName] The display name for the application. + */ + constructor() { + } + + /** + * Defines the metadata of ApplicationCreateParameters + * + * @returns {object} metadata of ApplicationCreateParameters + * + */ + mapper() { + return { + required: false, + serializedName: 'ApplicationCreateParameters', + type: { + name: 'Composite', + className: 'ApplicationCreateParameters', + modelProperties: { + allowUpdates: { + required: false, + serializedName: 'allowUpdates', + type: { + name: 'Boolean' + } + }, + displayName: { + required: false, + serializedName: 'displayName', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = ApplicationCreateParameters; diff --git a/lib/services/batchManagement/lib/models/applicationPackage.js b/lib/services/batchManagement/lib/models/applicationPackage.js index 0ba3b0e768..3143246aa1 100644 --- a/lib/services/batchManagement/lib/models/applicationPackage.js +++ b/lib/services/batchManagement/lib/models/applicationPackage.js @@ -10,19 +10,18 @@ 'use strict'; -const models = require('./index'); - /** * An application package which represents a particular version of an * application. * - * @extends models['ProxyResource'] */ -class ApplicationPackage extends models['ProxyResource'] { +class ApplicationPackage { /** * Create a ApplicationPackage. + * @property {string} [id] The ID of the application. + * @property {string} [version] The version of the application package. * @property {string} [state] The current state of the application package. - * Possible values include: 'Pending', 'Active' + * Possible values include: 'Pending', 'Active', 'Unmapped' * @property {string} [format] The format of the application package, if the * package is active. * @property {string} [storageUrl] The URL for the application package in @@ -33,7 +32,6 @@ class ApplicationPackage extends models['ProxyResource'] { * last activated, if the package is active. */ constructor() { - super(); } /** @@ -58,26 +56,10 @@ class ApplicationPackage extends models['ProxyResource'] { name: 'String' } }, - name: { - required: false, - readOnly: true, - serializedName: 'name', - type: { - name: 'String' - } - }, - type: { - required: false, - readOnly: true, - serializedName: 'type', - type: { - name: 'String' - } - }, - etag: { + version: { required: false, readOnly: true, - serializedName: 'etag', + serializedName: 'version', type: { name: 'String' } @@ -85,16 +67,16 @@ class ApplicationPackage extends models['ProxyResource'] { state: { required: false, readOnly: true, - serializedName: 'properties.state', + serializedName: 'state', type: { name: 'Enum', - allowedValues: [ 'Pending', 'Active' ] + allowedValues: [ 'Pending', 'Active', 'Unmapped' ] } }, format: { required: false, readOnly: true, - serializedName: 'properties.format', + serializedName: 'format', type: { name: 'String' } @@ -102,7 +84,7 @@ class ApplicationPackage extends models['ProxyResource'] { storageUrl: { required: false, readOnly: true, - serializedName: 'properties.storageUrl', + serializedName: 'storageUrl', type: { name: 'String' } @@ -110,7 +92,7 @@ class ApplicationPackage extends models['ProxyResource'] { storageUrlExpiry: { required: false, readOnly: true, - serializedName: 'properties.storageUrlExpiry', + serializedName: 'storageUrlExpiry', type: { name: 'DateTime' } @@ -118,7 +100,7 @@ class ApplicationPackage extends models['ProxyResource'] { lastActivationTime: { required: false, readOnly: true, - serializedName: 'properties.lastActivationTime', + serializedName: 'lastActivationTime', type: { name: 'DateTime' } diff --git a/lib/services/batchManagement/lib/models/applicationUpdateParameters.js b/lib/services/batchManagement/lib/models/applicationUpdateParameters.js new file mode 100644 index 0000000000..009ffd6c7e --- /dev/null +++ b/lib/services/batchManagement/lib/models/applicationUpdateParameters.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'; + +/** + * Parameters for an update application request. + * + */ +class ApplicationUpdateParameters { + /** + * Create a ApplicationUpdateParameters. + * @property {boolean} [allowUpdates] A value indicating whether packages + * within the application may be overwritten using the same version string. + * @property {string} [defaultVersion] The package to use if a client + * requests the application but does not specify a version. + * @property {string} [displayName] The display name for the application. + */ + constructor() { + } + + /** + * Defines the metadata of ApplicationUpdateParameters + * + * @returns {object} metadata of ApplicationUpdateParameters + * + */ + mapper() { + return { + required: false, + serializedName: 'ApplicationUpdateParameters', + type: { + name: 'Composite', + className: 'ApplicationUpdateParameters', + modelProperties: { + allowUpdates: { + required: false, + serializedName: 'allowUpdates', + type: { + name: 'Boolean' + } + }, + defaultVersion: { + required: false, + serializedName: 'defaultVersion', + type: { + name: 'String' + } + }, + displayName: { + required: false, + serializedName: 'displayName', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = ApplicationUpdateParameters; diff --git a/lib/services/batchManagement/lib/models/autoUserSpecification.js b/lib/services/batchManagement/lib/models/autoUserSpecification.js index 372a5c0cfe..74780a7aa9 100644 --- a/lib/services/batchManagement/lib/models/autoUserSpecification.js +++ b/lib/services/batchManagement/lib/models/autoUserSpecification.js @@ -18,8 +18,11 @@ class AutoUserSpecification { /** * Create a AutoUserSpecification. - * @property {string} [scope] The scope for the auto user. The default value - * is task. Possible values include: 'Task', 'Pool' + * @property {string} [scope] The scope for the auto user. pool - specifies + * that the task runs as the common auto user account which is created on + * every node in a pool. task - specifies that the service should create a + * new user for the task. The default value is task. Possible values include: + * 'Task', 'Pool' * @property {string} [elevationLevel] The elevation level of the auto user. * nonAdmin - The auto user is a standard user without elevated access. admin * - The auto user is a user with elevated access and operates with full diff --git a/lib/services/batchManagement/lib/models/certificate.js b/lib/services/batchManagement/lib/models/certificate.js index 3f6dc81da6..fdea84985f 100644 --- a/lib/services/batchManagement/lib/models/certificate.js +++ b/lib/services/batchManagement/lib/models/certificate.js @@ -28,7 +28,20 @@ class Certificate extends models['ProxyResource'] { * @property {string} [format] The format of the certificate - either Pfx or * Cer. If omitted, the default is Pfx. Possible values include: 'Pfx', 'Cer' * @property {string} [provisioningState] The provisioned state of the - * resource. Possible values include: 'Succeeded', 'Deleting', 'Failed' + * resource. Values are: + * + * Succeeded - The certificate is available for use in pools. + * Deleting - The user has requested that the certificate be deleted, but the + * delete operation has not yet completed. You may not reference the + * certificate when creating or updating pools. + * Failed - The user requested that the certificate be deleted, but there are + * pools that still have references to the certificate, or it is still + * installed on one or more compute nodes. (The latter can occur if the + * certificate has been removed from the pool, but the node has not yet + * restarted. Nodes refresh their certificates only when they restart.) You + * may use the cancel certificate delete operation to cancel the delete, or + * the delete certificate operation to retry the delete. Possible values + * include: 'Succeeded', 'Deleting', 'Failed' * @property {date} [provisioningStateTransitionTime] The time at which the * certificate entered its current state. * @property {string} [previousProvisioningState] The previous provisioned diff --git a/lib/services/batchManagement/lib/models/certificateReference.js b/lib/services/batchManagement/lib/models/certificateReference.js index dde1c0c0dc..4b9aa38137 100644 --- a/lib/services/batchManagement/lib/models/certificateReference.js +++ b/lib/services/batchManagement/lib/models/certificateReference.js @@ -40,7 +40,14 @@ class CertificateReference { * Trust, Disallowed, TrustedPeople, TrustedPublisher, AuthRoot, AddressBook, * but any custom store name can also be used. The default value is My. * @property {array} [visibility] Which user accounts on the compute node - * should have access to the private data of the certificate. + * should have access to the private data of the certificate. Values are: + * + * starttask - The user account under which the start task is run. + * task - The accounts under which job tasks are run. + * remoteuser - The accounts under which users remotely access the node. + * + * You can specify more than one visibility in this collection. The default + * is all accounts. */ constructor() { } diff --git a/lib/services/batchManagement/lib/models/cloudServiceConfiguration.js b/lib/services/batchManagement/lib/models/cloudServiceConfiguration.js index 2d32124778..886b0b3225 100644 --- a/lib/services/batchManagement/lib/models/cloudServiceConfiguration.js +++ b/lib/services/batchManagement/lib/models/cloudServiceConfiguration.js @@ -25,9 +25,17 @@ class CloudServiceConfiguration { * R2. 5 - OS Family 5, equivalent to Windows Server 2016. For more * information, see Azure Guest OS Releases * (https://azure.microsoft.com/documentation/articles/cloud-services-guestos-update-matrix/#releases). - * @property {string} [osVersion] The Azure Guest OS version to be installed - * on the virtual machines in the pool. The default value is * which - * specifies the latest operating system version for the specified OS family. + * @property {string} [targetOSVersion] The Azure Guest OS version to be + * installed on the virtual machines in the pool. The default value is * + * which specifies the latest operating system version for the specified OS + * family. + * @property {string} [currentOSVersion] The Azure Guest OS Version currently + * installed on the virtual machines in the pool. This may differ from + * targetOSVersion if the pool state is Upgrading. In this case some virtual + * machines may be on the targetOSVersion and some may be on the + * currentOSVersion during the upgrade process. Once all virtual machines + * have upgraded, currentOSVersion is updated to be the same as + * targetOSVersion. */ constructor() { } @@ -53,9 +61,16 @@ class CloudServiceConfiguration { name: 'String' } }, - osVersion: { + targetOSVersion: { required: false, - serializedName: 'osVersion', + serializedName: 'targetOSVersion', + type: { + name: 'String' + } + }, + currentOSVersion: { + required: false, + serializedName: 'currentOSVersion', type: { name: 'String' } diff --git a/lib/services/batchManagement/lib/models/deploymentConfiguration.js b/lib/services/batchManagement/lib/models/deploymentConfiguration.js index 96c303307e..8004d8a58e 100644 --- a/lib/services/batchManagement/lib/models/deploymentConfiguration.js +++ b/lib/services/batchManagement/lib/models/deploymentConfiguration.js @@ -28,9 +28,15 @@ class DeploymentConfiguration { * to Windows Server 2012 R2. 5 - OS Family 5, equivalent to Windows Server * 2016. For more information, see Azure Guest OS Releases * (https://azure.microsoft.com/documentation/articles/cloud-services-guestos-update-matrix/#releases). - * @property {string} [cloudServiceConfiguration.osVersion] The default value - * is * which specifies the latest operating system version for the specified - * OS family. + * @property {string} [cloudServiceConfiguration.targetOSVersion] The default + * value is * which specifies the latest operating system version for the + * specified OS family. + * @property {string} [cloudServiceConfiguration.currentOSVersion] This may + * differ from targetOSVersion if the pool state is Upgrading. In this case + * some virtual machines may be on the targetOSVersion and some may be on the + * currentOSVersion during the upgrade process. Once all virtual machines + * have upgraded, currentOSVersion is updated to be the same as + * targetOSVersion. * @property {object} [virtualMachineConfiguration] The virtual machine * configuration for the pool. This property and cloudServiceConfiguration * are mutually exclusive and one of the properties must be specified. @@ -51,6 +57,9 @@ class DeploymentConfiguration { * to communicate with Batch service see * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration * . + * @property {object} [virtualMachineConfiguration.osDisk] + * @property {string} [virtualMachineConfiguration.osDisk.caching] Default + * value is none. Possible values include: 'None', 'ReadOnly', 'ReadWrite' * @property {string} [virtualMachineConfiguration.nodeAgentSkuId] The Batch * node agent is a program that runs on each node in the pool, and provides * the command-and-control interface between the node and the Batch service. @@ -76,20 +85,6 @@ class DeploymentConfiguration { * * Windows_Server - The on-premises license is for Windows Server. * Windows_Client - The on-premises license is for Windows Client. - * @property {object} [virtualMachineConfiguration.containerConfiguration] If - * specified, setup is performed on each node in the pool to allow tasks to - * run in containers. All regular tasks and job manager tasks run on this - * pool must specify the containerSettings property, and all other tasks may - * specify it. - * @property {array} - * [virtualMachineConfiguration.containerConfiguration.containerImageNames] - * This is the full image reference, as would be specified to "docker pull". - * An image will be sourced from the default Docker registry unless the image - * is fully qualified with an alternative registry. - * @property {array} - * [virtualMachineConfiguration.containerConfiguration.containerRegistries] - * If any images must be downloaded from a private registry which requires - * credentials, then those credentials must be provided here. */ constructor() { } diff --git a/lib/services/batchManagement/lib/models/index.d.ts b/lib/services/batchManagement/lib/models/index.d.ts index c9042986e2..7f62349ca3 100644 --- a/lib/services/batchManagement/lib/models/index.d.ts +++ b/lib/services/batchManagement/lib/models/index.d.ts @@ -203,71 +203,99 @@ export interface ActivateApplicationPackageParameters { } /** - * A definition of an Azure resource. + * Parameters for adding an Application. */ -export interface ProxyResource extends BaseResource { +export interface ApplicationCreateParameters { /** - * The ID of the resource. + * A value indicating whether packages within the application may be overwritten using the same + * version string. + */ + allowUpdates?: boolean; + /** + * The display name for the application. + */ + displayName?: string; +} + +/** + * An application package which represents a particular version of an application. + */ +export interface ApplicationPackage { + /** + * The ID of the application. */ readonly id?: string; /** - * The name of the resource. + * The version of the application package. */ - readonly name?: string; + readonly version?: string; /** - * The type of the resource. + * The current state of the application package. Possible values include: 'Pending', 'Active', + * 'Unmapped' */ - readonly type?: string; + readonly state?: string; /** - * The ETag of the resource, used for concurrency statements. + * The format of the application package, if the package is active. */ - readonly etag?: string; + readonly format?: string; + /** + * The URL for the application package in Azure Storage. + */ + readonly storageUrl?: string; + /** + * The UTC time at which the Azure Storage URL will expire. + */ + readonly storageUrlExpiry?: Date; + /** + * The time at which the package was last activated, if the package is active. + */ + readonly lastActivationTime?: Date; } /** * Contains information about an application in a Batch account. */ -export interface Application extends ProxyResource { +export interface Application { + /** + * A string that uniquely identifies the application within the account. + */ + id?: string; /** * The display name for the application. */ displayName?: string; + /** + * The list of packages under this application. + */ + packages?: ApplicationPackage[]; /** * A value indicating whether packages within the application may be overwritten using the same * version string. */ allowUpdates?: boolean; /** - * The package to use if a client requests the application but does not specify a version. This - * property can only be set to the name of an existing package. + * The package to use if a client requests the application but does not specify a version. */ defaultVersion?: string; } /** - * An application package which represents a particular version of an application. + * Parameters for an update application request. */ -export interface ApplicationPackage extends ProxyResource { - /** - * The current state of the application package. Possible values include: 'Pending', 'Active' - */ - readonly state?: string; - /** - * The format of the application package, if the package is active. - */ - readonly format?: string; +export interface ApplicationUpdateParameters { /** - * The URL for the application package in Azure Storage. + * A value indicating whether packages within the application may be overwritten using the same + * version string. */ - readonly storageUrl?: string; + allowUpdates?: boolean; /** - * The UTC time at which the Azure Storage URL will expire. + * The package to use if a client requests the application but does not specify a version. */ - readonly storageUrlExpiry?: Date; + defaultVersion?: string; /** - * The time at which the package was last activated, if the package is active. + * The display name for the application. */ - readonly lastActivationTime?: Date; + displayName?: string; } /** @@ -281,6 +309,28 @@ export interface BatchLocationQuota { readonly accountQuota?: number; } +/** + * A definition of an Azure resource. + */ +export interface ProxyResource extends BaseResource { + /** + * The ID of the resource. + */ + readonly id?: string; + /** + * The name of the resource. + */ + readonly name?: string; + /** + * The type of the resource. + */ + readonly type?: string; + /** + * The ETag of the resource, used for concurrency statements. + */ + readonly etag?: string; +} + export interface CertificateBaseProperties { /** * @summary The algorithm of the certificate thumbprint @@ -345,7 +395,17 @@ export interface Certificate extends ProxyResource { format?: string; /** * @summary The provisioned state of the resource - * @description Possible values include: 'Succeeded', 'Deleting', 'Failed' + * @description Values are: + * + * Succeeded - The certificate is available for use in pools. + * Deleting - The user has requested that the certificate be deleted, but the delete operation + * has not yet completed. You may not reference the certificate when creating or updating pools. + * Failed - The user requested that the certificate be deleted, but there are pools that still + * have references to the certificate, or it is still installed on one or more compute nodes. + * (The latter can occur if the certificate has been removed from the pool, but the node has not + * yet restarted. Nodes refresh their certificates only when they restart.) You may use the + * cancel certificate delete operation to cancel the delete, or the delete certificate operation + * to retry the delete. Possible values include: 'Succeeded', 'Deleting', 'Failed' */ readonly provisioningState?: string; /** @@ -423,7 +483,15 @@ export interface CloudServiceConfiguration { * @description The default value is * which specifies the latest operating system version for * the specified OS family. */ - osVersion?: string; + targetOSVersion?: string; + /** + * @summary The Azure Guest OS Version currently installed on the virtual machines in the pool. + * @description This may differ from targetOSVersion if the pool state is Upgrading. In this case + * some virtual machines may be on the targetOSVersion and some may be on the currentOSVersion + * during the upgrade process. Once all virtual machines have upgraded, currentOSVersion is + * updated to be the same as targetOSVersion. + */ + currentOSVersion?: string; } /** @@ -466,6 +534,19 @@ export interface ImageReference { id?: string; } +/** + * @summary Settings for the operating system disk of the virtual machine. +*/ +export interface OSDisk { + /** + * @summary The type of caching to be enabled for the data disks. none - The caching mode for the + * disk is not enabled. readOnly - The caching mode for the disk is read only. readWrite - The + * caching mode for the disk is read and write. + * @description Default value is none. Possible values include: 'None', 'ReadOnly', 'ReadWrite' + */ + caching?: string; +} + /** * @summary Windows operating system settings to apply to the virtual machine. */ @@ -515,44 +596,6 @@ export interface DataDisk { storageAccountType?: string; } -/** - * @summary A private container registry. -*/ -export interface ContainerRegistry { - /** - * @summary The registry URL. - * @description If omitted, the default is "docker.io". - */ - registryServer?: string; - /** - * @summary The user name to log into the registry server. - */ - userName: string; - /** - * @summary The password to log into the registry server. - */ - password: string; -} - -/** - * @summary The configuration for container-enabled pools. -*/ -export interface ContainerConfiguration { - /** - * @summary The collection of container image names. - * @description This is the full image reference, as would be specified to "docker pull". An - * image will be sourced from the default Docker registry unless the image is fully qualified - * with an alternative registry. - */ - containerImageNames?: string[]; - /** - * @summary Additional private registries from which containers can be pulled. - * @description If any images must be downloaded from a private registry which requires - * credentials, then those credentials must be provided here. - */ - containerRegistries?: ContainerRegistry[]; -} - /** * @summary The configuration for compute nodes in a pool based on the Azure Virtual Machines * infrastructure. @@ -563,6 +606,10 @@ export interface VirtualMachineConfiguration { * Machine Image to use. */ imageReference: ImageReference; + /** + * @summary Settings for the operating system disk of the Virtual Machine. + */ + osDisk?: OSDisk; /** * @summary The SKU of the Batch node agent to be provisioned on compute nodes in the pool. * @description The Batch node agent is a program that runs on each node in the pool, and @@ -596,13 +643,6 @@ export interface VirtualMachineConfiguration { */ licenseType?: string; - /** - * @summary The container configuration for the pool. - * @description If specified, setup is performed on each node in the pool to allow tasks to run - * in containers. All regular tasks and job manager tasks run on this pool must specify the - * containerSettings property, and all other tasks may specify it. - */ - containerConfiguration?: ContainerConfiguration; } /** @@ -900,19 +940,6 @@ export interface LinuxUserConfiguration { sshPrivateKey?: string; } -/** - * @summary Properties used to create a user account on a Windows node. -*/ -export interface WindowsUserConfiguration { - /** - * @summary Login mode for user - * @description Specifies login mode for the user. The default value for - * VirtualMachineConfiguration pools is interactive mode and for CloudServiceConfiguration pools - * is batch mode. Possible values include: 'Batch', 'Interactive' - */ - loginMode?: string; -} - /** * @summary Properties used to create a user on an Azure Batch node. */ @@ -938,12 +965,6 @@ export interface UserAccount { * user is created with the default options. */ linuxUserConfiguration?: LinuxUserConfiguration; - /** - * @summary The Windows-specific user configuration for the user account. - * @description This property can only be specified if the user is on a Windows pool. If not - * specified and on a Windows pool, the user is created with the default options. - */ - windowsUserConfiguration?: WindowsUserConfiguration; } /** @@ -963,55 +984,22 @@ export interface MetadataItem { } /** - * @summary A single file or multiple files to be downloaded to a compute node. + * @summary A file to be downloaded from Azure blob storage to a compute node. */ export interface ResourceFile { /** - * @summary The storage container name in the auto storage account. - * @description The autoStorageContainerName, storageContainerUrl and httpUrl properties are - * mutually exclusive and one of them must be specified. - */ - autoStorageContainerName?: string; - /** - * @summary The URL of the blob container within Azure Blob Storage. - * @description The autoStorageContainerName, storageContainerUrl and httpUrl properties are - * mutually exclusive and one of them must be specified. This URL must be readable and listable - * using anonymous access; that is, the Batch service does not present any credentials when - * downloading the blob. There are two ways to get such a URL for a blob in Azure storage: - * include a Shared Access Signature (SAS) granting read and list permissions on the blob, or set - * the ACL for the blob or its container to allow public access. - */ - storageContainerUrl?: string; - /** - * @summary The URL of the file to download. - * @description The autoStorageContainerName, storageContainerUrl and httpUrl properties are - * mutually exclusive and one of them must be specified. If the URL is Azure Blob Storage, it - * must be readable using anonymous access; that is, the Batch service does not present any - * credentials when downloading the blob. There are two ways to get such a URL for a blob in - * Azure storage: include a Shared Access Signature (SAS) granting read permissions on the blob, - * or set the ACL for the blob or its container to allow public access. + * @summary The URL of the file within Azure Blob Storage. + * @description This URL must be readable using anonymous access; that is, the Batch service does + * not present any credentials when downloading the blob. There are two ways to get such a URL + * for a blob in Azure storage: include a Shared Access Signature (SAS) granting read permissions + * on the blob, or set the ACL for the blob or its container to allow public access. */ - httpUrl?: string; - /** - * @summary The blob prefix to use when downloading blobs from an Azure Storage container. Only - * the blobs whose names begin with the specified prefix will be downloaded. - * @description The property is valid only when autoStorageContainerName or storageContainerUrl - * is used. This prefix can be a partial filename or a subdirectory. If a prefix is not - * specified, all the files in the container will be downloaded. - */ - blobPrefix?: string; + blobSource: string; /** * @summary The location on the compute node to which to download the file, relative to the * task's working directory. - * @description If the httpUrl property is specified, the filePath is required and describes the - * path which the file will be downloaded to, including the filename. Otherwise, if the - * autoStorageContainerName or storageContainerUrl property is specified, filePath is optional - * and is the directory to download the files to. In the case where filePath is used as a - * directory, any directory structure already associated with the input data will be retained in - * full and appended to the specified filePath directory. The specified relative path cannot - * break out of the task's working directory (for example by using '..'). */ - filePath?: string; + filePath: string; /** * @summary The file permission mode attribute in octal format. * @description This property applies only to files being downloaded to Linux compute nodes. It @@ -1042,7 +1030,9 @@ export interface EnvironmentSetting { export interface AutoUserSpecification { /** * @summary The scope for the auto user - * @description The default value is task. Possible values include: 'Task', 'Pool' + * @description pool - specifies that the task runs as the common auto user account which is + * created on every node in a pool. task - specifies that the service should create a new user + * for the task. The default value is task. Possible values include: 'Task', 'Pool' */ scope?: string; /** @@ -1073,29 +1063,6 @@ export interface UserIdentity { autoUser?: AutoUserSpecification; } -/** - * @summary The container settings for a task. -*/ -export interface TaskContainerSettings { - /** - * @summary Additional options to the container create command. - * @description These additional options are supplied as arguments to the "docker create" - * command, in addition to those controlled by the Batch Service. - */ - containerRunOptions?: string; - /** - * @summary The image to use to create the container in which the task will run. - * @description This is the full image reference, as would be specified to "docker pull". If no - * tag is provided as part of the image name, the tag ":latest" is used as a default. - */ - imageName: string; - /** - * @summary The private registry which contains the container image. - * @description This setting can be omitted if was already provided at pool creation. - */ - registry?: ContainerRegistry; -} - /** * @summary A task which is run when a compute node joins a pool in the Azure Batch service, or * when the compute node is rebooted or reimaged. @@ -1147,14 +1114,6 @@ export interface StartTask { * scheduled on the node. The default is false. */ waitForSuccess?: boolean; - /** - * @summary The settings for the container under which the start task runs. - * @description When this is specified, all directories recursively below the - * AZ_BATCH_NODE_ROOT_DIR (the root of Azure Batch directories on the node) are mapped into the - * container, all task environment variables are mapped into the container, and the task command - * line is executed in the container. - */ - containerSettings?: TaskContainerSettings; } /** @@ -1193,6 +1152,13 @@ export interface CertificateReference { /** * @summary Which user accounts on the compute node should have access to the private data of the * certificate. + * @description Values are: + * + * starttask - The user account under which the start task is run. + * task - The accounts under which job tasks are run. + * remoteuser - The accounts under which users remotely access the node. + * + * You can specify more than one visibility in this collection. The default is all accounts. */ visibility?: string[]; } @@ -1300,7 +1266,11 @@ export interface Pool extends ProxyResource { readonly creationTime?: Date; /** * @summary The current state of the pool. - * @description Possible values include: 'Succeeded', 'Deleting' + * @description Values are: + * + * Succeeded - The pool is available to run tasks subject to the availability of compute nodes. + * Deleting - The user has requested that the pool be deleted, but the delete operation has not + * yet completed. Possible values include: 'Succeeded', 'Deleting' */ readonly provisioningState?: string; /** @@ -1309,7 +1279,16 @@ export interface Pool extends ProxyResource { readonly provisioningStateTransitionTime?: Date; /** * @summary Whether the pool is resizing. - * @description Possible values include: 'Steady', 'Resizing', 'Stopping' + * @description Values are: + * + * Steady - The pool is not resizing. There are no changes to the number of nodes in the pool in + * progress. A pool enters this state when it is created and when no operations are being + * performed on the pool to change the number of dedicated nodes. + * Resizing - The pool is resizing; that is, compute nodes are being added to or removed from the + * pool. + * Stopping - The pool was resizing, but the user has requested that the resize be stopped, but + * the stop request has not yet been completed. Possible values include: 'Steady', 'Resizing', + * 'Stopping' */ readonly allocationState?: string; /** @@ -1511,16 +1490,6 @@ export interface BatchAccountListResult extends Array { nextLink?: string; } -/** - * The result of performing list application packages. -*/ -export interface ListApplicationPackagesResult extends Array { - /** - * The URL to get the next set of results. - */ - nextLink?: string; -} - /** * The result of performing list applications. */ diff --git a/lib/services/batchManagement/lib/models/index.js b/lib/services/batchManagement/lib/models/index.js index 41cb012121..e14e9ea3e3 100644 --- a/lib/services/batchManagement/lib/models/index.js +++ b/lib/services/batchManagement/lib/models/index.js @@ -28,20 +28,21 @@ exports.BatchAccountUpdateParameters = require('./batchAccountUpdateParameters') exports.BatchAccountRegenerateKeyParameters = require('./batchAccountRegenerateKeyParameters'); exports.BatchAccountKeys = require('./batchAccountKeys'); exports.ActivateApplicationPackageParameters = require('./activateApplicationPackageParameters'); -exports.ProxyResource = require('./proxyResource'); -exports.Application = require('./application'); +exports.ApplicationCreateParameters = require('./applicationCreateParameters'); exports.ApplicationPackage = require('./applicationPackage'); +exports.Application = require('./application'); +exports.ApplicationUpdateParameters = require('./applicationUpdateParameters'); exports.BatchLocationQuota = require('./batchLocationQuota'); +exports.ProxyResource = require('./proxyResource'); exports.CertificateBaseProperties = require('./certificateBaseProperties'); exports.DeleteCertificateError = require('./deleteCertificateError'); exports.Certificate = require('./certificate'); exports.CertificateCreateOrUpdateParameters = require('./certificateCreateOrUpdateParameters'); exports.CloudServiceConfiguration = require('./cloudServiceConfiguration'); exports.ImageReference = require('./imageReference'); +exports.OSDisk = require('./oSDisk'); exports.WindowsConfiguration = require('./windowsConfiguration'); exports.DataDisk = require('./dataDisk'); -exports.ContainerRegistry = require('./containerRegistry'); -exports.ContainerConfiguration = require('./containerConfiguration'); exports.VirtualMachineConfiguration = require('./virtualMachineConfiguration'); exports.DeploymentConfiguration = require('./deploymentConfiguration'); exports.FixedScaleSettings = require('./fixedScaleSettings'); @@ -55,14 +56,12 @@ exports.PoolEndpointConfiguration = require('./poolEndpointConfiguration'); exports.NetworkConfiguration = require('./networkConfiguration'); exports.TaskSchedulingPolicy = require('./taskSchedulingPolicy'); exports.LinuxUserConfiguration = require('./linuxUserConfiguration'); -exports.WindowsUserConfiguration = require('./windowsUserConfiguration'); exports.UserAccount = require('./userAccount'); exports.MetadataItem = require('./metadataItem'); exports.ResourceFile = require('./resourceFile'); exports.EnvironmentSetting = require('./environmentSetting'); exports.AutoUserSpecification = require('./autoUserSpecification'); exports.UserIdentity = require('./userIdentity'); -exports.TaskContainerSettings = require('./taskContainerSettings'); exports.StartTask = require('./startTask'); exports.CertificateReference = require('./certificateReference'); exports.ApplicationPackageReference = require('./applicationPackageReference'); @@ -74,7 +73,6 @@ exports.Operation = require('./operation'); exports.CheckNameAvailabilityParameters = require('./checkNameAvailabilityParameters'); exports.CheckNameAvailabilityResult = require('./checkNameAvailabilityResult'); exports.BatchAccountListResult = require('./batchAccountListResult'); -exports.ListApplicationPackagesResult = require('./listApplicationPackagesResult'); exports.ListApplicationsResult = require('./listApplicationsResult'); exports.OperationListResult = require('./operationListResult'); exports.ListCertificatesResult = require('./listCertificatesResult'); diff --git a/lib/services/batchManagement/lib/models/oSDisk.js b/lib/services/batchManagement/lib/models/oSDisk.js new file mode 100644 index 0000000000..87bafa6e25 --- /dev/null +++ b/lib/services/batchManagement/lib/models/oSDisk.js @@ -0,0 +1,57 @@ +/* + * 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'; + +/** + * @summary Settings for the operating system disk of the virtual machine. + * + */ +class OSDisk { + /** + * Create a OSDisk. + * @property {string} [caching] The type of caching to be enabled for the + * data disks. none - The caching mode for the disk is not enabled. readOnly + * - The caching mode for the disk is read only. readWrite - The caching mode + * for the disk is read and write. Default value is none. Possible values + * include: 'None', 'ReadOnly', 'ReadWrite' + */ + constructor() { + } + + /** + * Defines the metadata of OSDisk + * + * @returns {object} metadata of OSDisk + * + */ + mapper() { + return { + required: false, + serializedName: 'OSDisk', + type: { + name: 'Composite', + className: 'OSDisk', + modelProperties: { + caching: { + required: false, + serializedName: 'caching', + type: { + name: 'Enum', + allowedValues: [ 'None', 'ReadOnly', 'ReadWrite' ] + } + } + } + } + }; + } +} + +module.exports = OSDisk; diff --git a/lib/services/batchManagement/lib/models/pool.js b/lib/services/batchManagement/lib/models/pool.js index 0e3d2cb82f..ddd6fa4d58 100644 --- a/lib/services/batchManagement/lib/models/pool.js +++ b/lib/services/batchManagement/lib/models/pool.js @@ -29,10 +29,26 @@ class Pool extends models['ProxyResource'] { * node-level changes such as a compute node changing state. * @property {date} [creationTime] The creation time of the pool. * @property {string} [provisioningState] The current state of the pool. - * Possible values include: 'Succeeded', 'Deleting' + * Values are: + * + * Succeeded - The pool is available to run tasks subject to the availability + * of compute nodes. + * Deleting - The user has requested that the pool be deleted, but the delete + * operation has not yet completed. Possible values include: 'Succeeded', + * 'Deleting' * @property {date} [provisioningStateTransitionTime] The time at which the * pool entered its current state. - * @property {string} [allocationState] Whether the pool is resizing. + * @property {string} [allocationState] Whether the pool is resizing. Values + * are: + * + * Steady - The pool is not resizing. There are no changes to the number of + * nodes in the pool in progress. A pool enters this state when it is created + * and when no operations are being performed on the pool to change the + * number of dedicated nodes. + * Resizing - The pool is resizing; that is, compute nodes are being added to + * or removed from the pool. + * Stopping - The pool was resizing, but the user has requested that the + * resize be stopped, but the stop request has not yet been completed. * Possible values include: 'Steady', 'Resizing', 'Stopping' * @property {date} [allocationStateTransitionTime] The time at which the * pool entered its current allocation state. @@ -68,9 +84,16 @@ class Pool extends models['ProxyResource'] { * Windows Server 2016. For more information, see Azure Guest OS Releases * (https://azure.microsoft.com/documentation/articles/cloud-services-guestos-update-matrix/#releases). * @property {string} - * [deploymentConfiguration.cloudServiceConfiguration.osVersion] The default - * value is * which specifies the latest operating system version for the - * specified OS family. + * [deploymentConfiguration.cloudServiceConfiguration.targetOSVersion] The + * default value is * which specifies the latest operating system version for + * the specified OS family. + * @property {string} + * [deploymentConfiguration.cloudServiceConfiguration.currentOSVersion] This + * may differ from targetOSVersion if the pool state is Upgrading. In this + * case some virtual machines may be on the targetOSVersion and some may be + * on the currentOSVersion during the upgrade process. Once all virtual + * machines have upgraded, currentOSVersion is updated to be the same as + * targetOSVersion. * @property {object} [deploymentConfiguration.virtualMachineConfiguration] * This property and cloudServiceConfiguration are mutually exclusive and one * of the properties must be specified. @@ -97,6 +120,12 @@ class Pool extends models['ProxyResource'] { * agent to communicate with Batch service see * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration * . + * @property {object} + * [deploymentConfiguration.virtualMachineConfiguration.osDisk] + * @property {string} + * [deploymentConfiguration.virtualMachineConfiguration.osDisk.caching] + * Default value is none. Possible values include: 'None', 'ReadOnly', + * 'ReadWrite' * @property {string} * [deploymentConfiguration.virtualMachineConfiguration.nodeAgentSkuId] The * Batch node agent is a program that runs on each node in the pool, and @@ -126,21 +155,6 @@ class Pool extends models['ProxyResource'] { * * Windows_Server - The on-premises license is for Windows Server. * Windows_Client - The on-premises license is for Windows Client. - * @property {object} - * [deploymentConfiguration.virtualMachineConfiguration.containerConfiguration] - * If specified, setup is performed on each node in the pool to allow tasks - * to run in containers. All regular tasks and job manager tasks run on this - * pool must specify the containerSettings property, and all other tasks may - * specify it. - * @property {array} - * [deploymentConfiguration.virtualMachineConfiguration.containerConfiguration.containerImageNames] - * This is the full image reference, as would be specified to "docker pull". - * An image will be sourced from the default Docker registry unless the image - * is fully qualified with an alternative registry. - * @property {array} - * [deploymentConfiguration.virtualMachineConfiguration.containerConfiguration.containerRegistries] - * If any images must be downloaded from a private registry which requires - * credentials, then those credentials must be provided here. * @property {number} [currentDedicatedNodes] The number of compute nodes * currently in the pool. * @property {number} [currentLowPriorityNodes] The number of low priority @@ -247,8 +261,11 @@ class Pool extends models['ProxyResource'] { * @property {object} [startTask.userIdentity.autoUser] The userName and * autoUser properties are mutually exclusive; you must specify one but not * both. - * @property {string} [startTask.userIdentity.autoUser.scope] The default - * value is task. Possible values include: 'Task', 'Pool' + * @property {string} [startTask.userIdentity.autoUser.scope] pool - + * specifies that the task runs as the common auto user account which is + * created on every node in a pool. task - specifies that the service should + * create a new user for the task. The default value is task. Possible values + * include: 'Task', 'Pool' * @property {string} [startTask.userIdentity.autoUser.elevationLevel] * nonAdmin - The auto user is a standard user without elevated access. admin * - The auto user is a user with elevated access and operates with full @@ -272,24 +289,6 @@ class Pool extends models['ProxyResource'] { * case, other tasks can start executing on the compute node while the start * task is still running; and even if the start task fails, new tasks will * continue to be scheduled on the node. The default is false. - * @property {object} [startTask.containerSettings] When this is specified, - * all directories recursively below the AZ_BATCH_NODE_ROOT_DIR (the root of - * Azure Batch directories on the node) are mapped into the container, all - * task environment variables are mapped into the container, and the task - * command line is executed in the container. - * @property {string} [startTask.containerSettings.containerRunOptions] These - * additional options are supplied as arguments to the "docker create" - * command, in addition to those controlled by the Batch Service. - * @property {string} [startTask.containerSettings.imageName] This is the - * full image reference, as would be specified to "docker pull". If no tag is - * provided as part of the image name, the tag ":latest" is used as a - * default. - * @property {object} [startTask.containerSettings.registry] This setting can - * be omitted if was already provided at pool creation. - * @property {string} [startTask.containerSettings.registry.registryServer] - * If omitted, the default is "docker.io". - * @property {string} [startTask.containerSettings.registry.userName] - * @property {string} [startTask.containerSettings.registry.password] * @property {array} [certificates] The list of certificates to be installed * on each compute node in the pool. For Windows compute nodes, the Batch * service installs the certificates to the specified certificate store and diff --git a/lib/services/batchManagement/lib/models/resourceFile.js b/lib/services/batchManagement/lib/models/resourceFile.js index f96522de59..25a34445db 100644 --- a/lib/services/batchManagement/lib/models/resourceFile.js +++ b/lib/services/batchManagement/lib/models/resourceFile.js @@ -11,50 +11,20 @@ 'use strict'; /** - * @summary A single file or multiple files to be downloaded to a compute node. + * @summary A file to be downloaded from Azure blob storage to a compute node. * */ class ResourceFile { /** * Create a ResourceFile. - * @property {string} [autoStorageContainerName] The storage container name - * in the auto storage account. The autoStorageContainerName, - * storageContainerUrl and httpUrl properties are mutually exclusive and one - * of them must be specified. - * @property {string} [storageContainerUrl] The URL of the blob container - * within Azure Blob Storage. The autoStorageContainerName, - * storageContainerUrl and httpUrl properties are mutually exclusive and one - * of them must be specified. This URL must be readable and listable using - * anonymous access; that is, the Batch service does not present any - * credentials when downloading the blob. There are two ways to get such a - * URL for a blob in Azure storage: include a Shared Access Signature (SAS) - * granting read and list permissions on the blob, or set the ACL for the - * blob or its container to allow public access. - * @property {string} [httpUrl] The URL of the file to download. The - * autoStorageContainerName, storageContainerUrl and httpUrl properties are - * mutually exclusive and one of them must be specified. If the URL is Azure - * Blob Storage, it must be readable using anonymous access; that is, the + * @property {string} blobSource The URL of the file within Azure Blob + * Storage. This URL must be readable using anonymous access; that is, the * Batch service does not present any credentials when downloading the blob. * There are two ways to get such a URL for a blob in Azure storage: include * a Shared Access Signature (SAS) granting read permissions on the blob, or * set the ACL for the blob or its container to allow public access. - * @property {string} [blobPrefix] The blob prefix to use when downloading - * blobs from an Azure Storage container. Only the blobs whose names begin - * with the specified prefix will be downloaded. The property is valid only - * when autoStorageContainerName or storageContainerUrl is used. This prefix - * can be a partial filename or a subdirectory. If a prefix is not specified, - * all the files in the container will be downloaded. - * @property {string} [filePath] The location on the compute node to which to - * download the file, relative to the task's working directory. If the - * httpUrl property is specified, the filePath is required and describes the - * path which the file will be downloaded to, including the filename. - * Otherwise, if the autoStorageContainerName or storageContainerUrl property - * is specified, filePath is optional and is the directory to download the - * files to. In the case where filePath is used as a directory, any directory - * structure already associated with the input data will be retained in full - * and appended to the specified filePath directory. The specified relative - * path cannot break out of the task's working directory (for example by - * using '..'). + * @property {string} filePath The location on the compute node to which to + * download the file, relative to the task's working directory. * @property {string} [fileMode] The file permission mode attribute in octal * format. This property applies only to files being downloaded to Linux * compute nodes. It will be ignored if it is specified for a resourceFile @@ -79,36 +49,15 @@ class ResourceFile { name: 'Composite', className: 'ResourceFile', modelProperties: { - autoStorageContainerName: { - required: false, - serializedName: 'autoStorageContainerName', - type: { - name: 'String' - } - }, - storageContainerUrl: { - required: false, - serializedName: 'storageContainerUrl', - type: { - name: 'String' - } - }, - httpUrl: { - required: false, - serializedName: 'httpUrl', - type: { - name: 'String' - } - }, - blobPrefix: { - required: false, - serializedName: 'blobPrefix', + blobSource: { + required: true, + serializedName: 'blobSource', type: { name: 'String' } }, filePath: { - required: false, + required: true, serializedName: 'filePath', type: { name: 'String' diff --git a/lib/services/batchManagement/lib/models/startTask.js b/lib/services/batchManagement/lib/models/startTask.js index 787c27eb70..357a3598a5 100644 --- a/lib/services/batchManagement/lib/models/startTask.js +++ b/lib/services/batchManagement/lib/models/startTask.js @@ -36,8 +36,11 @@ class StartTask { * properties are mutually exclusive; you must specify one but not both. * @property {object} [userIdentity.autoUser] The userName and autoUser * properties are mutually exclusive; you must specify one but not both. - * @property {string} [userIdentity.autoUser.scope] The default value is - * task. Possible values include: 'Task', 'Pool' + * @property {string} [userIdentity.autoUser.scope] pool - specifies that the + * task runs as the common auto user account which is created on every node + * in a pool. task - specifies that the service should create a new user for + * the task. The default value is task. Possible values include: 'Task', + * 'Pool' * @property {string} [userIdentity.autoUser.elevationLevel] nonAdmin - The * auto user is a standard user without elevated access. admin - The auto * user is a user with elevated access and operates with full Administrator @@ -63,24 +66,6 @@ class StartTask { * In this case, other tasks can start executing on the compute node while * the start task is still running; and even if the start task fails, new * tasks will continue to be scheduled on the node. The default is false. - * @property {object} [containerSettings] The settings for the container - * under which the start task runs. When this is specified, all directories - * recursively below the AZ_BATCH_NODE_ROOT_DIR (the root of Azure Batch - * directories on the node) are mapped into the container, all task - * environment variables are mapped into the container, and the task command - * line is executed in the container. - * @property {string} [containerSettings.containerRunOptions] These - * additional options are supplied as arguments to the "docker create" - * command, in addition to those controlled by the Batch Service. - * @property {string} [containerSettings.imageName] This is the full image - * reference, as would be specified to "docker pull". If no tag is provided - * as part of the image name, the tag ":latest" is used as a default. - * @property {object} [containerSettings.registry] This setting can be - * omitted if was already provided at pool creation. - * @property {string} [containerSettings.registry.registryServer] If omitted, - * the default is "docker.io". - * @property {string} [containerSettings.registry.userName] - * @property {string} [containerSettings.registry.password] */ constructor() { } @@ -157,14 +142,6 @@ class StartTask { type: { name: 'Boolean' } - }, - containerSettings: { - required: false, - serializedName: 'containerSettings', - type: { - name: 'Composite', - className: 'TaskContainerSettings' - } } } } diff --git a/lib/services/batchManagement/lib/models/userAccount.js b/lib/services/batchManagement/lib/models/userAccount.js index bed68b92e2..2a4d9322be 100644 --- a/lib/services/batchManagement/lib/models/userAccount.js +++ b/lib/services/batchManagement/lib/models/userAccount.js @@ -42,14 +42,6 @@ class UserAccount { * placing the key pair into the user's .ssh directory. If not specified, * password-less SSH is not configured between nodes (no modification of the * user's .ssh directory is done). - * @property {object} [windowsUserConfiguration] The Windows-specific user - * configuration for the user account. This property can only be specified if - * the user is on a Windows pool. If not specified and on a Windows pool, the - * user is created with the default options. - * @property {string} [windowsUserConfiguration.loginMode] Specifies login - * mode for the user. The default value for VirtualMachineConfiguration pools - * is interactive mode and for CloudServiceConfiguration pools is batch mode. - * Possible values include: 'Batch', 'Interactive' */ constructor() { } @@ -97,14 +89,6 @@ class UserAccount { name: 'Composite', className: 'LinuxUserConfiguration' } - }, - windowsUserConfiguration: { - required: false, - serializedName: 'windowsUserConfiguration', - type: { - name: 'Composite', - className: 'WindowsUserConfiguration' - } } } } diff --git a/lib/services/batchManagement/lib/models/userIdentity.js b/lib/services/batchManagement/lib/models/userIdentity.js index 3944c137bb..48a0ccffb7 100644 --- a/lib/services/batchManagement/lib/models/userIdentity.js +++ b/lib/services/batchManagement/lib/models/userIdentity.js @@ -25,8 +25,10 @@ class UserIdentity { * @property {object} [autoUser] The auto user under which the task is run. * The userName and autoUser properties are mutually exclusive; you must * specify one but not both. - * @property {string} [autoUser.scope] The default value is task. Possible - * values include: 'Task', 'Pool' + * @property {string} [autoUser.scope] pool - specifies that the task runs as + * the common auto user account which is created on every node in a pool. + * task - specifies that the service should create a new user for the task. + * The default value is task. Possible values include: 'Task', 'Pool' * @property {string} [autoUser.elevationLevel] nonAdmin - The auto user is a * standard user without elevated access. admin - The auto user is a user * with elevated access and operates with full Administrator permissions. The diff --git a/lib/services/batchManagement/lib/models/virtualMachineConfiguration.js b/lib/services/batchManagement/lib/models/virtualMachineConfiguration.js index dfec4d66a1..b4849231a8 100644 --- a/lib/services/batchManagement/lib/models/virtualMachineConfiguration.js +++ b/lib/services/batchManagement/lib/models/virtualMachineConfiguration.js @@ -36,6 +36,10 @@ class VirtualMachineConfiguration { * service see * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration * . + * @property {object} [osDisk] Settings for the operating system disk of the + * Virtual Machine. + * @property {string} [osDisk.caching] Default value is none. Possible values + * include: 'None', 'ReadOnly', 'ReadWrite' * @property {string} nodeAgentSkuId The SKU of the Batch node agent to be * provisioned on compute nodes in the pool. The Batch node agent is a * program that runs on each node in the pool, and provides the @@ -61,18 +65,6 @@ class VirtualMachineConfiguration { * * Windows_Server - The on-premises license is for Windows Server. * Windows_Client - The on-premises license is for Windows Client. - * @property {object} [containerConfiguration] The container configuration - * for the pool. If specified, setup is performed on each node in the pool to - * allow tasks to run in containers. All regular tasks and job manager tasks - * run on this pool must specify the containerSettings property, and all - * other tasks may specify it. - * @property {array} [containerConfiguration.containerImageNames] This is the - * full image reference, as would be specified to "docker pull". An image - * will be sourced from the default Docker registry unless the image is fully - * qualified with an alternative registry. - * @property {array} [containerConfiguration.containerRegistries] If any - * images must be downloaded from a private registry which requires - * credentials, then those credentials must be provided here. */ constructor() { } @@ -99,6 +91,14 @@ class VirtualMachineConfiguration { className: 'ImageReference' } }, + osDisk: { + required: false, + serializedName: 'osDisk', + type: { + name: 'Composite', + className: 'OSDisk' + } + }, nodeAgentSkuId: { required: true, serializedName: 'nodeAgentSkuId', @@ -135,14 +135,6 @@ class VirtualMachineConfiguration { type: { name: 'String' } - }, - containerConfiguration: { - required: false, - serializedName: 'containerConfiguration', - type: { - name: 'Composite', - className: 'ContainerConfiguration' - } } } } diff --git a/lib/services/batchManagement/lib/operations/applicationOperations.js b/lib/services/batchManagement/lib/operations/applicationOperations.js index f14a2272ae..2e16173489 100644 --- a/lib/services/batchManagement/lib/operations/applicationOperations.js +++ b/lib/services/batchManagement/lib/operations/applicationOperations.js @@ -22,23 +22,18 @@ const WebResource = msRest.WebResource; * * @param {string} accountName The name of the Batch account. * - * @param {string} applicationName The name of the application. This must be - * unique within the account. + * @param {string} applicationId The ID of the application. * * @param {object} [options] Optional Parameters. * * @param {object} [options.parameters] The parameters for the request. * - * @param {string} [options.parameters.displayName] The display name for the - * application. - * * @param {boolean} [options.parameters.allowUpdates] A value indicating * whether packages within the application may be overwritten using the same * version string. * - * @param {string} [options.parameters.defaultVersion] The package to use if a - * client requests the application but does not specify a version. This - * property can only be set to the name of an existing package. + * @param {string} [options.parameters.displayName] The display name for the + * application. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -56,7 +51,7 @@ const WebResource = msRest.WebResource; * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _create(resourceGroupName, accountName, applicationName, options, callback) { +function _create(resourceGroupName, accountName, applicationId, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -89,22 +84,8 @@ function _create(resourceGroupName, accountName, applicationName, options, callb throw new Error('"accountName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } - if (applicationName === null || applicationName === undefined || typeof applicationName.valueOf() !== 'string') { - throw new Error('applicationName cannot be null or undefined and it must be of type string.'); - } - if (applicationName !== null && applicationName !== undefined) { - if (applicationName.length > 64) - { - throw new Error('"applicationName" should satisfy the constraint - "MaxLength": 64'); - } - if (applicationName.length < 1) - { - throw new Error('"applicationName" should satisfy the constraint - "MinLength": 1'); - } - if (applicationName.match(/^[a-zA-Z0-9_-]+$/) === null) - { - throw new Error('"applicationName" should satisfy the constraint - "Pattern": /^[a-zA-Z0-9_-]+$/'); - } + if (applicationId === null || applicationId === undefined || typeof applicationId.valueOf() !== 'string') { + throw new Error('applicationId 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.'); @@ -121,10 +102,10 @@ function _create(resourceGroupName, accountName, applicationName, options, callb // Construct URL let baseUrl = this.client.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/applications/{applicationName}'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/applications/{applicationId}'; requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{accountName}', encodeURIComponent(accountName)); - requestUrl = requestUrl.replace('{applicationName}', encodeURIComponent(applicationName)); + requestUrl = requestUrl.replace('{applicationId}', encodeURIComponent(applicationId)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); @@ -157,7 +138,7 @@ function _create(resourceGroupName, accountName, applicationName, options, callb let requestModel = null; try { if (parameters !== null && parameters !== undefined) { - let requestModelMapper = new client.models['Application']().mapper(); + let requestModelMapper = new client.models['ApplicationCreateParameters']().mapper(); requestModel = client.serialize(requestModelMapper, parameters, 'parameters'); requestContent = JSON.stringify(requestModel); } @@ -173,7 +154,7 @@ function _create(resourceGroupName, accountName, applicationName, options, callb return callback(err); } let statusCode = response.statusCode; - if (statusCode !== 200) { + if (statusCode !== 201) { let error = new Error(responseBody); error.statusCode = response.statusCode; error.request = msRest.stripRequest(httpRequest); @@ -202,7 +183,7 @@ function _create(resourceGroupName, accountName, applicationName, options, callb let result = null; if (responseBody === '') responseBody = null; // Deserialize Response - if (statusCode === 200) { + if (statusCode === 201) { let parsedResponse = null; try { parsedResponse = JSON.parse(responseBody); @@ -231,8 +212,7 @@ function _create(resourceGroupName, accountName, applicationName, options, callb * * @param {string} accountName The name of the Batch account. * - * @param {string} applicationName The name of the application. This must be - * unique within the account. + * @param {string} applicationId The ID of the application. * * @param {object} [options] Optional Parameters. * @@ -251,7 +231,7 @@ function _create(resourceGroupName, accountName, applicationName, options, callb * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _deleteMethod(resourceGroupName, accountName, applicationName, options, callback) { +function _deleteMethod(resourceGroupName, accountName, applicationId, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -283,22 +263,8 @@ function _deleteMethod(resourceGroupName, accountName, applicationName, options, throw new Error('"accountName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } - if (applicationName === null || applicationName === undefined || typeof applicationName.valueOf() !== 'string') { - throw new Error('applicationName cannot be null or undefined and it must be of type string.'); - } - if (applicationName !== null && applicationName !== undefined) { - if (applicationName.length > 64) - { - throw new Error('"applicationName" should satisfy the constraint - "MaxLength": 64'); - } - if (applicationName.length < 1) - { - throw new Error('"applicationName" should satisfy the constraint - "MinLength": 1'); - } - if (applicationName.match(/^[a-zA-Z0-9_-]+$/) === null) - { - throw new Error('"applicationName" should satisfy the constraint - "Pattern": /^[a-zA-Z0-9_-]+$/'); - } + if (applicationId === null || applicationId === undefined || typeof applicationId.valueOf() !== 'string') { + throw new Error('applicationId 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.'); @@ -315,10 +281,10 @@ function _deleteMethod(resourceGroupName, accountName, applicationName, options, // Construct URL let baseUrl = this.client.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/applications/{applicationName}'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/applications/{applicationId}'; requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{accountName}', encodeURIComponent(accountName)); - requestUrl = requestUrl.replace('{applicationName}', encodeURIComponent(applicationName)); + requestUrl = requestUrl.replace('{applicationId}', encodeURIComponent(applicationId)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); @@ -353,7 +319,7 @@ function _deleteMethod(resourceGroupName, accountName, applicationName, options, return callback(err); } let statusCode = response.statusCode; - if (statusCode !== 200 && statusCode !== 204) { + if (statusCode !== 204) { let error = new Error(responseBody); error.statusCode = response.statusCode; error.request = msRest.stripRequest(httpRequest); @@ -394,8 +360,7 @@ function _deleteMethod(resourceGroupName, accountName, applicationName, options, * * @param {string} accountName The name of the Batch account. * - * @param {string} applicationName The name of the application. This must be - * unique within the account. + * @param {string} applicationId The ID of the application. * * @param {object} [options] Optional Parameters. * @@ -415,7 +380,7 @@ function _deleteMethod(resourceGroupName, accountName, applicationName, options, * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _get(resourceGroupName, accountName, applicationName, options, callback) { +function _get(resourceGroupName, accountName, applicationId, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -447,22 +412,8 @@ function _get(resourceGroupName, accountName, applicationName, options, callback throw new Error('"accountName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } - if (applicationName === null || applicationName === undefined || typeof applicationName.valueOf() !== 'string') { - throw new Error('applicationName cannot be null or undefined and it must be of type string.'); - } - if (applicationName !== null && applicationName !== undefined) { - if (applicationName.length > 64) - { - throw new Error('"applicationName" should satisfy the constraint - "MaxLength": 64'); - } - if (applicationName.length < 1) - { - throw new Error('"applicationName" should satisfy the constraint - "MinLength": 1'); - } - if (applicationName.match(/^[a-zA-Z0-9_-]+$/) === null) - { - throw new Error('"applicationName" should satisfy the constraint - "Pattern": /^[a-zA-Z0-9_-]+$/'); - } + if (applicationId === null || applicationId === undefined || typeof applicationId.valueOf() !== 'string') { + throw new Error('applicationId 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.'); @@ -479,10 +430,10 @@ function _get(resourceGroupName, accountName, applicationName, options, callback // Construct URL let baseUrl = this.client.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/applications/{applicationName}'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/applications/{applicationId}'; requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{accountName}', encodeURIComponent(accountName)); - requestUrl = requestUrl.replace('{applicationName}', encodeURIComponent(applicationName)); + requestUrl = requestUrl.replace('{applicationId}', encodeURIComponent(applicationId)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); @@ -575,21 +526,19 @@ function _get(resourceGroupName, accountName, applicationName, options, callback * * @param {string} accountName The name of the Batch account. * - * @param {string} applicationName The name of the application. This must be - * unique within the account. + * @param {string} applicationId The ID of the application. * * @param {object} parameters The parameters for the request. * - * @param {string} [parameters.displayName] The display name for the - * application. - * * @param {boolean} [parameters.allowUpdates] A value indicating whether * packages within the application may be overwritten using the same version * string. * * @param {string} [parameters.defaultVersion] The package to use if a client - * requests the application but does not specify a version. This property can - * only be set to the name of an existing package. + * requests the application but does not specify a version. + * + * @param {string} [parameters.displayName] The display name for the + * application. * * @param {object} [options] Optional Parameters. * @@ -602,14 +551,13 @@ function _get(resourceGroupName, accountName, applicationName, options, callback * * {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 Application} 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 _update(resourceGroupName, accountName, applicationName, parameters, options, callback) { +function _update(resourceGroupName, accountName, applicationId, parameters, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -641,22 +589,8 @@ function _update(resourceGroupName, accountName, applicationName, parameters, op throw new Error('"accountName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } - if (applicationName === null || applicationName === undefined || typeof applicationName.valueOf() !== 'string') { - throw new Error('applicationName cannot be null or undefined and it must be of type string.'); - } - if (applicationName !== null && applicationName !== undefined) { - if (applicationName.length > 64) - { - throw new Error('"applicationName" should satisfy the constraint - "MaxLength": 64'); - } - if (applicationName.length < 1) - { - throw new Error('"applicationName" should satisfy the constraint - "MinLength": 1'); - } - if (applicationName.match(/^[a-zA-Z0-9_-]+$/) === null) - { - throw new Error('"applicationName" should satisfy the constraint - "Pattern": /^[a-zA-Z0-9_-]+$/'); - } + if (applicationId === null || applicationId === undefined || typeof applicationId.valueOf() !== 'string') { + throw new Error('applicationId 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.'); @@ -676,10 +610,10 @@ function _update(resourceGroupName, accountName, applicationName, parameters, op // Construct URL let baseUrl = this.client.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/applications/{applicationName}'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/applications/{applicationId}'; requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{accountName}', encodeURIComponent(accountName)); - requestUrl = requestUrl.replace('{applicationName}', encodeURIComponent(applicationName)); + requestUrl = requestUrl.replace('{applicationId}', encodeURIComponent(applicationId)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); @@ -712,7 +646,7 @@ function _update(resourceGroupName, accountName, applicationName, parameters, op let requestModel = null; try { if (parameters !== null && parameters !== undefined) { - let requestModelMapper = new client.models['Application']().mapper(); + let requestModelMapper = new client.models['ApplicationUpdateParameters']().mapper(); requestModel = client.serialize(requestModelMapper, parameters, 'parameters'); requestContent = JSON.stringify(requestModel); } @@ -728,7 +662,7 @@ function _update(resourceGroupName, accountName, applicationName, parameters, op return callback(err); } let statusCode = response.statusCode; - if (statusCode !== 200) { + if (statusCode !== 204) { let error = new Error(responseBody); error.statusCode = response.statusCode; error.request = msRest.stripRequest(httpRequest); @@ -756,23 +690,6 @@ function _update(resourceGroupName, accountName, applicationName, parameters, 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['Application']().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); }); @@ -1101,23 +1018,18 @@ class ApplicationOperations { * * @param {string} accountName The name of the Batch account. * - * @param {string} applicationName The name of the application. This must be - * unique within the account. + * @param {string} applicationId The ID of the application. * * @param {object} [options] Optional Parameters. * * @param {object} [options.parameters] The parameters for the request. * - * @param {string} [options.parameters.displayName] The display name for the - * application. - * * @param {boolean} [options.parameters.allowUpdates] A value indicating * whether packages within the application may be overwritten using the same * version string. * - * @param {string} [options.parameters.defaultVersion] The package to use if a - * client requests the application but does not specify a version. This - * property can only be set to the name of an existing package. + * @param {string} [options.parameters.displayName] The display name for the + * application. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -1128,11 +1040,11 @@ class ApplicationOperations { * * @reject {Error} - The error object. */ - createWithHttpOperationResponse(resourceGroupName, accountName, applicationName, options) { + createWithHttpOperationResponse(resourceGroupName, accountName, applicationId, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._create(resourceGroupName, accountName, applicationName, options, (err, result, request, response) => { + self._create(resourceGroupName, accountName, applicationId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1150,23 +1062,18 @@ class ApplicationOperations { * * @param {string} accountName The name of the Batch account. * - * @param {string} applicationName The name of the application. This must be - * unique within the account. + * @param {string} applicationId The ID of the application. * * @param {object} [options] Optional Parameters. * * @param {object} [options.parameters] The parameters for the request. * - * @param {string} [options.parameters.displayName] The display name for the - * application. - * * @param {boolean} [options.parameters.allowUpdates] A value indicating * whether packages within the application may be overwritten using the same * version string. * - * @param {string} [options.parameters.defaultVersion] The package to use if a - * client requests the application but does not specify a version. This - * property can only be set to the name of an existing package. + * @param {string} [options.parameters.displayName] The display name for the + * application. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -1193,7 +1100,7 @@ class ApplicationOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - create(resourceGroupName, accountName, applicationName, options, optionalCallback) { + create(resourceGroupName, accountName, applicationId, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1202,14 +1109,14 @@ class ApplicationOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._create(resourceGroupName, accountName, applicationName, options, (err, result, request, response) => { + self._create(resourceGroupName, accountName, applicationId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._create(resourceGroupName, accountName, applicationName, options, optionalCallback); + return self._create(resourceGroupName, accountName, applicationId, options, optionalCallback); } } @@ -1221,8 +1128,7 @@ class ApplicationOperations { * * @param {string} accountName The name of the Batch account. * - * @param {string} applicationName The name of the application. This must be - * unique within the account. + * @param {string} applicationId The ID of the application. * * @param {object} [options] Optional Parameters. * @@ -1235,11 +1141,11 @@ class ApplicationOperations { * * @reject {Error} - The error object. */ - deleteMethodWithHttpOperationResponse(resourceGroupName, accountName, applicationName, options) { + deleteMethodWithHttpOperationResponse(resourceGroupName, accountName, applicationId, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._deleteMethod(resourceGroupName, accountName, applicationName, options, (err, result, request, response) => { + self._deleteMethod(resourceGroupName, accountName, applicationId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1257,8 +1163,7 @@ class ApplicationOperations { * * @param {string} accountName The name of the Batch account. * - * @param {string} applicationName The name of the application. This must be - * unique within the account. + * @param {string} applicationId The ID of the application. * * @param {object} [options] Optional Parameters. * @@ -1286,7 +1191,7 @@ class ApplicationOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(resourceGroupName, accountName, applicationName, options, optionalCallback) { + deleteMethod(resourceGroupName, accountName, applicationId, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1295,14 +1200,14 @@ class ApplicationOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._deleteMethod(resourceGroupName, accountName, applicationName, options, (err, result, request, response) => { + self._deleteMethod(resourceGroupName, accountName, applicationId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._deleteMethod(resourceGroupName, accountName, applicationName, options, optionalCallback); + return self._deleteMethod(resourceGroupName, accountName, applicationId, options, optionalCallback); } } @@ -1314,8 +1219,7 @@ class ApplicationOperations { * * @param {string} accountName The name of the Batch account. * - * @param {string} applicationName The name of the application. This must be - * unique within the account. + * @param {string} applicationId The ID of the application. * * @param {object} [options] Optional Parameters. * @@ -1328,11 +1232,11 @@ class ApplicationOperations { * * @reject {Error} - The error object. */ - getWithHttpOperationResponse(resourceGroupName, accountName, applicationName, options) { + getWithHttpOperationResponse(resourceGroupName, accountName, applicationId, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._get(resourceGroupName, accountName, applicationName, options, (err, result, request, response) => { + self._get(resourceGroupName, accountName, applicationId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1350,8 +1254,7 @@ class ApplicationOperations { * * @param {string} accountName The name of the Batch account. * - * @param {string} applicationName The name of the application. This must be - * unique within the account. + * @param {string} applicationId The ID of the application. * * @param {object} [options] Optional Parameters. * @@ -1380,7 +1283,7 @@ class ApplicationOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - get(resourceGroupName, accountName, applicationName, options, optionalCallback) { + get(resourceGroupName, accountName, applicationId, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1389,14 +1292,14 @@ class ApplicationOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._get(resourceGroupName, accountName, applicationName, options, (err, result, request, response) => { + self._get(resourceGroupName, accountName, applicationId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._get(resourceGroupName, accountName, applicationName, options, optionalCallback); + return self._get(resourceGroupName, accountName, applicationId, options, optionalCallback); } } @@ -1408,21 +1311,19 @@ class ApplicationOperations { * * @param {string} accountName The name of the Batch account. * - * @param {string} applicationName The name of the application. This must be - * unique within the account. + * @param {string} applicationId The ID of the application. * * @param {object} parameters The parameters for the request. * - * @param {string} [parameters.displayName] The display name for the - * application. - * * @param {boolean} [parameters.allowUpdates] A value indicating whether * packages within the application may be overwritten using the same version * string. * * @param {string} [parameters.defaultVersion] The package to use if a client - * requests the application but does not specify a version. This property can - * only be set to the name of an existing package. + * requests the application but does not specify a version. + * + * @param {string} [parameters.displayName] The display name for the + * application. * * @param {object} [options] Optional Parameters. * @@ -1431,15 +1332,15 @@ class ApplicationOperations { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - updateWithHttpOperationResponse(resourceGroupName, accountName, applicationName, parameters, options) { + updateWithHttpOperationResponse(resourceGroupName, accountName, applicationId, parameters, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._update(resourceGroupName, accountName, applicationName, parameters, options, (err, result, request, response) => { + self._update(resourceGroupName, accountName, applicationId, parameters, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1457,21 +1358,19 @@ class ApplicationOperations { * * @param {string} accountName The name of the Batch account. * - * @param {string} applicationName The name of the application. This must be - * unique within the account. + * @param {string} applicationId The ID of the application. * * @param {object} parameters The parameters for the request. * - * @param {string} [parameters.displayName] The display name for the - * application. - * * @param {boolean} [parameters.allowUpdates] A value indicating whether * packages within the application may be overwritten using the same version * string. * * @param {string} [parameters.defaultVersion] The package to use if a client - * requests the application but does not specify a version. This property can - * only be set to the name of an existing package. + * requests the application but does not specify a version. + * + * @param {string} [parameters.displayName] The display name for the + * application. * * @param {object} [options] Optional Parameters. * @@ -1485,7 +1384,7 @@ class ApplicationOperations { * * {Promise} A promise is returned * - * @resolve {Application} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -1493,14 +1392,13 @@ class ApplicationOperations { * * {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 Application} 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. */ - update(resourceGroupName, accountName, applicationName, parameters, options, optionalCallback) { + update(resourceGroupName, accountName, applicationId, parameters, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1509,14 +1407,14 @@ class ApplicationOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._update(resourceGroupName, accountName, applicationName, parameters, options, (err, result, request, response) => { + self._update(resourceGroupName, accountName, applicationId, parameters, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._update(resourceGroupName, accountName, applicationName, parameters, options, optionalCallback); + return self._update(resourceGroupName, accountName, applicationId, parameters, options, optionalCallback); } } diff --git a/lib/services/batchManagement/lib/operations/applicationPackageOperations.js b/lib/services/batchManagement/lib/operations/applicationPackageOperations.js index ddfcd5c872..1baf03d9e6 100644 --- a/lib/services/batchManagement/lib/operations/applicationPackageOperations.js +++ b/lib/services/batchManagement/lib/operations/applicationPackageOperations.js @@ -22,10 +22,9 @@ const WebResource = msRest.WebResource; * * @param {string} accountName The name of the Batch account. * - * @param {string} applicationName The name of the application. This must be - * unique within the account. + * @param {string} applicationId The ID of the application. * - * @param {string} versionName The version of the application. + * @param {string} version The version of the application to activate. * * @param {string} format The format of the application package binary file. * @@ -40,14 +39,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. - * See {@link ApplicationPackage} 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 _activate(resourceGroupName, accountName, applicationName, versionName, format, options, callback) { +function _activate(resourceGroupName, accountName, applicationId, version, format, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -79,39 +77,11 @@ function _activate(resourceGroupName, accountName, applicationName, versionName, throw new Error('"accountName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } - if (applicationName === null || applicationName === undefined || typeof applicationName.valueOf() !== 'string') { - throw new Error('applicationName cannot be null or undefined and it must be of type string.'); - } - if (applicationName !== null && applicationName !== undefined) { - if (applicationName.length > 64) - { - throw new Error('"applicationName" should satisfy the constraint - "MaxLength": 64'); - } - if (applicationName.length < 1) - { - throw new Error('"applicationName" should satisfy the constraint - "MinLength": 1'); - } - if (applicationName.match(/^[a-zA-Z0-9_-]+$/) === null) - { - throw new Error('"applicationName" should satisfy the constraint - "Pattern": /^[a-zA-Z0-9_-]+$/'); - } - } - if (versionName === null || versionName === undefined || typeof versionName.valueOf() !== 'string') { - throw new Error('versionName cannot be null or undefined and it must be of type string.'); + if (applicationId === null || applicationId === undefined || typeof applicationId.valueOf() !== 'string') { + throw new Error('applicationId cannot be null or undefined and it must be of type string.'); } - if (versionName !== null && versionName !== undefined) { - if (versionName.length > 64) - { - throw new Error('"versionName" should satisfy the constraint - "MaxLength": 64'); - } - if (versionName.length < 1) - { - throw new Error('"versionName" should satisfy the constraint - "MinLength": 1'); - } - if (versionName.match(/^[a-zA-Z0-9_-][a-zA-Z0-9_.-]*$/) === null) - { - throw new Error('"versionName" should satisfy the constraint - "Pattern": /^[a-zA-Z0-9_-][a-zA-Z0-9_.-]*$/'); - } + if (version === null || version === undefined || typeof version.valueOf() !== 'string') { + throw new Error('version 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.'); @@ -136,11 +106,11 @@ function _activate(resourceGroupName, accountName, applicationName, versionName, // Construct URL let baseUrl = this.client.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/applications/{applicationName}/versions/{versionName}/activate'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/applications/{applicationId}/versions/{version}/activate'; requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{accountName}', encodeURIComponent(accountName)); - requestUrl = requestUrl.replace('{applicationName}', encodeURIComponent(applicationName)); - requestUrl = requestUrl.replace('{versionName}', encodeURIComponent(versionName)); + requestUrl = requestUrl.replace('{applicationId}', encodeURIComponent(applicationId)); + requestUrl = requestUrl.replace('{version}', encodeURIComponent(version)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); @@ -189,423 +159,7 @@ function _activate(resourceGroupName, accountName, applicationName, versionName, 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) { - 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['ApplicationPackage']().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); - }); -} - -/** - * Creates an application package record. - * - * @param {string} resourceGroupName The name of the resource group that - * contains the Batch account. - * - * @param {string} accountName The name of the Batch account. - * - * @param {string} applicationName The name of the application. This must be - * unique within the account. - * - * @param {string} versionName The version of the application. - * - * @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 ApplicationPackage} 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(resourceGroupName, accountName, applicationName, versionName, 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 (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { - throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); - } - if (accountName === null || accountName === undefined || typeof accountName.valueOf() !== 'string') { - throw new Error('accountName cannot be null or undefined and it must be of type string.'); - } - if (accountName !== null && accountName !== undefined) { - if (accountName.length > 24) - { - throw new Error('"accountName" should satisfy the constraint - "MaxLength": 24'); - } - if (accountName.length < 3) - { - throw new Error('"accountName" should satisfy the constraint - "MinLength": 3'); - } - if (accountName.match(/^[-\w\._]+$/) === null) - { - throw new Error('"accountName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); - } - } - if (applicationName === null || applicationName === undefined || typeof applicationName.valueOf() !== 'string') { - throw new Error('applicationName cannot be null or undefined and it must be of type string.'); - } - if (applicationName !== null && applicationName !== undefined) { - if (applicationName.length > 64) - { - throw new Error('"applicationName" should satisfy the constraint - "MaxLength": 64'); - } - if (applicationName.length < 1) - { - throw new Error('"applicationName" should satisfy the constraint - "MinLength": 1'); - } - if (applicationName.match(/^[a-zA-Z0-9_-]+$/) === null) - { - throw new Error('"applicationName" should satisfy the constraint - "Pattern": /^[a-zA-Z0-9_-]+$/'); - } - } - if (versionName === null || versionName === undefined || typeof versionName.valueOf() !== 'string') { - throw new Error('versionName cannot be null or undefined and it must be of type string.'); - } - if (versionName !== null && versionName !== undefined) { - if (versionName.length > 64) - { - throw new Error('"versionName" should satisfy the constraint - "MaxLength": 64'); - } - if (versionName.length < 1) - { - throw new Error('"versionName" should satisfy the constraint - "MinLength": 1'); - } - if (versionName.match(/^[a-zA-Z0-9_-][a-zA-Z0-9_.-]*$/) === null) - { - throw new Error('"versionName" should satisfy the constraint - "Pattern": /^[a-zA-Z0-9_-][a-zA-Z0-9_.-]*$/'); - } - } - 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.subscriptionId === null || this.client.subscriptionId === undefined || typeof 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); - } - let parameters; - - // Construct URL - let baseUrl = this.client.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/applications/{applicationName}/versions/{versionName}'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); - requestUrl = requestUrl.replace('{accountName}', encodeURIComponent(accountName)); - requestUrl = requestUrl.replace('{applicationName}', encodeURIComponent(applicationName)); - requestUrl = requestUrl.replace('{versionName}', encodeURIComponent(versionName)); - requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); - let queryParameters = []; - queryParameters.push('api-version=' + encodeURIComponent(this.client.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['ApplicationPackage']().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) { - 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['ApplicationPackage']().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); - }); -} - -/** - * Deletes an application package record and its associated binary file. - * - * @param {string} resourceGroupName The name of the resource group that - * contains the Batch account. - * - * @param {string} accountName The name of the Batch account. - * - * @param {string} applicationName The name of the application. This must be - * unique within the account. - * - * @param {string} versionName The version of the application. - * - * @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(resourceGroupName, accountName, applicationName, versionName, 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 (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { - throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); - } - if (accountName === null || accountName === undefined || typeof accountName.valueOf() !== 'string') { - throw new Error('accountName cannot be null or undefined and it must be of type string.'); - } - if (accountName !== null && accountName !== undefined) { - if (accountName.length > 24) - { - throw new Error('"accountName" should satisfy the constraint - "MaxLength": 24'); - } - if (accountName.length < 3) - { - throw new Error('"accountName" should satisfy the constraint - "MinLength": 3'); - } - if (accountName.match(/^[-\w\._]+$/) === null) - { - throw new Error('"accountName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); - } - } - if (applicationName === null || applicationName === undefined || typeof applicationName.valueOf() !== 'string') { - throw new Error('applicationName cannot be null or undefined and it must be of type string.'); - } - if (applicationName !== null && applicationName !== undefined) { - if (applicationName.length > 64) - { - throw new Error('"applicationName" should satisfy the constraint - "MaxLength": 64'); - } - if (applicationName.length < 1) - { - throw new Error('"applicationName" should satisfy the constraint - "MinLength": 1'); - } - if (applicationName.match(/^[a-zA-Z0-9_-]+$/) === null) - { - throw new Error('"applicationName" should satisfy the constraint - "Pattern": /^[a-zA-Z0-9_-]+$/'); - } - } - if (versionName === null || versionName === undefined || typeof versionName.valueOf() !== 'string') { - throw new Error('versionName cannot be null or undefined and it must be of type string.'); - } - if (versionName !== null && versionName !== undefined) { - if (versionName.length > 64) - { - throw new Error('"versionName" should satisfy the constraint - "MaxLength": 64'); - } - if (versionName.length < 1) - { - throw new Error('"versionName" should satisfy the constraint - "MinLength": 1'); - } - if (versionName.match(/^[a-zA-Z0-9_-][a-zA-Z0-9_.-]*$/) === null) - { - throw new Error('"versionName" should satisfy the constraint - "Pattern": /^[a-zA-Z0-9_-][a-zA-Z0-9_.-]*$/'); - } - } - 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.subscriptionId === null || this.client.subscriptionId === undefined || typeof 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.Batch/batchAccounts/{accountName}/applications/{applicationName}/versions/{versionName}'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); - requestUrl = requestUrl.replace('{accountName}', encodeURIComponent(accountName)); - requestUrl = requestUrl.replace('{applicationName}', encodeURIComponent(applicationName)); - requestUrl = requestUrl.replace('{versionName}', encodeURIComponent(versionName)); - requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); - let queryParameters = []; - queryParameters.push('api-version=' + encodeURIComponent(this.client.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 && statusCode !== 204) { + if (statusCode !== 204) { let error = new Error(responseBody); error.statusCode = response.statusCode; error.request = msRest.stripRequest(httpRequest); @@ -639,17 +193,16 @@ function _deleteMethod(resourceGroupName, accountName, applicationName, versionN } /** - * Gets information about the specified application package. + * Creates an application package record. * * @param {string} resourceGroupName The name of the resource group that * contains the Batch account. * * @param {string} accountName The name of the Batch account. * - * @param {string} applicationName The name of the application. This must be - * unique within the account. + * @param {string} applicationId The ID of the application. * - * @param {string} versionName The version of the application. + * @param {string} version The version of the application. * * @param {object} [options] Optional Parameters. * @@ -669,7 +222,7 @@ function _deleteMethod(resourceGroupName, accountName, applicationName, versionN * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _get(resourceGroupName, accountName, applicationName, versionName, options, callback) { +function _create(resourceGroupName, accountName, applicationId, version, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -701,39 +254,11 @@ function _get(resourceGroupName, accountName, applicationName, versionName, opti throw new Error('"accountName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } - if (applicationName === null || applicationName === undefined || typeof applicationName.valueOf() !== 'string') { - throw new Error('applicationName cannot be null or undefined and it must be of type string.'); - } - if (applicationName !== null && applicationName !== undefined) { - if (applicationName.length > 64) - { - throw new Error('"applicationName" should satisfy the constraint - "MaxLength": 64'); - } - if (applicationName.length < 1) - { - throw new Error('"applicationName" should satisfy the constraint - "MinLength": 1'); - } - if (applicationName.match(/^[a-zA-Z0-9_-]+$/) === null) - { - throw new Error('"applicationName" should satisfy the constraint - "Pattern": /^[a-zA-Z0-9_-]+$/'); - } - } - if (versionName === null || versionName === undefined || typeof versionName.valueOf() !== 'string') { - throw new Error('versionName cannot be null or undefined and it must be of type string.'); + if (applicationId === null || applicationId === undefined || typeof applicationId.valueOf() !== 'string') { + throw new Error('applicationId cannot be null or undefined and it must be of type string.'); } - if (versionName !== null && versionName !== undefined) { - if (versionName.length > 64) - { - throw new Error('"versionName" should satisfy the constraint - "MaxLength": 64'); - } - if (versionName.length < 1) - { - throw new Error('"versionName" should satisfy the constraint - "MinLength": 1'); - } - if (versionName.match(/^[a-zA-Z0-9_-][a-zA-Z0-9_.-]*$/) === null) - { - throw new Error('"versionName" should satisfy the constraint - "Pattern": /^[a-zA-Z0-9_-][a-zA-Z0-9_.-]*$/'); - } + if (version === null || version === undefined || typeof version.valueOf() !== 'string') { + throw new Error('version 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.'); @@ -750,11 +275,11 @@ function _get(resourceGroupName, accountName, applicationName, versionName, opti // Construct URL let baseUrl = this.client.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/applications/{applicationName}/versions/{versionName}'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/applications/{applicationId}/versions/{version}'; requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{accountName}', encodeURIComponent(accountName)); - requestUrl = requestUrl.replace('{applicationName}', encodeURIComponent(applicationName)); - requestUrl = requestUrl.replace('{versionName}', encodeURIComponent(versionName)); + requestUrl = requestUrl.replace('{applicationId}', encodeURIComponent(applicationId)); + requestUrl = requestUrl.replace('{version}', encodeURIComponent(version)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); @@ -764,7 +289,7 @@ function _get(resourceGroupName, accountName, applicationName, versionName, opti // Create HTTP transport objects let httpRequest = new WebResource(); - httpRequest.method = 'GET'; + httpRequest.method = 'PUT'; httpRequest.url = requestUrl; httpRequest.headers = {}; // Set Headers @@ -789,7 +314,7 @@ function _get(resourceGroupName, accountName, applicationName, versionName, opti return callback(err); } let statusCode = response.statusCode; - if (statusCode !== 200) { + if (statusCode !== 201) { let error = new Error(responseBody); error.statusCode = response.statusCode; error.request = msRest.stripRequest(httpRequest); @@ -818,7 +343,7 @@ function _get(resourceGroupName, accountName, applicationName, versionName, opti let result = null; if (responseBody === '') responseBody = null; // Deserialize Response - if (statusCode === 200) { + if (statusCode === 201) { let parsedResponse = null; try { parsedResponse = JSON.parse(responseBody); @@ -840,20 +365,18 @@ function _get(resourceGroupName, accountName, applicationName, versionName, opti } /** - * Lists all of the application packages in the specified application. + * Deletes an application package record and its associated binary file. * * @param {string} resourceGroupName The name of the resource group that * contains the Batch account. * * @param {string} accountName The name of the Batch account. * - * @param {string} applicationName The name of the application. This must be - * unique within the account. + * @param {string} applicationId The ID of the application. * - * @param {object} [options] Optional Parameters. + * @param {string} version The version of the application to delete. * - * @param {number} [options.maxresults] The maximum number of items to return - * in the response. + * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -864,15 +387,13 @@ function _get(resourceGroupName, accountName, applicationName, versionName, opti * * {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 ListApplicationPackagesResult} 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 _list(resourceGroupName, accountName, applicationName, options, callback) { +function _deleteMethod(resourceGroupName, accountName, applicationId, version, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -882,7 +403,6 @@ function _list(resourceGroupName, accountName, applicationName, options, callbac if (!callback) { throw new Error('callback cannot be null.'); } - let maxresults = (options && options.maxresults !== undefined) ? options.maxresults : undefined; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -905,25 +425,11 @@ function _list(resourceGroupName, accountName, applicationName, options, callbac throw new Error('"accountName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); } } - if (applicationName === null || applicationName === undefined || typeof applicationName.valueOf() !== 'string') { - throw new Error('applicationName cannot be null or undefined and it must be of type string.'); - } - if (applicationName !== null && applicationName !== undefined) { - if (applicationName.length > 64) - { - throw new Error('"applicationName" should satisfy the constraint - "MaxLength": 64'); - } - if (applicationName.length < 1) - { - throw new Error('"applicationName" should satisfy the constraint - "MinLength": 1'); - } - if (applicationName.match(/^[a-zA-Z0-9_-]+$/) === null) - { - throw new Error('"applicationName" should satisfy the constraint - "Pattern": /^[a-zA-Z0-9_-]+$/'); - } + if (applicationId === null || applicationId === undefined || typeof applicationId.valueOf() !== 'string') { + throw new Error('applicationId cannot be null or undefined and it must be of type string.'); } - if (maxresults !== null && maxresults !== undefined && typeof maxresults !== 'number') { - throw new Error('maxresults must be of type number.'); + if (version === null || version === undefined || typeof version.valueOf() !== 'string') { + throw new Error('version 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.'); @@ -940,15 +446,13 @@ function _list(resourceGroupName, accountName, applicationName, options, callbac // Construct URL let baseUrl = this.client.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/applications/{applicationName}/versions'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/applications/{applicationId}/versions/{version}'; requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{accountName}', encodeURIComponent(accountName)); - requestUrl = requestUrl.replace('{applicationName}', encodeURIComponent(applicationName)); + requestUrl = requestUrl.replace('{applicationId}', encodeURIComponent(applicationId)); + requestUrl = requestUrl.replace('{version}', encodeURIComponent(version)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; - if (maxresults !== null && maxresults !== undefined) { - queryParameters.push('maxresults=' + encodeURIComponent(maxresults.toString())); - } queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); if (queryParameters.length > 0) { requestUrl += '?' + queryParameters.join('&'); @@ -956,7 +460,7 @@ function _list(resourceGroupName, accountName, applicationName, options, callbac // Create HTTP transport objects let httpRequest = new WebResource(); - httpRequest.method = 'GET'; + httpRequest.method = 'DELETE'; httpRequest.url = requestUrl; httpRequest.headers = {}; // Set Headers @@ -981,7 +485,7 @@ function _list(resourceGroupName, accountName, applicationName, options, callbac return callback(err); } let statusCode = response.statusCode; - if (statusCode !== 200) { + if (statusCode !== 204) { let error = new Error(responseBody); error.statusCode = response.statusCode; error.request = msRest.stripRequest(httpRequest); @@ -1009,33 +513,22 @@ function _list(resourceGroupName, accountName, applicationName, options, callbac // 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['ListApplicationPackagesResult']().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); }); } /** - * Lists all of the application packages in the specified application. + * Gets information about the specified application package. + * + * @param {string} resourceGroupName The name of the resource group that + * contains the Batch account. * - * @param {string} nextPageLink The NextLink from the previous successful call - * to List operation. + * @param {string} accountName The name of the Batch account. + * + * @param {string} applicationId The ID of the application. + * + * @param {string} version The version of the application. * * @param {object} [options] Optional Parameters. * @@ -1049,14 +542,13 @@ function _list(resourceGroupName, accountName, applicationName, options, callbac * {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 ListApplicationPackagesResult} for more - * information. + * See {@link ApplicationPackage} 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 _listNext(nextPageLink, options, callback) { +function _get(resourceGroupName, accountName, applicationId, version, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -1068,8 +560,37 @@ function _listNext(nextPageLink, options, callback) { } // 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 (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); + } + if (accountName === null || accountName === undefined || typeof accountName.valueOf() !== 'string') { + throw new Error('accountName cannot be null or undefined and it must be of type string.'); + } + if (accountName !== null && accountName !== undefined) { + if (accountName.length > 24) + { + throw new Error('"accountName" should satisfy the constraint - "MaxLength": 24'); + } + if (accountName.length < 3) + { + throw new Error('"accountName" should satisfy the constraint - "MinLength": 3'); + } + if (accountName.match(/^[-\w\._]+$/) === null) + { + throw new Error('"accountName" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + } + } + if (applicationId === null || applicationId === undefined || typeof applicationId.valueOf() !== 'string') { + throw new Error('applicationId cannot be null or undefined and it must be of type string.'); + } + if (version === null || version === undefined || typeof version.valueOf() !== 'string') { + throw new Error('version 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.subscriptionId === null || this.client.subscriptionId === undefined || typeof 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.'); @@ -1079,8 +600,18 @@ function _listNext(nextPageLink, options, callback) { } // Construct URL - let requestUrl = '{nextLink}'; - requestUrl = requestUrl.replace('{nextLink}', nextPageLink); + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/applications/{applicationId}/versions/{version}'; + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{accountName}', encodeURIComponent(accountName)); + requestUrl = requestUrl.replace('{applicationId}', encodeURIComponent(applicationId)); + requestUrl = requestUrl.replace('{version}', encodeURIComponent(version)); + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } // Create HTTP transport objects let httpRequest = new WebResource(); @@ -1144,7 +675,7 @@ function _listNext(nextPageLink, options, callback) { parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['ListApplicationPackagesResult']().mapper(); + let resultMapper = new client.models['ApplicationPackage']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -1171,8 +702,6 @@ class ApplicationPackageOperations { this._create = _create; this._deleteMethod = _deleteMethod; this._get = _get; - this._list = _list; - this._listNext = _listNext; } /** @@ -1183,10 +712,9 @@ class ApplicationPackageOperations { * * @param {string} accountName The name of the Batch account. * - * @param {string} applicationName The name of the application. This must be - * unique within the account. + * @param {string} applicationId The ID of the application. * - * @param {string} versionName The version of the application. + * @param {string} version The version of the application to activate. * * @param {string} format The format of the application package binary file. * @@ -1197,15 +725,15 @@ class ApplicationPackageOperations { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - activateWithHttpOperationResponse(resourceGroupName, accountName, applicationName, versionName, format, options) { + activateWithHttpOperationResponse(resourceGroupName, accountName, applicationId, version, format, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._activate(resourceGroupName, accountName, applicationName, versionName, format, options, (err, result, request, response) => { + self._activate(resourceGroupName, accountName, applicationId, version, format, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1223,10 +751,9 @@ class ApplicationPackageOperations { * * @param {string} accountName The name of the Batch account. * - * @param {string} applicationName The name of the application. This must be - * unique within the account. + * @param {string} applicationId The ID of the application. * - * @param {string} versionName The version of the application. + * @param {string} version The version of the application to activate. * * @param {string} format The format of the application package binary file. * @@ -1242,7 +769,7 @@ class ApplicationPackageOperations { * * {Promise} A promise is returned * - * @resolve {ApplicationPackage} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -1250,14 +777,13 @@ class ApplicationPackageOperations { * * {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 ApplicationPackage} 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. */ - activate(resourceGroupName, accountName, applicationName, versionName, format, options, optionalCallback) { + activate(resourceGroupName, accountName, applicationId, version, format, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1266,14 +792,14 @@ class ApplicationPackageOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._activate(resourceGroupName, accountName, applicationName, versionName, format, options, (err, result, request, response) => { + self._activate(resourceGroupName, accountName, applicationId, version, format, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._activate(resourceGroupName, accountName, applicationName, versionName, format, options, optionalCallback); + return self._activate(resourceGroupName, accountName, applicationId, version, format, options, optionalCallback); } } @@ -1285,10 +811,9 @@ class ApplicationPackageOperations { * * @param {string} accountName The name of the Batch account. * - * @param {string} applicationName The name of the application. This must be - * unique within the account. + * @param {string} applicationId The ID of the application. * - * @param {string} versionName The version of the application. + * @param {string} version The version of the application. * * @param {object} [options] Optional Parameters. * @@ -1301,11 +826,11 @@ class ApplicationPackageOperations { * * @reject {Error} - The error object. */ - createWithHttpOperationResponse(resourceGroupName, accountName, applicationName, versionName, options) { + createWithHttpOperationResponse(resourceGroupName, accountName, applicationId, version, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._create(resourceGroupName, accountName, applicationName, versionName, options, (err, result, request, response) => { + self._create(resourceGroupName, accountName, applicationId, version, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1323,10 +848,9 @@ class ApplicationPackageOperations { * * @param {string} accountName The name of the Batch account. * - * @param {string} applicationName The name of the application. This must be - * unique within the account. + * @param {string} applicationId The ID of the application. * - * @param {string} versionName The version of the application. + * @param {string} version The version of the application. * * @param {object} [options] Optional Parameters. * @@ -1355,7 +879,7 @@ class ApplicationPackageOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - create(resourceGroupName, accountName, applicationName, versionName, options, optionalCallback) { + create(resourceGroupName, accountName, applicationId, version, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1364,14 +888,14 @@ class ApplicationPackageOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._create(resourceGroupName, accountName, applicationName, versionName, options, (err, result, request, response) => { + self._create(resourceGroupName, accountName, applicationId, version, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._create(resourceGroupName, accountName, applicationName, versionName, options, optionalCallback); + return self._create(resourceGroupName, accountName, applicationId, version, options, optionalCallback); } } @@ -1383,10 +907,9 @@ class ApplicationPackageOperations { * * @param {string} accountName The name of the Batch account. * - * @param {string} applicationName The name of the application. This must be - * unique within the account. + * @param {string} applicationId The ID of the application. * - * @param {string} versionName The version of the application. + * @param {string} version The version of the application to delete. * * @param {object} [options] Optional Parameters. * @@ -1399,11 +922,11 @@ class ApplicationPackageOperations { * * @reject {Error} - The error object. */ - deleteMethodWithHttpOperationResponse(resourceGroupName, accountName, applicationName, versionName, options) { + deleteMethodWithHttpOperationResponse(resourceGroupName, accountName, applicationId, version, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._deleteMethod(resourceGroupName, accountName, applicationName, versionName, options, (err, result, request, response) => { + self._deleteMethod(resourceGroupName, accountName, applicationId, version, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1421,10 +944,9 @@ class ApplicationPackageOperations { * * @param {string} accountName The name of the Batch account. * - * @param {string} applicationName The name of the application. This must be - * unique within the account. + * @param {string} applicationId The ID of the application. * - * @param {string} versionName The version of the application. + * @param {string} version The version of the application to delete. * * @param {object} [options] Optional Parameters. * @@ -1452,7 +974,7 @@ class ApplicationPackageOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(resourceGroupName, accountName, applicationName, versionName, options, optionalCallback) { + deleteMethod(resourceGroupName, accountName, applicationId, version, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1461,14 +983,14 @@ class ApplicationPackageOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._deleteMethod(resourceGroupName, accountName, applicationName, versionName, options, (err, result, request, response) => { + self._deleteMethod(resourceGroupName, accountName, applicationId, version, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._deleteMethod(resourceGroupName, accountName, applicationName, versionName, options, optionalCallback); + return self._deleteMethod(resourceGroupName, accountName, applicationId, version, options, optionalCallback); } } @@ -1480,10 +1002,9 @@ class ApplicationPackageOperations { * * @param {string} accountName The name of the Batch account. * - * @param {string} applicationName The name of the application. This must be - * unique within the account. + * @param {string} applicationId The ID of the application. * - * @param {string} versionName The version of the application. + * @param {string} version The version of the application. * * @param {object} [options] Optional Parameters. * @@ -1496,11 +1017,11 @@ class ApplicationPackageOperations { * * @reject {Error} - The error object. */ - getWithHttpOperationResponse(resourceGroupName, accountName, applicationName, versionName, options) { + getWithHttpOperationResponse(resourceGroupName, accountName, applicationId, version, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._get(resourceGroupName, accountName, applicationName, versionName, options, (err, result, request, response) => { + self._get(resourceGroupName, accountName, applicationId, version, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1518,10 +1039,9 @@ class ApplicationPackageOperations { * * @param {string} accountName The name of the Batch account. * - * @param {string} applicationName The name of the application. This must be - * unique within the account. + * @param {string} applicationId The ID of the application. * - * @param {string} versionName The version of the application. + * @param {string} version The version of the application. * * @param {object} [options] Optional Parameters. * @@ -1550,193 +1070,7 @@ class ApplicationPackageOperations { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - get(resourceGroupName, accountName, applicationName, versionName, 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(resourceGroupName, accountName, applicationName, versionName, options, (err, result, request, response) => { - if (err) { reject(err); } - else { resolve(result); } - return; - }); - }); - } else { - return self._get(resourceGroupName, accountName, applicationName, versionName, options, optionalCallback); - } - } - - /** - * Lists all of the application packages in the specified application. - * - * @param {string} resourceGroupName The name of the resource group that - * contains the Batch account. - * - * @param {string} accountName The name of the Batch account. - * - * @param {string} applicationName The name of the application. This must be - * unique within the account. - * - * @param {object} [options] Optional Parameters. - * - * @param {number} [options.maxresults] The maximum number of items to return - * in the response. - * - * @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(resourceGroupName, accountName, applicationName, options) { - let client = this.client; - let self = this; - return new Promise((resolve, reject) => { - self._list(resourceGroupName, accountName, applicationName, options, (err, result, request, response) => { - let httpOperationResponse = new msRest.HttpOperationResponse(request, response); - httpOperationResponse.body = result; - if (err) { reject(err); } - else { resolve(httpOperationResponse); } - return; - }); - }); - } - - /** - * Lists all of the application packages in the specified application. - * - * @param {string} resourceGroupName The name of the resource group that - * contains the Batch account. - * - * @param {string} accountName The name of the Batch account. - * - * @param {string} applicationName The name of the application. This must be - * unique within the account. - * - * @param {object} [options] Optional Parameters. - * - * @param {number} [options.maxresults] The maximum number of items to return - * in the response. - * - * @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 {ListApplicationPackagesResult} - 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 ListApplicationPackagesResult} 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(resourceGroupName, accountName, applicationName, 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(resourceGroupName, accountName, applicationName, options, (err, result, request, response) => { - if (err) { reject(err); } - else { resolve(result); } - return; - }); - }); - } else { - return self._list(resourceGroupName, accountName, applicationName, options, optionalCallback); - } - } - - /** - * Lists all of the application packages in the specified application. - * - * @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. - */ - listNextWithHttpOperationResponse(nextPageLink, options) { - let client = this.client; - let self = this; - return new Promise((resolve, reject) => { - self._listNext(nextPageLink, options, (err, result, request, response) => { - let httpOperationResponse = new msRest.HttpOperationResponse(request, response); - httpOperationResponse.body = result; - if (err) { reject(err); } - else { resolve(httpOperationResponse); } - return; - }); - }); - } - - /** - * Lists all of the application packages in the specified application. - * - * @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 {ListApplicationPackagesResult} - 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 ListApplicationPackagesResult} 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. - */ - listNext(nextPageLink, options, optionalCallback) { + get(resourceGroupName, accountName, applicationId, version, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1745,14 +1079,14 @@ class ApplicationPackageOperations { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._listNext(nextPageLink, options, (err, result, request, response) => { + self._get(resourceGroupName, accountName, applicationId, version, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._listNext(nextPageLink, options, optionalCallback); + return self._get(resourceGroupName, accountName, applicationId, version, options, optionalCallback); } } diff --git a/lib/services/batchManagement/lib/operations/index.d.ts b/lib/services/batchManagement/lib/operations/index.d.ts index 40436a44ef..31f860f699 100644 --- a/lib/services/batchManagement/lib/operations/index.d.ts +++ b/lib/services/batchManagement/lib/operations/index.d.ts @@ -1008,10 +1008,9 @@ export interface ApplicationPackageOperations { * * @param {string} accountName The name of the Batch account. * - * @param {string} applicationName The name of the application. This must be - * unique within the account. + * @param {string} applicationId The ID of the application. * - * @param {string} versionName The version of the application. + * @param {string} version The version of the application to activate. * * @param {string} format The format of the application package binary file. * @@ -1022,11 +1021,11 @@ export interface ApplicationPackageOperations { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - activateWithHttpOperationResponse(resourceGroupName: string, accountName: string, applicationName: string, versionName: string, format: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + activateWithHttpOperationResponse(resourceGroupName: string, accountName: string, applicationId: string, version: string, format: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Activates the specified application package. @@ -1036,10 +1035,9 @@ export interface ApplicationPackageOperations { * * @param {string} accountName The name of the Batch account. * - * @param {string} applicationName The name of the application. This must be - * unique within the account. + * @param {string} applicationId The ID of the application. * - * @param {string} versionName The version of the application. + * @param {string} version The version of the application to activate. * * @param {string} format The format of the application package binary file. * @@ -1055,7 +1053,7 @@ export interface ApplicationPackageOperations { * * {Promise} A promise is returned. * - * @resolve {ApplicationPackage} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -1063,16 +1061,15 @@ export interface ApplicationPackageOperations { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {ApplicationPackage} [result] - The deserialized result object if an error did not occur. - * See {@link ApplicationPackage} 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. */ - activate(resourceGroupName: string, accountName: string, applicationName: string, versionName: string, format: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - activate(resourceGroupName: string, accountName: string, applicationName: string, versionName: string, format: string, callback: ServiceCallback): void; - activate(resourceGroupName: string, accountName: string, applicationName: string, versionName: string, format: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + activate(resourceGroupName: string, accountName: string, applicationId: string, version: string, format: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + activate(resourceGroupName: string, accountName: string, applicationId: string, version: string, format: string, callback: ServiceCallback): void; + activate(resourceGroupName: string, accountName: string, applicationId: string, version: string, format: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -1083,10 +1080,9 @@ export interface ApplicationPackageOperations { * * @param {string} accountName The name of the Batch account. * - * @param {string} applicationName The name of the application. This must be - * unique within the account. + * @param {string} applicationId The ID of the application. * - * @param {string} versionName The version of the application. + * @param {string} version The version of the application. * * @param {object} [options] Optional Parameters. * @@ -1099,7 +1095,7 @@ export interface ApplicationPackageOperations { * * @reject {Error|ServiceError} - The error object. */ - createWithHttpOperationResponse(resourceGroupName: string, accountName: string, applicationName: string, versionName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + createWithHttpOperationResponse(resourceGroupName: string, accountName: string, applicationId: string, version: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Creates an application package record. @@ -1109,10 +1105,9 @@ export interface ApplicationPackageOperations { * * @param {string} accountName The name of the Batch account. * - * @param {string} applicationName The name of the application. This must be - * unique within the account. + * @param {string} applicationId The ID of the application. * - * @param {string} versionName The version of the application. + * @param {string} version The version of the application. * * @param {object} [options] Optional Parameters. * @@ -1141,9 +1136,9 @@ export interface ApplicationPackageOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - create(resourceGroupName: string, accountName: string, applicationName: string, versionName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - create(resourceGroupName: string, accountName: string, applicationName: string, versionName: string, callback: ServiceCallback): void; - create(resourceGroupName: string, accountName: string, applicationName: string, versionName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + create(resourceGroupName: string, accountName: string, applicationId: string, version: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + create(resourceGroupName: string, accountName: string, applicationId: string, version: string, callback: ServiceCallback): void; + create(resourceGroupName: string, accountName: string, applicationId: string, version: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -1154,10 +1149,9 @@ export interface ApplicationPackageOperations { * * @param {string} accountName The name of the Batch account. * - * @param {string} applicationName The name of the application. This must be - * unique within the account. + * @param {string} applicationId The ID of the application. * - * @param {string} versionName The version of the application. + * @param {string} version The version of the application to delete. * * @param {object} [options] Optional Parameters. * @@ -1170,7 +1164,7 @@ export interface ApplicationPackageOperations { * * @reject {Error|ServiceError} - The error object. */ - deleteMethodWithHttpOperationResponse(resourceGroupName: string, accountName: string, applicationName: string, versionName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + deleteMethodWithHttpOperationResponse(resourceGroupName: string, accountName: string, applicationId: string, version: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Deletes an application package record and its associated binary file. @@ -1180,10 +1174,9 @@ export interface ApplicationPackageOperations { * * @param {string} accountName The name of the Batch account. * - * @param {string} applicationName The name of the application. This must be - * unique within the account. + * @param {string} applicationId The ID of the application. * - * @param {string} versionName The version of the application. + * @param {string} version The version of the application to delete. * * @param {object} [options] Optional Parameters. * @@ -1211,9 +1204,9 @@ export interface ApplicationPackageOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(resourceGroupName: string, accountName: string, applicationName: string, versionName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - deleteMethod(resourceGroupName: string, accountName: string, applicationName: string, versionName: string, callback: ServiceCallback): void; - deleteMethod(resourceGroupName: string, accountName: string, applicationName: string, versionName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, accountName: string, applicationId: string, version: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + deleteMethod(resourceGroupName: string, accountName: string, applicationId: string, version: string, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, accountName: string, applicationId: string, version: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -1224,10 +1217,9 @@ export interface ApplicationPackageOperations { * * @param {string} accountName The name of the Batch account. * - * @param {string} applicationName The name of the application. This must be - * unique within the account. + * @param {string} applicationId The ID of the application. * - * @param {string} versionName The version of the application. + * @param {string} version The version of the application. * * @param {object} [options] Optional Parameters. * @@ -1240,7 +1232,7 @@ export interface ApplicationPackageOperations { * * @reject {Error|ServiceError} - The error object. */ - getWithHttpOperationResponse(resourceGroupName: string, accountName: string, applicationName: string, versionName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(resourceGroupName: string, accountName: string, applicationId: string, version: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Gets information about the specified application package. @@ -1250,10 +1242,9 @@ export interface ApplicationPackageOperations { * * @param {string} accountName The name of the Batch account. * - * @param {string} applicationName The name of the application. This must be - * unique within the account. + * @param {string} applicationId The ID of the application. * - * @param {string} versionName The version of the application. + * @param {string} version The version of the application. * * @param {object} [options] Optional Parameters. * @@ -1282,141 +1273,9 @@ export interface ApplicationPackageOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - get(resourceGroupName: string, accountName: string, applicationName: string, versionName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - get(resourceGroupName: string, accountName: string, applicationName: string, versionName: string, callback: ServiceCallback): void; - get(resourceGroupName: string, accountName: string, applicationName: string, versionName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; - - - /** - * Lists all of the application packages in the specified application. - * - * @param {string} resourceGroupName The name of the resource group that - * contains the Batch account. - * - * @param {string} accountName The name of the Batch account. - * - * @param {string} applicationName The name of the application. This must be - * unique within the account. - * - * @param {object} [options] Optional Parameters. - * - * @param {number} [options.maxresults] The maximum number of items to return - * in the response. - * - * @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. - */ - listWithHttpOperationResponse(resourceGroupName: string, accountName: string, applicationName: string, options?: { maxresults? : number, customHeaders? : { [headerName: string]: string; } }): Promise>; - - /** - * Lists all of the application packages in the specified application. - * - * @param {string} resourceGroupName The name of the resource group that - * contains the Batch account. - * - * @param {string} accountName The name of the Batch account. - * - * @param {string} applicationName The name of the application. This must be - * unique within the account. - * - * @param {object} [options] Optional Parameters. - * - * @param {number} [options.maxresults] The maximum number of items to return - * in the response. - * - * @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 {ListApplicationPackagesResult} - 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. - * - * {ListApplicationPackagesResult} [result] - The deserialized result object if an error did not occur. - * See {@link ListApplicationPackagesResult} 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. - */ - list(resourceGroupName: string, accountName: string, applicationName: string, options?: { maxresults? : number, customHeaders? : { [headerName: string]: string; } }): Promise; - list(resourceGroupName: string, accountName: string, applicationName: string, callback: ServiceCallback): void; - list(resourceGroupName: string, accountName: string, applicationName: string, options: { maxresults? : number, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; - - - /** - * Lists all of the application packages in the specified application. - * - * @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. - */ - listNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; - - /** - * Lists all of the application packages in the specified application. - * - * @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 {ListApplicationPackagesResult} - 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. - * - * {ListApplicationPackagesResult} [result] - The deserialized result object if an error did not occur. - * See {@link ListApplicationPackagesResult} 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. - */ - listNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listNext(nextPageLink: string, callback: ServiceCallback): void; - listNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + get(resourceGroupName: string, accountName: string, applicationId: string, version: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + get(resourceGroupName: string, accountName: string, applicationId: string, version: string, callback: ServiceCallback): void; + get(resourceGroupName: string, accountName: string, applicationId: string, version: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; } /** @@ -1436,23 +1295,18 @@ export interface ApplicationOperations { * * @param {string} accountName The name of the Batch account. * - * @param {string} applicationName The name of the application. This must be - * unique within the account. + * @param {string} applicationId The ID of the application. * * @param {object} [options] Optional Parameters. * * @param {object} [options.parameters] The parameters for the request. * - * @param {string} [options.parameters.displayName] The display name for the - * application. - * * @param {boolean} [options.parameters.allowUpdates] A value indicating * whether packages within the application may be overwritten using the same * version string. * - * @param {string} [options.parameters.defaultVersion] The package to use if a - * client requests the application but does not specify a version. This - * property can only be set to the name of an existing package. + * @param {string} [options.parameters.displayName] The display name for the + * application. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -1463,7 +1317,7 @@ export interface ApplicationOperations { * * @reject {Error|ServiceError} - The error object. */ - createWithHttpOperationResponse(resourceGroupName: string, accountName: string, applicationName: string, options?: { parameters? : models.Application, customHeaders? : { [headerName: string]: string; } }): Promise>; + createWithHttpOperationResponse(resourceGroupName: string, accountName: string, applicationId: string, options?: { parameters? : models.ApplicationCreateParameters, customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Adds an application to the specified Batch account. @@ -1473,23 +1327,18 @@ export interface ApplicationOperations { * * @param {string} accountName The name of the Batch account. * - * @param {string} applicationName The name of the application. This must be - * unique within the account. + * @param {string} applicationId The ID of the application. * * @param {object} [options] Optional Parameters. * * @param {object} [options.parameters] The parameters for the request. * - * @param {string} [options.parameters.displayName] The display name for the - * application. - * * @param {boolean} [options.parameters.allowUpdates] A value indicating * whether packages within the application may be overwritten using the same * version string. * - * @param {string} [options.parameters.defaultVersion] The package to use if a - * client requests the application but does not specify a version. This - * property can only be set to the name of an existing package. + * @param {string} [options.parameters.displayName] The display name for the + * application. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -1516,9 +1365,9 @@ export interface ApplicationOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - create(resourceGroupName: string, accountName: string, applicationName: string, options?: { parameters? : models.Application, customHeaders? : { [headerName: string]: string; } }): Promise; - create(resourceGroupName: string, accountName: string, applicationName: string, callback: ServiceCallback): void; - create(resourceGroupName: string, accountName: string, applicationName: string, options: { parameters? : models.Application, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + create(resourceGroupName: string, accountName: string, applicationId: string, options?: { parameters? : models.ApplicationCreateParameters, customHeaders? : { [headerName: string]: string; } }): Promise; + create(resourceGroupName: string, accountName: string, applicationId: string, callback: ServiceCallback): void; + create(resourceGroupName: string, accountName: string, applicationId: string, options: { parameters? : models.ApplicationCreateParameters, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -1529,8 +1378,7 @@ export interface ApplicationOperations { * * @param {string} accountName The name of the Batch account. * - * @param {string} applicationName The name of the application. This must be - * unique within the account. + * @param {string} applicationId The ID of the application. * * @param {object} [options] Optional Parameters. * @@ -1543,7 +1391,7 @@ export interface ApplicationOperations { * * @reject {Error|ServiceError} - The error object. */ - deleteMethodWithHttpOperationResponse(resourceGroupName: string, accountName: string, applicationName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + deleteMethodWithHttpOperationResponse(resourceGroupName: string, accountName: string, applicationId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Deletes an application. @@ -1553,8 +1401,7 @@ export interface ApplicationOperations { * * @param {string} accountName The name of the Batch account. * - * @param {string} applicationName The name of the application. This must be - * unique within the account. + * @param {string} applicationId The ID of the application. * * @param {object} [options] Optional Parameters. * @@ -1582,9 +1429,9 @@ export interface ApplicationOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(resourceGroupName: string, accountName: string, applicationName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - deleteMethod(resourceGroupName: string, accountName: string, applicationName: string, callback: ServiceCallback): void; - deleteMethod(resourceGroupName: string, accountName: string, applicationName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, accountName: string, applicationId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + deleteMethod(resourceGroupName: string, accountName: string, applicationId: string, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, accountName: string, applicationId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -1595,8 +1442,7 @@ export interface ApplicationOperations { * * @param {string} accountName The name of the Batch account. * - * @param {string} applicationName The name of the application. This must be - * unique within the account. + * @param {string} applicationId The ID of the application. * * @param {object} [options] Optional Parameters. * @@ -1609,7 +1455,7 @@ export interface ApplicationOperations { * * @reject {Error|ServiceError} - The error object. */ - getWithHttpOperationResponse(resourceGroupName: string, accountName: string, applicationName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(resourceGroupName: string, accountName: string, applicationId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Gets information about the specified application. @@ -1619,8 +1465,7 @@ export interface ApplicationOperations { * * @param {string} accountName The name of the Batch account. * - * @param {string} applicationName The name of the application. This must be - * unique within the account. + * @param {string} applicationId The ID of the application. * * @param {object} [options] Optional Parameters. * @@ -1649,9 +1494,9 @@ export interface ApplicationOperations { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - get(resourceGroupName: string, accountName: string, applicationName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - get(resourceGroupName: string, accountName: string, applicationName: string, callback: ServiceCallback): void; - get(resourceGroupName: string, accountName: string, applicationName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + get(resourceGroupName: string, accountName: string, applicationId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + get(resourceGroupName: string, accountName: string, applicationId: string, callback: ServiceCallback): void; + get(resourceGroupName: string, accountName: string, applicationId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -1662,21 +1507,19 @@ export interface ApplicationOperations { * * @param {string} accountName The name of the Batch account. * - * @param {string} applicationName The name of the application. This must be - * unique within the account. + * @param {string} applicationId The ID of the application. * * @param {object} parameters The parameters for the request. * - * @param {string} [parameters.displayName] The display name for the - * application. - * * @param {boolean} [parameters.allowUpdates] A value indicating whether * packages within the application may be overwritten using the same version * string. * * @param {string} [parameters.defaultVersion] The package to use if a client - * requests the application but does not specify a version. This property can - * only be set to the name of an existing package. + * requests the application but does not specify a version. + * + * @param {string} [parameters.displayName] The display name for the + * application. * * @param {object} [options] Optional Parameters. * @@ -1685,11 +1528,11 @@ export interface ApplicationOperations { * * @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, accountName: string, applicationName: string, parameters: models.Application, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + updateWithHttpOperationResponse(resourceGroupName: string, accountName: string, applicationId: string, parameters: models.ApplicationUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Updates settings for the specified application. @@ -1699,21 +1542,19 @@ export interface ApplicationOperations { * * @param {string} accountName The name of the Batch account. * - * @param {string} applicationName The name of the application. This must be - * unique within the account. + * @param {string} applicationId The ID of the application. * * @param {object} parameters The parameters for the request. * - * @param {string} [parameters.displayName] The display name for the - * application. - * * @param {boolean} [parameters.allowUpdates] A value indicating whether * packages within the application may be overwritten using the same version * string. * * @param {string} [parameters.defaultVersion] The package to use if a client - * requests the application but does not specify a version. This property can - * only be set to the name of an existing package. + * requests the application but does not specify a version. + * + * @param {string} [parameters.displayName] The display name for the + * application. * * @param {object} [options] Optional Parameters. * @@ -1727,7 +1568,7 @@ export interface ApplicationOperations { * * {Promise} A promise is returned. * - * @resolve {Application} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -1735,16 +1576,15 @@ export interface ApplicationOperations { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {Application} [result] - The deserialized result object if an error did not occur. - * See {@link Application} 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, accountName: string, applicationName: string, parameters: models.Application, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - update(resourceGroupName: string, accountName: string, applicationName: string, parameters: models.Application, callback: ServiceCallback): void; - update(resourceGroupName: string, accountName: string, applicationName: string, parameters: models.Application, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + update(resourceGroupName: string, accountName: string, applicationId: string, parameters: models.ApplicationUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + update(resourceGroupName: string, accountName: string, applicationId: string, parameters: models.ApplicationUpdateParameters, callback: ServiceCallback): void; + update(resourceGroupName: string, accountName: string, applicationId: string, parameters: models.ApplicationUpdateParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -3101,10 +2941,19 @@ export interface PoolOperations { * (https://azure.microsoft.com/documentation/articles/cloud-services-guestos-update-matrix/#releases). * * @param {string} - * [parameters.deploymentConfiguration.cloudServiceConfiguration.osVersion] The - * Azure Guest OS version to be installed on the virtual machines in the pool. - * The default value is * which specifies the latest operating system version - * for the specified OS family. + * [parameters.deploymentConfiguration.cloudServiceConfiguration.targetOSVersion] + * The Azure Guest OS version to be installed on the virtual machines in the + * pool. The default value is * which specifies the latest operating system + * version for the specified OS family. + * + * @param {string} + * [parameters.deploymentConfiguration.cloudServiceConfiguration.currentOSVersion] + * The Azure Guest OS Version currently installed on the virtual machines in + * the pool. This may differ from targetOSVersion if the pool state is + * Upgrading. In this case some virtual machines may be on the targetOSVersion + * and some may be on the currentOSVersion during the upgrade process. Once all + * virtual machines have upgraded, currentOSVersion is updated to be the same + * as targetOSVersion. * * @param {object} * [parameters.deploymentConfiguration.virtualMachineConfiguration] The virtual @@ -3150,6 +2999,18 @@ export interface PoolOperations { * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration * . * + * @param {object} + * [parameters.deploymentConfiguration.virtualMachineConfiguration.osDisk] + * Settings for the operating system disk of the Virtual Machine. + * + * @param {string} + * [parameters.deploymentConfiguration.virtualMachineConfiguration.osDisk.caching] + * The type of caching to be enabled for the data disks. none - The caching + * mode for the disk is not enabled. readOnly - The caching mode for the disk + * is read only. readWrite - The caching mode for the disk is read and write. + * Default value is none. Possible values include: 'None', 'ReadOnly', + * 'ReadWrite' + * * @param {string} * parameters.deploymentConfiguration.virtualMachineConfiguration.nodeAgentSkuId * The SKU of the Batch node agent to be provisioned on compute nodes in the @@ -3189,26 +3050,6 @@ export interface PoolOperations { * Windows_Client - The on-premises license is for Windows Client. * * - * @param {object} - * [parameters.deploymentConfiguration.virtualMachineConfiguration.containerConfiguration] - * The container configuration for the pool. If specified, setup is performed - * on each node in the pool to allow tasks to run in containers. All regular - * tasks and job manager tasks run on this pool must specify the - * containerSettings property, and all other tasks may specify it. - * - * @param {array} - * [parameters.deploymentConfiguration.virtualMachineConfiguration.containerConfiguration.containerImageNames] - * The collection of container image names. This is the full image reference, - * as would be specified to "docker pull". An image will be sourced from the - * default Docker registry unless the image is fully qualified with an - * alternative registry. - * - * @param {array} - * [parameters.deploymentConfiguration.virtualMachineConfiguration.containerConfiguration.containerRegistries] - * Additional private registries from which containers can be pulled. If any - * images must be downloaded from a private registry which requires - * credentials, then those credentials must be provided here. - * * @param {object} [parameters.scaleSettings] Settings which configure the * number of nodes in the pool. * @@ -3348,8 +3189,10 @@ export interface PoolOperations { * mutually exclusive; you must specify one but not both. * * @param {string} [parameters.startTask.userIdentity.autoUser.scope] The scope - * for the auto user The default value is task. Possible values include: - * 'Task', 'Pool' + * for the auto user pool - specifies that the task runs as the common auto + * user account which is created on every node in a pool. task - specifies that + * the service should create a new user for the task. The default value is + * task. Possible values include: 'Task', 'Pool' * * @param {string} [parameters.startTask.userIdentity.autoUser.elevationLevel] * The elevation level of the auto user. nonAdmin - The auto user is a standard @@ -3379,37 +3222,6 @@ export interface PoolOperations { * while the start task is still running; and even if the start task fails, new * tasks will continue to be scheduled on the node. The default is false. * - * @param {object} [parameters.startTask.containerSettings] The settings for - * the container under which the start task runs. When this is specified, all - * directories recursively below the AZ_BATCH_NODE_ROOT_DIR (the root of Azure - * Batch directories on the node) are mapped into the container, all task - * environment variables are mapped into the container, and the task command - * line is executed in the container. - * - * @param {string} [parameters.startTask.containerSettings.containerRunOptions] - * Additional options to the container create command. These additional options - * are supplied as arguments to the "docker create" command, in addition to - * those controlled by the Batch Service. - * - * @param {string} parameters.startTask.containerSettings.imageName The image - * to use to create the container in which the task will run. This is the full - * image reference, as would be specified to "docker pull". If no tag is - * provided as part of the image name, the tag ":latest" is used as a default. - * - * @param {object} [parameters.startTask.containerSettings.registry] The - * private registry which contains the container image. This setting can be - * omitted if was already provided at pool creation. - * - * @param {string} - * [parameters.startTask.containerSettings.registry.registryServer] The - * registry URL. If omitted, the default is "docker.io". - * - * @param {string} parameters.startTask.containerSettings.registry.userName The - * user name to log into the registry server. - * - * @param {string} parameters.startTask.containerSettings.registry.password The - * password to log into the registry server. - * * @param {array} [parameters.certificates] The list of certificates to be * installed on each compute node in the pool. For Windows compute nodes, the * Batch service installs the certificates to the specified certificate store @@ -3508,10 +3320,19 @@ export interface PoolOperations { * (https://azure.microsoft.com/documentation/articles/cloud-services-guestos-update-matrix/#releases). * * @param {string} - * [parameters.deploymentConfiguration.cloudServiceConfiguration.osVersion] The - * Azure Guest OS version to be installed on the virtual machines in the pool. - * The default value is * which specifies the latest operating system version - * for the specified OS family. + * [parameters.deploymentConfiguration.cloudServiceConfiguration.targetOSVersion] + * The Azure Guest OS version to be installed on the virtual machines in the + * pool. The default value is * which specifies the latest operating system + * version for the specified OS family. + * + * @param {string} + * [parameters.deploymentConfiguration.cloudServiceConfiguration.currentOSVersion] + * The Azure Guest OS Version currently installed on the virtual machines in + * the pool. This may differ from targetOSVersion if the pool state is + * Upgrading. In this case some virtual machines may be on the targetOSVersion + * and some may be on the currentOSVersion during the upgrade process. Once all + * virtual machines have upgraded, currentOSVersion is updated to be the same + * as targetOSVersion. * * @param {object} * [parameters.deploymentConfiguration.virtualMachineConfiguration] The virtual @@ -3557,6 +3378,18 @@ export interface PoolOperations { * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration * . * + * @param {object} + * [parameters.deploymentConfiguration.virtualMachineConfiguration.osDisk] + * Settings for the operating system disk of the Virtual Machine. + * + * @param {string} + * [parameters.deploymentConfiguration.virtualMachineConfiguration.osDisk.caching] + * The type of caching to be enabled for the data disks. none - The caching + * mode for the disk is not enabled. readOnly - The caching mode for the disk + * is read only. readWrite - The caching mode for the disk is read and write. + * Default value is none. Possible values include: 'None', 'ReadOnly', + * 'ReadWrite' + * * @param {string} * parameters.deploymentConfiguration.virtualMachineConfiguration.nodeAgentSkuId * The SKU of the Batch node agent to be provisioned on compute nodes in the @@ -3596,26 +3429,6 @@ export interface PoolOperations { * Windows_Client - The on-premises license is for Windows Client. * * - * @param {object} - * [parameters.deploymentConfiguration.virtualMachineConfiguration.containerConfiguration] - * The container configuration for the pool. If specified, setup is performed - * on each node in the pool to allow tasks to run in containers. All regular - * tasks and job manager tasks run on this pool must specify the - * containerSettings property, and all other tasks may specify it. - * - * @param {array} - * [parameters.deploymentConfiguration.virtualMachineConfiguration.containerConfiguration.containerImageNames] - * The collection of container image names. This is the full image reference, - * as would be specified to "docker pull". An image will be sourced from the - * default Docker registry unless the image is fully qualified with an - * alternative registry. - * - * @param {array} - * [parameters.deploymentConfiguration.virtualMachineConfiguration.containerConfiguration.containerRegistries] - * Additional private registries from which containers can be pulled. If any - * images must be downloaded from a private registry which requires - * credentials, then those credentials must be provided here. - * * @param {object} [parameters.scaleSettings] Settings which configure the * number of nodes in the pool. * @@ -3755,8 +3568,10 @@ export interface PoolOperations { * mutually exclusive; you must specify one but not both. * * @param {string} [parameters.startTask.userIdentity.autoUser.scope] The scope - * for the auto user The default value is task. Possible values include: - * 'Task', 'Pool' + * for the auto user pool - specifies that the task runs as the common auto + * user account which is created on every node in a pool. task - specifies that + * the service should create a new user for the task. The default value is + * task. Possible values include: 'Task', 'Pool' * * @param {string} [parameters.startTask.userIdentity.autoUser.elevationLevel] * The elevation level of the auto user. nonAdmin - The auto user is a standard @@ -3786,37 +3601,6 @@ export interface PoolOperations { * while the start task is still running; and even if the start task fails, new * tasks will continue to be scheduled on the node. The default is false. * - * @param {object} [parameters.startTask.containerSettings] The settings for - * the container under which the start task runs. When this is specified, all - * directories recursively below the AZ_BATCH_NODE_ROOT_DIR (the root of Azure - * Batch directories on the node) are mapped into the container, all task - * environment variables are mapped into the container, and the task command - * line is executed in the container. - * - * @param {string} [parameters.startTask.containerSettings.containerRunOptions] - * Additional options to the container create command. These additional options - * are supplied as arguments to the "docker create" command, in addition to - * those controlled by the Batch Service. - * - * @param {string} parameters.startTask.containerSettings.imageName The image - * to use to create the container in which the task will run. This is the full - * image reference, as would be specified to "docker pull". If no tag is - * provided as part of the image name, the tag ":latest" is used as a default. - * - * @param {object} [parameters.startTask.containerSettings.registry] The - * private registry which contains the container image. This setting can be - * omitted if was already provided at pool creation. - * - * @param {string} - * [parameters.startTask.containerSettings.registry.registryServer] The - * registry URL. If omitted, the default is "docker.io". - * - * @param {string} parameters.startTask.containerSettings.registry.userName The - * user name to log into the registry server. - * - * @param {string} parameters.startTask.containerSettings.registry.password The - * password to log into the registry server. - * * @param {array} [parameters.certificates] The list of certificates to be * installed on each compute node in the pool. For Windows compute nodes, the * Batch service installs the certificates to the specified certificate store @@ -3936,10 +3720,19 @@ export interface PoolOperations { * (https://azure.microsoft.com/documentation/articles/cloud-services-guestos-update-matrix/#releases). * * @param {string} - * [parameters.deploymentConfiguration.cloudServiceConfiguration.osVersion] The - * Azure Guest OS version to be installed on the virtual machines in the pool. - * The default value is * which specifies the latest operating system version - * for the specified OS family. + * [parameters.deploymentConfiguration.cloudServiceConfiguration.targetOSVersion] + * The Azure Guest OS version to be installed on the virtual machines in the + * pool. The default value is * which specifies the latest operating system + * version for the specified OS family. + * + * @param {string} + * [parameters.deploymentConfiguration.cloudServiceConfiguration.currentOSVersion] + * The Azure Guest OS Version currently installed on the virtual machines in + * the pool. This may differ from targetOSVersion if the pool state is + * Upgrading. In this case some virtual machines may be on the targetOSVersion + * and some may be on the currentOSVersion during the upgrade process. Once all + * virtual machines have upgraded, currentOSVersion is updated to be the same + * as targetOSVersion. * * @param {object} * [parameters.deploymentConfiguration.virtualMachineConfiguration] The virtual @@ -3985,6 +3778,18 @@ export interface PoolOperations { * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration * . * + * @param {object} + * [parameters.deploymentConfiguration.virtualMachineConfiguration.osDisk] + * Settings for the operating system disk of the Virtual Machine. + * + * @param {string} + * [parameters.deploymentConfiguration.virtualMachineConfiguration.osDisk.caching] + * The type of caching to be enabled for the data disks. none - The caching + * mode for the disk is not enabled. readOnly - The caching mode for the disk + * is read only. readWrite - The caching mode for the disk is read and write. + * Default value is none. Possible values include: 'None', 'ReadOnly', + * 'ReadWrite' + * * @param {string} * parameters.deploymentConfiguration.virtualMachineConfiguration.nodeAgentSkuId * The SKU of the Batch node agent to be provisioned on compute nodes in the @@ -4024,26 +3829,6 @@ export interface PoolOperations { * Windows_Client - The on-premises license is for Windows Client. * * - * @param {object} - * [parameters.deploymentConfiguration.virtualMachineConfiguration.containerConfiguration] - * The container configuration for the pool. If specified, setup is performed - * on each node in the pool to allow tasks to run in containers. All regular - * tasks and job manager tasks run on this pool must specify the - * containerSettings property, and all other tasks may specify it. - * - * @param {array} - * [parameters.deploymentConfiguration.virtualMachineConfiguration.containerConfiguration.containerImageNames] - * The collection of container image names. This is the full image reference, - * as would be specified to "docker pull". An image will be sourced from the - * default Docker registry unless the image is fully qualified with an - * alternative registry. - * - * @param {array} - * [parameters.deploymentConfiguration.virtualMachineConfiguration.containerConfiguration.containerRegistries] - * Additional private registries from which containers can be pulled. If any - * images must be downloaded from a private registry which requires - * credentials, then those credentials must be provided here. - * * @param {object} [parameters.scaleSettings] Settings which configure the * number of nodes in the pool. * @@ -4183,8 +3968,10 @@ export interface PoolOperations { * mutually exclusive; you must specify one but not both. * * @param {string} [parameters.startTask.userIdentity.autoUser.scope] The scope - * for the auto user The default value is task. Possible values include: - * 'Task', 'Pool' + * for the auto user pool - specifies that the task runs as the common auto + * user account which is created on every node in a pool. task - specifies that + * the service should create a new user for the task. The default value is + * task. Possible values include: 'Task', 'Pool' * * @param {string} [parameters.startTask.userIdentity.autoUser.elevationLevel] * The elevation level of the auto user. nonAdmin - The auto user is a standard @@ -4214,37 +4001,6 @@ export interface PoolOperations { * while the start task is still running; and even if the start task fails, new * tasks will continue to be scheduled on the node. The default is false. * - * @param {object} [parameters.startTask.containerSettings] The settings for - * the container under which the start task runs. When this is specified, all - * directories recursively below the AZ_BATCH_NODE_ROOT_DIR (the root of Azure - * Batch directories on the node) are mapped into the container, all task - * environment variables are mapped into the container, and the task command - * line is executed in the container. - * - * @param {string} [parameters.startTask.containerSettings.containerRunOptions] - * Additional options to the container create command. These additional options - * are supplied as arguments to the "docker create" command, in addition to - * those controlled by the Batch Service. - * - * @param {string} parameters.startTask.containerSettings.imageName The image - * to use to create the container in which the task will run. This is the full - * image reference, as would be specified to "docker pull". If no tag is - * provided as part of the image name, the tag ":latest" is used as a default. - * - * @param {object} [parameters.startTask.containerSettings.registry] The - * private registry which contains the container image. This setting can be - * omitted if was already provided at pool creation. - * - * @param {string} - * [parameters.startTask.containerSettings.registry.registryServer] The - * registry URL. If omitted, the default is "docker.io". - * - * @param {string} parameters.startTask.containerSettings.registry.userName The - * user name to log into the registry server. - * - * @param {string} parameters.startTask.containerSettings.registry.password The - * password to log into the registry server. - * * @param {array} [parameters.certificates] The list of certificates to be * installed on each compute node in the pool. For Windows compute nodes, the * Batch service installs the certificates to the specified certificate store @@ -4341,10 +4097,19 @@ export interface PoolOperations { * (https://azure.microsoft.com/documentation/articles/cloud-services-guestos-update-matrix/#releases). * * @param {string} - * [parameters.deploymentConfiguration.cloudServiceConfiguration.osVersion] The - * Azure Guest OS version to be installed on the virtual machines in the pool. - * The default value is * which specifies the latest operating system version - * for the specified OS family. + * [parameters.deploymentConfiguration.cloudServiceConfiguration.targetOSVersion] + * The Azure Guest OS version to be installed on the virtual machines in the + * pool. The default value is * which specifies the latest operating system + * version for the specified OS family. + * + * @param {string} + * [parameters.deploymentConfiguration.cloudServiceConfiguration.currentOSVersion] + * The Azure Guest OS Version currently installed on the virtual machines in + * the pool. This may differ from targetOSVersion if the pool state is + * Upgrading. In this case some virtual machines may be on the targetOSVersion + * and some may be on the currentOSVersion during the upgrade process. Once all + * virtual machines have upgraded, currentOSVersion is updated to be the same + * as targetOSVersion. * * @param {object} * [parameters.deploymentConfiguration.virtualMachineConfiguration] The virtual @@ -4390,6 +4155,18 @@ export interface PoolOperations { * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration * . * + * @param {object} + * [parameters.deploymentConfiguration.virtualMachineConfiguration.osDisk] + * Settings for the operating system disk of the Virtual Machine. + * + * @param {string} + * [parameters.deploymentConfiguration.virtualMachineConfiguration.osDisk.caching] + * The type of caching to be enabled for the data disks. none - The caching + * mode for the disk is not enabled. readOnly - The caching mode for the disk + * is read only. readWrite - The caching mode for the disk is read and write. + * Default value is none. Possible values include: 'None', 'ReadOnly', + * 'ReadWrite' + * * @param {string} * parameters.deploymentConfiguration.virtualMachineConfiguration.nodeAgentSkuId * The SKU of the Batch node agent to be provisioned on compute nodes in the @@ -4429,26 +4206,6 @@ export interface PoolOperations { * Windows_Client - The on-premises license is for Windows Client. * * - * @param {object} - * [parameters.deploymentConfiguration.virtualMachineConfiguration.containerConfiguration] - * The container configuration for the pool. If specified, setup is performed - * on each node in the pool to allow tasks to run in containers. All regular - * tasks and job manager tasks run on this pool must specify the - * containerSettings property, and all other tasks may specify it. - * - * @param {array} - * [parameters.deploymentConfiguration.virtualMachineConfiguration.containerConfiguration.containerImageNames] - * The collection of container image names. This is the full image reference, - * as would be specified to "docker pull". An image will be sourced from the - * default Docker registry unless the image is fully qualified with an - * alternative registry. - * - * @param {array} - * [parameters.deploymentConfiguration.virtualMachineConfiguration.containerConfiguration.containerRegistries] - * Additional private registries from which containers can be pulled. If any - * images must be downloaded from a private registry which requires - * credentials, then those credentials must be provided here. - * * @param {object} [parameters.scaleSettings] Settings which configure the * number of nodes in the pool. * @@ -4588,8 +4345,10 @@ export interface PoolOperations { * mutually exclusive; you must specify one but not both. * * @param {string} [parameters.startTask.userIdentity.autoUser.scope] The scope - * for the auto user The default value is task. Possible values include: - * 'Task', 'Pool' + * for the auto user pool - specifies that the task runs as the common auto + * user account which is created on every node in a pool. task - specifies that + * the service should create a new user for the task. The default value is + * task. Possible values include: 'Task', 'Pool' * * @param {string} [parameters.startTask.userIdentity.autoUser.elevationLevel] * The elevation level of the auto user. nonAdmin - The auto user is a standard @@ -4619,37 +4378,6 @@ export interface PoolOperations { * while the start task is still running; and even if the start task fails, new * tasks will continue to be scheduled on the node. The default is false. * - * @param {object} [parameters.startTask.containerSettings] The settings for - * the container under which the start task runs. When this is specified, all - * directories recursively below the AZ_BATCH_NODE_ROOT_DIR (the root of Azure - * Batch directories on the node) are mapped into the container, all task - * environment variables are mapped into the container, and the task command - * line is executed in the container. - * - * @param {string} [parameters.startTask.containerSettings.containerRunOptions] - * Additional options to the container create command. These additional options - * are supplied as arguments to the "docker create" command, in addition to - * those controlled by the Batch Service. - * - * @param {string} parameters.startTask.containerSettings.imageName The image - * to use to create the container in which the task will run. This is the full - * image reference, as would be specified to "docker pull". If no tag is - * provided as part of the image name, the tag ":latest" is used as a default. - * - * @param {object} [parameters.startTask.containerSettings.registry] The - * private registry which contains the container image. This setting can be - * omitted if was already provided at pool creation. - * - * @param {string} - * [parameters.startTask.containerSettings.registry.registryServer] The - * registry URL. If omitted, the default is "docker.io". - * - * @param {string} parameters.startTask.containerSettings.registry.userName The - * user name to log into the registry server. - * - * @param {string} parameters.startTask.containerSettings.registry.password The - * password to log into the registry server. - * * @param {array} [parameters.certificates] The list of certificates to be * installed on each compute node in the pool. For Windows compute nodes, the * Batch service installs the certificates to the specified certificate store @@ -5048,10 +4776,19 @@ export interface PoolOperations { * (https://azure.microsoft.com/documentation/articles/cloud-services-guestos-update-matrix/#releases). * * @param {string} - * [parameters.deploymentConfiguration.cloudServiceConfiguration.osVersion] The - * Azure Guest OS version to be installed on the virtual machines in the pool. - * The default value is * which specifies the latest operating system version - * for the specified OS family. + * [parameters.deploymentConfiguration.cloudServiceConfiguration.targetOSVersion] + * The Azure Guest OS version to be installed on the virtual machines in the + * pool. The default value is * which specifies the latest operating system + * version for the specified OS family. + * + * @param {string} + * [parameters.deploymentConfiguration.cloudServiceConfiguration.currentOSVersion] + * The Azure Guest OS Version currently installed on the virtual machines in + * the pool. This may differ from targetOSVersion if the pool state is + * Upgrading. In this case some virtual machines may be on the targetOSVersion + * and some may be on the currentOSVersion during the upgrade process. Once all + * virtual machines have upgraded, currentOSVersion is updated to be the same + * as targetOSVersion. * * @param {object} * [parameters.deploymentConfiguration.virtualMachineConfiguration] The virtual @@ -5097,6 +4834,18 @@ export interface PoolOperations { * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration * . * + * @param {object} + * [parameters.deploymentConfiguration.virtualMachineConfiguration.osDisk] + * Settings for the operating system disk of the Virtual Machine. + * + * @param {string} + * [parameters.deploymentConfiguration.virtualMachineConfiguration.osDisk.caching] + * The type of caching to be enabled for the data disks. none - The caching + * mode for the disk is not enabled. readOnly - The caching mode for the disk + * is read only. readWrite - The caching mode for the disk is read and write. + * Default value is none. Possible values include: 'None', 'ReadOnly', + * 'ReadWrite' + * * @param {string} * parameters.deploymentConfiguration.virtualMachineConfiguration.nodeAgentSkuId * The SKU of the Batch node agent to be provisioned on compute nodes in the @@ -5136,26 +4885,6 @@ export interface PoolOperations { * Windows_Client - The on-premises license is for Windows Client. * * - * @param {object} - * [parameters.deploymentConfiguration.virtualMachineConfiguration.containerConfiguration] - * The container configuration for the pool. If specified, setup is performed - * on each node in the pool to allow tasks to run in containers. All regular - * tasks and job manager tasks run on this pool must specify the - * containerSettings property, and all other tasks may specify it. - * - * @param {array} - * [parameters.deploymentConfiguration.virtualMachineConfiguration.containerConfiguration.containerImageNames] - * The collection of container image names. This is the full image reference, - * as would be specified to "docker pull". An image will be sourced from the - * default Docker registry unless the image is fully qualified with an - * alternative registry. - * - * @param {array} - * [parameters.deploymentConfiguration.virtualMachineConfiguration.containerConfiguration.containerRegistries] - * Additional private registries from which containers can be pulled. If any - * images must be downloaded from a private registry which requires - * credentials, then those credentials must be provided here. - * * @param {object} [parameters.scaleSettings] Settings which configure the * number of nodes in the pool. * @@ -5295,8 +5024,10 @@ export interface PoolOperations { * mutually exclusive; you must specify one but not both. * * @param {string} [parameters.startTask.userIdentity.autoUser.scope] The scope - * for the auto user The default value is task. Possible values include: - * 'Task', 'Pool' + * for the auto user pool - specifies that the task runs as the common auto + * user account which is created on every node in a pool. task - specifies that + * the service should create a new user for the task. The default value is + * task. Possible values include: 'Task', 'Pool' * * @param {string} [parameters.startTask.userIdentity.autoUser.elevationLevel] * The elevation level of the auto user. nonAdmin - The auto user is a standard @@ -5326,37 +5057,6 @@ export interface PoolOperations { * while the start task is still running; and even if the start task fails, new * tasks will continue to be scheduled on the node. The default is false. * - * @param {object} [parameters.startTask.containerSettings] The settings for - * the container under which the start task runs. When this is specified, all - * directories recursively below the AZ_BATCH_NODE_ROOT_DIR (the root of Azure - * Batch directories on the node) are mapped into the container, all task - * environment variables are mapped into the container, and the task command - * line is executed in the container. - * - * @param {string} [parameters.startTask.containerSettings.containerRunOptions] - * Additional options to the container create command. These additional options - * are supplied as arguments to the "docker create" command, in addition to - * those controlled by the Batch Service. - * - * @param {string} parameters.startTask.containerSettings.imageName The image - * to use to create the container in which the task will run. This is the full - * image reference, as would be specified to "docker pull". If no tag is - * provided as part of the image name, the tag ":latest" is used as a default. - * - * @param {object} [parameters.startTask.containerSettings.registry] The - * private registry which contains the container image. This setting can be - * omitted if was already provided at pool creation. - * - * @param {string} - * [parameters.startTask.containerSettings.registry.registryServer] The - * registry URL. If omitted, the default is "docker.io". - * - * @param {string} parameters.startTask.containerSettings.registry.userName The - * user name to log into the registry server. - * - * @param {string} parameters.startTask.containerSettings.registry.password The - * password to log into the registry server. - * * @param {array} [parameters.certificates] The list of certificates to be * installed on each compute node in the pool. For Windows compute nodes, the * Batch service installs the certificates to the specified certificate store @@ -5455,10 +5155,19 @@ export interface PoolOperations { * (https://azure.microsoft.com/documentation/articles/cloud-services-guestos-update-matrix/#releases). * * @param {string} - * [parameters.deploymentConfiguration.cloudServiceConfiguration.osVersion] The - * Azure Guest OS version to be installed on the virtual machines in the pool. - * The default value is * which specifies the latest operating system version - * for the specified OS family. + * [parameters.deploymentConfiguration.cloudServiceConfiguration.targetOSVersion] + * The Azure Guest OS version to be installed on the virtual machines in the + * pool. The default value is * which specifies the latest operating system + * version for the specified OS family. + * + * @param {string} + * [parameters.deploymentConfiguration.cloudServiceConfiguration.currentOSVersion] + * The Azure Guest OS Version currently installed on the virtual machines in + * the pool. This may differ from targetOSVersion if the pool state is + * Upgrading. In this case some virtual machines may be on the targetOSVersion + * and some may be on the currentOSVersion during the upgrade process. Once all + * virtual machines have upgraded, currentOSVersion is updated to be the same + * as targetOSVersion. * * @param {object} * [parameters.deploymentConfiguration.virtualMachineConfiguration] The virtual @@ -5504,6 +5213,18 @@ export interface PoolOperations { * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration * . * + * @param {object} + * [parameters.deploymentConfiguration.virtualMachineConfiguration.osDisk] + * Settings for the operating system disk of the Virtual Machine. + * + * @param {string} + * [parameters.deploymentConfiguration.virtualMachineConfiguration.osDisk.caching] + * The type of caching to be enabled for the data disks. none - The caching + * mode for the disk is not enabled. readOnly - The caching mode for the disk + * is read only. readWrite - The caching mode for the disk is read and write. + * Default value is none. Possible values include: 'None', 'ReadOnly', + * 'ReadWrite' + * * @param {string} * parameters.deploymentConfiguration.virtualMachineConfiguration.nodeAgentSkuId * The SKU of the Batch node agent to be provisioned on compute nodes in the @@ -5543,26 +5264,6 @@ export interface PoolOperations { * Windows_Client - The on-premises license is for Windows Client. * * - * @param {object} - * [parameters.deploymentConfiguration.virtualMachineConfiguration.containerConfiguration] - * The container configuration for the pool. If specified, setup is performed - * on each node in the pool to allow tasks to run in containers. All regular - * tasks and job manager tasks run on this pool must specify the - * containerSettings property, and all other tasks may specify it. - * - * @param {array} - * [parameters.deploymentConfiguration.virtualMachineConfiguration.containerConfiguration.containerImageNames] - * The collection of container image names. This is the full image reference, - * as would be specified to "docker pull". An image will be sourced from the - * default Docker registry unless the image is fully qualified with an - * alternative registry. - * - * @param {array} - * [parameters.deploymentConfiguration.virtualMachineConfiguration.containerConfiguration.containerRegistries] - * Additional private registries from which containers can be pulled. If any - * images must be downloaded from a private registry which requires - * credentials, then those credentials must be provided here. - * * @param {object} [parameters.scaleSettings] Settings which configure the * number of nodes in the pool. * @@ -5702,8 +5403,10 @@ export interface PoolOperations { * mutually exclusive; you must specify one but not both. * * @param {string} [parameters.startTask.userIdentity.autoUser.scope] The scope - * for the auto user The default value is task. Possible values include: - * 'Task', 'Pool' + * for the auto user pool - specifies that the task runs as the common auto + * user account which is created on every node in a pool. task - specifies that + * the service should create a new user for the task. The default value is + * task. Possible values include: 'Task', 'Pool' * * @param {string} [parameters.startTask.userIdentity.autoUser.elevationLevel] * The elevation level of the auto user. nonAdmin - The auto user is a standard @@ -5733,37 +5436,6 @@ export interface PoolOperations { * while the start task is still running; and even if the start task fails, new * tasks will continue to be scheduled on the node. The default is false. * - * @param {object} [parameters.startTask.containerSettings] The settings for - * the container under which the start task runs. When this is specified, all - * directories recursively below the AZ_BATCH_NODE_ROOT_DIR (the root of Azure - * Batch directories on the node) are mapped into the container, all task - * environment variables are mapped into the container, and the task command - * line is executed in the container. - * - * @param {string} [parameters.startTask.containerSettings.containerRunOptions] - * Additional options to the container create command. These additional options - * are supplied as arguments to the "docker create" command, in addition to - * those controlled by the Batch Service. - * - * @param {string} parameters.startTask.containerSettings.imageName The image - * to use to create the container in which the task will run. This is the full - * image reference, as would be specified to "docker pull". If no tag is - * provided as part of the image name, the tag ":latest" is used as a default. - * - * @param {object} [parameters.startTask.containerSettings.registry] The - * private registry which contains the container image. This setting can be - * omitted if was already provided at pool creation. - * - * @param {string} - * [parameters.startTask.containerSettings.registry.registryServer] The - * registry URL. If omitted, the default is "docker.io". - * - * @param {string} parameters.startTask.containerSettings.registry.userName The - * user name to log into the registry server. - * - * @param {string} parameters.startTask.containerSettings.registry.password The - * password to log into the registry server. - * * @param {array} [parameters.certificates] The list of certificates to be * installed on each compute node in the pool. For Windows compute nodes, the * Batch service installs the certificates to the specified certificate store diff --git a/lib/services/batchManagement/lib/operations/poolOperations.js b/lib/services/batchManagement/lib/operations/poolOperations.js index edbaf5bfce..ab4f2d36f2 100644 --- a/lib/services/batchManagement/lib/operations/poolOperations.js +++ b/lib/services/batchManagement/lib/operations/poolOperations.js @@ -273,10 +273,19 @@ function _listByBatchAccount(resourceGroupName, accountName, options, callback) * (https://azure.microsoft.com/documentation/articles/cloud-services-guestos-update-matrix/#releases). * * @param {string} - * [parameters.deploymentConfiguration.cloudServiceConfiguration.osVersion] The - * Azure Guest OS version to be installed on the virtual machines in the pool. - * The default value is * which specifies the latest operating system version - * for the specified OS family. + * [parameters.deploymentConfiguration.cloudServiceConfiguration.targetOSVersion] + * The Azure Guest OS version to be installed on the virtual machines in the + * pool. The default value is * which specifies the latest operating system + * version for the specified OS family. + * + * @param {string} + * [parameters.deploymentConfiguration.cloudServiceConfiguration.currentOSVersion] + * The Azure Guest OS Version currently installed on the virtual machines in + * the pool. This may differ from targetOSVersion if the pool state is + * Upgrading. In this case some virtual machines may be on the targetOSVersion + * and some may be on the currentOSVersion during the upgrade process. Once all + * virtual machines have upgraded, currentOSVersion is updated to be the same + * as targetOSVersion. * * @param {object} * [parameters.deploymentConfiguration.virtualMachineConfiguration] The virtual @@ -322,6 +331,18 @@ function _listByBatchAccount(resourceGroupName, accountName, options, callback) * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration * . * + * @param {object} + * [parameters.deploymentConfiguration.virtualMachineConfiguration.osDisk] + * Settings for the operating system disk of the Virtual Machine. + * + * @param {string} + * [parameters.deploymentConfiguration.virtualMachineConfiguration.osDisk.caching] + * The type of caching to be enabled for the data disks. none - The caching + * mode for the disk is not enabled. readOnly - The caching mode for the disk + * is read only. readWrite - The caching mode for the disk is read and write. + * Default value is none. Possible values include: 'None', 'ReadOnly', + * 'ReadWrite' + * * @param {string} * parameters.deploymentConfiguration.virtualMachineConfiguration.nodeAgentSkuId * The SKU of the Batch node agent to be provisioned on compute nodes in the @@ -361,26 +382,6 @@ function _listByBatchAccount(resourceGroupName, accountName, options, callback) * Windows_Client - The on-premises license is for Windows Client. * * - * @param {object} - * [parameters.deploymentConfiguration.virtualMachineConfiguration.containerConfiguration] - * The container configuration for the pool. If specified, setup is performed - * on each node in the pool to allow tasks to run in containers. All regular - * tasks and job manager tasks run on this pool must specify the - * containerSettings property, and all other tasks may specify it. - * - * @param {array} - * [parameters.deploymentConfiguration.virtualMachineConfiguration.containerConfiguration.containerImageNames] - * The collection of container image names. This is the full image reference, - * as would be specified to "docker pull". An image will be sourced from the - * default Docker registry unless the image is fully qualified with an - * alternative registry. - * - * @param {array} - * [parameters.deploymentConfiguration.virtualMachineConfiguration.containerConfiguration.containerRegistries] - * Additional private registries from which containers can be pulled. If any - * images must be downloaded from a private registry which requires - * credentials, then those credentials must be provided here. - * * @param {object} [parameters.scaleSettings] Settings which configure the * number of nodes in the pool. * @@ -520,8 +521,10 @@ function _listByBatchAccount(resourceGroupName, accountName, options, callback) * mutually exclusive; you must specify one but not both. * * @param {string} [parameters.startTask.userIdentity.autoUser.scope] The scope - * for the auto user The default value is task. Possible values include: - * 'Task', 'Pool' + * for the auto user pool - specifies that the task runs as the common auto + * user account which is created on every node in a pool. task - specifies that + * the service should create a new user for the task. The default value is + * task. Possible values include: 'Task', 'Pool' * * @param {string} [parameters.startTask.userIdentity.autoUser.elevationLevel] * The elevation level of the auto user. nonAdmin - The auto user is a standard @@ -551,37 +554,6 @@ function _listByBatchAccount(resourceGroupName, accountName, options, callback) * while the start task is still running; and even if the start task fails, new * tasks will continue to be scheduled on the node. The default is false. * - * @param {object} [parameters.startTask.containerSettings] The settings for - * the container under which the start task runs. When this is specified, all - * directories recursively below the AZ_BATCH_NODE_ROOT_DIR (the root of Azure - * Batch directories on the node) are mapped into the container, all task - * environment variables are mapped into the container, and the task command - * line is executed in the container. - * - * @param {string} [parameters.startTask.containerSettings.containerRunOptions] - * Additional options to the container create command. These additional options - * are supplied as arguments to the "docker create" command, in addition to - * those controlled by the Batch Service. - * - * @param {string} parameters.startTask.containerSettings.imageName The image - * to use to create the container in which the task will run. This is the full - * image reference, as would be specified to "docker pull". If no tag is - * provided as part of the image name, the tag ":latest" is used as a default. - * - * @param {object} [parameters.startTask.containerSettings.registry] The - * private registry which contains the container image. This setting can be - * omitted if was already provided at pool creation. - * - * @param {string} - * [parameters.startTask.containerSettings.registry.registryServer] The - * registry URL. If omitted, the default is "docker.io". - * - * @param {string} parameters.startTask.containerSettings.registry.userName The - * user name to log into the registry server. - * - * @param {string} parameters.startTask.containerSettings.registry.password The - * password to log into the registry server. - * * @param {array} [parameters.certificates] The list of certificates to be * installed on each compute node in the pool. For Windows compute nodes, the * Batch service installs the certificates to the specified certificate store @@ -739,10 +711,19 @@ function _create(resourceGroupName, accountName, poolName, parameters, options, * (https://azure.microsoft.com/documentation/articles/cloud-services-guestos-update-matrix/#releases). * * @param {string} - * [parameters.deploymentConfiguration.cloudServiceConfiguration.osVersion] The - * Azure Guest OS version to be installed on the virtual machines in the pool. - * The default value is * which specifies the latest operating system version - * for the specified OS family. + * [parameters.deploymentConfiguration.cloudServiceConfiguration.targetOSVersion] + * The Azure Guest OS version to be installed on the virtual machines in the + * pool. The default value is * which specifies the latest operating system + * version for the specified OS family. + * + * @param {string} + * [parameters.deploymentConfiguration.cloudServiceConfiguration.currentOSVersion] + * The Azure Guest OS Version currently installed on the virtual machines in + * the pool. This may differ from targetOSVersion if the pool state is + * Upgrading. In this case some virtual machines may be on the targetOSVersion + * and some may be on the currentOSVersion during the upgrade process. Once all + * virtual machines have upgraded, currentOSVersion is updated to be the same + * as targetOSVersion. * * @param {object} * [parameters.deploymentConfiguration.virtualMachineConfiguration] The virtual @@ -788,6 +769,18 @@ function _create(resourceGroupName, accountName, poolName, parameters, options, * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration * . * + * @param {object} + * [parameters.deploymentConfiguration.virtualMachineConfiguration.osDisk] + * Settings for the operating system disk of the Virtual Machine. + * + * @param {string} + * [parameters.deploymentConfiguration.virtualMachineConfiguration.osDisk.caching] + * The type of caching to be enabled for the data disks. none - The caching + * mode for the disk is not enabled. readOnly - The caching mode for the disk + * is read only. readWrite - The caching mode for the disk is read and write. + * Default value is none. Possible values include: 'None', 'ReadOnly', + * 'ReadWrite' + * * @param {string} * parameters.deploymentConfiguration.virtualMachineConfiguration.nodeAgentSkuId * The SKU of the Batch node agent to be provisioned on compute nodes in the @@ -827,26 +820,6 @@ function _create(resourceGroupName, accountName, poolName, parameters, options, * Windows_Client - The on-premises license is for Windows Client. * * - * @param {object} - * [parameters.deploymentConfiguration.virtualMachineConfiguration.containerConfiguration] - * The container configuration for the pool. If specified, setup is performed - * on each node in the pool to allow tasks to run in containers. All regular - * tasks and job manager tasks run on this pool must specify the - * containerSettings property, and all other tasks may specify it. - * - * @param {array} - * [parameters.deploymentConfiguration.virtualMachineConfiguration.containerConfiguration.containerImageNames] - * The collection of container image names. This is the full image reference, - * as would be specified to "docker pull". An image will be sourced from the - * default Docker registry unless the image is fully qualified with an - * alternative registry. - * - * @param {array} - * [parameters.deploymentConfiguration.virtualMachineConfiguration.containerConfiguration.containerRegistries] - * Additional private registries from which containers can be pulled. If any - * images must be downloaded from a private registry which requires - * credentials, then those credentials must be provided here. - * * @param {object} [parameters.scaleSettings] Settings which configure the * number of nodes in the pool. * @@ -986,8 +959,10 @@ function _create(resourceGroupName, accountName, poolName, parameters, options, * mutually exclusive; you must specify one but not both. * * @param {string} [parameters.startTask.userIdentity.autoUser.scope] The scope - * for the auto user The default value is task. Possible values include: - * 'Task', 'Pool' + * for the auto user pool - specifies that the task runs as the common auto + * user account which is created on every node in a pool. task - specifies that + * the service should create a new user for the task. The default value is + * task. Possible values include: 'Task', 'Pool' * * @param {string} [parameters.startTask.userIdentity.autoUser.elevationLevel] * The elevation level of the auto user. nonAdmin - The auto user is a standard @@ -1017,37 +992,6 @@ function _create(resourceGroupName, accountName, poolName, parameters, options, * while the start task is still running; and even if the start task fails, new * tasks will continue to be scheduled on the node. The default is false. * - * @param {object} [parameters.startTask.containerSettings] The settings for - * the container under which the start task runs. When this is specified, all - * directories recursively below the AZ_BATCH_NODE_ROOT_DIR (the root of Azure - * Batch directories on the node) are mapped into the container, all task - * environment variables are mapped into the container, and the task command - * line is executed in the container. - * - * @param {string} [parameters.startTask.containerSettings.containerRunOptions] - * Additional options to the container create command. These additional options - * are supplied as arguments to the "docker create" command, in addition to - * those controlled by the Batch Service. - * - * @param {string} parameters.startTask.containerSettings.imageName The image - * to use to create the container in which the task will run. This is the full - * image reference, as would be specified to "docker pull". If no tag is - * provided as part of the image name, the tag ":latest" is used as a default. - * - * @param {object} [parameters.startTask.containerSettings.registry] The - * private registry which contains the container image. This setting can be - * omitted if was already provided at pool creation. - * - * @param {string} - * [parameters.startTask.containerSettings.registry.registryServer] The - * registry URL. If omitted, the default is "docker.io". - * - * @param {string} parameters.startTask.containerSettings.registry.userName The - * user name to log into the registry server. - * - * @param {string} parameters.startTask.containerSettings.registry.password The - * password to log into the registry server. - * * @param {array} [parameters.certificates] The list of certificates to be * installed on each compute node in the pool. For Windows compute nodes, the * Batch service installs the certificates to the specified certificate store @@ -1103,10 +1047,6 @@ function _update(resourceGroupName, accountName, poolName, parameters, options, throw new Error('callback cannot be null.'); } let ifMatch = (options && options.ifMatch !== undefined) ? options.ifMatch : undefined; - if (parameters === null || parameters === undefined) - { - parameters = {}; - } // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -1946,10 +1886,19 @@ function _stopResize(resourceGroupName, accountName, poolName, options, callback * (https://azure.microsoft.com/documentation/articles/cloud-services-guestos-update-matrix/#releases). * * @param {string} - * [parameters.deploymentConfiguration.cloudServiceConfiguration.osVersion] The - * Azure Guest OS version to be installed on the virtual machines in the pool. - * The default value is * which specifies the latest operating system version - * for the specified OS family. + * [parameters.deploymentConfiguration.cloudServiceConfiguration.targetOSVersion] + * The Azure Guest OS version to be installed on the virtual machines in the + * pool. The default value is * which specifies the latest operating system + * version for the specified OS family. + * + * @param {string} + * [parameters.deploymentConfiguration.cloudServiceConfiguration.currentOSVersion] + * The Azure Guest OS Version currently installed on the virtual machines in + * the pool. This may differ from targetOSVersion if the pool state is + * Upgrading. In this case some virtual machines may be on the targetOSVersion + * and some may be on the currentOSVersion during the upgrade process. Once all + * virtual machines have upgraded, currentOSVersion is updated to be the same + * as targetOSVersion. * * @param {object} * [parameters.deploymentConfiguration.virtualMachineConfiguration] The virtual @@ -1995,6 +1944,18 @@ function _stopResize(resourceGroupName, accountName, poolName, options, callback * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration * . * + * @param {object} + * [parameters.deploymentConfiguration.virtualMachineConfiguration.osDisk] + * Settings for the operating system disk of the Virtual Machine. + * + * @param {string} + * [parameters.deploymentConfiguration.virtualMachineConfiguration.osDisk.caching] + * The type of caching to be enabled for the data disks. none - The caching + * mode for the disk is not enabled. readOnly - The caching mode for the disk + * is read only. readWrite - The caching mode for the disk is read and write. + * Default value is none. Possible values include: 'None', 'ReadOnly', + * 'ReadWrite' + * * @param {string} * parameters.deploymentConfiguration.virtualMachineConfiguration.nodeAgentSkuId * The SKU of the Batch node agent to be provisioned on compute nodes in the @@ -2034,26 +1995,6 @@ function _stopResize(resourceGroupName, accountName, poolName, options, callback * Windows_Client - The on-premises license is for Windows Client. * * - * @param {object} - * [parameters.deploymentConfiguration.virtualMachineConfiguration.containerConfiguration] - * The container configuration for the pool. If specified, setup is performed - * on each node in the pool to allow tasks to run in containers. All regular - * tasks and job manager tasks run on this pool must specify the - * containerSettings property, and all other tasks may specify it. - * - * @param {array} - * [parameters.deploymentConfiguration.virtualMachineConfiguration.containerConfiguration.containerImageNames] - * The collection of container image names. This is the full image reference, - * as would be specified to "docker pull". An image will be sourced from the - * default Docker registry unless the image is fully qualified with an - * alternative registry. - * - * @param {array} - * [parameters.deploymentConfiguration.virtualMachineConfiguration.containerConfiguration.containerRegistries] - * Additional private registries from which containers can be pulled. If any - * images must be downloaded from a private registry which requires - * credentials, then those credentials must be provided here. - * * @param {object} [parameters.scaleSettings] Settings which configure the * number of nodes in the pool. * @@ -2193,8 +2134,10 @@ function _stopResize(resourceGroupName, accountName, poolName, options, callback * mutually exclusive; you must specify one but not both. * * @param {string} [parameters.startTask.userIdentity.autoUser.scope] The scope - * for the auto user The default value is task. Possible values include: - * 'Task', 'Pool' + * for the auto user pool - specifies that the task runs as the common auto + * user account which is created on every node in a pool. task - specifies that + * the service should create a new user for the task. The default value is + * task. Possible values include: 'Task', 'Pool' * * @param {string} [parameters.startTask.userIdentity.autoUser.elevationLevel] * The elevation level of the auto user. nonAdmin - The auto user is a standard @@ -2224,37 +2167,6 @@ function _stopResize(resourceGroupName, accountName, poolName, options, callback * while the start task is still running; and even if the start task fails, new * tasks will continue to be scheduled on the node. The default is false. * - * @param {object} [parameters.startTask.containerSettings] The settings for - * the container under which the start task runs. When this is specified, all - * directories recursively below the AZ_BATCH_NODE_ROOT_DIR (the root of Azure - * Batch directories on the node) are mapped into the container, all task - * environment variables are mapped into the container, and the task command - * line is executed in the container. - * - * @param {string} [parameters.startTask.containerSettings.containerRunOptions] - * Additional options to the container create command. These additional options - * are supplied as arguments to the "docker create" command, in addition to - * those controlled by the Batch Service. - * - * @param {string} parameters.startTask.containerSettings.imageName The image - * to use to create the container in which the task will run. This is the full - * image reference, as would be specified to "docker pull". If no tag is - * provided as part of the image name, the tag ":latest" is used as a default. - * - * @param {object} [parameters.startTask.containerSettings.registry] The - * private registry which contains the container image. This setting can be - * omitted if was already provided at pool creation. - * - * @param {string} - * [parameters.startTask.containerSettings.registry.registryServer] The - * registry URL. If omitted, the default is "docker.io". - * - * @param {string} parameters.startTask.containerSettings.registry.userName The - * user name to log into the registry server. - * - * @param {string} parameters.startTask.containerSettings.registry.password The - * password to log into the registry server. - * * @param {array} [parameters.certificates] The list of certificates to be * installed on each compute node in the pool. For Windows compute nodes, the * Batch service installs the certificates to the specified certificate store @@ -2315,10 +2227,6 @@ function _beginCreate(resourceGroupName, accountName, poolName, parameters, opti } let ifMatch = (options && options.ifMatch !== undefined) ? options.ifMatch : undefined; let ifNoneMatch = (options && options.ifNoneMatch !== undefined) ? options.ifNoneMatch : undefined; - if (parameters === null || parameters === undefined) - { - parameters = {}; - } // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -2987,10 +2895,19 @@ class PoolOperations { * (https://azure.microsoft.com/documentation/articles/cloud-services-guestos-update-matrix/#releases). * * @param {string} - * [parameters.deploymentConfiguration.cloudServiceConfiguration.osVersion] The - * Azure Guest OS version to be installed on the virtual machines in the pool. - * The default value is * which specifies the latest operating system version - * for the specified OS family. + * [parameters.deploymentConfiguration.cloudServiceConfiguration.targetOSVersion] + * The Azure Guest OS version to be installed on the virtual machines in the + * pool. The default value is * which specifies the latest operating system + * version for the specified OS family. + * + * @param {string} + * [parameters.deploymentConfiguration.cloudServiceConfiguration.currentOSVersion] + * The Azure Guest OS Version currently installed on the virtual machines in + * the pool. This may differ from targetOSVersion if the pool state is + * Upgrading. In this case some virtual machines may be on the targetOSVersion + * and some may be on the currentOSVersion during the upgrade process. Once all + * virtual machines have upgraded, currentOSVersion is updated to be the same + * as targetOSVersion. * * @param {object} * [parameters.deploymentConfiguration.virtualMachineConfiguration] The virtual @@ -3036,6 +2953,18 @@ class PoolOperations { * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration * . * + * @param {object} + * [parameters.deploymentConfiguration.virtualMachineConfiguration.osDisk] + * Settings for the operating system disk of the Virtual Machine. + * + * @param {string} + * [parameters.deploymentConfiguration.virtualMachineConfiguration.osDisk.caching] + * The type of caching to be enabled for the data disks. none - The caching + * mode for the disk is not enabled. readOnly - The caching mode for the disk + * is read only. readWrite - The caching mode for the disk is read and write. + * Default value is none. Possible values include: 'None', 'ReadOnly', + * 'ReadWrite' + * * @param {string} * parameters.deploymentConfiguration.virtualMachineConfiguration.nodeAgentSkuId * The SKU of the Batch node agent to be provisioned on compute nodes in the @@ -3075,26 +3004,6 @@ class PoolOperations { * Windows_Client - The on-premises license is for Windows Client. * * - * @param {object} - * [parameters.deploymentConfiguration.virtualMachineConfiguration.containerConfiguration] - * The container configuration for the pool. If specified, setup is performed - * on each node in the pool to allow tasks to run in containers. All regular - * tasks and job manager tasks run on this pool must specify the - * containerSettings property, and all other tasks may specify it. - * - * @param {array} - * [parameters.deploymentConfiguration.virtualMachineConfiguration.containerConfiguration.containerImageNames] - * The collection of container image names. This is the full image reference, - * as would be specified to "docker pull". An image will be sourced from the - * default Docker registry unless the image is fully qualified with an - * alternative registry. - * - * @param {array} - * [parameters.deploymentConfiguration.virtualMachineConfiguration.containerConfiguration.containerRegistries] - * Additional private registries from which containers can be pulled. If any - * images must be downloaded from a private registry which requires - * credentials, then those credentials must be provided here. - * * @param {object} [parameters.scaleSettings] Settings which configure the * number of nodes in the pool. * @@ -3234,8 +3143,10 @@ class PoolOperations { * mutually exclusive; you must specify one but not both. * * @param {string} [parameters.startTask.userIdentity.autoUser.scope] The scope - * for the auto user The default value is task. Possible values include: - * 'Task', 'Pool' + * for the auto user pool - specifies that the task runs as the common auto + * user account which is created on every node in a pool. task - specifies that + * the service should create a new user for the task. The default value is + * task. Possible values include: 'Task', 'Pool' * * @param {string} [parameters.startTask.userIdentity.autoUser.elevationLevel] * The elevation level of the auto user. nonAdmin - The auto user is a standard @@ -3265,37 +3176,6 @@ class PoolOperations { * while the start task is still running; and even if the start task fails, new * tasks will continue to be scheduled on the node. The default is false. * - * @param {object} [parameters.startTask.containerSettings] The settings for - * the container under which the start task runs. When this is specified, all - * directories recursively below the AZ_BATCH_NODE_ROOT_DIR (the root of Azure - * Batch directories on the node) are mapped into the container, all task - * environment variables are mapped into the container, and the task command - * line is executed in the container. - * - * @param {string} [parameters.startTask.containerSettings.containerRunOptions] - * Additional options to the container create command. These additional options - * are supplied as arguments to the "docker create" command, in addition to - * those controlled by the Batch Service. - * - * @param {string} parameters.startTask.containerSettings.imageName The image - * to use to create the container in which the task will run. This is the full - * image reference, as would be specified to "docker pull". If no tag is - * provided as part of the image name, the tag ":latest" is used as a default. - * - * @param {object} [parameters.startTask.containerSettings.registry] The - * private registry which contains the container image. This setting can be - * omitted if was already provided at pool creation. - * - * @param {string} - * [parameters.startTask.containerSettings.registry.registryServer] The - * registry URL. If omitted, the default is "docker.io". - * - * @param {string} parameters.startTask.containerSettings.registry.userName The - * user name to log into the registry server. - * - * @param {string} parameters.startTask.containerSettings.registry.password The - * password to log into the registry server. - * * @param {array} [parameters.certificates] The list of certificates to be * installed on each compute node in the pool. For Windows compute nodes, the * Batch service installs the certificates to the specified certificate store @@ -3406,10 +3286,19 @@ class PoolOperations { * (https://azure.microsoft.com/documentation/articles/cloud-services-guestos-update-matrix/#releases). * * @param {string} - * [parameters.deploymentConfiguration.cloudServiceConfiguration.osVersion] The - * Azure Guest OS version to be installed on the virtual machines in the pool. - * The default value is * which specifies the latest operating system version - * for the specified OS family. + * [parameters.deploymentConfiguration.cloudServiceConfiguration.targetOSVersion] + * The Azure Guest OS version to be installed on the virtual machines in the + * pool. The default value is * which specifies the latest operating system + * version for the specified OS family. + * + * @param {string} + * [parameters.deploymentConfiguration.cloudServiceConfiguration.currentOSVersion] + * The Azure Guest OS Version currently installed on the virtual machines in + * the pool. This may differ from targetOSVersion if the pool state is + * Upgrading. In this case some virtual machines may be on the targetOSVersion + * and some may be on the currentOSVersion during the upgrade process. Once all + * virtual machines have upgraded, currentOSVersion is updated to be the same + * as targetOSVersion. * * @param {object} * [parameters.deploymentConfiguration.virtualMachineConfiguration] The virtual @@ -3455,6 +3344,18 @@ class PoolOperations { * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration * . * + * @param {object} + * [parameters.deploymentConfiguration.virtualMachineConfiguration.osDisk] + * Settings for the operating system disk of the Virtual Machine. + * + * @param {string} + * [parameters.deploymentConfiguration.virtualMachineConfiguration.osDisk.caching] + * The type of caching to be enabled for the data disks. none - The caching + * mode for the disk is not enabled. readOnly - The caching mode for the disk + * is read only. readWrite - The caching mode for the disk is read and write. + * Default value is none. Possible values include: 'None', 'ReadOnly', + * 'ReadWrite' + * * @param {string} * parameters.deploymentConfiguration.virtualMachineConfiguration.nodeAgentSkuId * The SKU of the Batch node agent to be provisioned on compute nodes in the @@ -3494,26 +3395,6 @@ class PoolOperations { * Windows_Client - The on-premises license is for Windows Client. * * - * @param {object} - * [parameters.deploymentConfiguration.virtualMachineConfiguration.containerConfiguration] - * The container configuration for the pool. If specified, setup is performed - * on each node in the pool to allow tasks to run in containers. All regular - * tasks and job manager tasks run on this pool must specify the - * containerSettings property, and all other tasks may specify it. - * - * @param {array} - * [parameters.deploymentConfiguration.virtualMachineConfiguration.containerConfiguration.containerImageNames] - * The collection of container image names. This is the full image reference, - * as would be specified to "docker pull". An image will be sourced from the - * default Docker registry unless the image is fully qualified with an - * alternative registry. - * - * @param {array} - * [parameters.deploymentConfiguration.virtualMachineConfiguration.containerConfiguration.containerRegistries] - * Additional private registries from which containers can be pulled. If any - * images must be downloaded from a private registry which requires - * credentials, then those credentials must be provided here. - * * @param {object} [parameters.scaleSettings] Settings which configure the * number of nodes in the pool. * @@ -3653,8 +3534,10 @@ class PoolOperations { * mutually exclusive; you must specify one but not both. * * @param {string} [parameters.startTask.userIdentity.autoUser.scope] The scope - * for the auto user The default value is task. Possible values include: - * 'Task', 'Pool' + * for the auto user pool - specifies that the task runs as the common auto + * user account which is created on every node in a pool. task - specifies that + * the service should create a new user for the task. The default value is + * task. Possible values include: 'Task', 'Pool' * * @param {string} [parameters.startTask.userIdentity.autoUser.elevationLevel] * The elevation level of the auto user. nonAdmin - The auto user is a standard @@ -3684,37 +3567,6 @@ class PoolOperations { * while the start task is still running; and even if the start task fails, new * tasks will continue to be scheduled on the node. The default is false. * - * @param {object} [parameters.startTask.containerSettings] The settings for - * the container under which the start task runs. When this is specified, all - * directories recursively below the AZ_BATCH_NODE_ROOT_DIR (the root of Azure - * Batch directories on the node) are mapped into the container, all task - * environment variables are mapped into the container, and the task command - * line is executed in the container. - * - * @param {string} [parameters.startTask.containerSettings.containerRunOptions] - * Additional options to the container create command. These additional options - * are supplied as arguments to the "docker create" command, in addition to - * those controlled by the Batch Service. - * - * @param {string} parameters.startTask.containerSettings.imageName The image - * to use to create the container in which the task will run. This is the full - * image reference, as would be specified to "docker pull". If no tag is - * provided as part of the image name, the tag ":latest" is used as a default. - * - * @param {object} [parameters.startTask.containerSettings.registry] The - * private registry which contains the container image. This setting can be - * omitted if was already provided at pool creation. - * - * @param {string} - * [parameters.startTask.containerSettings.registry.registryServer] The - * registry URL. If omitted, the default is "docker.io". - * - * @param {string} parameters.startTask.containerSettings.registry.userName The - * user name to log into the registry server. - * - * @param {string} parameters.startTask.containerSettings.registry.password The - * password to log into the registry server. - * * @param {array} [parameters.certificates] The list of certificates to be * installed on each compute node in the pool. For Windows compute nodes, the * Batch service installs the certificates to the specified certificate store @@ -3849,10 +3701,19 @@ class PoolOperations { * (https://azure.microsoft.com/documentation/articles/cloud-services-guestos-update-matrix/#releases). * * @param {string} - * [parameters.deploymentConfiguration.cloudServiceConfiguration.osVersion] The - * Azure Guest OS version to be installed on the virtual machines in the pool. - * The default value is * which specifies the latest operating system version - * for the specified OS family. + * [parameters.deploymentConfiguration.cloudServiceConfiguration.targetOSVersion] + * The Azure Guest OS version to be installed on the virtual machines in the + * pool. The default value is * which specifies the latest operating system + * version for the specified OS family. + * + * @param {string} + * [parameters.deploymentConfiguration.cloudServiceConfiguration.currentOSVersion] + * The Azure Guest OS Version currently installed on the virtual machines in + * the pool. This may differ from targetOSVersion if the pool state is + * Upgrading. In this case some virtual machines may be on the targetOSVersion + * and some may be on the currentOSVersion during the upgrade process. Once all + * virtual machines have upgraded, currentOSVersion is updated to be the same + * as targetOSVersion. * * @param {object} * [parameters.deploymentConfiguration.virtualMachineConfiguration] The virtual @@ -3898,6 +3759,18 @@ class PoolOperations { * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration * . * + * @param {object} + * [parameters.deploymentConfiguration.virtualMachineConfiguration.osDisk] + * Settings for the operating system disk of the Virtual Machine. + * + * @param {string} + * [parameters.deploymentConfiguration.virtualMachineConfiguration.osDisk.caching] + * The type of caching to be enabled for the data disks. none - The caching + * mode for the disk is not enabled. readOnly - The caching mode for the disk + * is read only. readWrite - The caching mode for the disk is read and write. + * Default value is none. Possible values include: 'None', 'ReadOnly', + * 'ReadWrite' + * * @param {string} * parameters.deploymentConfiguration.virtualMachineConfiguration.nodeAgentSkuId * The SKU of the Batch node agent to be provisioned on compute nodes in the @@ -3937,26 +3810,6 @@ class PoolOperations { * Windows_Client - The on-premises license is for Windows Client. * * - * @param {object} - * [parameters.deploymentConfiguration.virtualMachineConfiguration.containerConfiguration] - * The container configuration for the pool. If specified, setup is performed - * on each node in the pool to allow tasks to run in containers. All regular - * tasks and job manager tasks run on this pool must specify the - * containerSettings property, and all other tasks may specify it. - * - * @param {array} - * [parameters.deploymentConfiguration.virtualMachineConfiguration.containerConfiguration.containerImageNames] - * The collection of container image names. This is the full image reference, - * as would be specified to "docker pull". An image will be sourced from the - * default Docker registry unless the image is fully qualified with an - * alternative registry. - * - * @param {array} - * [parameters.deploymentConfiguration.virtualMachineConfiguration.containerConfiguration.containerRegistries] - * Additional private registries from which containers can be pulled. If any - * images must be downloaded from a private registry which requires - * credentials, then those credentials must be provided here. - * * @param {object} [parameters.scaleSettings] Settings which configure the * number of nodes in the pool. * @@ -4096,8 +3949,10 @@ class PoolOperations { * mutually exclusive; you must specify one but not both. * * @param {string} [parameters.startTask.userIdentity.autoUser.scope] The scope - * for the auto user The default value is task. Possible values include: - * 'Task', 'Pool' + * for the auto user pool - specifies that the task runs as the common auto + * user account which is created on every node in a pool. task - specifies that + * the service should create a new user for the task. The default value is + * task. Possible values include: 'Task', 'Pool' * * @param {string} [parameters.startTask.userIdentity.autoUser.elevationLevel] * The elevation level of the auto user. nonAdmin - The auto user is a standard @@ -4127,37 +3982,6 @@ class PoolOperations { * while the start task is still running; and even if the start task fails, new * tasks will continue to be scheduled on the node. The default is false. * - * @param {object} [parameters.startTask.containerSettings] The settings for - * the container under which the start task runs. When this is specified, all - * directories recursively below the AZ_BATCH_NODE_ROOT_DIR (the root of Azure - * Batch directories on the node) are mapped into the container, all task - * environment variables are mapped into the container, and the task command - * line is executed in the container. - * - * @param {string} [parameters.startTask.containerSettings.containerRunOptions] - * Additional options to the container create command. These additional options - * are supplied as arguments to the "docker create" command, in addition to - * those controlled by the Batch Service. - * - * @param {string} parameters.startTask.containerSettings.imageName The image - * to use to create the container in which the task will run. This is the full - * image reference, as would be specified to "docker pull". If no tag is - * provided as part of the image name, the tag ":latest" is used as a default. - * - * @param {object} [parameters.startTask.containerSettings.registry] The - * private registry which contains the container image. This setting can be - * omitted if was already provided at pool creation. - * - * @param {string} - * [parameters.startTask.containerSettings.registry.registryServer] The - * registry URL. If omitted, the default is "docker.io". - * - * @param {string} parameters.startTask.containerSettings.registry.userName The - * user name to log into the registry server. - * - * @param {string} parameters.startTask.containerSettings.registry.password The - * password to log into the registry server. - * * @param {array} [parameters.certificates] The list of certificates to be * installed on each compute node in the pool. For Windows compute nodes, the * Batch service installs the certificates to the specified certificate store @@ -4266,10 +4090,19 @@ class PoolOperations { * (https://azure.microsoft.com/documentation/articles/cloud-services-guestos-update-matrix/#releases). * * @param {string} - * [parameters.deploymentConfiguration.cloudServiceConfiguration.osVersion] The - * Azure Guest OS version to be installed on the virtual machines in the pool. - * The default value is * which specifies the latest operating system version - * for the specified OS family. + * [parameters.deploymentConfiguration.cloudServiceConfiguration.targetOSVersion] + * The Azure Guest OS version to be installed on the virtual machines in the + * pool. The default value is * which specifies the latest operating system + * version for the specified OS family. + * + * @param {string} + * [parameters.deploymentConfiguration.cloudServiceConfiguration.currentOSVersion] + * The Azure Guest OS Version currently installed on the virtual machines in + * the pool. This may differ from targetOSVersion if the pool state is + * Upgrading. In this case some virtual machines may be on the targetOSVersion + * and some may be on the currentOSVersion during the upgrade process. Once all + * virtual machines have upgraded, currentOSVersion is updated to be the same + * as targetOSVersion. * * @param {object} * [parameters.deploymentConfiguration.virtualMachineConfiguration] The virtual @@ -4315,6 +4148,18 @@ class PoolOperations { * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration * . * + * @param {object} + * [parameters.deploymentConfiguration.virtualMachineConfiguration.osDisk] + * Settings for the operating system disk of the Virtual Machine. + * + * @param {string} + * [parameters.deploymentConfiguration.virtualMachineConfiguration.osDisk.caching] + * The type of caching to be enabled for the data disks. none - The caching + * mode for the disk is not enabled. readOnly - The caching mode for the disk + * is read only. readWrite - The caching mode for the disk is read and write. + * Default value is none. Possible values include: 'None', 'ReadOnly', + * 'ReadWrite' + * * @param {string} * parameters.deploymentConfiguration.virtualMachineConfiguration.nodeAgentSkuId * The SKU of the Batch node agent to be provisioned on compute nodes in the @@ -4354,26 +4199,6 @@ class PoolOperations { * Windows_Client - The on-premises license is for Windows Client. * * - * @param {object} - * [parameters.deploymentConfiguration.virtualMachineConfiguration.containerConfiguration] - * The container configuration for the pool. If specified, setup is performed - * on each node in the pool to allow tasks to run in containers. All regular - * tasks and job manager tasks run on this pool must specify the - * containerSettings property, and all other tasks may specify it. - * - * @param {array} - * [parameters.deploymentConfiguration.virtualMachineConfiguration.containerConfiguration.containerImageNames] - * The collection of container image names. This is the full image reference, - * as would be specified to "docker pull". An image will be sourced from the - * default Docker registry unless the image is fully qualified with an - * alternative registry. - * - * @param {array} - * [parameters.deploymentConfiguration.virtualMachineConfiguration.containerConfiguration.containerRegistries] - * Additional private registries from which containers can be pulled. If any - * images must be downloaded from a private registry which requires - * credentials, then those credentials must be provided here. - * * @param {object} [parameters.scaleSettings] Settings which configure the * number of nodes in the pool. * @@ -4513,8 +4338,10 @@ class PoolOperations { * mutually exclusive; you must specify one but not both. * * @param {string} [parameters.startTask.userIdentity.autoUser.scope] The scope - * for the auto user The default value is task. Possible values include: - * 'Task', 'Pool' + * for the auto user pool - specifies that the task runs as the common auto + * user account which is created on every node in a pool. task - specifies that + * the service should create a new user for the task. The default value is + * task. Possible values include: 'Task', 'Pool' * * @param {string} [parameters.startTask.userIdentity.autoUser.elevationLevel] * The elevation level of the auto user. nonAdmin - The auto user is a standard @@ -4544,37 +4371,6 @@ class PoolOperations { * while the start task is still running; and even if the start task fails, new * tasks will continue to be scheduled on the node. The default is false. * - * @param {object} [parameters.startTask.containerSettings] The settings for - * the container under which the start task runs. When this is specified, all - * directories recursively below the AZ_BATCH_NODE_ROOT_DIR (the root of Azure - * Batch directories on the node) are mapped into the container, all task - * environment variables are mapped into the container, and the task command - * line is executed in the container. - * - * @param {string} [parameters.startTask.containerSettings.containerRunOptions] - * Additional options to the container create command. These additional options - * are supplied as arguments to the "docker create" command, in addition to - * those controlled by the Batch Service. - * - * @param {string} parameters.startTask.containerSettings.imageName The image - * to use to create the container in which the task will run. This is the full - * image reference, as would be specified to "docker pull". If no tag is - * provided as part of the image name, the tag ":latest" is used as a default. - * - * @param {object} [parameters.startTask.containerSettings.registry] The - * private registry which contains the container image. This setting can be - * omitted if was already provided at pool creation. - * - * @param {string} - * [parameters.startTask.containerSettings.registry.registryServer] The - * registry URL. If omitted, the default is "docker.io". - * - * @param {string} parameters.startTask.containerSettings.registry.userName The - * user name to log into the registry server. - * - * @param {string} parameters.startTask.containerSettings.registry.password The - * password to log into the registry server. - * * @param {array} [parameters.certificates] The list of certificates to be * installed on each compute node in the pool. For Windows compute nodes, the * Batch service installs the certificates to the specified certificate store @@ -5096,10 +4892,19 @@ class PoolOperations { * (https://azure.microsoft.com/documentation/articles/cloud-services-guestos-update-matrix/#releases). * * @param {string} - * [parameters.deploymentConfiguration.cloudServiceConfiguration.osVersion] The - * Azure Guest OS version to be installed on the virtual machines in the pool. - * The default value is * which specifies the latest operating system version - * for the specified OS family. + * [parameters.deploymentConfiguration.cloudServiceConfiguration.targetOSVersion] + * The Azure Guest OS version to be installed on the virtual machines in the + * pool. The default value is * which specifies the latest operating system + * version for the specified OS family. + * + * @param {string} + * [parameters.deploymentConfiguration.cloudServiceConfiguration.currentOSVersion] + * The Azure Guest OS Version currently installed on the virtual machines in + * the pool. This may differ from targetOSVersion if the pool state is + * Upgrading. In this case some virtual machines may be on the targetOSVersion + * and some may be on the currentOSVersion during the upgrade process. Once all + * virtual machines have upgraded, currentOSVersion is updated to be the same + * as targetOSVersion. * * @param {object} * [parameters.deploymentConfiguration.virtualMachineConfiguration] The virtual @@ -5145,6 +4950,18 @@ class PoolOperations { * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration * . * + * @param {object} + * [parameters.deploymentConfiguration.virtualMachineConfiguration.osDisk] + * Settings for the operating system disk of the Virtual Machine. + * + * @param {string} + * [parameters.deploymentConfiguration.virtualMachineConfiguration.osDisk.caching] + * The type of caching to be enabled for the data disks. none - The caching + * mode for the disk is not enabled. readOnly - The caching mode for the disk + * is read only. readWrite - The caching mode for the disk is read and write. + * Default value is none. Possible values include: 'None', 'ReadOnly', + * 'ReadWrite' + * * @param {string} * parameters.deploymentConfiguration.virtualMachineConfiguration.nodeAgentSkuId * The SKU of the Batch node agent to be provisioned on compute nodes in the @@ -5184,26 +5001,6 @@ class PoolOperations { * Windows_Client - The on-premises license is for Windows Client. * * - * @param {object} - * [parameters.deploymentConfiguration.virtualMachineConfiguration.containerConfiguration] - * The container configuration for the pool. If specified, setup is performed - * on each node in the pool to allow tasks to run in containers. All regular - * tasks and job manager tasks run on this pool must specify the - * containerSettings property, and all other tasks may specify it. - * - * @param {array} - * [parameters.deploymentConfiguration.virtualMachineConfiguration.containerConfiguration.containerImageNames] - * The collection of container image names. This is the full image reference, - * as would be specified to "docker pull". An image will be sourced from the - * default Docker registry unless the image is fully qualified with an - * alternative registry. - * - * @param {array} - * [parameters.deploymentConfiguration.virtualMachineConfiguration.containerConfiguration.containerRegistries] - * Additional private registries from which containers can be pulled. If any - * images must be downloaded from a private registry which requires - * credentials, then those credentials must be provided here. - * * @param {object} [parameters.scaleSettings] Settings which configure the * number of nodes in the pool. * @@ -5343,8 +5140,10 @@ class PoolOperations { * mutually exclusive; you must specify one but not both. * * @param {string} [parameters.startTask.userIdentity.autoUser.scope] The scope - * for the auto user The default value is task. Possible values include: - * 'Task', 'Pool' + * for the auto user pool - specifies that the task runs as the common auto + * user account which is created on every node in a pool. task - specifies that + * the service should create a new user for the task. The default value is + * task. Possible values include: 'Task', 'Pool' * * @param {string} [parameters.startTask.userIdentity.autoUser.elevationLevel] * The elevation level of the auto user. nonAdmin - The auto user is a standard @@ -5374,37 +5173,6 @@ class PoolOperations { * while the start task is still running; and even if the start task fails, new * tasks will continue to be scheduled on the node. The default is false. * - * @param {object} [parameters.startTask.containerSettings] The settings for - * the container under which the start task runs. When this is specified, all - * directories recursively below the AZ_BATCH_NODE_ROOT_DIR (the root of Azure - * Batch directories on the node) are mapped into the container, all task - * environment variables are mapped into the container, and the task command - * line is executed in the container. - * - * @param {string} [parameters.startTask.containerSettings.containerRunOptions] - * Additional options to the container create command. These additional options - * are supplied as arguments to the "docker create" command, in addition to - * those controlled by the Batch Service. - * - * @param {string} parameters.startTask.containerSettings.imageName The image - * to use to create the container in which the task will run. This is the full - * image reference, as would be specified to "docker pull". If no tag is - * provided as part of the image name, the tag ":latest" is used as a default. - * - * @param {object} [parameters.startTask.containerSettings.registry] The - * private registry which contains the container image. This setting can be - * omitted if was already provided at pool creation. - * - * @param {string} - * [parameters.startTask.containerSettings.registry.registryServer] The - * registry URL. If omitted, the default is "docker.io". - * - * @param {string} parameters.startTask.containerSettings.registry.userName The - * user name to log into the registry server. - * - * @param {string} parameters.startTask.containerSettings.registry.password The - * password to log into the registry server. - * * @param {array} [parameters.certificates] The list of certificates to be * installed on each compute node in the pool. For Windows compute nodes, the * Batch service installs the certificates to the specified certificate store @@ -5515,10 +5283,19 @@ class PoolOperations { * (https://azure.microsoft.com/documentation/articles/cloud-services-guestos-update-matrix/#releases). * * @param {string} - * [parameters.deploymentConfiguration.cloudServiceConfiguration.osVersion] The - * Azure Guest OS version to be installed on the virtual machines in the pool. - * The default value is * which specifies the latest operating system version - * for the specified OS family. + * [parameters.deploymentConfiguration.cloudServiceConfiguration.targetOSVersion] + * The Azure Guest OS version to be installed on the virtual machines in the + * pool. The default value is * which specifies the latest operating system + * version for the specified OS family. + * + * @param {string} + * [parameters.deploymentConfiguration.cloudServiceConfiguration.currentOSVersion] + * The Azure Guest OS Version currently installed on the virtual machines in + * the pool. This may differ from targetOSVersion if the pool state is + * Upgrading. In this case some virtual machines may be on the targetOSVersion + * and some may be on the currentOSVersion during the upgrade process. Once all + * virtual machines have upgraded, currentOSVersion is updated to be the same + * as targetOSVersion. * * @param {object} * [parameters.deploymentConfiguration.virtualMachineConfiguration] The virtual @@ -5564,6 +5341,18 @@ class PoolOperations { * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration * . * + * @param {object} + * [parameters.deploymentConfiguration.virtualMachineConfiguration.osDisk] + * Settings for the operating system disk of the Virtual Machine. + * + * @param {string} + * [parameters.deploymentConfiguration.virtualMachineConfiguration.osDisk.caching] + * The type of caching to be enabled for the data disks. none - The caching + * mode for the disk is not enabled. readOnly - The caching mode for the disk + * is read only. readWrite - The caching mode for the disk is read and write. + * Default value is none. Possible values include: 'None', 'ReadOnly', + * 'ReadWrite' + * * @param {string} * parameters.deploymentConfiguration.virtualMachineConfiguration.nodeAgentSkuId * The SKU of the Batch node agent to be provisioned on compute nodes in the @@ -5603,26 +5392,6 @@ class PoolOperations { * Windows_Client - The on-premises license is for Windows Client. * * - * @param {object} - * [parameters.deploymentConfiguration.virtualMachineConfiguration.containerConfiguration] - * The container configuration for the pool. If specified, setup is performed - * on each node in the pool to allow tasks to run in containers. All regular - * tasks and job manager tasks run on this pool must specify the - * containerSettings property, and all other tasks may specify it. - * - * @param {array} - * [parameters.deploymentConfiguration.virtualMachineConfiguration.containerConfiguration.containerImageNames] - * The collection of container image names. This is the full image reference, - * as would be specified to "docker pull". An image will be sourced from the - * default Docker registry unless the image is fully qualified with an - * alternative registry. - * - * @param {array} - * [parameters.deploymentConfiguration.virtualMachineConfiguration.containerConfiguration.containerRegistries] - * Additional private registries from which containers can be pulled. If any - * images must be downloaded from a private registry which requires - * credentials, then those credentials must be provided here. - * * @param {object} [parameters.scaleSettings] Settings which configure the * number of nodes in the pool. * @@ -5762,8 +5531,10 @@ class PoolOperations { * mutually exclusive; you must specify one but not both. * * @param {string} [parameters.startTask.userIdentity.autoUser.scope] The scope - * for the auto user The default value is task. Possible values include: - * 'Task', 'Pool' + * for the auto user pool - specifies that the task runs as the common auto + * user account which is created on every node in a pool. task - specifies that + * the service should create a new user for the task. The default value is + * task. Possible values include: 'Task', 'Pool' * * @param {string} [parameters.startTask.userIdentity.autoUser.elevationLevel] * The elevation level of the auto user. nonAdmin - The auto user is a standard @@ -5793,37 +5564,6 @@ class PoolOperations { * while the start task is still running; and even if the start task fails, new * tasks will continue to be scheduled on the node. The default is false. * - * @param {object} [parameters.startTask.containerSettings] The settings for - * the container under which the start task runs. When this is specified, all - * directories recursively below the AZ_BATCH_NODE_ROOT_DIR (the root of Azure - * Batch directories on the node) are mapped into the container, all task - * environment variables are mapped into the container, and the task command - * line is executed in the container. - * - * @param {string} [parameters.startTask.containerSettings.containerRunOptions] - * Additional options to the container create command. These additional options - * are supplied as arguments to the "docker create" command, in addition to - * those controlled by the Batch Service. - * - * @param {string} parameters.startTask.containerSettings.imageName The image - * to use to create the container in which the task will run. This is the full - * image reference, as would be specified to "docker pull". If no tag is - * provided as part of the image name, the tag ":latest" is used as a default. - * - * @param {object} [parameters.startTask.containerSettings.registry] The - * private registry which contains the container image. This setting can be - * omitted if was already provided at pool creation. - * - * @param {string} - * [parameters.startTask.containerSettings.registry.registryServer] The - * registry URL. If omitted, the default is "docker.io". - * - * @param {string} parameters.startTask.containerSettings.registry.userName The - * user name to log into the registry server. - * - * @param {string} parameters.startTask.containerSettings.registry.password The - * password to log into the registry server. - * * @param {array} [parameters.certificates] The list of certificates to be * installed on each compute node in the pool. For Windows compute nodes, the * Batch service installs the certificates to the specified certificate store diff --git a/lib/services/batchManagement/package.json b/lib/services/batchManagement/package.json index 59ec10f4ab..31a1433bb9 100644 --- a/lib/services/batchManagement/package.json +++ b/lib/services/batchManagement/package.json @@ -22,4 +22,4 @@ "bugs": { "url": "https://github.com/azure/azure-sdk-for-node/issues" } -} \ No newline at end of file +}