diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index 7fbb4358e973..89eb418f8b16 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -2196,7 +2196,7 @@ packages: resolution: {integrity: sha512-ALYone6pm6QmwZoAgeyNksccT9Q4AWZQ6PvfwR37GT6r6FWUPguq6sUmNGSMV2Wr761oQoBxwGGa6DR5o1DC9g==} dependencies: '@types/connect': 3.4.35 - '@types/node': 14.18.32 + '@types/node': 18.11.4 dev: false /@types/chai-as-promised/7.1.5: @@ -2218,7 +2218,7 @@ packages: /@types/connect/3.4.35: resolution: {integrity: sha512-cdeYyv4KWoEgpBISTxWvqYsVy444DOqehiF3fM3ne10AmJ62RSyNkUnxMJXHQWRQQX2eR94m5y1IZyDwBjV9FQ==} dependencies: - '@types/node': 14.18.32 + '@types/node': 18.11.4 dev: false /@types/cookie/0.4.1: @@ -2253,7 +2253,7 @@ packages: /@types/express-serve-static-core/4.17.31: resolution: {integrity: sha512-DxMhY+NAsTwMMFHBTtJFNp5qiHKJ7TeqOo23zVEM9alT1Ml27Q3xcTH0xwxn7Q0BbMcVEJOs/7aQtUWupUQN3Q==} dependencies: - '@types/node': 14.18.32 + '@types/node': 18.11.4 '@types/qs': 6.9.7 '@types/range-parser': 1.2.4 dev: false @@ -2270,20 +2270,20 @@ packages: /@types/fs-extra/8.1.2: resolution: {integrity: sha512-SvSrYXfWSc7R4eqnOzbQF4TZmfpNSM9FrSWLU3EUnWBuyZqNBOrv1B1JA3byUDPUl9z4Ab3jeZG2eDdySlgNMg==} dependencies: - '@types/node': 14.18.32 + '@types/node': 18.11.4 dev: false /@types/fs-extra/9.0.13: resolution: {integrity: sha512-nEnwB++1u5lVDM2UI4c1+5R+FYaKfaAzS4OococimjVm3nQw3TuzH5UNsocrcTBbhnerblyHj4A49qXbIiZdpA==} dependencies: - '@types/node': 14.18.32 + '@types/node': 18.11.4 dev: false /@types/glob/7.2.0: resolution: {integrity: sha512-ZUxbzKl0IfJILTS6t7ip5fQQM/J3TJYubDm3nMbgubNNYS62eXeUpoLUC8/7fJNiFYHTrGPQn7hspDUzIHX3UA==} dependencies: '@types/minimatch': 5.1.2 - '@types/node': 14.18.32 + '@types/node': 18.11.4 dev: false /@types/inquirer/8.2.4: @@ -2295,7 +2295,7 @@ packages: /@types/is-buffer/2.0.0: resolution: {integrity: sha512-0f7N/e3BAz32qDYvgB4d2cqv1DqUwvGxHkXsrucICn8la1Vb6Yl6Eg8mPScGwUiqHJeE7diXlzaK+QMA9m4Gxw==} dependencies: - '@types/node': 14.18.32 + '@types/node': 18.11.4 dev: false /@types/json-schema/7.0.11: @@ -2309,13 +2309,13 @@ packages: /@types/jsonwebtoken/8.5.9: resolution: {integrity: sha512-272FMnFGzAVMGtu9tkr29hRL6bZj4Zs1KZNeHLnKqAvp06tAIcarTMwOh8/8bz4FmKRcMxZhZNeUAQsNLoiPhg==} dependencies: - '@types/node': 14.18.32 + '@types/node': 18.11.4 dev: false /@types/jws/3.2.4: resolution: {integrity: sha512-aqtH4dPw1wUjFZaeMD1ak/pf8iXlu/odFe+trJrvw0g1sTh93i+SCykg0Ek8C6B7rVK3oBORbfZAsKO7P10etg==} dependencies: - '@types/node': 14.18.32 + '@types/node': 18.11.4 dev: false /@types/md5/2.3.2: @@ -2351,13 +2351,13 @@ packages: /@types/mock-fs/4.13.1: resolution: {integrity: sha512-m6nFAJ3lBSnqbvDZioawRvpLXSaPyn52Srf7OfzjubYbYX8MTUdIgDxQl0wEapm4m/pNYSd9TXocpQ0TvZFlYA==} dependencies: - '@types/node': 14.18.32 + '@types/node': 18.11.4 dev: false /@types/mock-require/2.0.1: resolution: {integrity: sha512-O7U5DVGboY/Crueb5/huUCIRjKtRVRaLmRDbZJBlDQgJn966z3aiFDN+6AtYviu2ExwMkl34LjT/IiC0OPtKuQ==} dependencies: - '@types/node': 14.18.32 + '@types/node': 18.11.4 dev: false /@types/ms/0.7.31: @@ -2375,7 +2375,7 @@ packages: /@types/node-fetch/2.6.2: resolution: {integrity: sha512-DHqhlq5jeESLy19TYhLakJ07kNumXWjcDdxXsLUMJZ6ue8VZJj4kLPQVE/2mdHh3xZziNF1xppu5lwmS53HR+A==} dependencies: - '@types/node': 14.18.32 + '@types/node': 18.11.4 form-data: 3.0.1 dev: false @@ -2430,7 +2430,7 @@ packages: /@types/resolve/1.17.1: resolution: {integrity: sha512-yy7HuzQhj0dhGpD8RLXSZWEkLsV9ibvxvi6EiJ3bkqLAO1RGo0WbkWQiwpRlSFymTJRz0d3k5LM3kkx8ArDbLw==} dependencies: - '@types/node': 14.18.32 + '@types/node': 18.11.4 dev: false /@types/semaphore/1.1.1: @@ -2441,7 +2441,7 @@ packages: resolution: {integrity: sha512-z5xyF6uh8CbjAu9760KDKsH2FcDxZ2tFCsA4HIMWE6IkiYMXfVoa+4f9KX+FN0ZLsaMw1WNG2ETLA6N+/YA+cg==} dependencies: '@types/mime': 3.0.1 - '@types/node': 14.18.32 + '@types/node': 18.11.4 dev: false /@types/sinon/10.0.13: @@ -2463,13 +2463,13 @@ packages: /@types/stoppable/1.1.1: resolution: {integrity: sha512-b8N+fCADRIYYrGZOcmOR8ZNBOqhktWTB/bMUl5LvGtT201QKJZOOH5UsFyI3qtteM6ZAJbJqZoBcLqqxKIwjhw==} dependencies: - '@types/node': 14.18.32 + '@types/node': 18.11.4 dev: false /@types/through/0.0.30: resolution: {integrity: sha512-FvnCJljyxhPM3gkRgWmxmDZyAQSiBQQWLI0A0VFL0K7W1oRUrPJSqNO0NvTnLkBcotdlp3lKvaT0JrnyRDkzOg==} dependencies: - '@types/node': 14.18.32 + '@types/node': 18.11.4 dev: false /@types/tough-cookie/4.0.2: @@ -2483,13 +2483,13 @@ packages: /@types/tunnel/0.0.1: resolution: {integrity: sha512-AOqu6bQu5MSWwYvehMXLukFHnupHrpZ8nvgae5Ggie9UwzDR1CCwoXgSSWNZJuyOlCdfdsWMA5F2LlmvyoTv8A==} dependencies: - '@types/node': 14.18.32 + '@types/node': 18.11.4 dev: false /@types/tunnel/0.0.3: resolution: {integrity: sha512-sOUTGn6h1SfQ+gbgqC364jLFBw2lnFqkgF3q0WovEHRLMrVD1sd5aufqi/aJObLekJO+Aq5z646U4Oxy6shXMA==} dependencies: - '@types/node': 14.18.32 + '@types/node': 18.11.4 dev: false /@types/underscore/1.11.4: @@ -2507,19 +2507,19 @@ packages: /@types/ws/7.4.7: resolution: {integrity: sha512-JQbbmxZTZehdc2iszGKs5oC3NFnjeay7mtAWrdt7qNtAVK0g19muApzAy4bm9byz79xa2ZnO/BOBC2R8RC5Lww==} dependencies: - '@types/node': 14.18.32 + '@types/node': 18.11.4 dev: false /@types/ws/8.5.3: resolution: {integrity: sha512-6YOoWjruKj1uLf3INHH7D3qTXwFfEsg1kf3c0uDdSBJwfa/llkwIjrAGV7j7mVgGNbzTQ3HiHKKDXl6bJPD97w==} dependencies: - '@types/node': 14.18.32 + '@types/node': 18.11.4 dev: false /@types/xml2js/0.4.11: resolution: {integrity: sha512-JdigeAKmCyoJUiQljjr7tQG3if9NkqGUgwEUqBvV0N7LM4HyQk7UXCnusRa1lnvXAEYJ8mw8GtZWioagNztOwA==} dependencies: - '@types/node': 14.18.32 + '@types/node': 18.11.4 dev: false /@types/yargs-parser/21.0.0: @@ -2536,7 +2536,7 @@ packages: resolution: {integrity: sha512-Cn6WYCm0tXv8p6k+A8PvbDG763EDpBoTzHdA+Q/MF6H3sapGjCm9NzoaJncJS9tUKSuCoDs9XHxYYsQDgxR6kw==} requiresBuild: true dependencies: - '@types/node': 14.18.32 + '@types/node': 18.11.4 dev: false optional: true @@ -3611,7 +3611,7 @@ packages: resolution: {integrity: sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==} deprecated: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797) dependencies: - ms: 2.1.1 + ms: 2.1.3 dev: false /debug/3.2.7: @@ -3823,7 +3823,7 @@ packages: dependencies: semver: 7.3.8 shelljs: 0.8.5 - typescript: 4.9.0-dev.20221024 + typescript: 4.9.0-dev.20221025 dev: false /downlevel-dts/0.8.0: @@ -3832,7 +3832,7 @@ packages: dependencies: semver: 7.3.8 shelljs: 0.8.5 - typescript: 4.6.4 + typescript: 4.8.4 dev: false /ecdsa-sig-formatter/1.0.11: @@ -3883,7 +3883,7 @@ packages: dependencies: '@types/cookie': 0.4.1 '@types/cors': 2.8.12 - '@types/node': 14.18.32 + '@types/node': 18.11.4 accepts: 1.3.8 base64id: 2.0.0 cookie: 0.4.2 @@ -4898,7 +4898,7 @@ packages: fs.realpath: 1.0.0 inflight: 1.0.6 inherits: 2.0.4 - minimatch: 3.0.4 + minimatch: 3.1.2 once: 1.4.0 path-is-absolute: 1.0.1 dev: false @@ -8802,8 +8802,8 @@ packages: hasBin: true dev: false - /typescript/4.9.0-dev.20221024: - resolution: {integrity: sha512-emPfkqIHzCqpQeKpZ7FF7SwFvGcG2B6+sWGIW1xthggJbJGdqgBWAok5XTIoyS4G1GITQTOcXJLHpI/czVoinQ==} + /typescript/4.9.0-dev.20221025: + resolution: {integrity: sha512-3TZlt+3jGBjPRVFcNX6BmlajqwNExRm4rhG4llSH5WSMX/eQ54PSueTJ5UhLn9+6/byL31/WRmJJ/7W0j+gCtQ==} engines: {node: '>=4.2.0'} hasBin: true dev: false @@ -10533,7 +10533,7 @@ packages: dev: false file:projects/arm-batch.tgz: - resolution: {integrity: sha512-3D36iZHpAl+iPABGQh5eQEtvdsSsLzM04bPSQ8+pp/CKNYLFm01lTM8K6F8LhPdmsjWMzuV8e7zo2cBrGG9JrA==, tarball: file:projects/arm-batch.tgz} + resolution: {integrity: sha512-lZC1G7TN23uC2xkwyZZN3XJ1QRSGxQPtiSueILmdE+yi4pSUjuXwwLY1GPD772dTlf+dJRH/AzTiHxH6doBbwg==, tarball: file:projects/arm-batch.tgz} name: '@rush-temp/arm-batch' version: 0.0.0 dependencies: @@ -10553,7 +10553,7 @@ packages: rollup: 2.79.1 rollup-plugin-sourcemaps: 0.6.3_rollup@2.79.1 tslib: 2.4.0 - typescript: 4.2.4 + typescript: 4.6.4 uglify-js: 3.17.4 transitivePeerDependencies: - '@types/node' diff --git a/sdk/batch/arm-batch/CHANGELOG.md b/sdk/batch/arm-batch/CHANGELOG.md index fc9a238e0f2b..9ea0356a86f4 100644 --- a/sdk/batch/arm-batch/CHANGELOG.md +++ b/sdk/batch/arm-batch/CHANGELOG.md @@ -1,15 +1,23 @@ # Release History + +## 8.0.0 (2022-10-25) + +**Features** -## 7.2.1 (Unreleased) - -### Features Added - -### Breaking Changes - -### Bugs Fixed + - Added Type Alias NodeCommunicationMode + - Interface CifsMountConfiguration has a new optional parameter userName + - Interface NetworkConfiguration has a new optional parameter dynamicVnetAssignmentScope + - Interface Pool has a new optional parameter currentNodeCommunicationMode + - Interface Pool has a new optional parameter targetNodeCommunicationMode + - Interface PrivateLinkServiceConnectionState has a new optional parameter actionsRequired -### Other Changes +**Breaking Changes** + - Interface CifsMountConfiguration no longer has parameter username + - Interface NetworkConfiguration no longer has parameter dynamicVNetAssignmentScope + - Interface PrivateLinkServiceConnectionState no longer has parameter actionRequired + + ## 7.2.0 (2022-07-19) **Features** diff --git a/sdk/batch/arm-batch/_meta.json b/sdk/batch/arm-batch/_meta.json index bac2e44e60be..526d384eb3a3 100644 --- a/sdk/batch/arm-batch/_meta.json +++ b/sdk/batch/arm-batch/_meta.json @@ -1,8 +1,8 @@ { - "commit": "c03c258c7a01a7d57b3110cc20e2e76752b6f2d6", + "commit": "ba016d497dcd3b6fa568bb318f19da16303adb4e", "readme": "specification/batch/resource-manager/readme.md", - "autorest_command": "autorest --version=3.7.3 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\Git\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\batch\\resource-manager\\readme.md --use=@autorest/typescript@6.0.0-rc.1 --generate-sample=true", + "autorest_command": "autorest --version=3.8.4 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-js ../azure-rest-api-specs/specification/batch/resource-manager/readme.md --use=@autorest/typescript@6.0.0-rc.2", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "release_tool": "@azure-tools/js-sdk-release-tools@2.4.0", - "use": "@autorest/typescript@6.0.0-rc.1" + "release_tool": "@azure-tools/js-sdk-release-tools@2.4.4", + "use": "@autorest/typescript@6.0.0-rc.2" } \ No newline at end of file diff --git a/sdk/batch/arm-batch/package.json b/sdk/batch/arm-batch/package.json index 0a5f513018eb..d96c86a7517f 100644 --- a/sdk/batch/arm-batch/package.json +++ b/sdk/batch/arm-batch/package.json @@ -3,7 +3,7 @@ "sdk-type": "mgmt", "author": "Microsoft Corporation", "description": "A generated SDK for BatchManagementClient.", - "version": "7.2.1", + "version": "8.0.0", "engines": { "node": ">=14.0.0" }, @@ -36,7 +36,7 @@ "mkdirp": "^1.0.4", "rollup": "^2.66.1", "rollup-plugin-sourcemaps": "^0.6.3", - "typescript": "~4.2.0", + "typescript": "~4.6.0", "uglify-js": "^3.4.9", "rimraf": "^3.0.0", "@azure/identity": "^2.0.1", @@ -46,8 +46,7 @@ "@types/chai": "^4.2.8", "chai": "^4.2.0", "cross-env": "^7.0.2", - "@azure/dev-tool": "^1.0.0", - "@azure/arm-storage": "^17.1.0" + "@azure/dev-tool": "^1.0.0" }, "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/batch/arm-batch", "repository": { @@ -110,13 +109,5 @@ } ] }, - "autoPublish": true, - "//sampleConfiguration": { - "productName": "", - "productSlugs": [ - "azure" - ], - "disableDocsMs": true, - "apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-batch?view=azure-node-preview" - } -} + "autoPublish": true +} \ No newline at end of file diff --git a/sdk/batch/arm-batch/review/arm-batch.api.md b/sdk/batch/arm-batch/review/arm-batch.api.md index 35c928903c54..4f583f54416c 100644 --- a/sdk/batch/arm-batch/review/arm-batch.api.md +++ b/sdk/batch/arm-batch/review/arm-batch.api.md @@ -205,7 +205,7 @@ export interface AzureBlobFileSystemConfiguration { // @public export interface AzureFileShareConfiguration { - accountKey: string; + accountKey?: string; accountName: string; azureFileUrl: string; mountOptions?: string; @@ -661,7 +661,7 @@ export interface CifsMountConfiguration { password: string; relativeMountPath: string; source: string; - username: string; + userName?: string; } // @public @@ -977,7 +977,7 @@ export type NameAvailabilityReason = "Invalid" | "AlreadyExists"; // @public export interface NetworkConfiguration { - dynamicVNetAssignmentScope?: DynamicVNetAssignmentScope; + dynamicVnetAssignmentScope?: DynamicVNetAssignmentScope; endpointConfiguration?: PoolEndpointConfiguration; publicIPAddressConfiguration?: PublicIPAddressConfiguration; subnetId?: string; @@ -1007,6 +1007,9 @@ export interface NFSMountConfiguration { source: string; } +// @public +export type NodeCommunicationMode = "Default" | "Classic" | "Simplified"; + // @public export interface NodePlacementConfiguration { policy?: NodePlacementPolicyType; @@ -1088,6 +1091,7 @@ export interface Pool extends ProxyResource { readonly creationTime?: Date; readonly currentDedicatedNodes?: number; readonly currentLowPriorityNodes?: number; + readonly currentNodeCommunicationMode?: NodeCommunicationMode; deploymentConfiguration?: DeploymentConfiguration; displayName?: string; identity?: BatchPoolIdentity; @@ -1101,6 +1105,7 @@ export interface Pool extends ProxyResource { readonly resizeOperationStatus?: ResizeOperationStatus; scaleSettings?: ScaleSettings; startTask?: StartTask; + targetNodeCommunicationMode?: NodeCommunicationMode; taskSchedulingPolicy?: TaskSchedulingPolicy; taskSlotsPerNode?: number; userAccounts?: UserAccount[]; @@ -1346,7 +1351,7 @@ export interface PrivateLinkResourceOperations { // @public export interface PrivateLinkServiceConnectionState { - readonly actionRequired?: string; + readonly actionsRequired?: string; description?: string; status: PrivateLinkServiceConnectionStatus; } diff --git a/sdk/batch/arm-batch/src/batchManagementClient.ts b/sdk/batch/arm-batch/src/batchManagementClient.ts index fd4f31678c47..125f89f11ce9 100644 --- a/sdk/batch/arm-batch/src/batchManagementClient.ts +++ b/sdk/batch/arm-batch/src/batchManagementClient.ts @@ -71,7 +71,7 @@ export class BatchManagementClient extends coreClient.ServiceClient { credential: credentials }; - const packageDetails = `azsdk-js-arm-batch/7.2.1`; + const packageDetails = `azsdk-js-arm-batch/8.0.0`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` @@ -91,34 +91,41 @@ export class BatchManagementClient extends coreClient.ServiceClient { }; super(optionsWithDefaults); + let bearerTokenAuthenticationPolicyFound: boolean = false; if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) { const pipelinePolicies: coreRestPipeline.PipelinePolicy[] = options.pipeline.getOrderedPolicies(); - const bearerTokenAuthenticationPolicyFound = pipelinePolicies.some( + bearerTokenAuthenticationPolicyFound = pipelinePolicies.some( (pipelinePolicy) => pipelinePolicy.name === coreRestPipeline.bearerTokenAuthenticationPolicyName ); - if (!bearerTokenAuthenticationPolicyFound) { - this.pipeline.removePolicy({ - name: coreRestPipeline.bearerTokenAuthenticationPolicyName - }); - this.pipeline.addPolicy( - coreRestPipeline.bearerTokenAuthenticationPolicy({ - scopes: `${optionsWithDefaults.baseUri}/.default`, - challengeCallbacks: { - authorizeRequestOnChallenge: - coreClient.authorizeRequestOnClaimChallenge - } - }) - ); - } + } + if ( + !options || + !options.pipeline || + options.pipeline.getOrderedPolicies().length == 0 || + !bearerTokenAuthenticationPolicyFound + ) { + this.pipeline.removePolicy({ + name: coreRestPipeline.bearerTokenAuthenticationPolicyName + }); + this.pipeline.addPolicy( + coreRestPipeline.bearerTokenAuthenticationPolicy({ + credential: credentials, + scopes: `${optionsWithDefaults.credentialScopes}`, + challengeCallbacks: { + authorizeRequestOnChallenge: + coreClient.authorizeRequestOnClaimChallenge + } + }) + ); } // Parameter assignments this.subscriptionId = subscriptionId; // Assigning values to Constant parameters this.$host = options.$host || "https://management.azure.com"; - this.apiVersion = options.apiVersion || "2022-06-01"; + this.apiVersion = options.apiVersion || "2022-10-01"; this.batchAccountOperations = new BatchAccountOperationsImpl(this); this.applicationPackageOperations = new ApplicationPackageOperationsImpl( this diff --git a/sdk/batch/arm-batch/src/models/index.ts b/sdk/batch/arm-batch/src/models/index.ts index 37e451e2564c..8579a43d15e4 100644 --- a/sdk/batch/arm-batch/src/models/index.ts +++ b/sdk/batch/arm-batch/src/models/index.ts @@ -151,7 +151,7 @@ export interface PrivateLinkServiceConnectionState { * Action required on the private connection state * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly actionRequired?: string; + readonly actionsRequired?: string; } /** A definition of an Azure resource. */ @@ -698,7 +698,7 @@ export interface NetworkConfiguration { /** The virtual network must be in the same region and subscription as the Azure Batch account. The specified subnet should have enough free IP addresses to accommodate the number of nodes in the pool. If the subnet doesn't have enough free IP addresses, the pool will partially allocate compute nodes and a resize error will occur. The 'MicrosoftAzureBatch' service principal must have the 'Classic Virtual Machine Contributor' Role-Based Access Control (RBAC) role for the specified VNet. The specified subnet must allow communication from the Azure Batch service to be able to schedule tasks on the compute nodes. This can be verified by checking if the specified VNet has any associated Network Security Groups (NSG). If communication to the compute nodes in the specified subnet is denied by an NSG, then the Batch service will set the state of the compute nodes to unusable. If the specified VNet has any associated Network Security Groups (NSG), then a few reserved system ports must be enabled for inbound communication. For pools created with a virtual machine configuration, enable ports 29876 and 29877, as well as port 22 for Linux and port 3389 for Windows. For pools created with a cloud service configuration, enable ports 10100, 20100, and 30100. Also enable outbound connections to Azure Storage on port 443. For cloudServiceConfiguration pools, only 'classic' VNETs are supported. For more details see: https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration */ subnetId?: string; /** The scope of dynamic vnet assignment. */ - dynamicVNetAssignmentScope?: DynamicVNetAssignmentScope; + dynamicVnetAssignmentScope?: DynamicVNetAssignmentScope; /** Pool endpoint configuration is only supported on pools with the virtualMachineConfiguration property. */ endpointConfiguration?: PoolEndpointConfiguration; /** This property is only supported on Pools with the virtualMachineConfiguration property. */ @@ -755,7 +755,7 @@ export interface TaskSchedulingPolicy { /** Properties used to create a user on an Azure Batch node. */ export interface UserAccount { - /** The name of the user account. */ + /** The name of the user account. Names can contain any Unicode characters up to a maximum length of 20. */ name: string; /** The password for the user account. */ password: string; @@ -863,7 +863,7 @@ export interface TaskContainerSettings { workingDirectory?: ContainerWorkingDirectory; } -/** A reference to a certificate to be installed on compute nodes in a pool. This must exist inside the same account as the pool. */ +/** Warning: This object is deprecated and will be removed after February, 2024. Please use the [Azure KeyVault Extension](https://learn.microsoft.com/azure/batch/batch-certificate-migration-guide) instead. */ export interface CertificateReference { /** The fully qualified ID of the certificate to install on the pool. This must be inside the same batch account as the pool. */ id: string; @@ -952,7 +952,7 @@ export interface NFSMountConfiguration { /** Information used to connect to a CIFS file system. */ export interface CifsMountConfiguration { /** The user to use for authentication against the CIFS file system. */ - username: string; + userName?: string; /** The URI of the file system to mount. */ source: string; /** All file systems are mounted relative to the Batch mounts directory, accessible via the AZ_BATCH_NODE_MOUNTS_DIR environment variable. */ @@ -970,7 +970,7 @@ export interface AzureFileShareConfiguration { /** This is of the form 'https://{account}.file.core.windows.net/'. */ azureFileUrl: string; /** The Azure Storage account key. */ - accountKey: string; + accountKey?: string; /** All file systems are mounted relative to the Batch mounts directory, accessible via the AZ_BATCH_NODE_MOUNTS_DIR environment variable. */ relativeMountPath: string; /** These are 'net use' options in Windows and 'mount' options in Linux. */ @@ -1221,7 +1221,7 @@ export interface Pool extends ProxyResource { /** Using CloudServiceConfiguration specifies that the nodes should be creating using Azure Cloud Services (PaaS), while VirtualMachineConfiguration uses Azure Virtual Machines (IaaS). */ deploymentConfiguration?: DeploymentConfiguration; /** - * The number of compute nodes currently in the pool. + * The number of dedicated compute nodes currently in the pool. * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly currentDedicatedNodes?: number; @@ -1251,7 +1251,11 @@ export interface Pool extends ProxyResource { metadata?: MetadataItem[]; /** In an PATCH (update) operation, this property can be set to an empty object to remove the start task from the pool. */ startTask?: StartTask; - /** For Windows compute nodes, the Batch service installs the certificates to the specified certificate store and location. For Linux compute nodes, the certificates are stored in a directory inside the task working directory and an environment variable AZ_BATCH_CERTIFICATES_DIR is supplied to the task to query for this location. For certificates with visibility of 'remoteUser', a 'certs' directory is created in the user's home directory (e.g., /home/{user-name}/certs) and certificates are placed in that directory. */ + /** + * For Windows compute nodes, the Batch service installs the certificates to the specified certificate store and location. For Linux compute nodes, the certificates are stored in a directory inside the task working directory and an environment variable AZ_BATCH_CERTIFICATES_DIR is supplied to the task to query for this location. For certificates with visibility of 'remoteUser', a 'certs' directory is created in the user's home directory (e.g., /home/{user-name}/certs) and certificates are placed in that directory. + * + * Warning: This property is deprecated and will be removed after February, 2024. Please use the [Azure KeyVault Extension](https://learn.microsoft.com/azure/batch/batch-certificate-migration-guide) instead. + */ certificates?: CertificateReference[]; /** Changes to application package references affect all new compute nodes joining the pool, but do not affect compute nodes that are already in the pool until they are rebooted or reimaged. There is a maximum of 10 application package references on any given pool. */ applicationPackages?: ApplicationPackageReference[]; @@ -1264,6 +1268,13 @@ export interface Pool extends ProxyResource { readonly resizeOperationStatus?: ResizeOperationStatus; /** This supports Azure Files, NFS, CIFS/SMB, and Blobfuse. */ mountConfiguration?: MountConfiguration[]; + /** If omitted, the default value is Default. */ + targetNodeCommunicationMode?: NodeCommunicationMode; + /** + * Determines how a pool communicates with the Batch service. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly currentNodeCommunicationMode?: NodeCommunicationMode; } /** Contains information about an Azure Batch account. */ @@ -1591,6 +1602,8 @@ export type ContainerWorkingDirectory = export type CertificateStoreLocation = "CurrentUser" | "LocalMachine"; /** Defines values for CertificateVisibility. */ export type CertificateVisibility = "StartTask" | "Task" | "RemoteUser"; +/** Defines values for NodeCommunicationMode. */ +export type NodeCommunicationMode = "Default" | "Classic" | "Simplified"; /** Defines values for PoolIdentityType. */ export type PoolIdentityType = "UserAssigned" | "None"; diff --git a/sdk/batch/arm-batch/src/models/mappers.ts b/sdk/batch/arm-batch/src/models/mappers.ts index 6f7969ac3ae4..28c5d4e680c3 100644 --- a/sdk/batch/arm-batch/src/models/mappers.ts +++ b/sdk/batch/arm-batch/src/models/mappers.ts @@ -375,8 +375,8 @@ export const PrivateLinkServiceConnectionState: coreClient.CompositeMapper = { name: "String" } }, - actionRequired: { - serializedName: "actionRequired", + actionsRequired: { + serializedName: "actionsRequired", readOnly: true, type: { name: "String" @@ -1813,8 +1813,8 @@ export const NetworkConfiguration: coreClient.CompositeMapper = { name: "String" } }, - dynamicVNetAssignmentScope: { - serializedName: "dynamicVNetAssignmentScope", + dynamicVnetAssignmentScope: { + serializedName: "dynamicVnetAssignmentScope", type: { name: "Enum", allowedValues: ["none", "job"] @@ -2614,9 +2614,8 @@ export const CifsMountConfiguration: coreClient.CompositeMapper = { name: "Composite", className: "CifsMountConfiguration", modelProperties: { - username: { - serializedName: "username", - required: true, + userName: { + serializedName: "userName", type: { name: "String" } @@ -2673,7 +2672,6 @@ export const AzureFileShareConfiguration: coreClient.CompositeMapper = { }, accountKey: { serializedName: "accountKey", - required: true, type: { name: "String" } @@ -3358,6 +3356,22 @@ export const Pool: coreClient.CompositeMapper = { } } } + }, + targetNodeCommunicationMode: { + serializedName: "properties.targetNodeCommunicationMode", + type: { + name: "Enum", + allowedValues: ["Default", "Classic", "Simplified"] + } + }, + currentNodeCommunicationMode: { + serializedName: "properties.currentNodeCommunicationMode", + readOnly: true, + nullable: true, + type: { + name: "Enum", + allowedValues: ["Default", "Classic", "Simplified"] + } } } } @@ -3518,6 +3532,7 @@ export const BatchAccount: coreClient.CompositeMapper = { allowedAuthenticationModes: { serializedName: "properties.allowedAuthenticationModes", readOnly: true, + nullable: true, type: { name: "Sequence", element: { diff --git a/sdk/batch/arm-batch/src/models/parameters.ts b/sdk/batch/arm-batch/src/models/parameters.ts index ef51c04a09f0..6d4fb951e538 100644 --- a/sdk/batch/arm-batch/src/models/parameters.ts +++ b/sdk/batch/arm-batch/src/models/parameters.ts @@ -95,7 +95,7 @@ export const accountName: OperationURLParameter = { export const apiVersion: OperationQueryParameter = { parameterPath: "apiVersion", mapper: { - defaultValue: "2022-06-01", + defaultValue: "2022-10-01", isConstant: true, serializedName: "api-version", type: { diff --git a/sdk/batch/arm-batch/src/operations/batchAccountOperations.ts b/sdk/batch/arm-batch/src/operations/batchAccountOperations.ts index 92d9e19a3c84..2579d3048405 100644 --- a/sdk/batch/arm-batch/src/operations/batchAccountOperations.ts +++ b/sdk/batch/arm-batch/src/operations/batchAccountOperations.ts @@ -238,7 +238,7 @@ export class BatchAccountOperationsImpl implements BatchAccountOperations { * 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/azure/batch/batch-virtual-network + * 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 options parameters. @@ -655,7 +655,7 @@ export class BatchAccountOperationsImpl implements BatchAccountOperations { * 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/azure/batch/batch-virtual-network + * 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 options parameters. diff --git a/sdk/batch/arm-batch/src/operations/certificateOperations.ts b/sdk/batch/arm-batch/src/operations/certificateOperations.ts index cabfd055c4b7..43912129df8d 100644 --- a/sdk/batch/arm-batch/src/operations/certificateOperations.ts +++ b/sdk/batch/arm-batch/src/operations/certificateOperations.ts @@ -46,7 +46,9 @@ export class CertificateOperationsImpl implements CertificateOperations { } /** - * Lists all of the certificates in the specified account. + * Warning: This operation is deprecated and will be removed after February, 2024. Please use the + * [Azure KeyVault + * Extension](https://learn.microsoft.com/azure/batch/batch-certificate-migration-guide) instead. * @param resourceGroupName The name of the resource group that contains the Batch account. * @param accountName The name of the Batch account. * @param options The options parameters. @@ -117,7 +119,9 @@ export class CertificateOperationsImpl implements CertificateOperations { } /** - * Lists all of the certificates in the specified account. + * Warning: This operation is deprecated and will be removed after February, 2024. Please use the + * [Azure KeyVault + * Extension](https://learn.microsoft.com/azure/batch/batch-certificate-migration-guide) instead. * @param resourceGroupName The name of the resource group that contains the Batch account. * @param accountName The name of the Batch account. * @param options The options parameters. @@ -134,7 +138,9 @@ export class CertificateOperationsImpl implements CertificateOperations { } /** - * Creates a new certificate inside the specified account. + * Warning: This operation is deprecated and will be removed after February, 2024. Please use the + * [Azure KeyVault + * Extension](https://learn.microsoft.com/azure/batch/batch-certificate-migration-guide) instead. * @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 @@ -157,7 +163,9 @@ export class CertificateOperationsImpl implements CertificateOperations { } /** - * Updates the properties of an existing certificate. + * Warning: This operation is deprecated and will be removed after February, 2024. Please use the + * [Azure KeyVault + * Extension](https://learn.microsoft.com/azure/batch/batch-certificate-migration-guide) instead. * @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 @@ -180,7 +188,9 @@ export class CertificateOperationsImpl implements CertificateOperations { } /** - * Deletes the specified certificate. + * Warning: This operation is deprecated and will be removed after February, 2024. Please use the + * [Azure KeyVault + * Extension](https://learn.microsoft.com/azure/batch/batch-certificate-migration-guide) instead. * @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 @@ -248,7 +258,9 @@ export class CertificateOperationsImpl implements CertificateOperations { } /** - * Deletes the specified certificate. + * Warning: This operation is deprecated and will be removed after February, 2024. Please use the + * [Azure KeyVault + * Extension](https://learn.microsoft.com/azure/batch/batch-certificate-migration-guide) instead. * @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 @@ -272,7 +284,9 @@ export class CertificateOperationsImpl implements CertificateOperations { } /** - * Gets information about the specified certificate. + * Warning: This operation is deprecated and will be removed after February, 2024. Please use the + * [Azure KeyVault + * Extension](https://learn.microsoft.com/azure/batch/batch-certificate-migration-guide) instead. * @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 @@ -299,6 +313,10 @@ export class CertificateOperationsImpl implements CertificateOperations { * delete the certificate, you do not need to run this operation after the deletion failed. You must * make sure that the certificate is not being used by any resources, and then you can try again to * delete the certificate. + * + * Warning: This operation is deprecated and will be removed after February, 2024. Please use the + * [Azure KeyVault + * Extension](https://learn.microsoft.com/azure/batch/batch-certificate-migration-guide) instead. * @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 diff --git a/sdk/batch/arm-batch/src/operationsInterfaces/batchAccountOperations.ts b/sdk/batch/arm-batch/src/operationsInterfaces/batchAccountOperations.ts index 86e8d516b0e7..24c1be7d5026 100644 --- a/sdk/batch/arm-batch/src/operationsInterfaces/batchAccountOperations.ts +++ b/sdk/batch/arm-batch/src/operationsInterfaces/batchAccountOperations.ts @@ -71,7 +71,7 @@ export interface BatchAccountOperations { * 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/azure/batch/batch-virtual-network + * 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 options parameters. diff --git a/sdk/batch/arm-batch/src/operationsInterfaces/certificateOperations.ts b/sdk/batch/arm-batch/src/operationsInterfaces/certificateOperations.ts index 33ab4f829059..474fff5ac174 100644 --- a/sdk/batch/arm-batch/src/operationsInterfaces/certificateOperations.ts +++ b/sdk/batch/arm-batch/src/operationsInterfaces/certificateOperations.ts @@ -27,7 +27,9 @@ import { /** Interface representing a CertificateOperations. */ export interface CertificateOperations { /** - * Lists all of the certificates in the specified account. + * Warning: This operation is deprecated and will be removed after February, 2024. Please use the + * [Azure KeyVault + * Extension](https://learn.microsoft.com/azure/batch/batch-certificate-migration-guide) instead. * @param resourceGroupName The name of the resource group that contains the Batch account. * @param accountName The name of the Batch account. * @param options The options parameters. @@ -38,7 +40,9 @@ export interface CertificateOperations { options?: CertificateListByBatchAccountOptionalParams ): PagedAsyncIterableIterator; /** - * Creates a new certificate inside the specified account. + * Warning: This operation is deprecated and will be removed after February, 2024. Please use the + * [Azure KeyVault + * Extension](https://learn.microsoft.com/azure/batch/batch-certificate-migration-guide) instead. * @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 @@ -55,7 +59,9 @@ export interface CertificateOperations { options?: CertificateCreateOptionalParams ): Promise; /** - * Updates the properties of an existing certificate. + * Warning: This operation is deprecated and will be removed after February, 2024. Please use the + * [Azure KeyVault + * Extension](https://learn.microsoft.com/azure/batch/batch-certificate-migration-guide) instead. * @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 @@ -72,7 +78,9 @@ export interface CertificateOperations { options?: CertificateUpdateOptionalParams ): Promise; /** - * Deletes the specified certificate. + * Warning: This operation is deprecated and will be removed after February, 2024. Please use the + * [Azure KeyVault + * Extension](https://learn.microsoft.com/azure/batch/batch-certificate-migration-guide) instead. * @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 @@ -87,7 +95,9 @@ export interface CertificateOperations { options?: CertificateDeleteOptionalParams ): Promise, void>>; /** - * Deletes the specified certificate. + * Warning: This operation is deprecated and will be removed after February, 2024. Please use the + * [Azure KeyVault + * Extension](https://learn.microsoft.com/azure/batch/batch-certificate-migration-guide) instead. * @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 @@ -102,7 +112,9 @@ export interface CertificateOperations { options?: CertificateDeleteOptionalParams ): Promise; /** - * Gets information about the specified certificate. + * Warning: This operation is deprecated and will be removed after February, 2024. Please use the + * [Azure KeyVault + * Extension](https://learn.microsoft.com/azure/batch/batch-certificate-migration-guide) instead. * @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 @@ -123,6 +135,10 @@ export interface CertificateOperations { * delete the certificate, you do not need to run this operation after the deletion failed. You must * make sure that the certificate is not being used by any resources, and then you can try again to * delete the certificate. + * + * Warning: This operation is deprecated and will be removed after February, 2024. Please use the + * [Azure KeyVault + * Extension](https://learn.microsoft.com/azure/batch/batch-certificate-migration-guide) instead. * @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 diff --git a/sdk/batch/arm-batch/test/sampleTest.ts b/sdk/batch/arm-batch/test/sampleTest.ts new file mode 100644 index 000000000000..25aeb3ebcc36 --- /dev/null +++ b/sdk/batch/arm-batch/test/sampleTest.ts @@ -0,0 +1,43 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { + Recorder, + RecorderStartOptions, + env +} from "@azure-tools/test-recorder"; +import { assert } from "chai"; +import { Context } from "mocha"; + +const replaceableVariables: Record = { + AZURE_CLIENT_ID: "azure_client_id", + AZURE_CLIENT_SECRET: "azure_client_secret", + AZURE_TENANT_ID: "88888888-8888-8888-8888-888888888888", + SUBSCRIPTION_ID: "azure_subscription_id" +}; + +const recorderOptions: RecorderStartOptions = { + envSetupForPlayback: replaceableVariables +}; + +describe("My test", () => { + let recorder: Recorder; + + beforeEach(async function(this: Context) { + recorder = new Recorder(this.currentTest); + await recorder.start(recorderOptions); + }); + + afterEach(async function() { + await recorder.stop(); + }); + + it("sample test", async function() { + console.log("Hi, I'm a test!"); + }); +}); diff --git a/sdk/batch/arm-batch/tsconfig.json b/sdk/batch/arm-batch/tsconfig.json index 0e82052bd8fa..3e6ae96443f3 100644 --- a/sdk/batch/arm-batch/tsconfig.json +++ b/sdk/batch/arm-batch/tsconfig.json @@ -15,17 +15,11 @@ ], "declaration": true, "outDir": "./dist-esm", - "importHelpers": true, - "paths": { - "@azure/arm-batch": [ - "./src/index" - ] - } + "importHelpers": true }, "include": [ "./src/**/*.ts", - "./test/**/*.ts", - "samples-dev/**/*.ts" + "./test/**/*.ts" ], "exclude": [ "node_modules"