From 9c0c923c9c04cc5bd841186a32347e693d7b91cb Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Tue, 27 Jul 2021 18:46:58 +0000 Subject: [PATCH] CodeGen from PR 15371 in Azure/azure-rest-api-specs Fixed breaking change due to order (#15371) --- sdk/batch/batch/LICENSE.txt | 2 +- sdk/batch/batch/src/batchServiceClient.ts | 17 +- .../batch/src/batchServiceClientContext.ts | 25 +- sdk/batch/batch/src/models/accountMappers.ts | 4 +- .../batch/src/models/applicationMappers.ts | 4 +- .../models/certificateOperationsMappers.ts | 4 +- .../src/models/computeNodeExtensionMappers.ts | 20 + .../models/computeNodeOperationsMappers.ts | 9 +- sdk/batch/batch/src/models/fileMappers.ts | 4 +- sdk/batch/batch/src/models/index.ts | 640 ++++++++++++++++- sdk/batch/batch/src/models/jobMappers.ts | 9 +- .../batch/src/models/jobScheduleMappers.ts | 9 +- sdk/batch/batch/src/models/mappers.ts | 660 +++++++++++++++++- sdk/batch/batch/src/models/parameters.ts | 207 +++++- sdk/batch/batch/src/models/poolMappers.ts | 11 +- sdk/batch/batch/src/models/taskMappers.ts | 5 +- sdk/batch/batch/src/operations/account.ts | 11 +- sdk/batch/batch/src/operations/application.ts | 8 +- .../src/operations/certificateOperations.ts | 8 +- .../src/operations/computeNodeExtension.ts | 223 ++++++ .../src/operations/computeNodeOperations.ts | 8 +- sdk/batch/batch/src/operations/file.ts | 13 +- sdk/batch/batch/src/operations/index.ts | 6 +- sdk/batch/batch/src/operations/job.ts | 14 +- sdk/batch/batch/src/operations/jobSchedule.ts | 8 +- sdk/batch/batch/src/operations/pool.ts | 14 +- sdk/batch/batch/src/operations/task.ts | 8 +- 27 files changed, 1840 insertions(+), 111 deletions(-) create mode 100644 sdk/batch/batch/src/models/computeNodeExtensionMappers.ts create mode 100644 sdk/batch/batch/src/operations/computeNodeExtension.ts diff --git a/sdk/batch/batch/LICENSE.txt b/sdk/batch/batch/LICENSE.txt index ea8fb1516028..2d3163745319 100644 --- a/sdk/batch/batch/LICENSE.txt +++ b/sdk/batch/batch/LICENSE.txt @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2020 Microsoft +Copyright (c) 2021 Microsoft Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/sdk/batch/batch/src/batchServiceClient.ts b/sdk/batch/batch/src/batchServiceClient.ts index 8e4fb1f453ad..faeae2fb68b6 100644 --- a/sdk/batch/batch/src/batchServiceClient.ts +++ b/sdk/batch/batch/src/batchServiceClient.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -9,6 +8,7 @@ */ import * as msRest from "@azure/ms-rest-js"; +import { TokenCredential } from "@azure/core-auth"; import * as msRestAzure from "@azure/ms-rest-azure-js"; import * as Models from "./models"; import * as Mappers from "./models/mappers"; @@ -27,14 +27,20 @@ class BatchServiceClient extends BatchServiceClientContext { jobSchedule: operations.JobSchedule; task: operations.Task; computeNode: operations.ComputeNodeOperations; + computeNodeExtension: operations.ComputeNodeExtension; /** * Initializes a new instance of the BatchServiceClient class. - * @param credentials Credentials needed for the client to connect to Azure. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. * @param batchUrl The base URL for all Azure Batch service requests. * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials, batchUrl: string, options?: msRestAzure.AzureServiceClientOptions) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, batchUrl: string, options?: msRest.AzureServiceClientOptions) { super(credentials, batchUrl, options); this.application = new operations.Application(this); this.pool = new operations.Pool(this); @@ -45,6 +51,7 @@ class BatchServiceClient extends BatchServiceClientContext { this.jobSchedule = new operations.JobSchedule(this); this.task = new operations.Task(this); this.computeNode = new operations.ComputeNodeOperations(this); + this.computeNodeExtension = new operations.ComputeNodeExtension(this); } } diff --git a/sdk/batch/batch/src/batchServiceClientContext.ts b/sdk/batch/batch/src/batchServiceClientContext.ts index b522242929f9..f52a8ad3fda2 100644 --- a/sdk/batch/batch/src/batchServiceClientContext.ts +++ b/sdk/batch/batch/src/batchServiceClientContext.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -10,22 +9,28 @@ import * as msRest from "@azure/ms-rest-js"; import * as msRestAzure from "@azure/ms-rest-azure-js"; +import { TokenCredential } from "@azure/core-auth"; const packageName = "@azure/batch"; const packageVersion = "8.0.0"; export class BatchServiceClientContext extends msRestAzure.AzureServiceClient { - credentials: msRest.ServiceClientCredentials; + credentials: msRest.ServiceClientCredentials | TokenCredential; apiVersion?: string; batchUrl: string; /** * Initializes a new instance of the BatchServiceClient class. - * @param credentials Credentials needed for the client to connect to Azure. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. * @param batchUrl The base URL for all Azure Batch service requests. * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials, batchUrl: string, options?: msRestAzure.AzureServiceClientOptions) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, batchUrl: string, options?: msRestAzure.AzureServiceClientOptions) { if (credentials == undefined) { throw new Error('\'credentials\' cannot be null.'); } @@ -36,14 +41,14 @@ export class BatchServiceClientContext extends msRestAzure.AzureServiceClient { if (!options) { options = {}; } - if(!options.userAgent) { + if (!options.userAgent) { const defaultUserAgent = msRestAzure.getDefaultUserAgentValue(); options.userAgent = `${packageName}/${packageVersion} ${defaultUserAgent}`; } super(credentials, options); - this.apiVersion = '2020-09-01.12.0'; + this.apiVersion = '2021-06-01.14.0'; this.acceptLanguage = 'en-US'; this.longRunningOperationRetryTimeout = 30; this.baseUri = "{batchUrl}"; @@ -51,10 +56,10 @@ export class BatchServiceClientContext extends msRestAzure.AzureServiceClient { this.credentials = credentials; this.batchUrl = batchUrl; - if(options.acceptLanguage !== null && options.acceptLanguage !== undefined) { + if (options.acceptLanguage !== null && options.acceptLanguage !== undefined) { this.acceptLanguage = options.acceptLanguage; } - if(options.longRunningOperationRetryTimeout !== null && options.longRunningOperationRetryTimeout !== undefined) { + if (options.longRunningOperationRetryTimeout !== null && options.longRunningOperationRetryTimeout !== undefined) { this.longRunningOperationRetryTimeout = options.longRunningOperationRetryTimeout; } } diff --git a/sdk/batch/batch/src/models/accountMappers.ts b/sdk/batch/batch/src/models/accountMappers.ts index 42c721b464b3..3b57da9e56a4 100644 --- a/sdk/batch/batch/src/models/accountMappers.ts +++ b/sdk/batch/batch/src/models/accountMappers.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. diff --git a/sdk/batch/batch/src/models/applicationMappers.ts b/sdk/batch/batch/src/models/applicationMappers.ts index 63ed8a7bc26d..4df8f7d59e1b 100644 --- a/sdk/batch/batch/src/models/applicationMappers.ts +++ b/sdk/batch/batch/src/models/applicationMappers.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. diff --git a/sdk/batch/batch/src/models/certificateOperationsMappers.ts b/sdk/batch/batch/src/models/certificateOperationsMappers.ts index a9c098e7567e..2e14bc9a8cd6 100644 --- a/sdk/batch/batch/src/models/certificateOperationsMappers.ts +++ b/sdk/batch/batch/src/models/certificateOperationsMappers.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. diff --git a/sdk/batch/batch/src/models/computeNodeExtensionMappers.ts b/sdk/batch/batch/src/models/computeNodeExtensionMappers.ts new file mode 100644 index 000000000000..3ad76a0a8524 --- /dev/null +++ b/sdk/batch/batch/src/models/computeNodeExtensionMappers.ts @@ -0,0 +1,20 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + BatchError, + BatchErrorDetail, + ComputeNodeExtensionGetHeaders, + ComputeNodeExtensionListHeaders, + ErrorMessage, + InstanceViewStatus, + NodeVMExtension, + NodeVMExtensionList, + VMExtension, + VMExtensionInstanceView +} from "../models/mappers"; diff --git a/sdk/batch/batch/src/models/computeNodeOperationsMappers.ts b/sdk/batch/batch/src/models/computeNodeOperationsMappers.ts index 244abfabbddc..5b272042940b 100644 --- a/sdk/batch/batch/src/models/computeNodeOperationsMappers.ts +++ b/sdk/batch/batch/src/models/computeNodeOperationsMappers.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. @@ -22,6 +22,7 @@ export { ComputeNodeGetRemoteDesktopHeaders, ComputeNodeGetRemoteLoginSettingsHeaders, ComputeNodeGetRemoteLoginSettingsResult, + ComputeNodeIdentityReference, ComputeNodeListHeaders, ComputeNodeListResult, ComputeNodeRebootHeaders, @@ -32,6 +33,7 @@ export { ContainerRegistry, EnvironmentSetting, ErrorMessage, + ImageReference, InboundEndpoint, NameValuePair, NodeAgentInformation, @@ -49,5 +51,6 @@ export { TaskInformation, UploadBatchServiceLogsConfiguration, UploadBatchServiceLogsResult, - UserIdentity + UserIdentity, + VirtualMachineInfo } from "../models/mappers"; diff --git a/sdk/batch/batch/src/models/fileMappers.ts b/sdk/batch/batch/src/models/fileMappers.ts index 3f165a649309..312d43efdd61 100644 --- a/sdk/batch/batch/src/models/fileMappers.ts +++ b/sdk/batch/batch/src/models/fileMappers.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. diff --git a/sdk/batch/batch/src/models/index.ts b/sdk/batch/batch/src/models/index.ts index 1e1e9bfbc33f..b18dbc643f09 100644 --- a/sdk/batch/batch/src/models/index.ts +++ b/sdk/batch/batch/src/models/index.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. @@ -81,6 +81,13 @@ export interface ImageReference { * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration. */ virtualMachineImageId?: string; + /** + * The specific version of the platform image or marketplace image used to create the node. This + * read-only field differs from 'version' only if the value specified for 'version' when the pool + * was created was 'latest'. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly exactVersion?: string; } /** @@ -622,23 +629,39 @@ export interface JobNetworkConfiguration { subnetId: string; } +/** + * The reference to a user assigned identity associated with the Batch pool which a compute node + * will use. + */ +export interface ComputeNodeIdentityReference { + /** + * The ARM resource id of the user assigned identity. + */ + resourceId?: string; +} + /** * An interface representing ContainerRegistry. * @summary A private container registry. */ export interface ContainerRegistry { - /** - * The registry URL. If omitted, the default is "docker.io". - */ - registryServer?: string; /** * The user name to log into the registry server. */ - userName: string; + userName?: string; /** * The password to log into the registry server. */ - password: string; + password?: string; + /** + * The registry URL. If omitted, the default is "docker.io". + */ + registryServer?: string; + /** + * The reference to the user assigned identity to use to access an Azure Container Registry + * instead of username and password. + */ + identityReference?: ComputeNodeIdentityReference; } /** @@ -684,20 +707,19 @@ export interface ResourceFile { /** * 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 blobs from the container. There are - * two ways to get such a URL for a container in Azure storage: include a Shared Access Signature - * (SAS) granting read and list permissions on the container, or set the ACL for the container to - * allow public access. + * specified. This URL must be readable and listable from compute nodes. There are three ways to + * get such a URL for a container in Azure storage: include a Shared Access Signature (SAS) + * granting read and list permissions on the container, use a managed identity with read and list + * permissions, or set the ACL for the container to allow public access. */ storageContainerUrl?: string; /** * 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 points to - * 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 + * Azure Blob Storage, it must be readable from compute nodes. There are three 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. + * permissions on the blob, use a managed identity with read permission, or set the ACL for the + * blob or its container to allow public access. */ httpUrl?: string; /** @@ -726,6 +748,11 @@ export interface ResourceFile { * Linux Compute Node, then a default value of 0770 is applied to the file. */ fileMode?: string; + /** + * The reference to the user assigned identity to use to access Azure Blob Storage specified by + * storageContainerUrl or httpUrl. + */ + identityReference?: ComputeNodeIdentityReference; } /** @@ -988,10 +1015,16 @@ export interface OutputFileBlobContainerDestination { */ path?: string; /** - * The URL of the container within Azure Blob Storage to which to upload the file(s). The URL - * must include a Shared Access Signature (SAS) granting write permissions to the container. + * The URL of the container within Azure Blob Storage to which to upload the file(s). If not + * using a managed identity, the URL must include a Shared Access Signature (SAS) granting write + * permissions to the container. */ containerUrl: string; + /** + * The reference to the user assigned identity to use to access Azure Blob Storage specified by + * containerUrl. The identity must have write access to the Azure Blob Storage container + */ + identityReference?: ComputeNodeIdentityReference; } /** @@ -1134,7 +1167,7 @@ export interface JobManagerTask { /** * The number of scheduling slots that the Task requires to run. The default is 1. A Task can * only be scheduled to run on a compute node if the node has enough free scheduling slots - * available. For multi-instance Tasks, this must be 1. + * available. For multi-instance Tasks, this property is not supported and must not be specified. */ requiredSlots?: number; /** @@ -1615,6 +1648,94 @@ export interface DiskEncryptionConfiguration { targets?: DiskEncryptionTarget[]; } +/** + * For regional placement, nodes in the pool will be allocated in the same region. For zonal + * placement, nodes in the pool will be spread across different zones with best effort balancing. + * @summary Node placement configuration for a pool. + */ +export interface NodePlacementConfiguration { + /** + * Node placement Policy type on Batch Pools. Allocation policy used by Batch Service to + * provision the nodes. If not specified, Batch will use the regional policy. Possible values + * include: 'regional', 'zonal' + */ + policy?: NodePlacementPolicyType; +} + +/** + * An interface representing VMExtension. + * @summary The configuration for virtual machine extensions. + */ +export interface VMExtension { + /** + * The name of the virtual machine extension. + */ + name: string; + /** + * The name of the extension handler publisher. + */ + publisher: string; + /** + * The type of the extension. + */ + type: string; + /** + * The version of script handler. + */ + typeHandlerVersion?: string; + /** + * Indicates whether the extension should use a newer minor version if one is available at + * deployment time. Once deployed, however, the extension will not upgrade minor versions unless + * redeployed, even with this property set to true. + */ + autoUpgradeMinorVersion?: boolean; + /** + * JSON formatted public settings for the extension. + */ + settings?: any; + /** + * The extension can contain either protectedSettings or protectedSettingsFromKeyVault or no + * protected settings at all. + */ + protectedSettings?: any; + /** + * The collection of extension names. Collection of extension names after which this extension + * needs to be provisioned. + */ + provisionAfterExtensions?: string[]; +} + +/** + * An interface representing DiffDiskSettings. + * @summary Specifies the ephemeral Disk Settings for the operating system disk used by the compute + * node (VM). + */ +export interface DiffDiskSettings { + /** + * Specifies the ephemeral disk placement for operating system disk for all VMs in the pool. This + * property can be used by user in the request to choose the location e.g., cache disk space for + * Ephemeral OS disk provisioning. For more information on Ephemeral OS disk size requirements, + * please refer to Ephemeral OS disk size requirements for Windows VMs at + * https://docs.microsoft.com/en-us/azure/virtual-machines/windows/ephemeral-os-disks#size-requirements + * and Linux VMs at + * https://docs.microsoft.com/en-us/azure/virtual-machines/linux/ephemeral-os-disks#size-requirements. + * Possible values include: 'CacheDisk' + */ + placement?: DiffDiskPlacement; +} + +/** + * An interface representing OSDisk. + * @summary Settings for the operating system disk of the compute node (VM). + */ +export interface OSDisk { + /** + * Specifies the ephemeral Disk Settings for the operating system disk used by the compute node + * (VM). + */ + ephemeralOSDiskSettings?: DiffDiskSettings; +} + /** * An interface representing VirtualMachineConfiguration. * @summary The configuration for Compute Nodes in a Pool based on the Azure Virtual Machines @@ -1675,6 +1796,20 @@ export interface VirtualMachineConfiguration { * node in the pool during node provisioning. */ diskEncryptionConfiguration?: DiskEncryptionConfiguration; + /** + * The node placement configuration for the pool. This configuration will specify rules on how + * nodes in the pool will be physically allocated. + */ + nodePlacementConfiguration?: NodePlacementConfiguration; + /** + * The virtual machine extension for the pool. If specified, the extensions mentioned in this + * configuration will be installed on each node. + */ + extensions?: VMExtension[]; + /** + * Settings for the operating system disk of the Virtual Machine. + */ + osDisk?: OSDisk; } /** @@ -1854,13 +1989,13 @@ export interface AzureBlobFileSystemConfiguration { */ containerName: string; /** - * The Azure Storage Account key. This property is mutually exclusive with sasKey and one must be - * specified. + * The Azure Storage Account key. This property is mutually exclusive with both sasKey and + * identity; exactly one must be specified. */ accountKey?: string; /** - * The Azure Storage SAS token. This property is mutually exclusive with accountKey and one must - * be specified. + * The Azure Storage SAS token. This property is mutually exclusive with both accountKey and + * identity; exactly one must be specified. */ sasKey?: string; /** @@ -1874,6 +2009,11 @@ export interface AzureBlobFileSystemConfiguration { * AZ_BATCH_NODE_MOUNTS_DIR environment variable. */ relativeMountPath: string; + /** + * The reference to the user assigned identity to use to access containerName. This property is + * mutually exclusive with both accountKey and sasKey; exactly one must be specified. + */ + identityReference?: ComputeNodeIdentityReference; } /** @@ -2052,7 +2192,7 @@ export interface PoolSpecification { targetLowPriorityNodes?: number; /** * Whether the Pool size should automatically adjust over time. If false, at least one of - * targetDedicateNodes and targetLowPriorityNodes must be specified. If true, the + * targetDedicatedNodes and targetLowPriorityNodes must be specified. If true, the * autoScaleFormula element is required. The Pool automatically resizes according to the formula. * The default value is false. */ @@ -2198,6 +2338,14 @@ export interface JobSpecification { * update a Job's priority after it has been created using by using the update Job API. */ priority?: number; + /** + * The maximum number of tasks that can be executed in parallel for the job. The value of + * maxParallelTasks must be -1 or greater than 0 if specified. If not specified, the default + * value is -1, which means there's no limit to the number of tasks that can be run at once. You + * can update a job's maxParallelTasks after it has been created using the update job API. + * Default value: -1. + */ + maxParallelTasks?: number; /** * The display name for Jobs created under this schedule. The name need not be unique and can * contain any Unicode characters up to a maximum length of 1024. @@ -2639,6 +2787,14 @@ export interface CloudJob { * lowest priority and 1000 being the highest priority. The default value is 0. */ priority?: number; + /** + * The maximum number of tasks that can be executed in parallel for the job. The value of + * maxParallelTasks must be -1 or greater than 0 if specified. If not specified, the default + * value is -1, which means there's no limit to the number of tasks that can be run at once. You + * can update a job's maxParallelTasks after it has been created using the update job API. + * Default value: -1. + */ + maxParallelTasks?: number; /** * The execution constraints for the Job. */ @@ -2725,6 +2881,14 @@ export interface JobAddParameter { * lowest priority and 1000 being the highest priority. The default value is 0. */ priority?: number; + /** + * The maximum number of tasks that can be executed in parallel for the job. The value of + * maxParallelTasks must be -1 or greater than 0 if specified. If not specified, the default + * value is -1, which means there's no limit to the number of tasks that can be run at once. You + * can update a job's maxParallelTasks after it has been created using the update job API. + * Default value: -1. + */ + maxParallelTasks?: number; /** * The execution constraints for the Job. */ @@ -3134,6 +3298,111 @@ export interface ResizeError { values?: NameValuePair[]; } +/** + * An interface representing InstanceViewStatus. + * @summary The instance view status. + */ +export interface InstanceViewStatus { + /** + * The status code. + */ + code?: string; + /** + * The localized label for the status. + */ + displayStatus?: string; + /** + * Level code. Possible values include: 'Error', 'Info', 'Warning' + */ + level?: StatusLevelTypes; + /** + * The detailed status message. + */ + message?: string; + /** + * The time of the status. + */ + time?: string; +} + +/** + * An interface representing VMExtensionInstanceView. + * @summary The vm extension instance view. + */ +export interface VMExtensionInstanceView { + /** + * The name of the vm extension instance view. + */ + name?: string; + /** + * The resource status information. + */ + statuses?: InstanceViewStatus[]; + /** + * The resource status information. + */ + subStatuses?: InstanceViewStatus[]; +} + +/** + * An interface representing NodeVMExtension. + * @summary The configuration for virtual machine extension instance view. + */ +export interface NodeVMExtension { + /** + * The provisioning state of the virtual machine extension. + */ + provisioningState?: string; + /** + * The virtual machine extension. + */ + vmExtension?: VMExtension; + /** + * The vm extension instance view. + */ + instanceView?: VMExtensionInstanceView; +} + +/** + * The user assigned Identity + */ +export interface UserAssignedIdentity { + /** + * The ARM resource id of the user assigned identity + */ + resourceId: string; + /** + * The client id of the user assigned identity. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly clientId?: string; + /** + * The principal id of the user assigned identity. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly principalId?: string; +} + +/** + * The identity of the Batch pool, if configured. + * @summary The identity of the Batch pool, if configured. + */ +export interface BatchPoolIdentity { + /** + * The identity of the Batch pool, if configured. The list of user identities associated with the + * Batch pool. The user identity dictionary key references will be ARM resource ids in the form: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. + * Possible values include: 'UserAssigned', 'None' + */ + type: PoolIdentityType; + /** + * The list of user identities associated with the Batch account. The user identity dictionary + * key references will be ARM resource ids in the form: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. + */ + userAssignedIdentities?: UserAssignedIdentity[]; +} + /** * An interface representing CloudPool. * @summary A Pool in the Azure Batch service. @@ -3224,7 +3493,7 @@ export interface CloudPool { */ currentDedicatedNodes?: number; /** - * The number of low-priority Compute Nodes currently in the Pool. Low-priority Compute Nodes + * The number of low-priority Compute Nodes currently in the Pool. low-priority Compute Nodes * which have been preempted are included in this count. */ currentLowPriorityNodes?: number; @@ -3238,7 +3507,7 @@ export interface CloudPool { targetLowPriorityNodes?: number; /** * Whether the Pool size should automatically adjust over time. If false, at least one of - * targetDedicateNodes and targetLowPriorityNodes must be specified. If true, the + * targetDedicatedNodes and targetLowPriorityNodes must be specified. If true, the * autoScaleFormula property is required and the Pool automatically resizes according to the * formula. The default value is false. */ @@ -3328,6 +3597,12 @@ export interface CloudPool { * CIFS/SMB, and Blobfuse. */ mountConfiguration?: MountConfiguration[]; + /** + * The identity of the Batch pool, if configured. The list of user identities associated with the + * Batch pool. The user identity dictionary key references will be ARM resource ids in the form: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. + */ + identity?: BatchPoolIdentity; } /** @@ -3396,7 +3671,7 @@ export interface PoolAddParameter { targetLowPriorityNodes?: number; /** * Whether the Pool size should automatically adjust over time. If false, at least one of - * targetDedicateNodes and targetLowPriorityNodes must be specified. If true, the + * targetDedicatedNodes and targetLowPriorityNodes must be specified. If true, the * autoScaleFormula property is required and the Pool automatically resizes according to the * formula. The default value is false. */ @@ -4396,6 +4671,17 @@ export interface ComputeNodeEndpointConfiguration { inboundEndpoints: InboundEndpoint[]; } +/** + * An interface representing VirtualMachineInfo. + * @summary Info about the current state of the virtual machine. + */ +export interface VirtualMachineInfo { + /** + * The reference to the Azure Virtual Machine's Marketplace Image. + */ + imageReference?: ImageReference; +} + /** * An interface representing ComputeNode. * @summary A Compute Node in the Batch service. @@ -4521,6 +4807,10 @@ export interface ComputeNode { * new version. */ nodeAgentInfo?: NodeAgentInformation; + /** + * Info about the current state of the virtual machine. + */ + virtualMachineInfo?: VirtualMachineInfo; } /** @@ -4656,6 +4946,13 @@ export interface JobPatchParameter { * left unchanged. */ priority?: number; + /** + * The maximum number of tasks that can be executed in parallel for the job. The value of + * maxParallelTasks must be -1 or greater than 0 if specified. If not specified, the default + * value is -1, which means there's no limit to the number of tasks that can be run at once. You + * can update a job's maxParallelTasks after it has been created using the update job API. + */ + maxParallelTasks?: number; /** * The action the Batch service should take when all Tasks in the Job are in the completed state. * If omitted, the completion behavior is left unchanged. You may not change the value from @@ -4963,7 +5260,8 @@ export interface NodeDisableSchedulingParameter { */ export interface NodeRemoveParameter { /** - * A list containing the IDs of the Compute Nodes to be removed from the specified Pool. + * A list containing the IDs of the Compute Nodes to be removed from the specified Pool. A + * maximum of 100 nodes may be removed per request. */ nodeList: string[]; /** @@ -4988,9 +5286,10 @@ export interface NodeRemoveParameter { export interface UploadBatchServiceLogsConfiguration { /** * The URL of the container within Azure Blob Storage to which to upload the Batch Service log - * file(s). The URL must include a Shared Access Signature (SAS) granting write permissions to - * the container. The SAS duration must allow enough time for the upload to finish. The start - * time for SAS is optional and recommended to not be specified. + * file(s). If a user assigned managed identity is not being used, the URL must include a Shared + * Access Signature (SAS) granting write permissions to the container. The SAS duration must + * allow enough time for the upload to finish. The start time for SAS is optional and recommended + * to not be specified. */ containerUrl: string; /** @@ -5008,6 +5307,11 @@ export interface UploadBatchServiceLogsConfiguration { * omitted, the default is to upload all logs available after the startTime. */ endTime?: Date; + /** + * The reference to the user assigned identity to use to access Azure Blob Storage specified by + * containerUrl. The identity must have write access to the Azure Blob Storage container. + */ + identityReference?: ComputeNodeIdentityReference; } /** @@ -5104,7 +5408,7 @@ export interface PoolNodeCounts { */ dedicated?: NodeCounts; /** - * The number of low priority Compute Nodes in each state. + * The number of low-priority Compute Nodes in each state. */ lowPriority?: NodeCounts; } @@ -7981,6 +8285,69 @@ export interface ComputeNodeListOptions { ocpDate?: Date; } +/** + * Additional parameters for get operation. + */ +export interface ComputeNodeExtensionGetOptions { + /** + * An OData $select clause. + */ + select?: string; + /** + * The maximum time that the server can spend processing the request, in seconds. The default is + * 30 seconds. Default value: 30. + */ + timeout?: number; + /** + * The caller-generated request identity, in the form of a GUID with no decoration such as curly + * braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. + */ + clientRequestId?: string; + /** + * Whether the server should return the client-request-id in the response. Default value: false. + */ + returnClientRequestId?: boolean; + /** + * The time the request was issued. Client libraries typically set this to the current system + * clock time; set it explicitly if you are calling the REST API directly. + */ + ocpDate?: Date; +} + +/** + * Additional parameters for list operation. + */ +export interface ComputeNodeExtensionListOptions { + /** + * An OData $select clause. + */ + select?: string; + /** + * The maximum number of items to return in the response. A maximum of 1000 Compute Nodes can be + * returned. Default value: 1000. + */ + maxResults?: number; + /** + * The maximum time that the server can spend processing the request, in seconds. The default is + * 30 seconds. Default value: 30. + */ + timeout?: number; + /** + * The caller-generated request identity, in the form of a GUID with no decoration such as curly + * braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. + */ + clientRequestId?: string; + /** + * Whether the server should return the client-request-id in the response. Default value: false. + */ + returnClientRequestId?: boolean; + /** + * The time the request was issued. Client libraries typically set this to the current system + * clock time; set it explicitly if you are calling the REST API directly. + */ + ocpDate?: Date; +} + /** * Additional parameters for listNext operation. */ @@ -8261,6 +8628,26 @@ export interface ComputeNodeListNextOptions { ocpDate?: Date; } +/** + * Additional parameters for listNext operation. + */ +export interface ComputeNodeExtensionListNextOptions { + /** + * The caller-generated request identity, in the form of a GUID with no decoration such as curly + * braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. + */ + clientRequestId?: string; + /** + * Whether the server should return the client-request-id in the response. Default value: false. + */ + returnClientRequestId?: boolean; + /** + * The time the request was issued. Client libraries typically set this to the current system + * clock time; set it explicitly if you are calling the REST API directly. + */ + ocpDate?: Date; +} + /** * Optional Parameters. */ @@ -8832,6 +9219,11 @@ export interface FileListFromComputeNodeOptionalParams extends msRest.RequestOpt * Optional Parameters. */ export interface FileListFromTaskNextOptionalParams extends msRest.RequestOptionsBase { + /** + * Whether to list children of the Task directory. This parameter can be used in combination with + * the filter parameter to list specific type of files. + */ + recursive?: boolean; /** * Additional parameters for the operation */ @@ -8842,6 +9234,10 @@ export interface FileListFromTaskNextOptionalParams extends msRest.RequestOption * Optional Parameters. */ export interface FileListFromComputeNodeNextOptionalParams extends msRest.RequestOptionsBase { + /** + * Whether to list children of a directory. + */ + recursive?: boolean; /** * Additional parameters for the operation */ @@ -9211,6 +9607,36 @@ export interface ComputeNodeListNextOptionalParams extends msRest.RequestOptions computeNodeListNextOptions?: ComputeNodeListNextOptions; } +/** + * Optional Parameters. + */ +export interface ComputeNodeExtensionGetOptionalParams extends msRest.RequestOptionsBase { + /** + * Additional parameters for the operation + */ + computeNodeExtensionGetOptions?: ComputeNodeExtensionGetOptions; +} + +/** + * Optional Parameters. + */ +export interface ComputeNodeExtensionListOptionalParams extends msRest.RequestOptionsBase { + /** + * Additional parameters for the operation + */ + computeNodeExtensionListOptions?: ComputeNodeExtensionListOptions; +} + +/** + * Optional Parameters. + */ +export interface ComputeNodeExtensionListNextOptionalParams extends msRest.RequestOptionsBase { + /** + * Additional parameters for the operation + */ + computeNodeExtensionListNextOptions?: ComputeNodeExtensionListNextOptions; +} + /** * Defines headers for List operation. */ @@ -11537,6 +11963,64 @@ export interface ComputeNodeListHeaders { lastModified: Date; } +/** + * Defines headers for Get operation. + */ +export interface ComputeNodeExtensionGetHeaders { + /** + * The client-request-id provided by the client during the request. This will be returned only if + * the return-client-request-id parameter was set to true. + */ + clientRequestId: string; + /** + * A unique identifier for the request that was made to the Batch service. If a request is + * consistently failing and you have verified that the request is properly formulated, you may + * use this value to report the error to Microsoft. In your report, include the value of this + * request ID, the approximate time that the request was made, the Batch Account against which + * the request was made, and the region that Account resides in. + */ + requestId: string; + /** + * The ETag HTTP response header. This is an opaque string. You can use it to detect whether the + * resource has changed between requests. In particular, you can pass the ETag to one of the + * If-Modified-Since, If-Unmodified-Since, If-Match or If-None-Match headers. + */ + eTag: string; + /** + * The time at which the resource was last modified. + */ + lastModified: Date; +} + +/** + * Defines headers for List operation. + */ +export interface ComputeNodeExtensionListHeaders { + /** + * The client-request-id provided by the client during the request. This will be returned only if + * the return-client-request-id parameter was set to true. + */ + clientRequestId: string; + /** + * A unique identifier for the request that was made to the Batch service. If a request is + * consistently failing and you have verified that the request is properly formulated, you may + * use this value to report the error to Microsoft. In your report, include the value of this + * request ID, the approximate time that the request was made, the Batch Account against which + * the request was made, and the region that Account resides in. + */ + requestId: string; + /** + * The ETag HTTP response header. This is an opaque string. You can use it to detect whether the + * resource has changed between requests. In particular, you can pass the ETag to one of the + * If-Modified-Since, If-Unmodified-Since, If-Match or If-None-Match headers. + */ + eTag: string; + /** + * The time at which the resource was last modified. + */ + lastModified: Date; +} + /** * @interface * An interface representing the ApplicationListResult. @@ -11659,6 +12143,16 @@ export interface ComputeNodeListResult extends Array { odatanextLink?: string; } +/** + * @interface + * An interface representing the NodeVMExtensionList. + * @summary The result of listing the Compute Node extensions in a Node. + * @extends Array + */ +export interface NodeVMExtensionList extends Array { + odatanextLink?: string; +} + /** * Defines values for OSType. * Possible values include: 'linux', 'windows' @@ -11803,6 +12297,22 @@ export type StorageAccountType = 'standard_lrs' | 'premium_lrs'; */ export type DiskEncryptionTarget = 'osdisk' | 'temporarydisk'; +/** + * Defines values for NodePlacementPolicyType. + * Possible values include: 'regional', 'zonal' + * @readonly + * @enum {string} + */ +export type NodePlacementPolicyType = 'regional' | 'zonal'; + +/** + * Defines values for DiffDiskPlacement. + * Possible values include: 'CacheDisk' + * @readonly + * @enum {string} + */ +export type DiffDiskPlacement = 'CacheDisk'; + /** * Defines values for DynamicVNetAssignmentScope. * Possible values include: 'none', 'job' @@ -11908,6 +12418,14 @@ export type TaskExecutionResult = 'success' | 'failure'; */ export type JobReleaseTaskState = 'running' | 'completed'; +/** + * Defines values for StatusLevelTypes. + * Possible values include: 'Error', 'Info', 'Warning' + * @readonly + * @enum {string} + */ +export type StatusLevelTypes = 'Error' | 'Info' | 'Warning'; + /** * Defines values for PoolState. * Possible values include: 'active', 'deleting' @@ -11924,6 +12442,14 @@ export type PoolState = 'active' | 'deleting'; */ export type AllocationState = 'steady' | 'resizing' | 'stopping'; +/** + * Defines values for PoolIdentityType. + * Possible values include: 'UserAssigned', 'None' + * @readonly + * @enum {string} + */ +export type PoolIdentityType = 'UserAssigned' | 'None'; + /** * Defines values for TaskState. * Possible values include: 'active', 'preparing', 'running', 'completed' @@ -13521,3 +14047,53 @@ export type ComputeNodeListResponse = ComputeNodeListResult & ComputeNodeListHea parsedBody: ComputeNodeListResult; }; }; + +/** + * Contains response data for the get operation. + */ +export type ComputeNodeExtensionGetResponse = NodeVMExtension & ComputeNodeExtensionGetHeaders & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The parsed HTTP response headers. + */ + parsedHeaders: ComputeNodeExtensionGetHeaders; + + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: NodeVMExtension; + }; +}; + +/** + * Contains response data for the list operation. + */ +export type ComputeNodeExtensionListResponse = NodeVMExtensionList & ComputeNodeExtensionListHeaders & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The parsed HTTP response headers. + */ + parsedHeaders: ComputeNodeExtensionListHeaders; + + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: NodeVMExtensionList; + }; +}; diff --git a/sdk/batch/batch/src/models/jobMappers.ts b/sdk/batch/batch/src/models/jobMappers.ts index 6c1dc2928ea5..a03190abf3e5 100644 --- a/sdk/batch/batch/src/models/jobMappers.ts +++ b/sdk/batch/batch/src/models/jobMappers.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. @@ -21,9 +21,11 @@ export { CloudJobListPreparationAndReleaseTaskStatusResult, CloudJobListResult, CloudServiceConfiguration, + ComputeNodeIdentityReference, ContainerConfiguration, ContainerRegistry, DataDisk, + DiffDiskSettings, DiskEncryptionConfiguration, EnvironmentSetting, ErrorMessage, @@ -65,6 +67,8 @@ export { NetworkConfiguration, NetworkSecurityGroupRule, NFSMountConfiguration, + NodePlacementConfiguration, + OSDisk, OutputFile, OutputFileBlobContainerDestination, OutputFileDestination, @@ -86,6 +90,7 @@ export { UserAccount, UserIdentity, VirtualMachineConfiguration, + VMExtension, WindowsConfiguration, WindowsUserConfiguration } from "../models/mappers"; diff --git a/sdk/batch/batch/src/models/jobScheduleMappers.ts b/sdk/batch/batch/src/models/jobScheduleMappers.ts index 7f9ccf9fe3ca..975c00b19a76 100644 --- a/sdk/batch/batch/src/models/jobScheduleMappers.ts +++ b/sdk/batch/batch/src/models/jobScheduleMappers.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. @@ -20,9 +20,11 @@ export { CloudJobSchedule, CloudJobScheduleListResult, CloudServiceConfiguration, + ComputeNodeIdentityReference, ContainerConfiguration, ContainerRegistry, DataDisk, + DiffDiskSettings, DiskEncryptionConfiguration, EnvironmentSetting, ErrorMessage, @@ -55,6 +57,8 @@ export { NetworkConfiguration, NetworkSecurityGroupRule, NFSMountConfiguration, + NodePlacementConfiguration, + OSDisk, OutputFile, OutputFileBlobContainerDestination, OutputFileDestination, @@ -73,6 +77,7 @@ export { UserAccount, UserIdentity, VirtualMachineConfiguration, + VMExtension, WindowsConfiguration, WindowsUserConfiguration } from "../models/mappers"; diff --git a/sdk/batch/batch/src/models/mappers.ts b/sdk/batch/batch/src/models/mappers.ts index 0b27ccc84ca7..79947091a52a 100644 --- a/sdk/batch/batch/src/models/mappers.ts +++ b/sdk/batch/batch/src/models/mappers.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. @@ -92,6 +92,13 @@ export const ImageReference: msRest.CompositeMapper = { type: { name: "String" } + }, + exactVersion: { + readOnly: true, + serializedName: "exactVersion", + type: { + name: "String" + } } } } @@ -857,31 +864,52 @@ export const JobNetworkConfiguration: msRest.CompositeMapper = { } }; -export const ContainerRegistry: msRest.CompositeMapper = { - serializedName: "ContainerRegistry", +export const ComputeNodeIdentityReference: msRest.CompositeMapper = { + serializedName: "ComputeNodeIdentityReference", type: { name: "Composite", - className: "ContainerRegistry", + className: "ComputeNodeIdentityReference", modelProperties: { - registryServer: { - serializedName: "registryServer", + resourceId: { + serializedName: "resourceId", type: { name: "String" } - }, + } + } + } +}; + +export const ContainerRegistry: msRest.CompositeMapper = { + serializedName: "ContainerRegistry", + type: { + name: "Composite", + className: "ContainerRegistry", + modelProperties: { userName: { - required: true, serializedName: "username", type: { name: "String" } }, password: { - required: true, serializedName: "password", type: { name: "String" } + }, + registryServer: { + serializedName: "registryServer", + type: { + name: "String" + } + }, + identityReference: { + serializedName: "identityReference", + type: { + name: "Composite", + className: "ComputeNodeIdentityReference" + } } } } @@ -968,6 +996,13 @@ export const ResourceFile: msRest.CompositeMapper = { type: { name: "String" } + }, + identityReference: { + serializedName: "identityReference", + type: { + name: "Composite", + className: "ComputeNodeIdentityReference" + } } } } @@ -1334,6 +1369,13 @@ export const OutputFileBlobContainerDestination: msRest.CompositeMapper = { type: { name: "String" } + }, + identityReference: { + serializedName: "identityReference", + type: { + name: "Composite", + className: "ComputeNodeIdentityReference" + } } } } @@ -2013,6 +2055,128 @@ export const DiskEncryptionConfiguration: msRest.CompositeMapper = { } }; +export const NodePlacementConfiguration: msRest.CompositeMapper = { + serializedName: "NodePlacementConfiguration", + type: { + name: "Composite", + className: "NodePlacementConfiguration", + modelProperties: { + policy: { + serializedName: "policy", + type: { + name: "Enum", + allowedValues: [ + "regional", + "zonal" + ] + } + } + } + } +}; + +export const VMExtension: msRest.CompositeMapper = { + serializedName: "VMExtension", + type: { + name: "Composite", + className: "VMExtension", + modelProperties: { + name: { + required: true, + serializedName: "name", + type: { + name: "String" + } + }, + publisher: { + required: true, + serializedName: "publisher", + type: { + name: "String" + } + }, + type: { + required: true, + serializedName: "type", + type: { + name: "String" + } + }, + typeHandlerVersion: { + serializedName: "typeHandlerVersion", + type: { + name: "String" + } + }, + autoUpgradeMinorVersion: { + serializedName: "autoUpgradeMinorVersion", + type: { + name: "Boolean" + } + }, + settings: { + serializedName: "settings", + type: { + name: "Object" + } + }, + protectedSettings: { + serializedName: "protectedSettings", + type: { + name: "Object" + } + }, + provisionAfterExtensions: { + serializedName: "provisionAfterExtensions", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const DiffDiskSettings: msRest.CompositeMapper = { + serializedName: "DiffDiskSettings", + type: { + name: "Composite", + className: "DiffDiskSettings", + modelProperties: { + placement: { + serializedName: "placement", + type: { + name: "Enum", + allowedValues: [ + "CacheDisk" + ] + } + } + } + } +}; + +export const OSDisk: msRest.CompositeMapper = { + serializedName: "OSDisk", + type: { + name: "Composite", + className: "OSDisk", + modelProperties: { + ephemeralOSDiskSettings: { + serializedName: "ephemeralOSDiskSettings", + type: { + name: "Composite", + className: "DiffDiskSettings" + } + } + } + } +}; + export const VirtualMachineConfiguration: msRest.CompositeMapper = { serializedName: "VirtualMachineConfiguration", type: { @@ -2072,6 +2236,32 @@ export const VirtualMachineConfiguration: msRest.CompositeMapper = { name: "Composite", className: "DiskEncryptionConfiguration" } + }, + nodePlacementConfiguration: { + serializedName: "nodePlacementConfiguration", + type: { + name: "Composite", + className: "NodePlacementConfiguration" + } + }, + extensions: { + serializedName: "extensions", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "VMExtension" + } + } + } + }, + osDisk: { + serializedName: "osDisk", + type: { + name: "Composite", + className: "OSDisk" + } } } } @@ -2323,6 +2513,13 @@ export const AzureBlobFileSystemConfiguration: msRest.CompositeMapper = { type: { name: "String" } + }, + identityReference: { + serializedName: "identityReference", + type: { + name: "Composite", + className: "ComputeNodeIdentityReference" + } } } } @@ -2736,6 +2933,13 @@ export const JobSpecification: msRest.CompositeMapper = { name: "Number" } }, + maxParallelTasks: { + serializedName: "maxParallelTasks", + defaultValue: -1, + type: { + name: "Number" + } + }, displayName: { serializedName: "displayName", type: { @@ -3358,6 +3562,13 @@ export const CloudJob: msRest.CompositeMapper = { name: "Number" } }, + maxParallelTasks: { + serializedName: "maxParallelTasks", + defaultValue: -1, + type: { + name: "Number" + } + }, constraints: { serializedName: "constraints", type: { @@ -3487,6 +3698,13 @@ export const JobAddParameter: msRest.CompositeMapper = { name: "Number" } }, + maxParallelTasks: { + serializedName: "maxParallelTasks", + defaultValue: -1, + type: { + name: "Number" + } + }, constraints: { serializedName: "constraints", type: { @@ -4079,6 +4297,185 @@ export const ResizeError: msRest.CompositeMapper = { } }; +export const InstanceViewStatus: msRest.CompositeMapper = { + serializedName: "InstanceViewStatus", + type: { + name: "Composite", + className: "InstanceViewStatus", + modelProperties: { + code: { + serializedName: "code", + type: { + name: "String" + } + }, + displayStatus: { + serializedName: "displayStatus", + type: { + name: "String" + } + }, + level: { + serializedName: "level", + type: { + name: "Enum", + allowedValues: [ + "Error", + "Info", + "Warning" + ] + } + }, + message: { + serializedName: "message", + type: { + name: "String" + } + }, + time: { + serializedName: "time", + type: { + name: "String" + } + } + } + } +}; + +export const VMExtensionInstanceView: msRest.CompositeMapper = { + serializedName: "VMExtensionInstanceView", + type: { + name: "Composite", + className: "VMExtensionInstanceView", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String" + } + }, + statuses: { + serializedName: "statuses", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "InstanceViewStatus" + } + } + } + }, + subStatuses: { + serializedName: "subStatuses", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "InstanceViewStatus" + } + } + } + } + } + } +}; + +export const NodeVMExtension: msRest.CompositeMapper = { + serializedName: "NodeVMExtension", + type: { + name: "Composite", + className: "NodeVMExtension", + modelProperties: { + provisioningState: { + serializedName: "provisioningState", + type: { + name: "String" + } + }, + vmExtension: { + serializedName: "vmExtension", + type: { + name: "Composite", + className: "VMExtension" + } + }, + instanceView: { + serializedName: "instanceView", + type: { + name: "Composite", + className: "VMExtensionInstanceView" + } + } + } + } +}; + +export const UserAssignedIdentity: msRest.CompositeMapper = { + serializedName: "UserAssignedIdentity", + type: { + name: "Composite", + className: "UserAssignedIdentity", + modelProperties: { + resourceId: { + required: true, + serializedName: "resourceId", + type: { + name: "String" + } + }, + clientId: { + readOnly: true, + serializedName: "clientId", + type: { + name: "String" + } + }, + principalId: { + readOnly: true, + serializedName: "principalId", + type: { + name: "String" + } + } + } + } +}; + +export const BatchPoolIdentity: msRest.CompositeMapper = { + serializedName: "BatchPoolIdentity", + type: { + name: "Composite", + className: "BatchPoolIdentity", + modelProperties: { + type: { + required: true, + serializedName: "type", + type: { + name: "Enum", + allowedValues: [ + "UserAssigned", + "None" + ] + } + }, + userAssignedIdentities: { + serializedName: "userAssignedIdentities", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "UserAssignedIdentity" + } + } + } + } + } + } +}; + export const CloudPool: msRest.CompositeMapper = { serializedName: "CloudPool", type: { @@ -4351,6 +4748,13 @@ export const CloudPool: msRest.CompositeMapper = { } } } + }, + identity: { + serializedName: "identity", + type: { + name: "Composite", + className: "BatchPoolIdentity" + } } } } @@ -5789,6 +6193,23 @@ export const ComputeNodeEndpointConfiguration: msRest.CompositeMapper = { } }; +export const VirtualMachineInfo: msRest.CompositeMapper = { + serializedName: "VirtualMachineInfo", + type: { + name: "Composite", + className: "VirtualMachineInfo", + modelProperties: { + imageReference: { + serializedName: "imageReference", + type: { + name: "Composite", + className: "ImageReference" + } + } + } + } +}; + export const ComputeNode: msRest.CompositeMapper = { serializedName: "ComputeNode", type: { @@ -5967,6 +6388,13 @@ export const ComputeNode: msRest.CompositeMapper = { name: "Composite", className: "NodeAgentInformation" } + }, + virtualMachineInfo: { + serializedName: "virtualMachineInfo", + type: { + name: "Composite", + className: "VirtualMachineInfo" + } } } } @@ -6162,6 +6590,12 @@ export const JobPatchParameter: msRest.CompositeMapper = { name: "Number" } }, + maxParallelTasks: { + serializedName: "maxParallelTasks", + type: { + name: "Number" + } + }, onAllTasksComplete: { serializedName: "onAllTasksComplete", type: { @@ -6622,6 +7056,13 @@ export const UploadBatchServiceLogsConfiguration: msRest.CompositeMapper = { type: { name: "DateTime" } + }, + identityReference: { + serializedName: "identityReference", + type: { + name: "Composite", + className: "ComputeNodeIdentityReference" + } } } } @@ -10035,6 +10476,84 @@ export const ComputeNodeListOptions: msRest.CompositeMapper = { } }; +export const ComputeNodeExtensionGetOptions: msRest.CompositeMapper = { + type: { + name: "Composite", + className: "ComputeNodeExtensionGetOptions", + modelProperties: { + select: { + type: { + name: "String" + } + }, + timeout: { + defaultValue: 30, + type: { + name: "Number" + } + }, + clientRequestId: { + type: { + name: "Uuid" + } + }, + returnClientRequestId: { + defaultValue: false, + type: { + name: "Boolean" + } + }, + ocpDate: { + type: { + name: "DateTimeRfc1123" + } + } + } + } +}; + +export const ComputeNodeExtensionListOptions: msRest.CompositeMapper = { + type: { + name: "Composite", + className: "ComputeNodeExtensionListOptions", + modelProperties: { + select: { + type: { + name: "String" + } + }, + maxResults: { + defaultValue: 1000, + type: { + name: "Number" + } + }, + timeout: { + defaultValue: 30, + type: { + name: "Number" + } + }, + clientRequestId: { + type: { + name: "Uuid" + } + }, + returnClientRequestId: { + defaultValue: false, + type: { + name: "Boolean" + } + }, + ocpDate: { + type: { + name: "DateTimeRfc1123" + } + } + } + } +}; + export const ApplicationListNextOptions: msRest.CompositeMapper = { type: { name: "Composite", @@ -10385,6 +10904,31 @@ export const ComputeNodeListNextOptions: msRest.CompositeMapper = { } }; +export const ComputeNodeExtensionListNextOptions: msRest.CompositeMapper = { + type: { + name: "Composite", + className: "ComputeNodeExtensionListNextOptions", + modelProperties: { + clientRequestId: { + type: { + name: "Uuid" + } + }, + returnClientRequestId: { + defaultValue: false, + type: { + name: "Boolean" + } + }, + ocpDate: { + type: { + name: "DateTimeRfc1123" + } + } + } + } +}; + export const ApplicationListHeaders: msRest.CompositeMapper = { serializedName: "application-list-headers", type: { @@ -13185,6 +13729,74 @@ export const ComputeNodeListHeaders: msRest.CompositeMapper = { } }; +export const ComputeNodeExtensionGetHeaders: msRest.CompositeMapper = { + serializedName: "computenodeextension-get-headers", + type: { + name: "Composite", + className: "ComputeNodeExtensionGetHeaders", + modelProperties: { + clientRequestId: { + serializedName: "client-request-id", + type: { + name: "Uuid" + } + }, + requestId: { + serializedName: "request-id", + type: { + name: "Uuid" + } + }, + eTag: { + serializedName: "etag", + type: { + name: "String" + } + }, + lastModified: { + serializedName: "last-modified", + type: { + name: "DateTimeRfc1123" + } + } + } + } +}; + +export const ComputeNodeExtensionListHeaders: msRest.CompositeMapper = { + serializedName: "computenodeextension-list-headers", + type: { + name: "Composite", + className: "ComputeNodeExtensionListHeaders", + modelProperties: { + clientRequestId: { + serializedName: "client-request-id", + type: { + name: "Uuid" + } + }, + requestId: { + serializedName: "request-id", + type: { + name: "Uuid" + } + }, + eTag: { + serializedName: "etag", + type: { + name: "String" + } + }, + lastModified: { + serializedName: "last-modified", + type: { + name: "DateTimeRfc1123" + } + } + } + } +}; + export const ApplicationListResult: msRest.CompositeMapper = { serializedName: "ApplicationListResult", type: { @@ -13520,3 +14132,31 @@ export const ComputeNodeListResult: msRest.CompositeMapper = { } } }; + +export const NodeVMExtensionList: msRest.CompositeMapper = { + serializedName: "NodeVMExtensionList", + type: { + name: "Composite", + className: "NodeVMExtensionList", + modelProperties: { + value: { + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "NodeVMExtension" + } + } + } + }, + odatanextLink: { + serializedName: "odata\\.nextLink", + type: { + name: "String" + } + } + } + } +}; diff --git a/sdk/batch/batch/src/models/parameters.ts b/sdk/batch/batch/src/models/parameters.ts index a7e7cf030f6f..81d333c3397b 100644 --- a/sdk/batch/batch/src/models/parameters.ts +++ b/sdk/batch/batch/src/models/parameters.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -1222,6 +1221,45 @@ export const clientRequestId9: msRest.OperationParameter = { } } }; +export const clientRequestId90: msRest.OperationParameter = { + parameterPath: [ + "options", + "computeNodeExtensionGetOptions", + "clientRequestId" + ], + mapper: { + serializedName: "client-request-id", + type: { + name: "Uuid" + } + } +}; +export const clientRequestId91: msRest.OperationParameter = { + parameterPath: [ + "options", + "computeNodeExtensionListOptions", + "clientRequestId" + ], + mapper: { + serializedName: "client-request-id", + type: { + name: "Uuid" + } + } +}; +export const clientRequestId92: msRest.OperationParameter = { + parameterPath: [ + "options", + "computeNodeExtensionListNextOptions", + "clientRequestId" + ], + mapper: { + serializedName: "client-request-id", + type: { + name: "Uuid" + } + } +}; export const endTime: msRest.OperationQueryParameter = { parameterPath: [ "options", @@ -1352,6 +1390,16 @@ export const expand8: msRest.OperationQueryParameter = { } } }; +export const extensionName: msRest.OperationURLParameter = { + parameterPath: "extensionName", + mapper: { + required: true, + serializedName: "extensionName", + type: { + name: "String" + } + } +}; export const filePath: msRest.OperationURLParameter = { parameterPath: "filePath", mapper: { @@ -3219,6 +3267,24 @@ export const maxResults13: msRest.OperationQueryParameter = { } } }; +export const maxResults14: msRest.OperationQueryParameter = { + parameterPath: [ + "options", + "computeNodeExtensionListOptions", + "maxResults" + ], + mapper: { + serializedName: "maxresults", + defaultValue: 1000, + constraints: { + InclusiveMaximum: 1000, + InclusiveMinimum: 1 + }, + type: { + name: "Number" + } + } +}; export const maxResults2: msRest.OperationQueryParameter = { parameterPath: [ "options", @@ -4554,6 +4620,45 @@ export const ocpDate9: msRest.OperationParameter = { } } }; +export const ocpDate90: msRest.OperationParameter = { + parameterPath: [ + "options", + "computeNodeExtensionGetOptions", + "ocpDate" + ], + mapper: { + serializedName: "ocp-date", + type: { + name: "DateTimeRfc1123" + } + } +}; +export const ocpDate91: msRest.OperationParameter = { + parameterPath: [ + "options", + "computeNodeExtensionListOptions", + "ocpDate" + ], + mapper: { + serializedName: "ocp-date", + type: { + name: "DateTimeRfc1123" + } + } +}; +export const ocpDate92: msRest.OperationParameter = { + parameterPath: [ + "options", + "computeNodeExtensionListNextOptions", + "ocpDate" + ], + mapper: { + serializedName: "ocp-date", + type: { + name: "DateTimeRfc1123" + } + } +}; export const ocpRange0: msRest.OperationParameter = { parameterPath: [ "options", @@ -5862,6 +5967,48 @@ export const returnClientRequestId9: msRest.OperationParameter = { } } }; +export const returnClientRequestId90: msRest.OperationParameter = { + parameterPath: [ + "options", + "computeNodeExtensionGetOptions", + "returnClientRequestId" + ], + mapper: { + serializedName: "return-client-request-id", + defaultValue: false, + type: { + name: "Boolean" + } + } +}; +export const returnClientRequestId91: msRest.OperationParameter = { + parameterPath: [ + "options", + "computeNodeExtensionListOptions", + "returnClientRequestId" + ], + mapper: { + serializedName: "return-client-request-id", + defaultValue: false, + type: { + name: "Boolean" + } + } +}; +export const returnClientRequestId92: msRest.OperationParameter = { + parameterPath: [ + "options", + "computeNodeExtensionListNextOptions", + "returnClientRequestId" + ], + mapper: { + serializedName: "return-client-request-id", + defaultValue: false, + type: { + name: "Boolean" + } + } +}; export const select0: msRest.OperationQueryParameter = { parameterPath: [ "options", @@ -5953,6 +6100,32 @@ export const select14: msRest.OperationQueryParameter = { } } }; +export const select15: msRest.OperationQueryParameter = { + parameterPath: [ + "options", + "computeNodeExtensionGetOptions", + "select" + ], + mapper: { + serializedName: "$select", + type: { + name: "String" + } + } +}; +export const select16: msRest.OperationQueryParameter = { + parameterPath: [ + "options", + "computeNodeExtensionListOptions", + "select" + ], + mapper: { + serializedName: "$select", + type: { + name: "String" + } + } +}; export const select2: msRest.OperationQueryParameter = { parameterPath: [ "options", @@ -7136,6 +7309,34 @@ export const timeout75: msRest.OperationQueryParameter = { } } }; +export const timeout76: msRest.OperationQueryParameter = { + parameterPath: [ + "options", + "computeNodeExtensionGetOptions", + "timeout" + ], + mapper: { + serializedName: "timeout", + defaultValue: 30, + type: { + name: "Number" + } + } +}; +export const timeout77: msRest.OperationQueryParameter = { + parameterPath: [ + "options", + "computeNodeExtensionListOptions", + "timeout" + ], + mapper: { + serializedName: "timeout", + defaultValue: 30, + type: { + name: "Number" + } + } +}; export const timeout8: msRest.OperationQueryParameter = { parameterPath: [ "options", diff --git a/sdk/batch/batch/src/models/poolMappers.ts b/sdk/batch/batch/src/models/poolMappers.ts index 3b5505c8315e..ee378c127465 100644 --- a/sdk/batch/batch/src/models/poolMappers.ts +++ b/sdk/batch/batch/src/models/poolMappers.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. @@ -15,14 +15,17 @@ export { AzureFileShareConfiguration, BatchError, BatchErrorDetail, + BatchPoolIdentity, CertificateReference, CIFSMountConfiguration, CloudPool, CloudPoolListResult, CloudServiceConfiguration, + ComputeNodeIdentityReference, ContainerConfiguration, ContainerRegistry, DataDisk, + DiffDiskSettings, DiskEncryptionConfiguration, EnvironmentSetting, ErrorMessage, @@ -35,7 +38,9 @@ export { NetworkConfiguration, NetworkSecurityGroupRule, NFSMountConfiguration, + NodePlacementConfiguration, NodeRemoveParameter, + OSDisk, PoolAddHeaders, PoolAddParameter, PoolDeleteHeaders, @@ -70,8 +75,10 @@ export { TaskSchedulingPolicy, UsageStatistics, UserAccount, + UserAssignedIdentity, UserIdentity, VirtualMachineConfiguration, + VMExtension, WindowsConfiguration, WindowsUserConfiguration } from "../models/mappers"; diff --git a/sdk/batch/batch/src/models/taskMappers.ts b/sdk/batch/batch/src/models/taskMappers.ts index 84ef079bc951..57a4376103f5 100644 --- a/sdk/batch/batch/src/models/taskMappers.ts +++ b/sdk/batch/batch/src/models/taskMappers.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. @@ -16,6 +16,7 @@ export { CloudTask, CloudTaskListResult, CloudTaskListSubtasksResult, + ComputeNodeIdentityReference, ComputeNodeInformation, ContainerRegistry, EnvironmentSetting, diff --git a/sdk/batch/batch/src/operations/account.ts b/sdk/batch/batch/src/operations/account.ts index eea384325c0e..80186fdde1a1 100644 --- a/sdk/batch/batch/src/operations/account.ts +++ b/sdk/batch/batch/src/operations/account.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -204,6 +203,9 @@ const listSupportedImagesNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion + ], headerParameters: [ Parameters.acceptLanguage, Parameters.clientRequestId22, @@ -230,6 +232,9 @@ const listPoolNodeCountsNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion + ], headerParameters: [ Parameters.acceptLanguage, Parameters.clientRequestId23, diff --git a/sdk/batch/batch/src/operations/application.ts b/sdk/batch/batch/src/operations/application.ts index ec8b45d115d8..aeeea76475c7 100644 --- a/sdk/batch/batch/src/operations/application.ts +++ b/sdk/batch/batch/src/operations/application.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -188,6 +187,9 @@ const listNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion + ], headerParameters: [ Parameters.acceptLanguage, Parameters.clientRequestId2, diff --git a/sdk/batch/batch/src/operations/certificateOperations.ts b/sdk/batch/batch/src/operations/certificateOperations.ts index f54f868a87a6..4cdbccb307d8 100644 --- a/sdk/batch/batch/src/operations/certificateOperations.ts +++ b/sdk/batch/batch/src/operations/certificateOperations.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -395,6 +394,9 @@ const listNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion + ], headerParameters: [ Parameters.acceptLanguage, Parameters.clientRequestId45, diff --git a/sdk/batch/batch/src/operations/computeNodeExtension.ts b/sdk/batch/batch/src/operations/computeNodeExtension.ts new file mode 100644 index 000000000000..d26e7828d6da --- /dev/null +++ b/sdk/batch/batch/src/operations/computeNodeExtension.ts @@ -0,0 +1,223 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/computeNodeExtensionMappers"; +import * as Parameters from "../models/parameters"; +import { BatchServiceClientContext } from "../batchServiceClientContext"; + +/** Class representing a ComputeNodeExtension. */ +export class ComputeNodeExtension { + private readonly client: BatchServiceClientContext; + + /** + * Create a ComputeNodeExtension. + * @param {BatchServiceClientContext} client Reference to the service client. + */ + constructor(client: BatchServiceClientContext) { + this.client = client; + } + + /** + * @summary Gets information about the specified Compute Node Extension. + * @param poolId The ID of the Pool that contains the Compute Node. + * @param nodeId The ID of the Compute Node that contains the extensions. + * @param extensionName The name of the of the Compute Node Extension that you want to get + * information about. + * @param [options] The optional parameters + * @returns Promise + */ + get(poolId: string, nodeId: string, extensionName: string, options?: Models.ComputeNodeExtensionGetOptionalParams): Promise; + /** + * @param poolId The ID of the Pool that contains the Compute Node. + * @param nodeId The ID of the Compute Node that contains the extensions. + * @param extensionName The name of the of the Compute Node Extension that you want to get + * information about. + * @param callback The callback + */ + get(poolId: string, nodeId: string, extensionName: string, callback: msRest.ServiceCallback): void; + /** + * @param poolId The ID of the Pool that contains the Compute Node. + * @param nodeId The ID of the Compute Node that contains the extensions. + * @param extensionName The name of the of the Compute Node Extension that you want to get + * information about. + * @param options The optional parameters + * @param callback The callback + */ + get(poolId: string, nodeId: string, extensionName: string, options: Models.ComputeNodeExtensionGetOptionalParams, callback: msRest.ServiceCallback): void; + get(poolId: string, nodeId: string, extensionName: string, options?: Models.ComputeNodeExtensionGetOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + poolId, + nodeId, + extensionName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * @summary Lists the Compute Nodes Extensions in the specified Pool. + * @param poolId The ID of the Pool that contains Compute Node. + * @param nodeId The ID of the Compute Node that you want to list extensions. + * @param [options] The optional parameters + * @returns Promise + */ + list(poolId: string, nodeId: string, options?: Models.ComputeNodeExtensionListOptionalParams): Promise; + /** + * @param poolId The ID of the Pool that contains Compute Node. + * @param nodeId The ID of the Compute Node that you want to list extensions. + * @param callback The callback + */ + list(poolId: string, nodeId: string, callback: msRest.ServiceCallback): void; + /** + * @param poolId The ID of the Pool that contains Compute Node. + * @param nodeId The ID of the Compute Node that you want to list extensions. + * @param options The optional parameters + * @param callback The callback + */ + list(poolId: string, nodeId: string, options: Models.ComputeNodeExtensionListOptionalParams, callback: msRest.ServiceCallback): void; + list(poolId: string, nodeId: string, options?: Models.ComputeNodeExtensionListOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + poolId, + nodeId, + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * @summary Lists the Compute Nodes Extensions in the specified Pool. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listNext(nextPageLink: string, options?: Models.ComputeNodeExtensionListNextOptionalParams): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listNext(nextPageLink: string, options: Models.ComputeNodeExtensionListNextOptionalParams, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: Models.ComputeNodeExtensionListNextOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "pools/{poolId}/nodes/{nodeId}/extensions/{extensionName}", + urlParameters: [ + Parameters.batchUrl, + Parameters.poolId, + Parameters.nodeId, + Parameters.extensionName + ], + queryParameters: [ + Parameters.apiVersion, + Parameters.select15, + Parameters.timeout76 + ], + headerParameters: [ + Parameters.acceptLanguage, + Parameters.clientRequestId90, + Parameters.returnClientRequestId90, + Parameters.ocpDate90 + ], + responses: { + 200: { + bodyMapper: Mappers.NodeVMExtension, + headersMapper: Mappers.ComputeNodeExtensionGetHeaders + }, + default: { + bodyMapper: Mappers.BatchError, + headersMapper: Mappers.ComputeNodeExtensionGetHeaders + } + }, + serializer +}; + +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "pools/{poolId}/nodes/{nodeId}/extensions", + urlParameters: [ + Parameters.batchUrl, + Parameters.poolId, + Parameters.nodeId + ], + queryParameters: [ + Parameters.apiVersion, + Parameters.select16, + Parameters.maxResults14, + Parameters.timeout77 + ], + headerParameters: [ + Parameters.acceptLanguage, + Parameters.clientRequestId91, + Parameters.returnClientRequestId91, + Parameters.ocpDate91 + ], + responses: { + 200: { + bodyMapper: Mappers.NodeVMExtensionList, + headersMapper: Mappers.ComputeNodeExtensionListHeaders + }, + default: { + bodyMapper: Mappers.BatchError, + headersMapper: Mappers.ComputeNodeExtensionListHeaders + } + }, + serializer +}; + +const listNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "{batchUrl}", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage, + Parameters.clientRequestId92, + Parameters.returnClientRequestId92, + Parameters.ocpDate92 + ], + responses: { + 200: { + bodyMapper: Mappers.NodeVMExtensionList, + headersMapper: Mappers.ComputeNodeExtensionListHeaders + }, + default: { + bodyMapper: Mappers.BatchError, + headersMapper: Mappers.ComputeNodeExtensionListHeaders + } + }, + serializer +}; diff --git a/sdk/batch/batch/src/operations/computeNodeOperations.ts b/sdk/batch/batch/src/operations/computeNodeOperations.ts index 47c3f08e468f..ce2901373435 100644 --- a/sdk/batch/batch/src/operations/computeNodeOperations.ts +++ b/sdk/batch/batch/src/operations/computeNodeOperations.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -929,6 +928,9 @@ const listNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion + ], headerParameters: [ Parameters.acceptLanguage, Parameters.clientRequestId89, diff --git a/sdk/batch/batch/src/operations/file.ts b/sdk/batch/batch/src/operations/file.ts index 4c5829f84f12..b273620ad4f3 100644 --- a/sdk/batch/batch/src/operations/file.ts +++ b/sdk/batch/batch/src/operations/file.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -650,6 +649,10 @@ const listFromTaskNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.recursive, + Parameters.apiVersion + ], headerParameters: [ Parameters.acceptLanguage, Parameters.clientRequestId54, @@ -676,6 +679,10 @@ const listFromComputeNodeNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.recursive, + Parameters.apiVersion + ], headerParameters: [ Parameters.acceptLanguage, Parameters.clientRequestId55, diff --git a/sdk/batch/batch/src/operations/index.ts b/sdk/batch/batch/src/operations/index.ts index ab28bd75785c..f1694b24ac5f 100644 --- a/sdk/batch/batch/src/operations/index.ts +++ b/sdk/batch/batch/src/operations/index.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -17,3 +16,4 @@ export * from "./file"; export * from "./jobSchedule"; export * from "./task"; export * from "./computeNodeOperations"; +export * from "./computeNodeExtension"; diff --git a/sdk/batch/batch/src/operations/job.ts b/sdk/batch/batch/src/operations/job.ts index b59c6a5bde79..0ceb032cd54c 100644 --- a/sdk/batch/batch/src/operations/job.ts +++ b/sdk/batch/batch/src/operations/job.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -1013,6 +1012,9 @@ const listNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion + ], headerParameters: [ Parameters.acceptLanguage, Parameters.clientRequestId37, @@ -1039,6 +1041,9 @@ const listFromJobScheduleNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion + ], headerParameters: [ Parameters.acceptLanguage, Parameters.clientRequestId38, @@ -1065,6 +1070,9 @@ const listPreparationAndReleaseTaskStatusNextOperationSpec: msRest.OperationSpec urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion + ], headerParameters: [ Parameters.acceptLanguage, Parameters.clientRequestId39, diff --git a/sdk/batch/batch/src/operations/jobSchedule.ts b/sdk/batch/batch/src/operations/jobSchedule.ts index e686ef685453..5dfe34a9f368 100644 --- a/sdk/batch/batch/src/operations/jobSchedule.ts +++ b/sdk/batch/batch/src/operations/jobSchedule.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -717,6 +716,9 @@ const listNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion + ], headerParameters: [ Parameters.acceptLanguage, Parameters.clientRequestId66, diff --git a/sdk/batch/batch/src/operations/pool.ts b/sdk/batch/batch/src/operations/pool.ts index f78aa95f014c..33bf1294b8cd 100644 --- a/sdk/batch/batch/src/operations/pool.ts +++ b/sdk/batch/batch/src/operations/pool.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -488,7 +487,8 @@ export class Pool { /** * This operation can only run when the allocation state of the Pool is steady. When this operation - * runs, the allocation state changes from steady to resizing. + * runs, the allocation state changes from steady to resizing. Each request may remove up to 100 + * nodes. * @summary Removes Compute Nodes from the specified Pool. * @param poolId The ID of the Pool from which you want to remove Compute Nodes. * @param nodeRemoveParameter The parameters for the request. @@ -1131,6 +1131,9 @@ const listUsageMetricsNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion + ], headerParameters: [ Parameters.acceptLanguage, Parameters.clientRequestId18, @@ -1157,6 +1160,9 @@ const listNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion + ], headerParameters: [ Parameters.acceptLanguage, Parameters.clientRequestId19, diff --git a/sdk/batch/batch/src/operations/task.ts b/sdk/batch/batch/src/operations/task.ts index f5e171bf1a18..c0d583c4a2f2 100644 --- a/sdk/batch/batch/src/operations/task.ts +++ b/sdk/batch/batch/src/operations/task.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -722,6 +721,9 @@ const listNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion + ], headerParameters: [ Parameters.acceptLanguage, Parameters.clientRequestId76,