From fb9edf929812055ce7f6facb98fb3ccdb47e19ca Mon Sep 17 00:00:00 2001 From: colawwj Date: Tue, 27 Jul 2021 13:42:04 +0800 Subject: [PATCH 1/3] arm-batch-release --- sdk/batch/arm-batch/LICENSE.txt | 2 +- sdk/batch/arm-batch/README.md | 16 +- sdk/batch/arm-batch/package.json | 29 +- sdk/batch/arm-batch/rollup.config.js | 6 +- ...ManagementClient.ts => batchManagement.ts} | 17 +- ...ntContext.ts => batchManagementContext.ts} | 23 +- .../models/applicationOperationsMappers.ts | 11 +- .../applicationPackageOperationsMappers.ts | 11 +- .../models/batchAccountOperationsMappers.ts | 15 +- .../models/certificateOperationsMappers.ts | 11 +- sdk/batch/arm-batch/src/models/index.ts | 685 ++++++++++++++++-- .../arm-batch/src/models/locationMappers.ts | 9 +- sdk/batch/arm-batch/src/models/mappers.ts | 548 +++++++++++++- .../arm-batch/src/models/operationsMappers.ts | 4 +- sdk/batch/arm-batch/src/models/parameters.ts | 5 +- .../src/models/poolOperationsMappers.ts | 11 +- ...vateEndpointConnectionOperationsMappers.ts | 11 +- .../privateLinkResourceOperationsMappers.ts | 11 +- .../src/operations/applicationOperations.ts | 23 +- .../applicationPackageOperations.ts | 30 +- .../src/operations/batchAccountOperations.ts | 154 +++- .../src/operations/certificateOperations.ts | 139 ++-- sdk/batch/arm-batch/src/operations/index.ts | 5 +- .../arm-batch/src/operations/location.ts | 229 +++++- .../arm-batch/src/operations/operations.ts | 16 +- .../src/operations/poolOperations.ts | 141 ++-- .../privateEndpointConnectionOperations.ts | 23 +- .../privateLinkResourceOperations.ts | 23 +- .../test/batchManagementClient.spec.ts | 576 --------------- sdk/batch/arm-batch/test/sample.env | 15 - 30 files changed, 1878 insertions(+), 921 deletions(-) rename sdk/batch/arm-batch/src/{batchManagementClient.ts => batchManagement.ts} (84%) rename sdk/batch/arm-batch/src/{batchManagementClientContext.ts => batchManagementContext.ts} (77%) delete mode 100644 sdk/batch/arm-batch/test/batchManagementClient.spec.ts delete mode 100644 sdk/batch/arm-batch/test/sample.env diff --git a/sdk/batch/arm-batch/LICENSE.txt b/sdk/batch/arm-batch/LICENSE.txt index ea8fb1516028..2d3163745319 100644 --- a/sdk/batch/arm-batch/LICENSE.txt +++ b/sdk/batch/arm-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/arm-batch/README.md b/sdk/batch/arm-batch/README.md index 7b0d748b036c..f8025c6ce58b 100644 --- a/sdk/batch/arm-batch/README.md +++ b/sdk/batch/arm-batch/README.md @@ -1,11 +1,11 @@ -## Azure BatchManagementClient SDK for JavaScript +## Azure BatchManagement SDK for JavaScript -This package contains an isomorphic SDK (runs both in Node.js and in browsers) for BatchManagementClient. +This package contains an isomorphic SDK (runs both in node.js and in browsers) for BatchManagement. ### Currently supported environments - [LTS versions of Node.js](https://nodejs.org/about/releases/) -- Latest versions of Safari, Chrome, Edge, and Firefox. +- Latest versions of Safari, Chrome, Edge and Firefox. ### Prerequisites @@ -21,7 +21,6 @@ Install both packages using the below command: ```bash npm install --save @azure/arm-batch @azure/identity ``` - > **Note**: You may have used either `@azure/ms-rest-nodeauth` or `@azure/ms-rest-browserauth` in the past. These packages are in maintenance mode receiving critical bug fixes, but no new features. If you are on a [Node.js that has LTS status](https://nodejs.org/about/releases/), or are writing a client side browser application, we strongly encourage you to upgrade to `@azure/identity` which uses the latest versions of Azure Active Directory and MSAL APIs and provides more authentication options. @@ -37,20 +36,19 @@ If you are on a [Node.js that has LTS status](https://nodejs.org/about/releases/ In the below samples, we pass the credential and the Azure subscription id to instantiate the client. Once the client is created, explore the operations on it either in your favorite editor or in our [API reference documentation](https://docs.microsoft.com/javascript/api) to get started. - #### nodejs - Authentication, client creation, and get batchAccount as an example written in JavaScript. ##### Sample code ```javascript const { DefaultAzureCredential } = require("@azure/identity"); -const { BatchManagementClient } = require("@azure/arm-batch"); +const { BatchManagement } = require("@azure/arm-batch"); const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]; // Use `DefaultAzureCredential` or any other credential of your choice based on https://aka.ms/azsdk/js/identity/examples // Please note that you can also use credentials from the `@azure/ms-rest-nodeauth` package instead. const creds = new DefaultAzureCredential(); -const client = new BatchManagementClient(creds, subscriptionId); +const client = new BatchManagement(creds, subscriptionId); const resourceGroupName = "testresourceGroupName"; const accountName = "testaccountName"; client.batchAccount.get(resourceGroupName, accountName).then((result) => { @@ -87,9 +85,9 @@ In browser applications, we recommend using the `InteractiveBrowserCredential` t const credential = new InteractiveBrowserCredential( { clientId: "", - tenantId: "" + tenant: "" }); - const client = new Azure.ArmBatch.BatchManagementClient(creds, subscriptionId); + const client = new Azure.ArmBatch.BatchManagement(creds, subscriptionId); const resourceGroupName = "testresourceGroupName"; const accountName = "testaccountName"; client.batchAccount.get(resourceGroupName, accountName).then((result) => { diff --git a/sdk/batch/arm-batch/package.json b/sdk/batch/arm-batch/package.json index 25147b040606..f6ed45f43522 100644 --- a/sdk/batch/arm-batch/package.json +++ b/sdk/batch/arm-batch/package.json @@ -1,13 +1,13 @@ { "name": "@azure/arm-batch", "author": "Microsoft Corporation", - "description": "BatchManagementClient Library with typescript type definitions for node.js and browser.", - "version": "5.1.0", + "description": "BatchManagement Library with typescript type definitions for node.js and browser.", + "version": "6.0.0", "dependencies": { "@azure/ms-rest-azure-js": "^2.1.0", "@azure/ms-rest-js": "^2.2.0", "@azure/core-auth": "^1.1.4", - "tslib": "^2.0.0" + "tslib": "^1.10.0" }, "keywords": [ "node", @@ -18,24 +18,16 @@ ], "license": "MIT", "main": "./dist/arm-batch.js", - "module": "./esm/batchManagementClient.js", - "types": "./esm/batchManagementClient.d.ts", + "module": "./esm/batchManagement.js", + "types": "./esm/batchManagement.d.ts", "devDependencies": { - "@types/chai": "^4.1.6", - "@types/jssha": "^2.0.0", - "@types/mocha": "^7.0.2", - "chai": "^4.2.0", - "dotenv": "^8.2.0", - "mocha": "^7.1.1", - "rollup": "^1.16.3", + "typescript": "^3.6.0", + "rollup": "^1.18.0", "rollup-plugin-node-resolve": "^5.2.0", "rollup-plugin-sourcemaps": "^0.4.2", - "esm": "^3.2.25", - "ts-node": "^8.3.0", - "typescript": "^3.6.0", - "uglify-js": "^3.4.9" + "uglify-js": "^3.6.0" }, - "homepage": "https://github.com/Azure/azure-sdk-for-js", + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/feature/v4/sdk/batch/arm-batch", "repository": { "type": "git", "url": "https://github.com/Azure/azure-sdk-for-js.git" @@ -60,8 +52,7 @@ "scripts": { "build": "tsc && rollup -c rollup.config.js && npm run minify", "minify": "uglifyjs -c -m --comments --source-map \"content='./dist/arm-batch.js.map'\" -o ./dist/arm-batch.min.js ./dist/arm-batch.js", - "prepack": "npm install && npm run build", - "test": "mocha -r esm --require ts-node/register test/*.spec.ts --timeout 1200000 --full-trace" + "prepack": "npm install && npm run build" }, "sideEffects": false, "autoPublish": true diff --git a/sdk/batch/arm-batch/rollup.config.js b/sdk/batch/arm-batch/rollup.config.js index 8d1bc25e71ac..e0eb8061be69 100644 --- a/sdk/batch/arm-batch/rollup.config.js +++ b/sdk/batch/arm-batch/rollup.config.js @@ -6,7 +6,7 @@ import sourcemaps from "rollup-plugin-sourcemaps"; * @type {rollup.RollupFileOptions} */ const config = { - input: "./esm/batchManagementClient.js", + input: "./esm/batchManagement.js", external: [ "@azure/ms-rest-js", "@azure/ms-rest-azure-js" @@ -21,8 +21,8 @@ const config = { "@azure/ms-rest-azure-js": "msRestAzure" }, banner: `/* - * 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/arm-batch/src/batchManagementClient.ts b/sdk/batch/arm-batch/src/batchManagement.ts similarity index 84% rename from sdk/batch/arm-batch/src/batchManagementClient.ts rename to sdk/batch/arm-batch/src/batchManagement.ts index f59a410fc6ff..b66d30aaa247 100644 --- a/sdk/batch/arm-batch/src/batchManagementClient.ts +++ b/sdk/batch/arm-batch/src/batchManagement.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 @@ -13,10 +12,10 @@ import { TokenCredential } from "@azure/core-auth"; import * as Models from "./models"; import * as Mappers from "./models/mappers"; import * as operations from "./operations"; -import { BatchManagementClientContext } from "./batchManagementClientContext"; +import { BatchManagementContext } from "./batchManagementContext"; -class BatchManagementClient extends BatchManagementClientContext { +class BatchManagement extends BatchManagementContext { // Operation groups batchAccount: operations.BatchAccountOperations; applicationPackage: operations.ApplicationPackageOperations; @@ -29,7 +28,7 @@ class BatchManagementClient extends BatchManagementClientContext { pool: operations.PoolOperations; /** - * Initializes a new instance of the BatchManagementClient class. + * Initializes a new instance of the BatchManagement class. * @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 @@ -40,7 +39,7 @@ class BatchManagementClient extends BatchManagementClientContext { * 00000000-0000-0000-0000-000000000000) * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.BatchManagementClientOptions) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.BatchManagementOptions) { super(credentials, subscriptionId, options); this.batchAccount = new operations.BatchAccountOperations(this); this.applicationPackage = new operations.ApplicationPackageOperations(this); @@ -57,8 +56,8 @@ class BatchManagementClient extends BatchManagementClientContext { // Operation Specifications export { - BatchManagementClient, - BatchManagementClientContext, + BatchManagement, + BatchManagementContext, Models as BatchManagementModels, Mappers as BatchManagementMappers }; diff --git a/sdk/batch/arm-batch/src/batchManagementClientContext.ts b/sdk/batch/arm-batch/src/batchManagementContext.ts similarity index 77% rename from sdk/batch/arm-batch/src/batchManagementClientContext.ts rename to sdk/batch/arm-batch/src/batchManagementContext.ts index c24d567fca56..04f01cadba5a 100644 --- a/sdk/batch/arm-batch/src/batchManagementClientContext.ts +++ b/sdk/batch/arm-batch/src/batchManagementContext.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,19 +9,19 @@ import * as Models from "./models"; import * as msRest from "@azure/ms-rest-js"; -import { TokenCredential } from "@azure/core-auth"; import * as msRestAzure from "@azure/ms-rest-azure-js"; +import { TokenCredential } from "@azure/core-auth"; const packageName = "@azure/arm-batch"; -const packageVersion = "5.1.0"; +const packageVersion = "6.0.0"; -export class BatchManagementClientContext extends msRestAzure.AzureServiceClient { +export class BatchManagementContext extends msRestAzure.AzureServiceClient { credentials: msRest.ServiceClientCredentials | TokenCredential; subscriptionId: string; apiVersion?: string; /** - * Initializes a new instance of the BatchManagementClient class. + * Initializes a new instance of the BatchManagement class. * @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 @@ -33,7 +32,7 @@ export class BatchManagementClientContext extends msRestAzure.AzureServiceClient * 00000000-0000-0000-0000-000000000000) * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.BatchManagementClientOptions) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.BatchManagementOptions) { if (credentials == undefined) { throw new Error('\'credentials\' cannot be null.'); } @@ -44,14 +43,14 @@ export class BatchManagementClientContext 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'; + this.apiVersion = '2021-06-01'; this.acceptLanguage = 'en-US'; this.longRunningOperationRetryTimeout = 30; this.baseUri = options.baseUri || this.baseUri || "https://management.azure.com"; @@ -59,10 +58,10 @@ export class BatchManagementClientContext extends msRestAzure.AzureServiceClient this.credentials = credentials; this.subscriptionId = subscriptionId; - 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/arm-batch/src/models/applicationOperationsMappers.ts b/sdk/batch/arm-batch/src/models/applicationOperationsMappers.ts index 5a3c50ebbc1b..f9b0107ab733 100644 --- a/sdk/batch/arm-batch/src/models/applicationOperationsMappers.ts +++ b/sdk/batch/arm-batch/src/models/applicationOperationsMappers.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,17 +21,20 @@ export { BaseResource, BatchAccount, BatchAccountIdentity, + BatchPoolIdentity, Certificate, CertificateCreateOrUpdateParameters, CertificateReference, CIFSMountConfiguration, CloudError, CloudServiceConfiguration, + ComputeNodeIdentityReference, ContainerConfiguration, ContainerRegistry, DataDisk, DeleteCertificateError, DeploymentConfiguration, + DiffDiskSettings, DiskEncryptionConfiguration, EncryptionProperties, EnvironmentSetting, @@ -47,6 +50,8 @@ export { NetworkConfiguration, NetworkSecurityGroupRule, NFSMountConfiguration, + NodePlacementConfiguration, + OSDisk, Pool, PoolEndpointConfiguration, PrivateEndpoint, @@ -64,9 +69,11 @@ export { TaskContainerSettings, TaskSchedulingPolicy, UserAccount, + UserAssignedIdentities, UserIdentity, VirtualMachineConfiguration, VirtualMachineFamilyCoreQuota, + VMExtension, WindowsConfiguration, WindowsUserConfiguration } from "../models/mappers"; diff --git a/sdk/batch/arm-batch/src/models/applicationPackageOperationsMappers.ts b/sdk/batch/arm-batch/src/models/applicationPackageOperationsMappers.ts index a498cd5da71f..eecbc960958b 100644 --- a/sdk/batch/arm-batch/src/models/applicationPackageOperationsMappers.ts +++ b/sdk/batch/arm-batch/src/models/applicationPackageOperationsMappers.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,17 +22,20 @@ export { BaseResource, BatchAccount, BatchAccountIdentity, + BatchPoolIdentity, Certificate, CertificateCreateOrUpdateParameters, CertificateReference, CIFSMountConfiguration, CloudError, CloudServiceConfiguration, + ComputeNodeIdentityReference, ContainerConfiguration, ContainerRegistry, DataDisk, DeleteCertificateError, DeploymentConfiguration, + DiffDiskSettings, DiskEncryptionConfiguration, EncryptionProperties, EnvironmentSetting, @@ -48,6 +51,8 @@ export { NetworkConfiguration, NetworkSecurityGroupRule, NFSMountConfiguration, + NodePlacementConfiguration, + OSDisk, Pool, PoolEndpointConfiguration, PrivateEndpoint, @@ -65,9 +70,11 @@ export { TaskContainerSettings, TaskSchedulingPolicy, UserAccount, + UserAssignedIdentities, UserIdentity, VirtualMachineConfiguration, VirtualMachineFamilyCoreQuota, + VMExtension, WindowsConfiguration, WindowsUserConfiguration } from "../models/mappers"; diff --git a/sdk/batch/arm-batch/src/models/batchAccountOperationsMappers.ts b/sdk/batch/arm-batch/src/models/batchAccountOperationsMappers.ts index 4488249bd7f1..d8c96bb10f1c 100644 --- a/sdk/batch/arm-batch/src/models/batchAccountOperationsMappers.ts +++ b/sdk/batch/arm-batch/src/models/batchAccountOperationsMappers.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. @@ -28,19 +28,24 @@ export { BatchAccountListResult, BatchAccountRegenerateKeyParameters, BatchAccountUpdateParameters, + BatchPoolIdentity, Certificate, CertificateCreateOrUpdateParameters, CertificateReference, CIFSMountConfiguration, CloudError, CloudServiceConfiguration, + ComputeNodeIdentityReference, ContainerConfiguration, ContainerRegistry, DataDisk, DeleteCertificateError, DeploymentConfiguration, + DiffDiskSettings, DiskEncryptionConfiguration, EncryptionProperties, + EndpointDependency, + EndpointDetail, EnvironmentSetting, FixedScaleSettings, ImageReference, @@ -53,6 +58,10 @@ export { NetworkConfiguration, NetworkSecurityGroupRule, NFSMountConfiguration, + NodePlacementConfiguration, + OSDisk, + OutboundEnvironmentEndpoint, + OutboundEnvironmentEndpointCollection, Pool, PoolEndpointConfiguration, PrivateEndpoint, @@ -70,9 +79,11 @@ export { TaskContainerSettings, TaskSchedulingPolicy, UserAccount, + UserAssignedIdentities, UserIdentity, VirtualMachineConfiguration, VirtualMachineFamilyCoreQuota, + VMExtension, WindowsConfiguration, WindowsUserConfiguration } from "../models/mappers"; diff --git a/sdk/batch/arm-batch/src/models/certificateOperationsMappers.ts b/sdk/batch/arm-batch/src/models/certificateOperationsMappers.ts index 65fd32d7dd8f..ebc8d5f0d45c 100644 --- a/sdk/batch/arm-batch/src/models/certificateOperationsMappers.ts +++ b/sdk/batch/arm-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. @@ -21,6 +21,7 @@ export { BaseResource, BatchAccount, BatchAccountIdentity, + BatchPoolIdentity, Certificate, CertificateCancelDeletionHeaders, CertificateCreateHeaders, @@ -32,11 +33,13 @@ export { CIFSMountConfiguration, CloudError, CloudServiceConfiguration, + ComputeNodeIdentityReference, ContainerConfiguration, ContainerRegistry, DataDisk, DeleteCertificateError, DeploymentConfiguration, + DiffDiskSettings, DiskEncryptionConfiguration, EncryptionProperties, EnvironmentSetting, @@ -52,6 +55,8 @@ export { NetworkConfiguration, NetworkSecurityGroupRule, NFSMountConfiguration, + NodePlacementConfiguration, + OSDisk, Pool, PoolEndpointConfiguration, PrivateEndpoint, @@ -69,9 +74,11 @@ export { TaskContainerSettings, TaskSchedulingPolicy, UserAccount, + UserAssignedIdentities, UserIdentity, VirtualMachineConfiguration, VirtualMachineFamilyCoreQuota, + VMExtension, WindowsConfiguration, WindowsUserConfiguration } from "../models/mappers"; diff --git a/sdk/batch/arm-batch/src/models/index.ts b/sdk/batch/arm-batch/src/models/index.ts index 6db72910d857..a43cf115660f 100644 --- a/sdk/batch/arm-batch/src/models/index.ts +++ b/sdk/batch/arm-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. @@ -11,6 +11,17 @@ import * as msRest from "@azure/ms-rest-js"; export { BaseResource, CloudError }; +/** + * 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; +} + /** * The properties related to the auto-storage account. */ @@ -19,6 +30,18 @@ export interface AutoStorageBaseProperties { * The resource ID of the storage account to be used for auto-storage account. */ storageAccountId: string; + /** + * The authentication mode which the Batch service will use to manage the auto-storage account. + * Possible values include: 'StorageKeys', 'BatchAccountManagedIdentity'. Default value: + * 'StorageKeys'. + */ + authenticationMode?: AutoStorageAuthenticationMode; + /** + * The reference to the user assigned identity which compute nodes will use to access + * auto-storage. The identity referenced here must be assigned to pools which have compute nodes + * that need access to auto-storage. + */ + nodeIdentityReference?: ComputeNodeIdentityReference; } /** @@ -68,8 +91,25 @@ export interface KeyVaultReference { } /** - * The identity of the Batch account, if configured. This is only used when the user specifies - * 'Microsoft.KeyVault' as their Batch account encryption configuration. + * The list of associated user identities. + */ +export interface UserAssignedIdentities { + /** + * The principal id of user assigned identity. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly principalId?: string; + /** + * The client id of user assigned identity. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly clientId?: string; +} + +/** + * The identity of the Batch account, if configured. This is used when the user specifies + * 'Microsoft.KeyVault' as their Batch account encryption configuration or when `ManagedIdentity` + * is selected as the auto-storage authentication mode. */ export interface BatchAccountIdentity { /** @@ -86,9 +126,13 @@ export interface BatchAccountIdentity { readonly tenantId?: string; /** * The type of identity used for the Batch account. Possible values include: 'SystemAssigned', - * 'None' + * 'UserAssigned', 'None' */ type: ResourceIdentityType; + /** + * The list of user identities associated with the Batch account. + */ + userAssignedIdentities?: { [propertyName: string]: UserAssignedIdentities }; } /** @@ -130,6 +174,11 @@ export interface BatchAccountCreateParameters { * For additional control, a customer-managed key can be used instead. */ encryption?: EncryptionProperties; + /** + * List of allowed authentication modes for the Batch account that can be used to authenticate + * with the data plane. This does not affect authentication with the control plane. + */ + allowedAuthenticationModes?: AuthenticationMode[]; /** * The identity of the Batch account. */ @@ -341,12 +390,12 @@ export interface BatchAccount extends Resource { */ readonly dedicatedCoreQuotaPerVMFamily?: VirtualMachineFamilyCoreQuota[]; /** - * A value indicating whether the core quota for the Batch Account is enforced per Virtual - * Machine family or not. Batch is transitioning its core quota system for dedicated cores to be - * enforced per Virtual Machine family. During this transitional phase, the dedicated core quota - * per Virtual Machine family may not yet be enforced. If this flag is false, dedicated core - * quota is enforced via the old dedicatedCoreQuota property on the account and does not consider - * Virtual Machine family. If this flag is true, dedicated core quota is enforced via the + * A value indicating whether core quotas per Virtual Machine family are enforced for this + * account. Batch is transitioning its core quota system for dedicated cores to be enforced per + * Virtual Machine family. During this transitional phase, the dedicated core quota per Virtual + * Machine family may not yet be enforced. If this flag is false, dedicated core quota is + * enforced via the old dedicatedCoreQuota property on the account and does not consider Virtual + * Machine family. If this flag is true, dedicated core quota is enforced via the * dedicatedCoreQuotaPerVMFamily property on the account, and the old dedicatedCoreQuota does not * apply. * **NOTE: This property will not be serialized. It can only be populated by the server.** @@ -362,6 +411,12 @@ export interface BatchAccount extends Resource { * serialized. It can only be populated by the server.** */ readonly activeJobAndJobScheduleQuota?: number; + /** + * List of allowed authentication modes for the Batch account that can be used to authenticate + * with the data plane. This does not affect authentication with the control plane. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly allowedAuthenticationModes?: AuthenticationMode[]; /** * The identity of the Batch account. */ @@ -386,6 +441,11 @@ export interface BatchAccountUpdateParameters { * For additional control, a customer-managed key can be used instead. */ encryption?: EncryptionProperties; + /** + * List of allowed authentication modes for the Batch account that can be used to authenticate + * with the data plane. This does not affect authentication with the control plane. + */ + allowedAuthenticationModes?: AuthenticationMode[]; /** * The identity of the Batch account. */ @@ -497,7 +557,7 @@ export interface BatchLocationQuota { } /** - * An interface representing CertificateBaseProperties. + * Base certificate properties. */ export interface CertificateBaseProperties { /** @@ -765,11 +825,16 @@ export interface ContainerRegistry { /** * 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 reference to the user assigned identity to use to access an Azure Container Registry + * instead of username and password. + */ + identityReference?: ComputeNodeIdentityReference; } /** @@ -804,6 +869,94 @@ export interface DiskEncryptionConfiguration { targets?: DiskEncryptionTarget[]; } +/** + * Allocation configuration used by Batch Service to provision the nodes. + * @summary Node placement configuration for batch pools. + */ +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 extensions. + */ + 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 virtual + * machine. + */ +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 which location the operating system + * should be in. 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 virtual machine. + */ +export interface OSDisk { + /** + * Specifies the ephemeral Disk Settings for the operating system disk used by the virtual + * machine. + */ + ephemeralOSDiskSettings?: DiffDiskSettings; +} + /** * An interface representing VirtualMachineConfiguration. * @summary The configuration for compute nodes in a pool based on the Azure Virtual Machines @@ -856,6 +1009,21 @@ 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. Contains configuration for + * ephemeral OSDisk settings. + */ + osDisk?: OSDisk; } /** @@ -1255,20 +1423,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 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. + * 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 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. + * properties are mutually exclusive and one of them must be specified. If the URL points to + * 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, use a managed identity with read permission, or set the ACL for the + * blob or its container to allow public access. */ httpUrl?: string; /** @@ -1297,6 +1464,11 @@ export interface ResourceFile { * 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; } /** @@ -1575,13 +1747,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; /** @@ -1595,6 +1767,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; } /** @@ -1706,6 +1883,22 @@ export interface MountConfiguration { azureFileShareConfiguration?: AzureFileShareConfiguration; } +/** + * The identity of the Batch pool, if configured. If the pool identity is updated during update an + * existing pool, only the new vms which are created after the pool shrinks to 0 will have the + * updated identities + */ +export interface BatchPoolIdentity { + /** + * The type of identity used for the Batch Pool. Possible values include: 'UserAssigned', 'None' + */ + type: PoolIdentityType; + /** + * The list of user identities associated with the Batch pool. + */ + userAssignedIdentities?: { [propertyName: string]: UserAssignedIdentities }; +} + /** * Contains information about a pool. */ @@ -1775,7 +1968,7 @@ export interface Pool extends ProxyResource { */ readonly currentDedicatedNodes?: number; /** - * The number of low priority compute nodes currently in the pool. **NOTE: This property will not + * The number of low-priority compute nodes currently in the pool. **NOTE: This property will not * be serialized. It can only be populated by the server.** */ readonly currentLowPriorityNodes?: number; @@ -1859,6 +2052,47 @@ export interface Pool extends ProxyResource { * CIFS/SMB, and Blobfuse. */ mountConfiguration?: MountConfiguration[]; + /** + * The type of identity used for the Batch Pool. The type of identity used for the Batch Pool. + */ + identity?: BatchPoolIdentity; +} + +/** + * A SKU capability, such as the number of cores. + */ +export interface SkuCapability { + /** + * The name of the feature. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly name?: string; + /** + * The value of the feature. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly value?: string; +} + +/** + * Describes a Batch supported SKU. + */ +export interface SupportedSku { + /** + * The name of the SKU. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly name?: string; + /** + * The family name of the SKU. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly familyName?: string; + /** + * A collection of capabilities which this SKU supports. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly capabilities?: SkuCapability[]; } /** @@ -1893,6 +2127,10 @@ export interface Operation { * The operation name. This is of the format {provider}/{resource}/{operation} */ name?: string; + /** + * Indicates whether the operation is a data action + */ + isDataAction?: boolean; /** * The object that describes the operation. */ @@ -1940,6 +2178,56 @@ export interface CheckNameAvailabilityResult { readonly message?: string; } +/** + * Details about the connection between the Batch service and the endpoint. + */ +export interface EndpointDetail { + /** + * The port an endpoint is connected to. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly port?: number; +} + +/** + * A domain name and connection details used to access a dependency. + */ +export interface EndpointDependency { + /** + * The domain name of the dependency. Domain names may be fully qualified or may contain a * + * wildcard. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly domainName?: string; + /** + * Human-readable supplemental information about the dependency and when it is applicable. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly description?: string; + /** + * The list of connection details for this endpoint. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly endpointDetails?: EndpointDetail[]; +} + +/** + * A collection of related endpoints from the same service for which the Batch service requires + * outbound access. + */ +export interface OutboundEnvironmentEndpoint { + /** + * The type of service that the Batch service connects to. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly category?: string; + /** + * The endpoints for this service to which the Batch service makes outbound calls. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly endpoints?: EndpointDependency[]; +} + /** * Optional Parameters. */ @@ -1950,6 +2238,16 @@ export interface ApplicationPackageListOptionalParams extends msRest.RequestOpti maxresults?: number; } +/** + * Optional Parameters. + */ +export interface ApplicationPackageListNextOptionalParams extends msRest.RequestOptionsBase { + /** + * The maximum number of items to return in the response. + */ + maxresults?: number; +} + /** * Optional Parameters. */ @@ -1970,6 +2268,72 @@ export interface ApplicationListOptionalParams extends msRest.RequestOptionsBase maxresults?: number; } +/** + * Optional Parameters. + */ +export interface ApplicationListNextOptionalParams extends msRest.RequestOptionsBase { + /** + * The maximum number of items to return in the response. + */ + maxresults?: number; +} + +/** + * Optional Parameters. + */ +export interface LocationListSupportedVirtualMachineSkusOptionalParams extends msRest.RequestOptionsBase { + /** + * The maximum number of items to return in the response. + */ + maxresults?: number; + /** + * OData filter expression. Valid properties for filtering are "familyName". + */ + filter?: string; +} + +/** + * Optional Parameters. + */ +export interface LocationListSupportedCloudServiceSkusOptionalParams extends msRest.RequestOptionsBase { + /** + * The maximum number of items to return in the response. + */ + maxresults?: number; + /** + * OData filter expression. Valid properties for filtering are "familyName". + */ + filter?: string; +} + +/** + * Optional Parameters. + */ +export interface LocationListSupportedVirtualMachineSkusNextOptionalParams extends msRest.RequestOptionsBase { + /** + * The maximum number of items to return in the response. + */ + maxresults?: number; + /** + * OData filter expression. Valid properties for filtering are "familyName". + */ + filter?: string; +} + +/** + * Optional Parameters. + */ +export interface LocationListSupportedCloudServiceSkusNextOptionalParams extends msRest.RequestOptionsBase { + /** + * The maximum number of items to return in the response. + */ + maxresults?: number; + /** + * OData filter expression. Valid properties for filtering are "familyName". + */ + filter?: string; +} + /** * Optional Parameters. */ @@ -2022,18 +2386,22 @@ export interface CertificateUpdateOptionalParams extends msRest.RequestOptionsBa /** * Optional Parameters. */ -export interface CertificateBeginCreateOptionalParams extends msRest.RequestOptionsBase { +export interface CertificateListByBatchAccountNextOptionalParams extends msRest.RequestOptionsBase { /** - * The entity state (ETag) version of the certificate to update. A value of "*" can be used to - * apply the operation only if the certificate already exists. If omitted, this operation will - * always be applied. + * The maximum number of items to return in the response. */ - ifMatch?: string; + maxresults?: number; /** - * Set to '*' to allow a new certificate to be created, but to prevent updating an existing - * certificate. Other values will be ignored. + * Comma separated list of properties that should be returned. e.g. + * "properties/provisioningState". Only top level properties under properties/ are valid for + * selection. */ - ifNoneMatch?: string; + select?: string; + /** + * OData filter expression. Valid properties for filtering are "properties/provisioningState", + * "properties/provisioningStateTransitionTime", "name". + */ + filter?: string; } /** @@ -2046,6 +2414,16 @@ export interface PrivateLinkResourceListByBatchAccountOptionalParams extends msR maxresults?: number; } +/** + * Optional Parameters. + */ +export interface PrivateLinkResourceListByBatchAccountNextOptionalParams extends msRest.RequestOptionsBase { + /** + * The maximum number of items to return in the response. + */ + maxresults?: number; +} + /** * Optional Parameters. */ @@ -2078,6 +2456,16 @@ export interface PrivateEndpointConnectionBeginUpdateOptionalParams extends msRe ifMatch?: string; } +/** + * Optional Parameters. + */ +export interface PrivateEndpointConnectionListByBatchAccountNextOptionalParams extends msRest.RequestOptionsBase { + /** + * The maximum number of items to return in the response. + */ + maxresults?: number; +} + /** * Optional Parameters. */ @@ -2140,23 +2528,39 @@ export interface PoolUpdateOptionalParams extends msRest.RequestOptionsBase { /** * Optional Parameters. */ -export interface PoolBeginCreateOptionalParams extends msRest.RequestOptionsBase { +export interface PoolListByBatchAccountNextOptionalParams extends msRest.RequestOptionsBase { /** - * The entity state (ETag) version of the pool to update. A value of "*" can be used to apply the - * operation only if the pool already exists. If omitted, this operation will always be applied. + * The maximum number of items to return in the response. */ - ifMatch?: string; + maxresults?: number; /** - * Set to '*' to allow a new pool to be created, but to prevent updating an existing pool. Other - * values will be ignored. + * Comma separated list of properties that should be returned. e.g. + * "properties/provisioningState". Only top level properties under properties/ are valid for + * selection. */ - ifNoneMatch?: string; + select?: string; + /** + * OData filter expression. Valid properties for filtering are: + * + * name + * properties/allocationState + * properties/allocationStateTransitionTime + * properties/creationTime + * properties/provisioningState + * properties/provisioningStateTransitionTime + * properties/lastModified + * properties/vmSize + * properties/interNodeCommunication + * properties/scaleSettings/autoScale + * properties/scaleSettings/fixedScale + */ + filter?: string; } /** - * An interface representing BatchManagementClientOptions. + * An interface representing BatchManagementOptions. */ -export interface BatchManagementClientOptions extends AzureServiceClientOptions { +export interface BatchManagementOptions extends AzureServiceClientOptions { baseUri?: string; } @@ -2355,6 +2759,18 @@ export interface BatchAccountListResult extends Array { nextLink?: string; } +/** + * @interface + * Values returned by the List operation. + * @extends Array + */ +export interface OutboundEnvironmentEndpointCollection extends Array { + /** + * The continuation token. + */ + nextLink?: string; +} + /** * @interface * The result of performing list application packages. @@ -2379,6 +2795,19 @@ export interface ListApplicationsResult extends Array { nextLink?: string; } +/** + * @interface + * The Batch List supported SKUs operation response. + * @extends Array + */ +export interface SupportedSkusResult extends Array { + /** + * The URL to use for getting the next set of results. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nextLink?: string; +} + /** * @interface * An interface representing the OperationListResult. @@ -2438,6 +2867,14 @@ export interface ListPoolsResult extends Array { nextLink?: string; } +/** + * Defines values for AutoStorageAuthenticationMode. + * Possible values include: 'StorageKeys', 'BatchAccountManagedIdentity' + * @readonly + * @enum {string} + */ +export type AutoStorageAuthenticationMode = 'StorageKeys' | 'BatchAccountManagedIdentity'; + /** * Defines values for KeySource. * Possible values include: 'Microsoft.Batch', 'Microsoft.KeyVault' @@ -2446,6 +2883,14 @@ export interface ListPoolsResult extends Array { */ export type KeySource = 'Microsoft.Batch' | 'Microsoft.KeyVault'; +/** + * Defines values for AuthenticationMode. + * Possible values include: 'SharedKey', 'AAD', 'TaskAuthenticationToken' + * @readonly + * @enum {string} + */ +export type AuthenticationMode = 'SharedKey' | 'AAD' | 'TaskAuthenticationToken'; + /** * Defines values for PoolAllocationMode. * Possible values include: 'BatchService', 'UserSubscription' @@ -2464,11 +2909,11 @@ export type PublicNetworkAccessType = 'Enabled' | 'Disabled'; /** * Defines values for ResourceIdentityType. - * Possible values include: 'SystemAssigned', 'None' + * Possible values include: 'SystemAssigned', 'UserAssigned', 'None' * @readonly * @enum {string} */ -export type ResourceIdentityType = 'SystemAssigned' | 'None'; +export type ResourceIdentityType = 'SystemAssigned' | 'UserAssigned' | 'None'; /** * Defines values for ProvisioningState. @@ -2566,6 +3011,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 ComputeNodeDeallocationOption. * Possible values include: 'Requeue', 'Terminate', 'TaskCompletion', 'RetainedData' @@ -2662,6 +3123,14 @@ export type CertificateStoreLocation = 'CurrentUser' | 'LocalMachine'; */ export type CertificateVisibility = 'StartTask' | 'Task' | 'RemoteUser'; +/** + * Defines values for PoolIdentityType. + * Possible values include: 'UserAssigned', 'None' + * @readonly + * @enum {string} + */ +export type PoolIdentityType = 'UserAssigned' | 'None'; + /** * Defines values for NameAvailabilityReason. * Possible values include: 'Invalid', 'AlreadyExists' @@ -2830,6 +3299,26 @@ export type BatchAccountGetKeysResponse = BatchAccountKeys & { }; }; +/** + * Contains response data for the listOutboundNetworkDependenciesEndpoints operation. + */ +export type BatchAccountListOutboundNetworkDependenciesEndpointsResponse = OutboundEnvironmentEndpointCollection & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: OutboundEnvironmentEndpointCollection; + }; +}; + /** * Contains response data for the listNext operation. */ @@ -2870,6 +3359,26 @@ export type BatchAccountListByResourceGroupNextResponse = BatchAccountListResult }; }; +/** + * Contains response data for the listOutboundNetworkDependenciesEndpointsNext operation. + */ +export type BatchAccountListOutboundNetworkDependenciesEndpointsNextResponse = OutboundEnvironmentEndpointCollection & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: OutboundEnvironmentEndpointCollection; + }; +}; + /** * Contains response data for the activate operation. */ @@ -3090,6 +3599,46 @@ export type LocationGetQuotasResponse = BatchLocationQuota & { }; }; +/** + * Contains response data for the listSupportedVirtualMachineSkus operation. + */ +export type LocationListSupportedVirtualMachineSkusResponse = SupportedSkusResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: SupportedSkusResult; + }; +}; + +/** + * Contains response data for the listSupportedCloudServiceSkus operation. + */ +export type LocationListSupportedCloudServiceSkusResponse = SupportedSkusResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: SupportedSkusResult; + }; +}; + /** * Contains response data for the checkNameAvailability operation. */ @@ -3110,6 +3659,46 @@ export type LocationCheckNameAvailabilityResponse = CheckNameAvailabilityResult }; }; +/** + * Contains response data for the listSupportedVirtualMachineSkusNext operation. + */ +export type LocationListSupportedVirtualMachineSkusNextResponse = SupportedSkusResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: SupportedSkusResult; + }; +}; + +/** + * Contains response data for the listSupportedCloudServiceSkusNext operation. + */ +export type LocationListSupportedCloudServiceSkusNextResponse = SupportedSkusResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: SupportedSkusResult; + }; +}; + /** * Contains response data for the list operation. */ diff --git a/sdk/batch/arm-batch/src/models/locationMappers.ts b/sdk/batch/arm-batch/src/models/locationMappers.ts index ddbec3b47f94..06e0512e1664 100644 --- a/sdk/batch/arm-batch/src/models/locationMappers.ts +++ b/sdk/batch/arm-batch/src/models/locationMappers.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. @@ -10,5 +10,8 @@ export { BatchLocationQuota, CheckNameAvailabilityParameters, CheckNameAvailabilityResult, - CloudError + CloudError, + SkuCapability, + SupportedSku, + SupportedSkusResult } from "../models/mappers"; diff --git a/sdk/batch/arm-batch/src/models/mappers.ts b/sdk/batch/arm-batch/src/models/mappers.ts index cc7d3296b2d5..4e77885b432e 100644 --- a/sdk/batch/arm-batch/src/models/mappers.ts +++ b/sdk/batch/arm-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. @@ -12,6 +12,22 @@ import * as msRest from "@azure/ms-rest-js"; export const CloudError = CloudErrorMapper; export const BaseResource = BaseResourceMapper; +export const ComputeNodeIdentityReference: msRest.CompositeMapper = { + serializedName: "ComputeNodeIdentityReference", + type: { + name: "Composite", + className: "ComputeNodeIdentityReference", + modelProperties: { + resourceId: { + serializedName: "resourceId", + type: { + name: "String" + } + } + } + } +}; + export const AutoStorageBaseProperties: msRest.CompositeMapper = { serializedName: "AutoStorageBaseProperties", type: { @@ -24,6 +40,24 @@ export const AutoStorageBaseProperties: msRest.CompositeMapper = { type: { name: "String" } + }, + authenticationMode: { + serializedName: "authenticationMode", + defaultValue: 'StorageKeys', + type: { + name: "Enum", + allowedValues: [ + "StorageKeys", + "BatchAccountManagedIdentity" + ] + } + }, + nodeIdentityReference: { + serializedName: "nodeIdentityReference", + type: { + name: "Composite", + className: "ComputeNodeIdentityReference" + } } } } @@ -96,6 +130,30 @@ export const KeyVaultReference: msRest.CompositeMapper = { } }; +export const UserAssignedIdentities: msRest.CompositeMapper = { + serializedName: "UserAssignedIdentities", + type: { + name: "Composite", + className: "UserAssignedIdentities", + modelProperties: { + principalId: { + readOnly: true, + serializedName: "principalId", + type: { + name: "String" + } + }, + clientId: { + readOnly: true, + serializedName: "clientId", + type: { + name: "String" + } + } + } + } +}; + export const BatchAccountIdentity: msRest.CompositeMapper = { serializedName: "BatchAccountIdentity", type: { @@ -123,9 +181,22 @@ export const BatchAccountIdentity: msRest.CompositeMapper = { name: "Enum", allowedValues: [ "SystemAssigned", + "UserAssigned", "None" ] } + }, + userAssignedIdentities: { + serializedName: "userAssignedIdentities", + type: { + name: "Dictionary", + value: { + type: { + name: "Composite", + className: "UserAssignedIdentities" + } + } + } } } } @@ -197,6 +268,23 @@ export const BatchAccountCreateParameters: msRest.CompositeMapper = { className: "EncryptionProperties" } }, + allowedAuthenticationModes: { + nullable: true, + serializedName: "properties.allowedAuthenticationModes", + type: { + name: "Sequence", + element: { + type: { + name: "Enum", + allowedValues: [ + "SharedKey", + "AAD", + "TaskAuthenticationToken" + ] + } + } + } + }, identity: { serializedName: "identity", type: { @@ -576,6 +664,24 @@ export const BatchAccount: msRest.CompositeMapper = { name: "Number" } }, + allowedAuthenticationModes: { + nullable: false, + readOnly: true, + serializedName: "properties.allowedAuthenticationModes", + type: { + name: "Sequence", + element: { + type: { + name: "Enum", + allowedValues: [ + "SharedKey", + "AAD", + "TaskAuthenticationToken" + ] + } + } + } + }, identity: { serializedName: "identity", type: { @@ -618,6 +724,23 @@ export const BatchAccountUpdateParameters: msRest.CompositeMapper = { className: "EncryptionProperties" } }, + allowedAuthenticationModes: { + nullable: true, + serializedName: "properties.allowedAuthenticationModes", + type: { + name: "Sequence", + element: { + type: { + name: "Enum", + allowedValues: [ + "SharedKey", + "AAD", + "TaskAuthenticationToken" + ] + } + } + } + }, identity: { serializedName: "identity", type: { @@ -1184,18 +1307,23 @@ export const ContainerRegistry: msRest.CompositeMapper = { } }, userName: { - required: true, serializedName: "username", type: { name: "String" } }, password: { - required: true, serializedName: "password", type: { name: "String" } + }, + identityReference: { + serializedName: "identityReference", + type: { + name: "Composite", + className: "ComputeNodeIdentityReference" + } } } } @@ -1268,6 +1396,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: { @@ -1327,6 +1577,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" + } } } } @@ -1883,6 +2159,13 @@ export const ResourceFile: msRest.CompositeMapper = { type: { name: "String" } + }, + identityReference: { + serializedName: "identityReference", + type: { + name: "Composite", + className: "ComputeNodeIdentityReference" + } } } } @@ -2280,6 +2563,13 @@ export const AzureBlobFileSystemConfiguration: msRest.CompositeMapper = { type: { name: "String" } + }, + identityReference: { + serializedName: "identityReference", + type: { + name: "Composite", + className: "ComputeNodeIdentityReference" + } } } } @@ -2441,6 +2731,39 @@ export const MountConfiguration: msRest.CompositeMapper = { } }; +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: "Dictionary", + value: { + type: { + name: "Composite", + className: "UserAssignedIdentities" + } + } + } + } + } + } +}; + export const Pool: msRest.CompositeMapper = { serializedName: "Pool", type: { @@ -2662,6 +2985,74 @@ export const Pool: msRest.CompositeMapper = { } } } + }, + identity: { + serializedName: "identity", + type: { + name: "Composite", + className: "BatchPoolIdentity" + } + } + } + } +}; + +export const SkuCapability: msRest.CompositeMapper = { + serializedName: "SkuCapability", + type: { + name: "Composite", + className: "SkuCapability", + modelProperties: { + name: { + readOnly: true, + serializedName: "name", + type: { + name: "String" + } + }, + value: { + readOnly: true, + serializedName: "value", + type: { + name: "String" + } + } + } + } +}; + +export const SupportedSku: msRest.CompositeMapper = { + serializedName: "SupportedSku", + type: { + name: "Composite", + className: "SupportedSku", + modelProperties: { + name: { + readOnly: true, + serializedName: "name", + type: { + name: "String" + } + }, + familyName: { + readOnly: true, + serializedName: "familyName", + type: { + name: "String" + } + }, + capabilities: { + readOnly: true, + serializedName: "capabilities", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SkuCapability" + } + } + } } } } @@ -2713,6 +3104,12 @@ export const Operation: msRest.CompositeMapper = { name: "String" } }, + isDataAction: { + serializedName: "isDataAction", + type: { + name: "Boolean" + } + }, display: { serializedName: "display", type: { @@ -2797,6 +3194,90 @@ export const CheckNameAvailabilityResult: msRest.CompositeMapper = { } }; +export const EndpointDetail: msRest.CompositeMapper = { + serializedName: "EndpointDetail", + type: { + name: "Composite", + className: "EndpointDetail", + modelProperties: { + port: { + readOnly: true, + serializedName: "port", + type: { + name: "Number" + } + } + } + } +}; + +export const EndpointDependency: msRest.CompositeMapper = { + serializedName: "EndpointDependency", + type: { + name: "Composite", + className: "EndpointDependency", + modelProperties: { + domainName: { + readOnly: true, + serializedName: "domainName", + type: { + name: "String" + } + }, + description: { + readOnly: true, + serializedName: "description", + type: { + name: "String" + } + }, + endpointDetails: { + readOnly: true, + serializedName: "endpointDetails", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "EndpointDetail" + } + } + } + } + } + } +}; + +export const OutboundEnvironmentEndpoint: msRest.CompositeMapper = { + serializedName: "OutboundEnvironmentEndpoint", + type: { + name: "Composite", + className: "OutboundEnvironmentEndpoint", + modelProperties: { + category: { + readOnly: true, + serializedName: "category", + type: { + name: "String" + } + }, + endpoints: { + readOnly: true, + serializedName: "endpoints", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "EndpointDependency" + } + } + } + } + } + } +}; + export const BatchAccountCreateHeaders: msRest.CompositeMapper = { serializedName: "batchaccount-create-headers", type: { @@ -3079,6 +3560,35 @@ export const BatchAccountListResult: msRest.CompositeMapper = { } }; +export const OutboundEnvironmentEndpointCollection: msRest.CompositeMapper = { + serializedName: "OutboundEnvironmentEndpointCollection", + type: { + name: "Composite", + className: "OutboundEnvironmentEndpointCollection", + modelProperties: { + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "OutboundEnvironmentEndpoint" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + export const ListApplicationPackagesResult: msRest.CompositeMapper = { serializedName: "ListApplicationPackagesResult", type: { @@ -3135,6 +3645,36 @@ export const ListApplicationsResult: msRest.CompositeMapper = { } }; +export const SupportedSkusResult: msRest.CompositeMapper = { + serializedName: "SupportedSkusResult", + type: { + name: "Composite", + className: "SupportedSkusResult", + modelProperties: { + value: { + required: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SupportedSku" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + export const OperationListResult: msRest.CompositeMapper = { serializedName: "OperationListResult", type: { diff --git a/sdk/batch/arm-batch/src/models/operationsMappers.ts b/sdk/batch/arm-batch/src/models/operationsMappers.ts index 689688180be7..938d3e665a23 100644 --- a/sdk/batch/arm-batch/src/models/operationsMappers.ts +++ b/sdk/batch/arm-batch/src/models/operationsMappers.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/arm-batch/src/models/parameters.ts b/sdk/batch/arm-batch/src/models/parameters.ts index 519b835471af..45cfed3924cb 100644 --- a/sdk/batch/arm-batch/src/models/parameters.ts +++ b/sdk/batch/arm-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 diff --git a/sdk/batch/arm-batch/src/models/poolOperationsMappers.ts b/sdk/batch/arm-batch/src/models/poolOperationsMappers.ts index ea9ca581dd23..d51f53d56ff8 100644 --- a/sdk/batch/arm-batch/src/models/poolOperationsMappers.ts +++ b/sdk/batch/arm-batch/src/models/poolOperationsMappers.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,17 +21,20 @@ export { BaseResource, BatchAccount, BatchAccountIdentity, + BatchPoolIdentity, Certificate, CertificateCreateOrUpdateParameters, CertificateReference, CIFSMountConfiguration, CloudError, CloudServiceConfiguration, + ComputeNodeIdentityReference, ContainerConfiguration, ContainerRegistry, DataDisk, DeleteCertificateError, DeploymentConfiguration, + DiffDiskSettings, DiskEncryptionConfiguration, EncryptionProperties, EnvironmentSetting, @@ -47,6 +50,8 @@ export { NetworkConfiguration, NetworkSecurityGroupRule, NFSMountConfiguration, + NodePlacementConfiguration, + OSDisk, Pool, PoolCreateHeaders, PoolDeleteHeaders, @@ -70,9 +75,11 @@ export { TaskContainerSettings, TaskSchedulingPolicy, UserAccount, + UserAssignedIdentities, UserIdentity, VirtualMachineConfiguration, VirtualMachineFamilyCoreQuota, + VMExtension, WindowsConfiguration, WindowsUserConfiguration } from "../models/mappers"; diff --git a/sdk/batch/arm-batch/src/models/privateEndpointConnectionOperationsMappers.ts b/sdk/batch/arm-batch/src/models/privateEndpointConnectionOperationsMappers.ts index a5159c1d441e..ed6683f3d3fc 100644 --- a/sdk/batch/arm-batch/src/models/privateEndpointConnectionOperationsMappers.ts +++ b/sdk/batch/arm-batch/src/models/privateEndpointConnectionOperationsMappers.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,17 +21,20 @@ export { BaseResource, BatchAccount, BatchAccountIdentity, + BatchPoolIdentity, Certificate, CertificateCreateOrUpdateParameters, CertificateReference, CIFSMountConfiguration, CloudError, CloudServiceConfiguration, + ComputeNodeIdentityReference, ContainerConfiguration, ContainerRegistry, DataDisk, DeleteCertificateError, DeploymentConfiguration, + DiffDiskSettings, DiskEncryptionConfiguration, EncryptionProperties, EnvironmentSetting, @@ -47,6 +50,8 @@ export { NetworkConfiguration, NetworkSecurityGroupRule, NFSMountConfiguration, + NodePlacementConfiguration, + OSDisk, Pool, PoolEndpointConfiguration, PrivateEndpoint, @@ -65,9 +70,11 @@ export { TaskContainerSettings, TaskSchedulingPolicy, UserAccount, + UserAssignedIdentities, UserIdentity, VirtualMachineConfiguration, VirtualMachineFamilyCoreQuota, + VMExtension, WindowsConfiguration, WindowsUserConfiguration } from "../models/mappers"; diff --git a/sdk/batch/arm-batch/src/models/privateLinkResourceOperationsMappers.ts b/sdk/batch/arm-batch/src/models/privateLinkResourceOperationsMappers.ts index 69b3e26378ec..c4f8b94ef006 100644 --- a/sdk/batch/arm-batch/src/models/privateLinkResourceOperationsMappers.ts +++ b/sdk/batch/arm-batch/src/models/privateLinkResourceOperationsMappers.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,17 +21,20 @@ export { BaseResource, BatchAccount, BatchAccountIdentity, + BatchPoolIdentity, Certificate, CertificateCreateOrUpdateParameters, CertificateReference, CIFSMountConfiguration, CloudError, CloudServiceConfiguration, + ComputeNodeIdentityReference, ContainerConfiguration, ContainerRegistry, DataDisk, DeleteCertificateError, DeploymentConfiguration, + DiffDiskSettings, DiskEncryptionConfiguration, EncryptionProperties, EnvironmentSetting, @@ -47,6 +50,8 @@ export { NetworkConfiguration, NetworkSecurityGroupRule, NFSMountConfiguration, + NodePlacementConfiguration, + OSDisk, Pool, PoolEndpointConfiguration, PrivateEndpoint, @@ -64,9 +69,11 @@ export { TaskContainerSettings, TaskSchedulingPolicy, UserAccount, + UserAssignedIdentities, UserIdentity, VirtualMachineConfiguration, VirtualMachineFamilyCoreQuota, + VMExtension, WindowsConfiguration, WindowsUserConfiguration } from "../models/mappers"; diff --git a/sdk/batch/arm-batch/src/operations/applicationOperations.ts b/sdk/batch/arm-batch/src/operations/applicationOperations.ts index c96802c24e7e..ad203f91058f 100644 --- a/sdk/batch/arm-batch/src/operations/applicationOperations.ts +++ b/sdk/batch/arm-batch/src/operations/applicationOperations.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 @@ -12,17 +11,17 @@ import * as msRest from "@azure/ms-rest-js"; import * as Models from "../models"; import * as Mappers from "../models/applicationOperationsMappers"; import * as Parameters from "../models/parameters"; -import { BatchManagementClientContext } from "../batchManagementClientContext"; +import { BatchManagementContext } from "../batchManagementContext"; /** Class representing a ApplicationOperations. */ export class ApplicationOperations { - private readonly client: BatchManagementClientContext; + private readonly client: BatchManagementContext; /** * Create a ApplicationOperations. - * @param {BatchManagementClientContext} client Reference to the service client. + * @param {BatchManagementContext} client Reference to the service client. */ - constructor(client: BatchManagementClientContext) { + constructor(client: BatchManagementContext) { this.client = client; } @@ -212,7 +211,7 @@ export class ApplicationOperations { * @param [options] The optional parameters * @returns Promise */ - listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + listNext(nextPageLink: string, options?: Models.ApplicationListNextOptionalParams): Promise; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param callback The callback @@ -223,8 +222,8 @@ export class ApplicationOperations { * @param options The optional parameters * @param callback The callback */ - listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + listNext(nextPageLink: string, options: Models.ApplicationListNextOptionalParams, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: Models.ApplicationListNextOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { nextPageLink, @@ -387,6 +386,10 @@ const listNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.maxresults, + Parameters.apiVersion + ], headerParameters: [ Parameters.acceptLanguage ], diff --git a/sdk/batch/arm-batch/src/operations/applicationPackageOperations.ts b/sdk/batch/arm-batch/src/operations/applicationPackageOperations.ts index 6ec032190c81..96d6bd444590 100644 --- a/sdk/batch/arm-batch/src/operations/applicationPackageOperations.ts +++ b/sdk/batch/arm-batch/src/operations/applicationPackageOperations.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 @@ -12,17 +11,17 @@ import * as msRest from "@azure/ms-rest-js"; import * as Models from "../models"; import * as Mappers from "../models/applicationPackageOperationsMappers"; import * as Parameters from "../models/parameters"; -import { BatchManagementClientContext } from "../batchManagementClientContext"; +import { BatchManagementContext } from "../batchManagementContext"; /** Class representing a ApplicationPackageOperations. */ export class ApplicationPackageOperations { - private readonly client: BatchManagementClientContext; + private readonly client: BatchManagementContext; /** * Create a ApplicationPackageOperations. - * @param {BatchManagementClientContext} client Reference to the service client. + * @param {BatchManagementContext} client Reference to the service client. */ - constructor(client: BatchManagementClientContext) { + constructor(client: BatchManagementContext) { this.client = client; } @@ -73,9 +72,10 @@ export class ApplicationPackageOperations { } /** - * Creates an application package record. The record contains the SAS where the package should be - * uploaded to. Once it is uploaded the `ApplicationPackage` needs to be activated using - * `ApplicationPackageActive` before it can be used. + * Creates an application package record. The record contains a storageUrl where the package should + * be uploaded to. Once it is uploaded the `ApplicationPackage` needs to be activated using + * `ApplicationPackageActive` before it can be used. If the auto storage account was configured to + * use storage keys, the URL returned will contain a SAS. * @param resourceGroupName The name of the resource group that contains the Batch account. * @param accountName The name of the Batch account. * @param applicationName The name of the application. This must be unique within the account. @@ -236,7 +236,7 @@ export class ApplicationPackageOperations { * @param [options] The optional parameters * @returns Promise */ - listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + listNext(nextPageLink: string, options?: Models.ApplicationPackageListNextOptionalParams): Promise; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param callback The callback @@ -247,8 +247,8 @@ export class ApplicationPackageOperations { * @param options The optional parameters * @param callback The callback */ - listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + listNext(nextPageLink: string, options: Models.ApplicationPackageListNextOptionalParams, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: Models.ApplicationPackageListNextOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { nextPageLink, @@ -418,6 +418,10 @@ const listNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.maxresults, + Parameters.apiVersion + ], headerParameters: [ Parameters.acceptLanguage ], diff --git a/sdk/batch/arm-batch/src/operations/batchAccountOperations.ts b/sdk/batch/arm-batch/src/operations/batchAccountOperations.ts index 318548de4ed5..8120e6bbf21f 100644 --- a/sdk/batch/arm-batch/src/operations/batchAccountOperations.ts +++ b/sdk/batch/arm-batch/src/operations/batchAccountOperations.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 @@ -13,17 +12,17 @@ import * as msRestAzure from "@azure/ms-rest-azure-js"; import * as Models from "../models"; import * as Mappers from "../models/batchAccountOperationsMappers"; import * as Parameters from "../models/parameters"; -import { BatchManagementClientContext } from "../batchManagementClientContext"; +import { BatchManagementContext } from "../batchManagementContext"; /** Class representing a BatchAccountOperations. */ export class BatchAccountOperations { - private readonly client: BatchManagementClientContext; + private readonly client: BatchManagementContext; /** * Create a BatchAccountOperations. - * @param {BatchManagementClientContext} client Reference to the service client. + * @param {BatchManagementContext} client Reference to the service client. */ - constructor(client: BatchManagementClientContext) { + constructor(client: BatchManagementContext) { this.client = client; } @@ -179,7 +178,7 @@ export class BatchAccountOperations { /** * Synchronizes access keys for the auto-storage account configured for the specified Batch - * account. + * account, only if storage key authentication is being used. * @param resourceGroupName The name of the resource group that contains the Batch account. * @param accountName The name of the Batch account. * @param [options] The optional parameters @@ -211,7 +210,11 @@ export class BatchAccountOperations { } /** - * Regenerates the specified account key for the Batch account. + * This operation applies only to Batch accounts with allowedAuthenticationModes containing + * 'SharedKey'. If the Batch account doesn't contain 'SharedKey' in its allowedAuthenticationMode, + * clients cannot use shared keys to authenticate, and must use another allowedAuthenticationModes + * instead. In this case, regenerating the keys will fail. + * @summary Regenerates the specified account key for the Batch account. * @param resourceGroupName The name of the resource group that contains the Batch account. * @param accountName The name of the Batch account. * @param keyName The type of account key to regenerate. Possible values include: 'Primary', @@ -250,10 +253,10 @@ export class BatchAccountOperations { } /** - * This operation applies only to Batch accounts created with a poolAllocationMode of - * 'BatchService'. If the Batch account was created with a poolAllocationMode of - * 'UserSubscription', clients cannot use access to keys to authenticate, and must use Azure Active - * Directory instead. In this case, getting the keys will fail. + * This operation applies only to Batch accounts with allowedAuthenticationModes containing + * 'SharedKey'. If the Batch account doesn't contain 'SharedKey' in its allowedAuthenticationMode, + * clients cannot use shared keys to authenticate, and must use another allowedAuthenticationModes + * instead. In this case, getting the keys will fail. * @summary Gets the account keys for the specified Batch account. * @param resourceGroupName The name of the resource group that contains the Batch account. * @param accountName The name of the Batch account. @@ -285,6 +288,43 @@ export class BatchAccountOperations { callback) as Promise; } + /** + * Lists the endpoints that a Batch Compute Node under this Batch Account may call as part of Batch + * service administration. If you are deploying a Pool inside of a virtual network that you + * specify, you must make sure your network allows outbound access to these endpoints. Failure to + * allow access to these endpoints may cause Batch to mark the affected nodes as unusable. For more + * information about creating a pool inside of a virtual network, see + * https://docs.microsoft.com/en-us/azure/batch/batch-virtual-network. + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param [options] The optional parameters + * @returns Promise + */ + listOutboundNetworkDependenciesEndpoints(resourceGroupName: string, accountName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param callback The callback + */ + listOutboundNetworkDependenciesEndpoints(resourceGroupName: string, accountName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param options The optional parameters + * @param callback The callback + */ + listOutboundNetworkDependenciesEndpoints(resourceGroupName: string, accountName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listOutboundNetworkDependenciesEndpoints(resourceGroupName: string, accountName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + accountName, + options + }, + listOutboundNetworkDependenciesEndpointsOperationSpec, + callback) as Promise; + } + /** * Creates a new Batch account with the specified parameters. Existing accounts cannot be updated * with this API and should instead be updated with the Update Batch Account API. @@ -383,6 +423,39 @@ export class BatchAccountOperations { listByResourceGroupNextOperationSpec, callback) as Promise; } + + /** + * Lists the endpoints that a Batch Compute Node under this Batch Account may call as part of Batch + * service administration. If you are deploying a Pool inside of a virtual network that you + * specify, you must make sure your network allows outbound access to these endpoints. Failure to + * allow access to these endpoints may cause Batch to mark the affected nodes as unusable. For more + * information about creating a pool inside of a virtual network, see + * https://docs.microsoft.com/en-us/azure/batch/batch-virtual-network. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listOutboundNetworkDependenciesEndpointsNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listOutboundNetworkDependenciesEndpointsNext(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 + */ + listOutboundNetworkDependenciesEndpointsNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listOutboundNetworkDependenciesEndpointsNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listOutboundNetworkDependenciesEndpointsNextOperationSpec, + callback) as Promise; + } } // Operation Specifications @@ -573,6 +646,31 @@ const getKeysOperationSpec: msRest.OperationSpec = { serializer }; +const listOutboundNetworkDependenciesEndpointsOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/outboundNetworkDependenciesEndpoints", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.accountName1, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.OutboundEnvironmentEndpointCollection + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + const beginCreateOperationSpec: msRest.OperationSpec = { httpMethod: "PUT", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}", @@ -649,6 +747,9 @@ const listNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion + ], headerParameters: [ Parameters.acceptLanguage ], @@ -670,6 +771,9 @@ const listByResourceGroupNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion + ], headerParameters: [ Parameters.acceptLanguage ], @@ -683,3 +787,27 @@ const listByResourceGroupNextOperationSpec: msRest.OperationSpec = { }, serializer }; + +const listOutboundNetworkDependenciesEndpointsNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.OutboundEnvironmentEndpointCollection + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/batch/arm-batch/src/operations/certificateOperations.ts b/sdk/batch/arm-batch/src/operations/certificateOperations.ts index f8517e31854e..5ac4aa9bd78b 100644 --- a/sdk/batch/arm-batch/src/operations/certificateOperations.ts +++ b/sdk/batch/arm-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 @@ -13,17 +12,17 @@ import * as msRestAzure from "@azure/ms-rest-azure-js"; import * as Models from "../models"; import * as Mappers from "../models/certificateOperationsMappers"; import * as Parameters from "../models/parameters"; -import { BatchManagementClientContext } from "../batchManagementClientContext"; +import { BatchManagementContext } from "../batchManagementContext"; /** Class representing a CertificateOperations. */ export class CertificateOperations { - private readonly client: BatchManagementClientContext; + private readonly client: BatchManagementContext; /** * Create a CertificateOperations. - * @param {BatchManagementClientContext} client Reference to the service client. + * @param {BatchManagementContext} client Reference to the service client. */ - constructor(client: BatchManagementClientContext) { + constructor(client: BatchManagementContext) { this.client = client; } @@ -70,9 +69,39 @@ export class CertificateOperations { * @param [options] The optional parameters * @returns Promise */ - create(resourceGroupName: string, accountName: string, certificateName: string, parameters: Models.CertificateCreateOrUpdateParameters, options?: Models.CertificateCreateOptionalParams): Promise { - return this.beginCreate(resourceGroupName,accountName,certificateName,parameters,options) - .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + create(resourceGroupName: string, accountName: string, certificateName: string, parameters: Models.CertificateCreateOrUpdateParameters, options?: Models.CertificateCreateOptionalParams): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param certificateName The identifier for the certificate. This must be made up of algorithm and + * thumbprint separated by a dash, and must match the certificate data in the request. For example + * SHA1-a3d1c5. + * @param parameters Additional parameters for certificate creation. + * @param callback The callback + */ + create(resourceGroupName: string, accountName: string, certificateName: string, parameters: Models.CertificateCreateOrUpdateParameters, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param certificateName The identifier for the certificate. This must be made up of algorithm and + * thumbprint separated by a dash, and must match the certificate data in the request. For example + * SHA1-a3d1c5. + * @param parameters Additional parameters for certificate creation. + * @param options The optional parameters + * @param callback The callback + */ + create(resourceGroupName: string, accountName: string, certificateName: string, parameters: Models.CertificateCreateOrUpdateParameters, options: Models.CertificateCreateOptionalParams, callback: msRest.ServiceCallback): void; + create(resourceGroupName: string, accountName: string, certificateName: string, parameters: Models.CertificateCreateOrUpdateParameters, options?: Models.CertificateCreateOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + accountName, + certificateName, + parameters, + options + }, + createOperationSpec, + callback) as Promise; } /** @@ -226,30 +255,6 @@ export class CertificateOperations { callback) as Promise; } - /** - * Creates a new certificate inside the specified account. - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. - * @param certificateName The identifier for the certificate. This must be made up of algorithm and - * thumbprint separated by a dash, and must match the certificate data in the request. For example - * SHA1-a3d1c5. - * @param parameters Additional parameters for certificate creation. - * @param [options] The optional parameters - * @returns Promise - */ - beginCreate(resourceGroupName: string, accountName: string, certificateName: string, parameters: Models.CertificateCreateOrUpdateParameters, options?: Models.CertificateBeginCreateOptionalParams): Promise { - return this.client.sendLRORequest( - { - resourceGroupName, - accountName, - certificateName, - parameters, - options - }, - beginCreateOperationSpec, - options); - } - /** * Deletes the specified certificate. * @param resourceGroupName The name of the resource group that contains the Batch account. @@ -278,7 +283,7 @@ export class CertificateOperations { * @param [options] The optional parameters * @returns Promise */ - listByBatchAccountNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + listByBatchAccountNext(nextPageLink: string, options?: Models.CertificateListByBatchAccountNextOptionalParams): Promise; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param callback The callback @@ -289,8 +294,8 @@ export class CertificateOperations { * @param options The optional parameters * @param callback The callback */ - listByBatchAccountNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listByBatchAccountNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + listByBatchAccountNext(nextPageLink: string, options: Models.CertificateListByBatchAccountNextOptionalParams, callback: msRest.ServiceCallback): void; + listByBatchAccountNext(nextPageLink: string, options?: Models.CertificateListByBatchAccountNextOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { nextPageLink, @@ -331,8 +336,8 @@ const listByBatchAccountOperationSpec: msRest.OperationSpec = { serializer }; -const updateOperationSpec: msRest.OperationSpec = { - httpMethod: "PATCH", +const createOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/certificates/{certificateName}", urlParameters: [ Parameters.resourceGroupName, @@ -345,6 +350,7 @@ const updateOperationSpec: msRest.OperationSpec = { ], headerParameters: [ Parameters.ifMatch, + Parameters.ifNoneMatch, Parameters.acceptLanguage ], requestBody: { @@ -357,18 +363,18 @@ const updateOperationSpec: msRest.OperationSpec = { responses: { 200: { bodyMapper: Mappers.Certificate, - headersMapper: Mappers.CertificateUpdateHeaders + headersMapper: Mappers.CertificateCreateHeaders }, default: { bodyMapper: Mappers.CloudError, - headersMapper: Mappers.CertificateUpdateHeaders + headersMapper: Mappers.CertificateCreateHeaders } }, serializer }; -const getOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", +const updateOperationSpec: msRest.OperationSpec = { + httpMethod: "PATCH", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/certificates/{certificateName}", urlParameters: [ Parameters.resourceGroupName, @@ -380,24 +386,32 @@ const getOperationSpec: msRest.OperationSpec = { Parameters.apiVersion ], headerParameters: [ + Parameters.ifMatch, Parameters.acceptLanguage ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.CertificateCreateOrUpdateParameters, + required: true + } + }, responses: { 200: { bodyMapper: Mappers.Certificate, - headersMapper: Mappers.CertificateGetHeaders + headersMapper: Mappers.CertificateUpdateHeaders }, default: { bodyMapper: Mappers.CloudError, - headersMapper: Mappers.CertificateGetHeaders + headersMapper: Mappers.CertificateUpdateHeaders } }, serializer }; -const cancelDeletionOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/certificates/{certificateName}/cancelDelete", +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/certificates/{certificateName}", urlParameters: [ Parameters.resourceGroupName, Parameters.accountName1, @@ -413,19 +427,19 @@ const cancelDeletionOperationSpec: msRest.OperationSpec = { responses: { 200: { bodyMapper: Mappers.Certificate, - headersMapper: Mappers.CertificateCancelDeletionHeaders + headersMapper: Mappers.CertificateGetHeaders }, default: { bodyMapper: Mappers.CloudError, - headersMapper: Mappers.CertificateCancelDeletionHeaders + headersMapper: Mappers.CertificateGetHeaders } }, serializer }; -const beginCreateOperationSpec: msRest.OperationSpec = { - httpMethod: "PUT", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/certificates/{certificateName}", +const cancelDeletionOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/certificates/{certificateName}/cancelDelete", urlParameters: [ Parameters.resourceGroupName, Parameters.accountName1, @@ -436,25 +450,16 @@ const beginCreateOperationSpec: msRest.OperationSpec = { Parameters.apiVersion ], headerParameters: [ - Parameters.ifMatch, - Parameters.ifNoneMatch, Parameters.acceptLanguage ], - requestBody: { - parameterPath: "parameters", - mapper: { - ...Mappers.CertificateCreateOrUpdateParameters, - required: true - } - }, responses: { 200: { bodyMapper: Mappers.Certificate, - headersMapper: Mappers.CertificateCreateHeaders + headersMapper: Mappers.CertificateCancelDeletionHeaders }, default: { bodyMapper: Mappers.CloudError, - headersMapper: Mappers.CertificateCreateHeaders + headersMapper: Mappers.CertificateCancelDeletionHeaders } }, serializer @@ -500,6 +505,12 @@ const listByBatchAccountNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.maxresults, + Parameters.select, + Parameters.filter, + Parameters.apiVersion + ], headerParameters: [ Parameters.acceptLanguage ], diff --git a/sdk/batch/arm-batch/src/operations/index.ts b/sdk/batch/arm-batch/src/operations/index.ts index f67d0e2219db..313596fde346 100644 --- a/sdk/batch/arm-batch/src/operations/index.ts +++ b/sdk/batch/arm-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 diff --git a/sdk/batch/arm-batch/src/operations/location.ts b/sdk/batch/arm-batch/src/operations/location.ts index 6efd43a3f585..4205314c53b0 100644 --- a/sdk/batch/arm-batch/src/operations/location.ts +++ b/sdk/batch/arm-batch/src/operations/location.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 @@ -12,17 +11,17 @@ import * as msRest from "@azure/ms-rest-js"; import * as Models from "../models"; import * as Mappers from "../models/locationMappers"; import * as Parameters from "../models/parameters"; -import { BatchManagementClientContext } from "../batchManagementClientContext"; +import { BatchManagementContext } from "../batchManagementContext"; /** Class representing a Location. */ export class Location { - private readonly client: BatchManagementClientContext; + private readonly client: BatchManagementContext; /** * Create a Location. - * @param {BatchManagementClientContext} client Reference to the service client. + * @param {BatchManagementContext} client Reference to the service client. */ - constructor(client: BatchManagementClientContext) { + constructor(client: BatchManagementContext) { this.client = client; } @@ -54,6 +53,62 @@ export class Location { callback) as Promise; } + /** + * Gets the list of Batch supported Virtual Machine VM sizes available at the given location. + * @param locationName The region for which to retrieve Batch service supported SKUs. + * @param [options] The optional parameters + * @returns Promise + */ + listSupportedVirtualMachineSkus(locationName: string, options?: Models.LocationListSupportedVirtualMachineSkusOptionalParams): Promise; + /** + * @param locationName The region for which to retrieve Batch service supported SKUs. + * @param callback The callback + */ + listSupportedVirtualMachineSkus(locationName: string, callback: msRest.ServiceCallback): void; + /** + * @param locationName The region for which to retrieve Batch service supported SKUs. + * @param options The optional parameters + * @param callback The callback + */ + listSupportedVirtualMachineSkus(locationName: string, options: Models.LocationListSupportedVirtualMachineSkusOptionalParams, callback: msRest.ServiceCallback): void; + listSupportedVirtualMachineSkus(locationName: string, options?: Models.LocationListSupportedVirtualMachineSkusOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + locationName, + options + }, + listSupportedVirtualMachineSkusOperationSpec, + callback) as Promise; + } + + /** + * Gets the list of Batch supported Cloud Service VM sizes available at the given location. + * @param locationName The region for which to retrieve Batch service supported SKUs. + * @param [options] The optional parameters + * @returns Promise + */ + listSupportedCloudServiceSkus(locationName: string, options?: Models.LocationListSupportedCloudServiceSkusOptionalParams): Promise; + /** + * @param locationName The region for which to retrieve Batch service supported SKUs. + * @param callback The callback + */ + listSupportedCloudServiceSkus(locationName: string, callback: msRest.ServiceCallback): void; + /** + * @param locationName The region for which to retrieve Batch service supported SKUs. + * @param options The optional parameters + * @param callback The callback + */ + listSupportedCloudServiceSkus(locationName: string, options: Models.LocationListSupportedCloudServiceSkusOptionalParams, callback: msRest.ServiceCallback): void; + listSupportedCloudServiceSkus(locationName: string, options?: Models.LocationListSupportedCloudServiceSkusOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + locationName, + options + }, + listSupportedCloudServiceSkusOperationSpec, + callback) as Promise; + } + /** * Checks whether the Batch account name is available in the specified region. * @param locationName The desired region for the name check. @@ -85,6 +140,62 @@ export class Location { checkNameAvailabilityOperationSpec, callback) as Promise; } + + /** + * Gets the list of Batch supported Virtual Machine VM sizes available at the given location. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listSupportedVirtualMachineSkusNext(nextPageLink: string, options?: Models.LocationListSupportedVirtualMachineSkusNextOptionalParams): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listSupportedVirtualMachineSkusNext(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 + */ + listSupportedVirtualMachineSkusNext(nextPageLink: string, options: Models.LocationListSupportedVirtualMachineSkusNextOptionalParams, callback: msRest.ServiceCallback): void; + listSupportedVirtualMachineSkusNext(nextPageLink: string, options?: Models.LocationListSupportedVirtualMachineSkusNextOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listSupportedVirtualMachineSkusNextOperationSpec, + callback) as Promise; + } + + /** + * Gets the list of Batch supported Cloud Service VM sizes available at the given location. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listSupportedCloudServiceSkusNext(nextPageLink: string, options?: Models.LocationListSupportedCloudServiceSkusNextOptionalParams): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listSupportedCloudServiceSkusNext(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 + */ + listSupportedCloudServiceSkusNext(nextPageLink: string, options: Models.LocationListSupportedCloudServiceSkusNextOptionalParams, callback: msRest.ServiceCallback): void; + listSupportedCloudServiceSkusNext(nextPageLink: string, options?: Models.LocationListSupportedCloudServiceSkusNextOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listSupportedCloudServiceSkusNextOperationSpec, + callback) as Promise; + } } // Operation Specifications @@ -113,6 +224,58 @@ const getQuotasOperationSpec: msRest.OperationSpec = { serializer }; +const listSupportedVirtualMachineSkusOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/providers/Microsoft.Batch/locations/{locationName}/virtualMachineSkus", + urlParameters: [ + Parameters.locationName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.maxresults, + Parameters.filter, + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.SupportedSkusResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listSupportedCloudServiceSkusOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/providers/Microsoft.Batch/locations/{locationName}/cloudServiceSkus", + urlParameters: [ + Parameters.locationName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.maxresults, + Parameters.filter, + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.SupportedSkusResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + const checkNameAvailabilityOperationSpec: msRest.OperationSpec = { httpMethod: "POST", path: "subscriptions/{subscriptionId}/providers/Microsoft.Batch/locations/{locationName}/checkNameAvailability", @@ -145,3 +308,55 @@ const checkNameAvailabilityOperationSpec: msRest.OperationSpec = { }, serializer }; + +const listSupportedVirtualMachineSkusNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.maxresults, + Parameters.filter, + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.SupportedSkusResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listSupportedCloudServiceSkusNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.maxresults, + Parameters.filter, + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.SupportedSkusResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/batch/arm-batch/src/operations/operations.ts b/sdk/batch/arm-batch/src/operations/operations.ts index b4067f9898f6..774b5e4e7d62 100644 --- a/sdk/batch/arm-batch/src/operations/operations.ts +++ b/sdk/batch/arm-batch/src/operations/operations.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 @@ -12,17 +11,17 @@ import * as msRest from "@azure/ms-rest-js"; import * as Models from "../models"; import * as Mappers from "../models/operationsMappers"; import * as Parameters from "../models/parameters"; -import { BatchManagementClientContext } from "../batchManagementClientContext"; +import { BatchManagementContext } from "../batchManagementContext"; /** Class representing a Operations. */ export class Operations { - private readonly client: BatchManagementClientContext; + private readonly client: BatchManagementContext; /** * Create a Operations. - * @param {BatchManagementClientContext} client Reference to the service client. + * @param {BatchManagementContext} client Reference to the service client. */ - constructor(client: BatchManagementClientContext) { + constructor(client: BatchManagementContext) { this.client = client; } @@ -108,6 +107,9 @@ const listNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion + ], headerParameters: [ Parameters.acceptLanguage ], diff --git a/sdk/batch/arm-batch/src/operations/poolOperations.ts b/sdk/batch/arm-batch/src/operations/poolOperations.ts index 14511c788af0..017b9fca9115 100644 --- a/sdk/batch/arm-batch/src/operations/poolOperations.ts +++ b/sdk/batch/arm-batch/src/operations/poolOperations.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 @@ -13,17 +12,17 @@ import * as msRestAzure from "@azure/ms-rest-azure-js"; import * as Models from "../models"; import * as Mappers from "../models/poolOperationsMappers"; import * as Parameters from "../models/parameters"; -import { BatchManagementClientContext } from "../batchManagementClientContext"; +import { BatchManagementContext } from "../batchManagementContext"; /** Class representing a PoolOperations. */ export class PoolOperations { - private readonly client: BatchManagementClientContext; + private readonly client: BatchManagementContext; /** * Create a PoolOperations. - * @param {BatchManagementClientContext} client Reference to the service client. + * @param {BatchManagementContext} client Reference to the service client. */ - constructor(client: BatchManagementClientContext) { + constructor(client: BatchManagementContext) { this.client = client; } @@ -68,9 +67,35 @@ export class PoolOperations { * @param [options] The optional parameters * @returns Promise */ - create(resourceGroupName: string, accountName: string, poolName: string, parameters: Models.Pool, options?: Models.PoolCreateOptionalParams): Promise { - return this.beginCreate(resourceGroupName,accountName,poolName,parameters,options) - .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + create(resourceGroupName: string, accountName: string, poolName: string, parameters: Models.Pool, options?: Models.PoolCreateOptionalParams): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param poolName The pool name. This must be unique within the account. + * @param parameters Additional parameters for pool creation. + * @param callback The callback + */ + create(resourceGroupName: string, accountName: string, poolName: string, parameters: Models.Pool, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param poolName The pool name. This must be unique within the account. + * @param parameters Additional parameters for pool creation. + * @param options The optional parameters + * @param callback The callback + */ + create(resourceGroupName: string, accountName: string, poolName: string, parameters: Models.Pool, options: Models.PoolCreateOptionalParams, callback: msRest.ServiceCallback): void; + create(resourceGroupName: string, accountName: string, poolName: string, parameters: Models.Pool, options?: Models.PoolCreateOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + accountName, + poolName, + parameters, + options + }, + createOperationSpec, + callback) as Promise; } /** @@ -243,28 +268,6 @@ export class PoolOperations { callback) as Promise; } - /** - * Creates a new pool inside the specified account. - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. - * @param poolName The pool name. This must be unique within the account. - * @param parameters Additional parameters for pool creation. - * @param [options] The optional parameters - * @returns Promise - */ - beginCreate(resourceGroupName: string, accountName: string, poolName: string, parameters: Models.Pool, options?: Models.PoolBeginCreateOptionalParams): Promise { - return this.client.sendLRORequest( - { - resourceGroupName, - accountName, - poolName, - parameters, - options - }, - beginCreateOperationSpec, - options); - } - /** * Deletes the specified pool. * @param resourceGroupName The name of the resource group that contains the Batch account. @@ -291,7 +294,7 @@ export class PoolOperations { * @param [options] The optional parameters * @returns Promise */ - listByBatchAccountNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + listByBatchAccountNext(nextPageLink: string, options?: Models.PoolListByBatchAccountNextOptionalParams): Promise; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param callback The callback @@ -302,8 +305,8 @@ export class PoolOperations { * @param options The optional parameters * @param callback The callback */ - listByBatchAccountNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listByBatchAccountNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + listByBatchAccountNext(nextPageLink: string, options: Models.PoolListByBatchAccountNextOptionalParams, callback: msRest.ServiceCallback): void; + listByBatchAccountNext(nextPageLink: string, options?: Models.PoolListByBatchAccountNextOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { nextPageLink, @@ -344,8 +347,8 @@ const listByBatchAccountOperationSpec: msRest.OperationSpec = { serializer }; -const updateOperationSpec: msRest.OperationSpec = { - httpMethod: "PATCH", +const createOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/pools/{poolName}", urlParameters: [ Parameters.resourceGroupName, @@ -358,6 +361,7 @@ const updateOperationSpec: msRest.OperationSpec = { ], headerParameters: [ Parameters.ifMatch, + Parameters.ifNoneMatch, Parameters.acceptLanguage ], requestBody: { @@ -370,18 +374,18 @@ const updateOperationSpec: msRest.OperationSpec = { responses: { 200: { bodyMapper: Mappers.Pool, - headersMapper: Mappers.PoolUpdateHeaders + headersMapper: Mappers.PoolCreateHeaders }, default: { bodyMapper: Mappers.CloudError, - headersMapper: Mappers.PoolUpdateHeaders + headersMapper: Mappers.PoolCreateHeaders } }, serializer }; -const getOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", +const updateOperationSpec: msRest.OperationSpec = { + httpMethod: "PATCH", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/pools/{poolName}", urlParameters: [ Parameters.resourceGroupName, @@ -393,24 +397,32 @@ const getOperationSpec: msRest.OperationSpec = { Parameters.apiVersion ], headerParameters: [ + Parameters.ifMatch, Parameters.acceptLanguage ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.Pool, + required: true + } + }, responses: { 200: { bodyMapper: Mappers.Pool, - headersMapper: Mappers.PoolGetHeaders + headersMapper: Mappers.PoolUpdateHeaders }, default: { bodyMapper: Mappers.CloudError, - headersMapper: Mappers.PoolGetHeaders + headersMapper: Mappers.PoolUpdateHeaders } }, serializer }; -const disableAutoScaleOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/pools/{poolName}/disableAutoScale", +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/pools/{poolName}", urlParameters: [ Parameters.resourceGroupName, Parameters.accountName1, @@ -426,19 +438,19 @@ const disableAutoScaleOperationSpec: msRest.OperationSpec = { responses: { 200: { bodyMapper: Mappers.Pool, - headersMapper: Mappers.PoolDisableAutoScaleHeaders + headersMapper: Mappers.PoolGetHeaders }, default: { bodyMapper: Mappers.CloudError, - headersMapper: Mappers.PoolDisableAutoScaleHeaders + headersMapper: Mappers.PoolGetHeaders } }, serializer }; -const stopResizeOperationSpec: msRest.OperationSpec = { +const disableAutoScaleOperationSpec: msRest.OperationSpec = { httpMethod: "POST", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/pools/{poolName}/stopResize", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/pools/{poolName}/disableAutoScale", urlParameters: [ Parameters.resourceGroupName, Parameters.accountName1, @@ -454,19 +466,19 @@ const stopResizeOperationSpec: msRest.OperationSpec = { responses: { 200: { bodyMapper: Mappers.Pool, - headersMapper: Mappers.PoolStopResizeHeaders + headersMapper: Mappers.PoolDisableAutoScaleHeaders }, default: { bodyMapper: Mappers.CloudError, - headersMapper: Mappers.PoolStopResizeHeaders + headersMapper: Mappers.PoolDisableAutoScaleHeaders } }, serializer }; -const beginCreateOperationSpec: msRest.OperationSpec = { - httpMethod: "PUT", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/pools/{poolName}", +const stopResizeOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/pools/{poolName}/stopResize", urlParameters: [ Parameters.resourceGroupName, Parameters.accountName1, @@ -477,25 +489,16 @@ const beginCreateOperationSpec: msRest.OperationSpec = { Parameters.apiVersion ], headerParameters: [ - Parameters.ifMatch, - Parameters.ifNoneMatch, Parameters.acceptLanguage ], - requestBody: { - parameterPath: "parameters", - mapper: { - ...Mappers.Pool, - required: true - } - }, responses: { 200: { bodyMapper: Mappers.Pool, - headersMapper: Mappers.PoolCreateHeaders + headersMapper: Mappers.PoolStopResizeHeaders }, default: { bodyMapper: Mappers.CloudError, - headersMapper: Mappers.PoolCreateHeaders + headersMapper: Mappers.PoolStopResizeHeaders } }, serializer @@ -541,6 +544,12 @@ const listByBatchAccountNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.maxresults, + Parameters.select, + Parameters.filter, + Parameters.apiVersion + ], headerParameters: [ Parameters.acceptLanguage ], diff --git a/sdk/batch/arm-batch/src/operations/privateEndpointConnectionOperations.ts b/sdk/batch/arm-batch/src/operations/privateEndpointConnectionOperations.ts index 3b6040a9c642..15477071381a 100644 --- a/sdk/batch/arm-batch/src/operations/privateEndpointConnectionOperations.ts +++ b/sdk/batch/arm-batch/src/operations/privateEndpointConnectionOperations.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 @@ -13,17 +12,17 @@ import * as msRestAzure from "@azure/ms-rest-azure-js"; import * as Models from "../models"; import * as Mappers from "../models/privateEndpointConnectionOperationsMappers"; import * as Parameters from "../models/parameters"; -import { BatchManagementClientContext } from "../batchManagementClientContext"; +import { BatchManagementContext } from "../batchManagementContext"; /** Class representing a PrivateEndpointConnectionOperations. */ export class PrivateEndpointConnectionOperations { - private readonly client: BatchManagementClientContext; + private readonly client: BatchManagementContext; /** * Create a PrivateEndpointConnectionOperations. - * @param {BatchManagementClientContext} client Reference to the service client. + * @param {BatchManagementContext} client Reference to the service client. */ - constructor(client: BatchManagementClientContext) { + constructor(client: BatchManagementContext) { this.client = client; } @@ -144,7 +143,7 @@ export class PrivateEndpointConnectionOperations { * @param [options] The optional parameters * @returns Promise */ - listByBatchAccountNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + listByBatchAccountNext(nextPageLink: string, options?: Models.PrivateEndpointConnectionListByBatchAccountNextOptionalParams): Promise; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param callback The callback @@ -155,8 +154,8 @@ export class PrivateEndpointConnectionOperations { * @param options The optional parameters * @param callback The callback */ - listByBatchAccountNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listByBatchAccountNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + listByBatchAccountNext(nextPageLink: string, options: Models.PrivateEndpointConnectionListByBatchAccountNextOptionalParams, callback: msRest.ServiceCallback): void; + listByBatchAccountNext(nextPageLink: string, options?: Models.PrivateEndpointConnectionListByBatchAccountNextOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { nextPageLink, @@ -270,6 +269,10 @@ const listByBatchAccountNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion, + Parameters.maxresults + ], headerParameters: [ Parameters.acceptLanguage ], diff --git a/sdk/batch/arm-batch/src/operations/privateLinkResourceOperations.ts b/sdk/batch/arm-batch/src/operations/privateLinkResourceOperations.ts index d27dfdc6ccfc..9f3ca12c11b8 100644 --- a/sdk/batch/arm-batch/src/operations/privateLinkResourceOperations.ts +++ b/sdk/batch/arm-batch/src/operations/privateLinkResourceOperations.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 @@ -12,17 +11,17 @@ import * as msRest from "@azure/ms-rest-js"; import * as Models from "../models"; import * as Mappers from "../models/privateLinkResourceOperationsMappers"; import * as Parameters from "../models/parameters"; -import { BatchManagementClientContext } from "../batchManagementClientContext"; +import { BatchManagementContext } from "../batchManagementContext"; /** Class representing a PrivateLinkResourceOperations. */ export class PrivateLinkResourceOperations { - private readonly client: BatchManagementClientContext; + private readonly client: BatchManagementContext; /** * Create a PrivateLinkResourceOperations. - * @param {BatchManagementClientContext} client Reference to the service client. + * @param {BatchManagementContext} client Reference to the service client. */ - constructor(client: BatchManagementClientContext) { + constructor(client: BatchManagementContext) { this.client = client; } @@ -103,7 +102,7 @@ export class PrivateLinkResourceOperations { * @param [options] The optional parameters * @returns Promise */ - listByBatchAccountNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + listByBatchAccountNext(nextPageLink: string, options?: Models.PrivateLinkResourceListByBatchAccountNextOptionalParams): Promise; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param callback The callback @@ -114,8 +113,8 @@ export class PrivateLinkResourceOperations { * @param options The optional parameters * @param callback The callback */ - listByBatchAccountNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listByBatchAccountNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + listByBatchAccountNext(nextPageLink: string, options: Models.PrivateLinkResourceListByBatchAccountNextOptionalParams, callback: msRest.ServiceCallback): void; + listByBatchAccountNext(nextPageLink: string, options?: Models.PrivateLinkResourceListByBatchAccountNextOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { nextPageLink, @@ -187,6 +186,10 @@ const listByBatchAccountNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion, + Parameters.maxresults + ], headerParameters: [ Parameters.acceptLanguage ], diff --git a/sdk/batch/arm-batch/test/batchManagementClient.spec.ts b/sdk/batch/arm-batch/test/batchManagementClient.spec.ts deleted file mode 100644 index 974f8dd717bd..000000000000 --- a/sdk/batch/arm-batch/test/batchManagementClient.spec.ts +++ /dev/null @@ -1,576 +0,0 @@ -/* eslint-disable @typescript-eslint/no-non-null-assertion */ -import { BatchManagementClient, BatchManagementModels } from "../src/batchManagementClient"; -import { describe, beforeEach } from "mocha"; -import { assert } from "chai"; -import * as dotenv from "dotenv"; -import * as util from "util"; -import * as fs from "fs"; -import { AuthenticationContext } from "adal-node"; -import { TokenCredentials, RestError, ServiceClient, WebResource } from "@azure/ms-rest-js"; -import { CertificateCreateOrUpdateParameters } from "../src/models"; - -dotenv.config(); - -describe("Batch Management Service", () => { - let client: BatchManagementClient; - let subscriptionId: string; - let clientId: string; - let secret: string; - let tenant: string; - let location: string; - let autoStorage: string; - let batchAccount: string; - let groupName: string; - - async function getAppOnlyToken(clientId, secret) { - const authContext = new AuthenticationContext( - "https://login.microsoftonline.com/microsoft.onmicrosoft.com" - ); - return new Promise((resolve, reject) => { - authContext.acquireTokenWithClientCredentials( - "https://management.core.windows.net/", - clientId, - secret, - (err, token) => { - if (err) { - reject(err); - } else { - resolve(token.accessToken); - } - } - ); - }); - } - - beforeEach(async () => { - subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]!; - location = process.env["AZURE_TEST_LOCATION"]!; - autoStorage = process.env["AZURE_AUTOSTORAGE"]!; - batchAccount = "batchtestnodesdk"; - groupName = util.format("default-azurebatch-%s", location); - clientId = process.env["AZURE_CLIENT_ID"]; - secret = process.env["AZURE_CLIENT_SECRET"]; - tenant = process.env["AZURE_TENANT_ID"]; - - const token = await getAppOnlyToken(clientId, secret); - const tokenCreds = new TokenCredentials(token, "Bearer"); - client = new BatchManagementClient(tokenCreds, subscriptionId); - }); - - describe("operations", () => { - it("should list Batch operations successfully", async () => { - const result = await client.operations.list(); - assert.isNotNull(result); - assert.isAtLeast(result.length, 50); - assert.equal( - result[0].name, - "Microsoft.Batch/batchAccounts/providers/Microsoft.Insights/diagnosticSettings/read" - ); - assert.equal(result[0].origin, "system"); - assert.equal(result[0].display.provider, "Microsoft Batch"); - assert.equal(result[0].display.operation, "Read diagnostic setting"); - }); - - it("should get subscription quota successfully", async () => { - const result = await client.location.getQuotas(location); - assert.exists(result); - assert.equal(result.accountQuota, 1); - }); - - it("should check name available successfully", async () => { - let name = "randombatch8374652387"; - const result = await client.location.checkNameAvailability(location, name); - assert.exists(result); - assert.isTrue(result.nameAvailable); - }); - - it("should create a batch account successfully", async () => { - var resource = util.format( - "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Storage/storageAccounts/%s", - subscriptionId, - groupName, - autoStorage - ); - var params = { location: location, autoStorage: { storageAccountId: resource } }; - const result = await client.batchAccount.create(groupName, batchAccount, params); - assert.exists(result); - assert.equal(result.location, location); - assert.equal(result.poolQuota, 100); - assert.equal(result.dedicatedCoreQuota, 700); - assert.equal(result.lowPriorityCoreQuota, 500); - }); - - it("should add application successfully", async () => { - var params = { allowUpdates: true, displayName: "my_application_name" }; - var options = { parameters: params }; - const result = await client.application.create( - groupName, - batchAccount, - "my_application_id", - options - ); - assert.exists(result); - assert.equal(result.name, "my_application_id"); - }); - - it("should get application successfully", async () => { - const result = await client.application.get(groupName, batchAccount, "my_application_id"); - assert.exists(result); - assert.equal(result.name, "my_application_id"); - assert.equal(result.displayName, "my_application_name"); - }); - - it("should get a list of applications successfully", async () => { - const result = await client.application.list(groupName, batchAccount); - assert.exists(result); - assert.isAtLeast(result.length, 1); - }); - - it("should add application package successfully", async () => { - const result = await client.applicationPackage.create( - groupName, - batchAccount, - "my_application_id", - "v1.0" - ); - assert.exists(result); - assert.equal(result._response.status, 200); - assert.equal(result.name, "v1.0"); - console.log(result); - console.log(__dirname); - fs.writeFileSync(__dirname + "/test_package.zip", "Hey there!"); - var fileContent = fs.createReadStream(__dirname + "/test_package.zip"); - var httpRequest = new WebResource(); - var serviceClient = new ServiceClient(); - httpRequest.method = "PUT"; - httpRequest.headers = {}; - httpRequest.headers["x-ms-blob-type"] = "BlockBlob"; - httpRequest.headers["Content-Length"] = "10"; - httpRequest.url = result.storageUrl; - httpRequest.body = fileContent; - httpRequest.streamedResponse = true; - var upload = serviceClient.sendRequest(httpRequest, function(err, response) { - assert.exists(response); - assert.equal(response.statusCode, 201); - }); - }); - - it("should add second application package successfully", async () => { - const result = await client.applicationPackage.create( - groupName, - batchAccount, - "my_application_id", - "v2.0" - ); - assert.exists(result); - assert.equal(result._response.status, 200); - }); - - it("should list application packages successfully", async () => { - const result = await client.applicationPackage.list( - groupName, - batchAccount, - "my_application_id" - ); - assert.isAtLeast(result.length, 1); - }); - - it("should activate application package successfully", async () => { - const result = await client.applicationPackage.activate( - groupName, - batchAccount, - "my_application_id", - "v1.0", - "zip" - ); - assert.exists(result); - assert.equal(result._response.status, 200); - }); - - it("should fail to activate application package", async () => { - try { - await client.applicationPackage.activate( - groupName, - batchAccount, - "my_application_id", - "v2.0", - "zip" - ); - assert.fail("No error thrown"); - } catch (err) { - if (err instanceof RestError) { - assert.equal(err.response.status, 409); - assert.equal(err.body.code, "ApplicationPackageBlobNotFound"); - } else { - assert.fail(`Caught error but wasn't a RestError: ${err}`); - } - } - }); - - it("should fail to update application", async () => { - var params = { allowUpdates: false, displayName: "my_updated_name", defaultVersion: "v2.0" }; - try { - await client.application.update(groupName, batchAccount, "my_application_id", params); - assert.fail("No error thrown"); - } catch (err) { - if (err instanceof RestError) { - assert.equal(err.response.status, 409); - assert.equal(err.body.code, "RequestedDefaultVersionNotActive"); - } else { - assert.fail(`Caught error but wasn't a RestError: ${err}`); - } - } - }); - - it("should update application successfully", async () => { - var params = { allowUpdates: false, displayName: "my_updated_name", defaultVersion: "v1.0" }; - const result = await client.application.update( - groupName, - batchAccount, - "my_application_id", - params - ); - assert.equal(result._response.status, 200); - }); - - it("should get application package successfully", async () => { - const result = await client.applicationPackage.get( - groupName, - batchAccount, - "my_application_id", - "v1.0" - ); - assert.exists(result); - assert.equal(result._response.status, 200); - }); - - it("should delete application package successfully", async () => { - const result = await client.applicationPackage.deleteMethod( - groupName, - batchAccount, - "my_application_id", - "v1.0" - ); - assert.equal(result._response.status, 200); - }); - - it("should fail to delete application", async () => { - try { - await client.application.deleteMethod(groupName, batchAccount, "my_application_id"); - assert.fail("No error thrown"); - } catch (err) { - if (err instanceof RestError) { - assert.equal(err.response.status, 409); - assert.equal(err.body.code, "ApplicationPackagesNotEmpty"); - } else { - assert.fail(`Caught error but wasn't a RestError: ${err}`); - } - } - }); - - it("should delete second application package successfully", async () => { - const result = await client.applicationPackage.deleteMethod( - groupName, - batchAccount, - "my_application_id", - "v2.0" - ); - assert.equal(result._response.status, 200); - }); - - it("should delete application successfully", async () => { - const result = await client.application.deleteMethod( - groupName, - batchAccount, - "my_application_id" - ); - assert.equal(result._response.status, 200); - }); - - it("should fail to create a batch account due to dupilcate location", async () => { - var params = { location: location }; - try { - await client.batchAccount.create(groupName, "batchtestnodesdk2", params); - assert.fail("No error thrown"); - } catch (err) { - console.log(err); - } - //This fails after the initial create request - so error isn't surfaced. - }); - - it("should fail to create a batch account due to invalid resource group", async () => { - var params = { location: location }; - try { - await client.batchAccount.create("does-not-exist", batchAccount, params); - assert.fail("No error thrown"); - } catch (err) { - if (err instanceof RestError) { - assert.equal(err.response.status, 404); - assert.equal(err.body.code, "ResourceGroupNotFound"); - } else { - assert.fail(`Caught error but wasn't a RestError: ${err}`); - } - } - //This fails on the initial create request - so we can check the error. - }); - - it("should get a specific account info successfully", async () => { - const result = await client.batchAccount.get(groupName, batchAccount); - assert.exists(result); - assert.equal(result.name, batchAccount); - assert.equal(result.location, location); - assert.equal(result._response.status, 200); - }); - - it("should list accounts successfully", async () => { - const result = await client.batchAccount.list(); - assert.exists(result); - assert.isAtLeast(result.length, 1); - var sorted = result.sort(function(a, b) { - if (a.name < b.name) { - return -1; - } - return 1; - }); - assert.equal(sorted[0].name, batchAccount); - assert.equal(sorted[0].location, location); - }); - - it("should list accounts by resource group successfully", async () => { - const result = await client.batchAccount.listByResourceGroup(groupName); - assert.exists(result); - assert.isAtLeast(result.length, 1); - assert.equal(result[0].name, batchAccount); - assert.equal(result[0].location, location); - }); - - it("should get account keys successfully", async () => { - const result = await client.batchAccount.getKeys(groupName, batchAccount); - assert.exists(result); - assert.exists(result.accountName); - assert.exists(result.primary); - assert.exists(result.secondary); - }); - - it("should regenerate keys successfully", async () => { - const result = await client.batchAccount.regenerateKey(groupName, batchAccount, "Primary"); - assert.exists(result); - assert.exists(result.primary); - assert.exists(result.secondary); - }); - - it("should sync auto storage keys successfully", async () => { - const result = await client.batchAccount.synchronizeAutoStorageKeys(groupName, batchAccount); - assert.equal(result._response.status, 204); - }); - - it("should update account successfully", async () => { - var tags = { tags: { Name: "tagName", Value: "tagValue" } }; - const result = await client.batchAccount.update(groupName, batchAccount, tags); - assert.exists(result); - assert.equal(result.tags.Name, "tagName"); - assert.equal(result.tags.Value, "tagValue"); - }); - - it("should add certificate successfully", async () => { - var certificate = "SHA1-cff2ab63c8c955aaf71989efa641b906558d9fb7"; - var parameters: CertificateCreateOrUpdateParameters = { - thumbprint: "cff2ab63c8c955aaf71989efa641b906558d9fb7", - thumbprintAlgorithm: "sha1", - data: - "MIIGMQIBAzCCBe0GCSqGSIb3DQEHAaCCBd4EggXaMIIF1jCCA8AGCSqGSIb3DQEHAaCCA7EEggOtMIIDqTCCA6UGCyqGSIb3DQEMCgECoIICtjCCArIwHAYKKoZIhvcNAQwBAzAOBAhyd3xCtln3iQICB9AEggKQhe5P10V9iV1BsDlwWT561Yu2hVq3JT8ae/ebx1ZR/gMApVereDKkS9Zg4vFyssusHebbK5pDpU8vfAqle0TM4m7wGsRj453ZorSPUfMpHvQnAOn+2pEpWdMThU7xvZ6DVpwhDOQk9166z+KnKdHGuJKh4haMT7Rw/6xZ1rsBt2423cwTrQVMQyACrEkianpuujubKltN99qRoFAxhQcnYE2KlYKw7lRcExq6mDSYAyk5xJZ1ZFdLj6MAryZroQit/0g5eyhoNEKwWbi8px5j71pRTf7yjN+deMGQKwbGl+3OgaL1UZ5fCjypbVL60kpIBxLZwIJ7p3jJ+q9pbq9zSdzshPYor5lxyUfXqaso/0/91ayNoBzg4hQGh618PhFI6RMGjwkzhB9xk74iweJ9HQyIHf8yx2RCSI22JuCMitPMWSGvOszhbNx3AEDLuiiAOHg391mprEtKZguOIr9LrJwem/YmcHbwyz5YAbZmiseKPkllfC7dafFfCFEkj6R2oegIsZo0pEKYisAXBqT0g+6/jGwuhlZcBo0f7UIZm88iA3MrJCjlXEgV5OcQdoWj+hq0lKEdnhtCKr03AIfukN6+4vjjarZeW1bs0swq0l3XFf5RHa11otshMS4mpewshB9iO9MuKWpRxuxeng4PlKZ/zuBqmPeUrjJ9454oK35Pq+dghfemt7AUpBH/KycDNIZgfdEWUZrRKBGnc519C+RTqxyt5hWL18nJk4LvSd3QKlJ1iyJxClhhb/NWEzPqNdyA5cxen+2T9bd/EqJ2KzRv5/BPVwTQkHH9W/TZElFyvFfOFIW2+03RKbVGw72Mr/0xKZ+awAnEfoU+SL/2Gj2m6PHkqFX2sOCi/tN9EA4xgdswEwYJKoZIhvcNAQkVMQYEBAEAAAAwXQYJKwYBBAGCNxEBMVAeTgBNAGkAYwByAG8AcwBvAGYAdAAgAFMAdAByAG8AbgBnACAAQwByAHkAcAB0AG8AZwByAGEAcABoAGkAYwAgAFAAcgBvAHYAaQBkAGUAcjBlBgkqhkiG9w0BCRQxWB5WAFAAdgBrAFQAbQBwADoANABjAGUANgAwADQAZABhAC0AMAA2ADgAMQAtADQANAAxADUALQBhADIAYwBhAC0ANQA3ADcAMwAwADgAZQA2AGQAOQBhAGMwggIOBgkqhkiG9w0BBwGgggH/BIIB+zCCAfcwggHzBgsqhkiG9w0BDAoBA6CCAcswggHHBgoqhkiG9w0BCRYBoIIBtwSCAbMwggGvMIIBXaADAgECAhAdka3aTQsIsUphgIXGUmeRMAkGBSsOAwIdBQAwFjEUMBIGA1UEAxMLUm9vdCBBZ2VuY3kwHhcNMTYwMTAxMDcwMDAwWhcNMTgwMTAxMDcwMDAwWjASMRAwDgYDVQQDEwdub2Rlc2RrMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC5fhcxbJHxxBEIDzVOMc56s04U6k4GPY7yMR1m+rBGVRiAyV4RjY6U936dqXHCVD36ps2Q0Z+OeEgyCInkIyVeB1EwXcToOcyeS2YcUb0vRWZDouC3tuFdHwiK1Ed5iW/LksmXDotyV7kpqzaPhOFiMtBuMEwNJcPge9k17hRgRQIDAQABo0swSTBHBgNVHQEEQDA+gBAS5AktBh0dTwCNYSHcFmRjoRgwFjEUMBIGA1UEAxMLUm9vdCBBZ2VuY3mCEAY3bACqAGSKEc+41KpcNfQwCQYFKw4DAh0FAANBAHl2M97QbpzdnwO5HoRBsiEExOcLTNg+GKCr7HUsbzfvrUivw+JLL7qjHAIc5phnK+F5bQ8HKe0L9YXBSKl+fvwxFTATBgkqhkiG9w0BCRUxBgQEAQAAADA7MB8wBwYFKw4DAhoEFGVtyGMqiBd32fGpzlGZQoRM6UQwBBTI0YHFFqTS4Go8CoLgswn29EiuUQICB9A=", - format: "Pfx", - password: "nodesdk" - }; - const result = await client.certificate.create( - groupName, - batchAccount, - certificate, - parameters - ); - assert.exists(result); - assert.equal(result.name, "sha1-cff2ab63c8c955aaf71989efa641b906558d9fb7"); - }); - - it("should list certificates successfully", async () => { - const result = await client.certificate.listByBatchAccount(groupName, batchAccount); - assert.exists(result); - assert.equal(result.length, 1); - }); - - it("should get certificate successfully", async () => { - var certificate = "SHA1-cff2ab63c8c955aaf71989efa641b906558d9fb7"; - const result = await client.certificate.get(groupName, batchAccount, certificate); - assert.exists(result); - assert.equal(result.name, "sha1-cff2ab63c8c955aaf71989efa641b906558d9fb7"); - assert.equal(result.thumbprintAlgorithm, "sha1"); - assert.equal(result.thumbprint, "cff2ab63c8c955aaf71989efa641b906558d9fb7"); - }); - - it("should update certificate successfully", async () => { - var certificate = "SHA1-cff2ab63c8c955aaf71989efa641b906558d9fb7"; - var parameters: CertificateCreateOrUpdateParameters = { - password: "nodesdk", - data: - "MIIGMQIBAzCCBe0GCSqGSIb3DQEHAaCCBd4EggXaMIIF1jCCA8AGCSqGSIb3DQEHAaCCA7EEggOtMIIDqTCCA6UGCyqGSIb3DQEMCgECoIICtjCCArIwHAYKKoZIhvcNAQwBAzAOBAhyd3xCtln3iQICB9AEggKQhe5P10V9iV1BsDlwWT561Yu2hVq3JT8ae/ebx1ZR/gMApVereDKkS9Zg4vFyssusHebbK5pDpU8vfAqle0TM4m7wGsRj453ZorSPUfMpHvQnAOn+2pEpWdMThU7xvZ6DVpwhDOQk9166z+KnKdHGuJKh4haMT7Rw/6xZ1rsBt2423cwTrQVMQyACrEkianpuujubKltN99qRoFAxhQcnYE2KlYKw7lRcExq6mDSYAyk5xJZ1ZFdLj6MAryZroQit/0g5eyhoNEKwWbi8px5j71pRTf7yjN+deMGQKwbGl+3OgaL1UZ5fCjypbVL60kpIBxLZwIJ7p3jJ+q9pbq9zSdzshPYor5lxyUfXqaso/0/91ayNoBzg4hQGh618PhFI6RMGjwkzhB9xk74iweJ9HQyIHf8yx2RCSI22JuCMitPMWSGvOszhbNx3AEDLuiiAOHg391mprEtKZguOIr9LrJwem/YmcHbwyz5YAbZmiseKPkllfC7dafFfCFEkj6R2oegIsZo0pEKYisAXBqT0g+6/jGwuhlZcBo0f7UIZm88iA3MrJCjlXEgV5OcQdoWj+hq0lKEdnhtCKr03AIfukN6+4vjjarZeW1bs0swq0l3XFf5RHa11otshMS4mpewshB9iO9MuKWpRxuxeng4PlKZ/zuBqmPeUrjJ9454oK35Pq+dghfemt7AUpBH/KycDNIZgfdEWUZrRKBGnc519C+RTqxyt5hWL18nJk4LvSd3QKlJ1iyJxClhhb/NWEzPqNdyA5cxen+2T9bd/EqJ2KzRv5/BPVwTQkHH9W/TZElFyvFfOFIW2+03RKbVGw72Mr/0xKZ+awAnEfoU+SL/2Gj2m6PHkqFX2sOCi/tN9EA4xgdswEwYJKoZIhvcNAQkVMQYEBAEAAAAwXQYJKwYBBAGCNxEBMVAeTgBNAGkAYwByAG8AcwBvAGYAdAAgAFMAdAByAG8AbgBnACAAQwByAHkAcAB0AG8AZwByAGEAcABoAGkAYwAgAFAAcgBvAHYAaQBkAGUAcjBlBgkqhkiG9w0BCRQxWB5WAFAAdgBrAFQAbQBwADoANABjAGUANgAwADQAZABhAC0AMAA2ADgAMQAtADQANAAxADUALQBhADIAYwBhAC0ANQA3ADcAMwAwADgAZQA2AGQAOQBhAGMwggIOBgkqhkiG9w0BBwGgggH/BIIB+zCCAfcwggHzBgsqhkiG9w0BDAoBA6CCAcswggHHBgoqhkiG9w0BCRYBoIIBtwSCAbMwggGvMIIBXaADAgECAhAdka3aTQsIsUphgIXGUmeRMAkGBSsOAwIdBQAwFjEUMBIGA1UEAxMLUm9vdCBBZ2VuY3kwHhcNMTYwMTAxMDcwMDAwWhcNMTgwMTAxMDcwMDAwWjASMRAwDgYDVQQDEwdub2Rlc2RrMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC5fhcxbJHxxBEIDzVOMc56s04U6k4GPY7yMR1m+rBGVRiAyV4RjY6U936dqXHCVD36ps2Q0Z+OeEgyCInkIyVeB1EwXcToOcyeS2YcUb0vRWZDouC3tuFdHwiK1Ed5iW/LksmXDotyV7kpqzaPhOFiMtBuMEwNJcPge9k17hRgRQIDAQABo0swSTBHBgNVHQEEQDA+gBAS5AktBh0dTwCNYSHcFmRjoRgwFjEUMBIGA1UEAxMLUm9vdCBBZ2VuY3mCEAY3bACqAGSKEc+41KpcNfQwCQYFKw4DAh0FAANBAHl2M97QbpzdnwO5HoRBsiEExOcLTNg+GKCr7HUsbzfvrUivw+JLL7qjHAIc5phnK+F5bQ8HKe0L9YXBSKl+fvwxFTATBgkqhkiG9w0BCRUxBgQEAQAAADA7MB8wBwYFKw4DAhoEFGVtyGMqiBd32fGpzlGZQoRM6UQwBBTI0YHFFqTS4Go8CoLgswn29EiuUQICB9A=" - }; - const result = await client.certificate.update( - groupName, - batchAccount, - certificate, - parameters - ); - assert.exists(result); - assert.equal(result.name, "sha1-cff2ab63c8c955aaf71989efa641b906558d9fb7"); - }); - - it("shoud delete certificate successfully", async () => { - var certificate = "SHA1-cff2ab63c8c955aaf71989efa641b906558d9fb7"; - const result = await client.certificate.deleteMethod(groupName, batchAccount, certificate); - }); - - it("should create a paas pool successfully", async () => { - var paas_pool = "test_paas_pool"; - var parameters = { - displayName: "test_pool", - vmSize: "small", - deploymentConfiguration: { - cloudServiceConfiguration: { - osFamily: "5" - } - }, - startTask: { - commandLine: 'cmd.exe /c "echo hello world"', - resourceFiles: [{ httpUrl: "https://blobsource.com", filePath: "filename.txt" }], - environmentSettings: [{ name: "ENV_VAR", value: "foo" }], - userIdentity: { - autoUser: { - elevationLevel: "admin" - } - } - }, - userAccounts: [{ name: "UserName", password: "p@55wOrd" }], - scaleSettings: { - fixedScale: { - targetDedicatedNodes: 0, - targetLowPriorityNodes: 0 - } - } - }; - const result = await client.pool.create(groupName, batchAccount, paas_pool, parameters); - assert.exists(result); - assert.equal(result.name, paas_pool); - }); - - it("should create a iaas pool successfully", async () => { - var iaas_pool = "test_iaas_pool"; - var parameters = { - displayName: "test_pool", - vmSize: "Standard_A1", - deploymentConfiguration: { - virtualMachineConfiguration: { - imageReference: { - publisher: "MicrosoftWindowsServer", - offer: "WindowsServer", - sku: "2016-Datacenter-smalldisk" - }, - nodeAgentSkuId: "batch.node.windows amd64", - windowsConfiguration: { enableAutomaticUpdates: true } - } - }, - scaleSettings: { - fixedScale: { - targetDedicatedNodes: 0, - targetLowPriorityNodes: 0 - } - } - }; - const result = await client.pool.create(groupName, batchAccount, iaas_pool, parameters); - assert.exists(result); - assert.equal(result.name, iaas_pool); - }); - - it("should list pools successfully", async () => { - const result = await client.pool.listByBatchAccount(groupName, batchAccount); - assert.exists(result); - assert.equal(result.length, 2); - }); - - it("should update pool successfully", async () => { - var iaas_pool = "test_iaas_pool"; - var parameters = { - autoScale: { - formula: "$TargetDedicatedNodes=1" - } - }; - const result = await client.pool.update(groupName, batchAccount, iaas_pool, parameters); - assert.exists(result); - assert.equal(result.name, iaas_pool); - }); - - it("should get pool successfully", async () => { - var iaas_pool = "test_iaas_pool"; - const result = await client.pool.get(groupName, batchAccount, iaas_pool); - assert.exists(result); - assert.equal(result.name, iaas_pool); - assert.equal(result.vmSize, "STANDARD_A1"); - }); - - it("should delete pool successfully", async () => { - var iaas_pool = "test_iaas_pool"; - await client.pool.deleteMethod(groupName, batchAccount, iaas_pool); - var paas_pool = "test_paas_pool"; - await client.pool.deleteMethod(groupName, batchAccount, paas_pool); - }); - - it("should delete a batch account successfully", async () => { - const result = await client.batchAccount.deleteMethod(groupName, batchAccount); - }); - - it("should fail to create a BYOS account with bad KeyVault properties", async () => { - var byosAccountName = "batchtestnodesdkbyos"; - var allocationMode = "UserSubscription"; - - // Omit keyVaultReference - var params = { - location: location, - poolAllocationMode: allocationMode - }; - - try { - await client.batchAccount.create(groupName, byosAccountName, params); - assert.fail("No error thrown"); - } catch (err) { - if (err instanceof RestError) { - assert.equal(err.response.status, 400); - assert.equal(err.body.code, "InvalidRequestBody"); - } else { - assert.fail(`Caught error but wasn't a RestError: ${err}`); - } - } - - // Use malformed key vault parameter values - var params1 = { - location: location, - poolAllocationMode: allocationMode, - keyVaultReference: { - id: "abc", - url: "def" - } - }; - - try { - await client.batchAccount.create(groupName, byosAccountName, params1); - assert.fail("No error thrown"); - } catch (err) { - console.log(err); - if (err instanceof RestError) { - assert.equal(err.response.status, 400); - assert.equal(err.body.code, "LinkedInvalidPropertyId"); - } else { - assert.fail(`Caught error but wasn't a RestError: ${err}`); - } - } - }); - }); -}); diff --git a/sdk/batch/arm-batch/test/sample.env b/sdk/batch/arm-batch/test/sample.env deleted file mode 100644 index d5472d5d1ed2..000000000000 --- a/sdk/batch/arm-batch/test/sample.env +++ /dev/null @@ -1,15 +0,0 @@ -# First create a Service Principal for the subscription you wish to test against. -# Follow the instructions here on creating a Service Principal using the Azure CLI: -# https://github.com/Azure/azure-sdk-for-node/blob/master/Documentation/Authentication.md -AZURE_SUBSCRIPTION_ID= -AZURE_CLIENT_ID= -AZURE_CLIENT_SECRET= -AZURE_TENANT_ID= -# The tests are configured by default to run with in japaneast, using a resource group of -# 'default-azurebatch-japaneast'. To change this location set: -AZURE_TEST_LOCATION="japaneast" -# The tests require a storage account to be configured. Using the CLI: -# >> az storage account create -n -l -g --sku Standard_LRS -# The tests have been configured against nodesdkteststorage. If you have set up -# a different name, then set this var: -AZURE_AUTOSTORAGE="nodesdkteststorage" \ No newline at end of file From 988b931550c088002468203db8464642ca108763 Mon Sep 17 00:00:00 2001 From: colawwj Date: Fri, 30 Jul 2021 10:31:40 +0800 Subject: [PATCH 2/3] update --- sdk/batch/arm-batch/README.md | 10 +++++----- sdk/batch/arm-batch/package.json | 8 ++++---- sdk/batch/arm-batch/rollup.config.js | 2 +- .../{batchManagement.ts => batchManagementClient.ts} | 12 ++++++------ ...entContext.ts => batchManagementClientContext.ts} | 6 +++--- sdk/batch/arm-batch/src/models/index.ts | 12 ++++++------ sdk/batch/arm-batch/src/models/mappers.ts | 12 ++++++------ .../src/operations/applicationOperations.ts | 8 ++++---- .../src/operations/applicationPackageOperations.ts | 8 ++++---- .../src/operations/batchAccountOperations.ts | 8 ++++---- .../src/operations/certificateOperations.ts | 8 ++++---- sdk/batch/arm-batch/src/operations/location.ts | 8 ++++---- sdk/batch/arm-batch/src/operations/operations.ts | 8 ++++---- sdk/batch/arm-batch/src/operations/poolOperations.ts | 8 ++++---- .../privateEndpointConnectionOperations.ts | 8 ++++---- .../src/operations/privateLinkResourceOperations.ts | 8 ++++---- 16 files changed, 67 insertions(+), 67 deletions(-) rename sdk/batch/arm-batch/src/{batchManagement.ts => batchManagementClient.ts} (89%) rename sdk/batch/arm-batch/src/{batchManagementContext.ts => batchManagementClientContext.ts} (93%) diff --git a/sdk/batch/arm-batch/README.md b/sdk/batch/arm-batch/README.md index f8025c6ce58b..dea98e284e4a 100644 --- a/sdk/batch/arm-batch/README.md +++ b/sdk/batch/arm-batch/README.md @@ -1,6 +1,6 @@ -## Azure BatchManagement SDK for JavaScript +## Azure BatchManagementClient SDK for JavaScript -This package contains an isomorphic SDK (runs both in node.js and in browsers) for BatchManagement. +This package contains an isomorphic SDK (runs both in node.js and in browsers) for BatchManagementClient. ### Currently supported environments @@ -42,13 +42,13 @@ Once the client is created, explore the operations on it either in your favorite ```javascript const { DefaultAzureCredential } = require("@azure/identity"); -const { BatchManagement } = require("@azure/arm-batch"); +const { BatchManagementClient } = require("@azure/arm-batch"); const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]; // Use `DefaultAzureCredential` or any other credential of your choice based on https://aka.ms/azsdk/js/identity/examples // Please note that you can also use credentials from the `@azure/ms-rest-nodeauth` package instead. const creds = new DefaultAzureCredential(); -const client = new BatchManagement(creds, subscriptionId); +const client = new BatchManagementClient(creds, subscriptionId); const resourceGroupName = "testresourceGroupName"; const accountName = "testaccountName"; client.batchAccount.get(resourceGroupName, accountName).then((result) => { @@ -87,7 +87,7 @@ In browser applications, we recommend using the `InteractiveBrowserCredential` t clientId: "", tenant: "" }); - const client = new Azure.ArmBatch.BatchManagement(creds, subscriptionId); + const client = new Azure.ArmBatch.BatchManagementClient(creds, subscriptionId); const resourceGroupName = "testresourceGroupName"; const accountName = "testaccountName"; client.batchAccount.get(resourceGroupName, accountName).then((result) => { diff --git a/sdk/batch/arm-batch/package.json b/sdk/batch/arm-batch/package.json index f6ed45f43522..f2971a643e0f 100644 --- a/sdk/batch/arm-batch/package.json +++ b/sdk/batch/arm-batch/package.json @@ -1,7 +1,7 @@ { "name": "@azure/arm-batch", "author": "Microsoft Corporation", - "description": "BatchManagement Library with typescript type definitions for node.js and browser.", + "description": "BatchManagementClient Library with typescript type definitions for node.js and browser.", "version": "6.0.0", "dependencies": { "@azure/ms-rest-azure-js": "^2.1.0", @@ -18,8 +18,8 @@ ], "license": "MIT", "main": "./dist/arm-batch.js", - "module": "./esm/batchManagement.js", - "types": "./esm/batchManagement.d.ts", + "module": "./esm/batchManagementClient.js", + "types": "./esm/batchManagementClient.d.ts", "devDependencies": { "typescript": "^3.6.0", "rollup": "^1.18.0", @@ -27,7 +27,7 @@ "rollup-plugin-sourcemaps": "^0.4.2", "uglify-js": "^3.6.0" }, - "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/feature/v4/sdk/batch/arm-batch", + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/batch/arm-batch", "repository": { "type": "git", "url": "https://github.com/Azure/azure-sdk-for-js.git" diff --git a/sdk/batch/arm-batch/rollup.config.js b/sdk/batch/arm-batch/rollup.config.js index e0eb8061be69..8d189bb7fa9b 100644 --- a/sdk/batch/arm-batch/rollup.config.js +++ b/sdk/batch/arm-batch/rollup.config.js @@ -6,7 +6,7 @@ import sourcemaps from "rollup-plugin-sourcemaps"; * @type {rollup.RollupFileOptions} */ const config = { - input: "./esm/batchManagement.js", + input: "./esm/batchManagementClient.js", external: [ "@azure/ms-rest-js", "@azure/ms-rest-azure-js" diff --git a/sdk/batch/arm-batch/src/batchManagement.ts b/sdk/batch/arm-batch/src/batchManagementClient.ts similarity index 89% rename from sdk/batch/arm-batch/src/batchManagement.ts rename to sdk/batch/arm-batch/src/batchManagementClient.ts index b66d30aaa247..466def3d7c18 100644 --- a/sdk/batch/arm-batch/src/batchManagement.ts +++ b/sdk/batch/arm-batch/src/batchManagementClient.ts @@ -12,10 +12,10 @@ import { TokenCredential } from "@azure/core-auth"; import * as Models from "./models"; import * as Mappers from "./models/mappers"; import * as operations from "./operations"; -import { BatchManagementContext } from "./batchManagementContext"; +import { BatchManagementClientContext } from "./batchManagementClientContext"; -class BatchManagement extends BatchManagementContext { +class BatchManagementClient extends BatchManagementClientContext { // Operation groups batchAccount: operations.BatchAccountOperations; applicationPackage: operations.ApplicationPackageOperations; @@ -28,7 +28,7 @@ class BatchManagement extends BatchManagementContext { pool: operations.PoolOperations; /** - * Initializes a new instance of the BatchManagement class. + * Initializes a new instance of the BatchManagementClient class. * @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 @@ -39,7 +39,7 @@ class BatchManagement extends BatchManagementContext { * 00000000-0000-0000-0000-000000000000) * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.BatchManagementOptions) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.BatchManagementClientOptions) { super(credentials, subscriptionId, options); this.batchAccount = new operations.BatchAccountOperations(this); this.applicationPackage = new operations.ApplicationPackageOperations(this); @@ -56,8 +56,8 @@ class BatchManagement extends BatchManagementContext { // Operation Specifications export { - BatchManagement, - BatchManagementContext, + BatchManagementClient, + BatchManagementClientContext, Models as BatchManagementModels, Mappers as BatchManagementMappers }; diff --git a/sdk/batch/arm-batch/src/batchManagementContext.ts b/sdk/batch/arm-batch/src/batchManagementClientContext.ts similarity index 93% rename from sdk/batch/arm-batch/src/batchManagementContext.ts rename to sdk/batch/arm-batch/src/batchManagementClientContext.ts index 04f01cadba5a..5ee650d7828f 100644 --- a/sdk/batch/arm-batch/src/batchManagementContext.ts +++ b/sdk/batch/arm-batch/src/batchManagementClientContext.ts @@ -15,13 +15,13 @@ import { TokenCredential } from "@azure/core-auth"; const packageName = "@azure/arm-batch"; const packageVersion = "6.0.0"; -export class BatchManagementContext extends msRestAzure.AzureServiceClient { +export class BatchManagementClientContext extends msRestAzure.AzureServiceClient { credentials: msRest.ServiceClientCredentials | TokenCredential; subscriptionId: string; apiVersion?: string; /** - * Initializes a new instance of the BatchManagement class. + * Initializes a new instance of the BatchManagementClient class. * @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 @@ -32,7 +32,7 @@ export class BatchManagementContext extends msRestAzure.AzureServiceClient { * 00000000-0000-0000-0000-000000000000) * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.BatchManagementOptions) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.BatchManagementClientOptions) { if (credentials == undefined) { throw new Error('\'credentials\' cannot be null.'); } diff --git a/sdk/batch/arm-batch/src/models/index.ts b/sdk/batch/arm-batch/src/models/index.ts index a43cf115660f..f6f7aed030d7 100644 --- a/sdk/batch/arm-batch/src/models/index.ts +++ b/sdk/batch/arm-batch/src/models/index.ts @@ -818,10 +818,6 @@ export interface DataDisk { * @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. */ @@ -830,6 +826,10 @@ export interface ContainerRegistry { * The password to log into the registry server. */ 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. @@ -2558,9 +2558,9 @@ export interface PoolListByBatchAccountNextOptionalParams extends msRest.Request } /** - * An interface representing BatchManagementOptions. + * An interface representing BatchManagementClientOptions. */ -export interface BatchManagementOptions extends AzureServiceClientOptions { +export interface BatchManagementClientOptions extends AzureServiceClientOptions { baseUri?: string; } diff --git a/sdk/batch/arm-batch/src/models/mappers.ts b/sdk/batch/arm-batch/src/models/mappers.ts index 4e77885b432e..308466feacdf 100644 --- a/sdk/batch/arm-batch/src/models/mappers.ts +++ b/sdk/batch/arm-batch/src/models/mappers.ts @@ -1300,12 +1300,6 @@ export const ContainerRegistry: msRest.CompositeMapper = { name: "Composite", className: "ContainerRegistry", modelProperties: { - registryServer: { - serializedName: "registryServer", - type: { - name: "String" - } - }, userName: { serializedName: "username", type: { @@ -1318,6 +1312,12 @@ export const ContainerRegistry: msRest.CompositeMapper = { name: "String" } }, + registryServer: { + serializedName: "registryServer", + type: { + name: "String" + } + }, identityReference: { serializedName: "identityReference", type: { diff --git a/sdk/batch/arm-batch/src/operations/applicationOperations.ts b/sdk/batch/arm-batch/src/operations/applicationOperations.ts index ad203f91058f..19bc1d92b35d 100644 --- a/sdk/batch/arm-batch/src/operations/applicationOperations.ts +++ b/sdk/batch/arm-batch/src/operations/applicationOperations.ts @@ -11,17 +11,17 @@ import * as msRest from "@azure/ms-rest-js"; import * as Models from "../models"; import * as Mappers from "../models/applicationOperationsMappers"; import * as Parameters from "../models/parameters"; -import { BatchManagementContext } from "../batchManagementContext"; +import { BatchManagementClientContext } from "../batchManagementClientContext"; /** Class representing a ApplicationOperations. */ export class ApplicationOperations { - private readonly client: BatchManagementContext; + private readonly client: BatchManagementClientContext; /** * Create a ApplicationOperations. - * @param {BatchManagementContext} client Reference to the service client. + * @param {BatchManagementClientContext} client Reference to the service client. */ - constructor(client: BatchManagementContext) { + constructor(client: BatchManagementClientContext) { this.client = client; } diff --git a/sdk/batch/arm-batch/src/operations/applicationPackageOperations.ts b/sdk/batch/arm-batch/src/operations/applicationPackageOperations.ts index 96d6bd444590..3b383c7c7314 100644 --- a/sdk/batch/arm-batch/src/operations/applicationPackageOperations.ts +++ b/sdk/batch/arm-batch/src/operations/applicationPackageOperations.ts @@ -11,17 +11,17 @@ import * as msRest from "@azure/ms-rest-js"; import * as Models from "../models"; import * as Mappers from "../models/applicationPackageOperationsMappers"; import * as Parameters from "../models/parameters"; -import { BatchManagementContext } from "../batchManagementContext"; +import { BatchManagementClientContext } from "../batchManagementClientContext"; /** Class representing a ApplicationPackageOperations. */ export class ApplicationPackageOperations { - private readonly client: BatchManagementContext; + private readonly client: BatchManagementClientContext; /** * Create a ApplicationPackageOperations. - * @param {BatchManagementContext} client Reference to the service client. + * @param {BatchManagementClientContext} client Reference to the service client. */ - constructor(client: BatchManagementContext) { + constructor(client: BatchManagementClientContext) { this.client = client; } diff --git a/sdk/batch/arm-batch/src/operations/batchAccountOperations.ts b/sdk/batch/arm-batch/src/operations/batchAccountOperations.ts index 8120e6bbf21f..21038c841d11 100644 --- a/sdk/batch/arm-batch/src/operations/batchAccountOperations.ts +++ b/sdk/batch/arm-batch/src/operations/batchAccountOperations.ts @@ -12,17 +12,17 @@ import * as msRestAzure from "@azure/ms-rest-azure-js"; import * as Models from "../models"; import * as Mappers from "../models/batchAccountOperationsMappers"; import * as Parameters from "../models/parameters"; -import { BatchManagementContext } from "../batchManagementContext"; +import { BatchManagementClientContext } from "../batchManagementClientContext"; /** Class representing a BatchAccountOperations. */ export class BatchAccountOperations { - private readonly client: BatchManagementContext; + private readonly client: BatchManagementClientContext; /** * Create a BatchAccountOperations. - * @param {BatchManagementContext} client Reference to the service client. + * @param {BatchManagementClientContext} client Reference to the service client. */ - constructor(client: BatchManagementContext) { + constructor(client: BatchManagementClientContext) { this.client = client; } diff --git a/sdk/batch/arm-batch/src/operations/certificateOperations.ts b/sdk/batch/arm-batch/src/operations/certificateOperations.ts index 5ac4aa9bd78b..300ef91c8107 100644 --- a/sdk/batch/arm-batch/src/operations/certificateOperations.ts +++ b/sdk/batch/arm-batch/src/operations/certificateOperations.ts @@ -12,17 +12,17 @@ import * as msRestAzure from "@azure/ms-rest-azure-js"; import * as Models from "../models"; import * as Mappers from "../models/certificateOperationsMappers"; import * as Parameters from "../models/parameters"; -import { BatchManagementContext } from "../batchManagementContext"; +import { BatchManagementClientContext } from "../batchManagementClientContext"; /** Class representing a CertificateOperations. */ export class CertificateOperations { - private readonly client: BatchManagementContext; + private readonly client: BatchManagementClientContext; /** * Create a CertificateOperations. - * @param {BatchManagementContext} client Reference to the service client. + * @param {BatchManagementClientContext} client Reference to the service client. */ - constructor(client: BatchManagementContext) { + constructor(client: BatchManagementClientContext) { this.client = client; } diff --git a/sdk/batch/arm-batch/src/operations/location.ts b/sdk/batch/arm-batch/src/operations/location.ts index 4205314c53b0..e4d42c84a7d4 100644 --- a/sdk/batch/arm-batch/src/operations/location.ts +++ b/sdk/batch/arm-batch/src/operations/location.ts @@ -11,17 +11,17 @@ import * as msRest from "@azure/ms-rest-js"; import * as Models from "../models"; import * as Mappers from "../models/locationMappers"; import * as Parameters from "../models/parameters"; -import { BatchManagementContext } from "../batchManagementContext"; +import { BatchManagementClientContext } from "../batchManagementClientContext"; /** Class representing a Location. */ export class Location { - private readonly client: BatchManagementContext; + private readonly client: BatchManagementClientContext; /** * Create a Location. - * @param {BatchManagementContext} client Reference to the service client. + * @param {BatchManagementClientContext} client Reference to the service client. */ - constructor(client: BatchManagementContext) { + constructor(client: BatchManagementClientContext) { this.client = client; } diff --git a/sdk/batch/arm-batch/src/operations/operations.ts b/sdk/batch/arm-batch/src/operations/operations.ts index 774b5e4e7d62..85f1828dde4c 100644 --- a/sdk/batch/arm-batch/src/operations/operations.ts +++ b/sdk/batch/arm-batch/src/operations/operations.ts @@ -11,17 +11,17 @@ import * as msRest from "@azure/ms-rest-js"; import * as Models from "../models"; import * as Mappers from "../models/operationsMappers"; import * as Parameters from "../models/parameters"; -import { BatchManagementContext } from "../batchManagementContext"; +import { BatchManagementClientContext } from "../batchManagementClientContext"; /** Class representing a Operations. */ export class Operations { - private readonly client: BatchManagementContext; + private readonly client: BatchManagementClientContext; /** * Create a Operations. - * @param {BatchManagementContext} client Reference to the service client. + * @param {BatchManagementClientContext} client Reference to the service client. */ - constructor(client: BatchManagementContext) { + constructor(client: BatchManagementClientContext) { this.client = client; } diff --git a/sdk/batch/arm-batch/src/operations/poolOperations.ts b/sdk/batch/arm-batch/src/operations/poolOperations.ts index 017b9fca9115..1029e9a6e018 100644 --- a/sdk/batch/arm-batch/src/operations/poolOperations.ts +++ b/sdk/batch/arm-batch/src/operations/poolOperations.ts @@ -12,17 +12,17 @@ import * as msRestAzure from "@azure/ms-rest-azure-js"; import * as Models from "../models"; import * as Mappers from "../models/poolOperationsMappers"; import * as Parameters from "../models/parameters"; -import { BatchManagementContext } from "../batchManagementContext"; +import { BatchManagementClientContext } from "../batchManagementClientContext"; /** Class representing a PoolOperations. */ export class PoolOperations { - private readonly client: BatchManagementContext; + private readonly client: BatchManagementClientContext; /** * Create a PoolOperations. - * @param {BatchManagementContext} client Reference to the service client. + * @param {BatchManagementClientContext} client Reference to the service client. */ - constructor(client: BatchManagementContext) { + constructor(client: BatchManagementClientContext) { this.client = client; } diff --git a/sdk/batch/arm-batch/src/operations/privateEndpointConnectionOperations.ts b/sdk/batch/arm-batch/src/operations/privateEndpointConnectionOperations.ts index 15477071381a..b9329a9b1c99 100644 --- a/sdk/batch/arm-batch/src/operations/privateEndpointConnectionOperations.ts +++ b/sdk/batch/arm-batch/src/operations/privateEndpointConnectionOperations.ts @@ -12,17 +12,17 @@ import * as msRestAzure from "@azure/ms-rest-azure-js"; import * as Models from "../models"; import * as Mappers from "../models/privateEndpointConnectionOperationsMappers"; import * as Parameters from "../models/parameters"; -import { BatchManagementContext } from "../batchManagementContext"; +import { BatchManagementClientContext } from "../batchManagementClientContext"; /** Class representing a PrivateEndpointConnectionOperations. */ export class PrivateEndpointConnectionOperations { - private readonly client: BatchManagementContext; + private readonly client: BatchManagementClientContext; /** * Create a PrivateEndpointConnectionOperations. - * @param {BatchManagementContext} client Reference to the service client. + * @param {BatchManagementClientContext} client Reference to the service client. */ - constructor(client: BatchManagementContext) { + constructor(client: BatchManagementClientContext) { this.client = client; } diff --git a/sdk/batch/arm-batch/src/operations/privateLinkResourceOperations.ts b/sdk/batch/arm-batch/src/operations/privateLinkResourceOperations.ts index 9f3ca12c11b8..7b84efa05565 100644 --- a/sdk/batch/arm-batch/src/operations/privateLinkResourceOperations.ts +++ b/sdk/batch/arm-batch/src/operations/privateLinkResourceOperations.ts @@ -11,17 +11,17 @@ import * as msRest from "@azure/ms-rest-js"; import * as Models from "../models"; import * as Mappers from "../models/privateLinkResourceOperationsMappers"; import * as Parameters from "../models/parameters"; -import { BatchManagementContext } from "../batchManagementContext"; +import { BatchManagementClientContext } from "../batchManagementClientContext"; /** Class representing a PrivateLinkResourceOperations. */ export class PrivateLinkResourceOperations { - private readonly client: BatchManagementContext; + private readonly client: BatchManagementClientContext; /** * Create a PrivateLinkResourceOperations. - * @param {BatchManagementContext} client Reference to the service client. + * @param {BatchManagementClientContext} client Reference to the service client. */ - constructor(client: BatchManagementContext) { + constructor(client: BatchManagementClientContext) { this.client = client; } From 1c4e64f03f80c437e3a8d86b912cf8e1d6567dd3 Mon Sep 17 00:00:00 2001 From: colawwj Date: Fri, 30 Jul 2021 10:37:54 +0800 Subject: [PATCH 3/3] update --- sdk/batch/arm-batch/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/batch/arm-batch/package.json b/sdk/batch/arm-batch/package.json index f2971a643e0f..f218eb61d971 100644 --- a/sdk/batch/arm-batch/package.json +++ b/sdk/batch/arm-batch/package.json @@ -27,7 +27,7 @@ "rollup-plugin-sourcemaps": "^0.4.2", "uglify-js": "^3.6.0" }, - "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/batch/arm-batch", + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/feature/v4/sdk/batch/arm-batch", "repository": { "type": "git", "url": "https://github.com/Azure/azure-sdk-for-js.git"