Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[mgmt] batch release #28900

Merged
merged 2 commits into from
Mar 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 12 additions & 10 deletions sdk/batch/arm-batch/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
# Release History

## 9.2.0 (2024-03-13)

**Features**

## 9.1.1 (Unreleased)

### Features Added

### Breaking Changes

### Bugs Fixed

### Other Changes

- Added Interface AutomaticOSUpgradePolicy
- Added Interface RollingUpgradePolicy
- Added Interface UpgradePolicy
- Added Type Alias UpgradeMode
- Interface Pool has a new optional parameter upgradePolicy
- Interface SupportedSku has a new optional parameter batchSupportEndOfLife


## 9.1.0 (2023-12-08)

**Features**
Expand Down
2 changes: 1 addition & 1 deletion sdk/batch/arm-batch/LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2023 Microsoft
Copyright (c) 2024 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
Expand Down
6 changes: 3 additions & 3 deletions sdk/batch/arm-batch/_meta.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"commit": "0373f0edc4414fd402603fac51d0df93f1f70507",
"commit": "3004d02873a4b583ba6a3966a370f1ba19b5da1d",
"readme": "specification/batch/resource-manager/readme.md",
"autorest_command": "autorest --version=3.9.7 --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/[email protected].13 --generate-sample=true",
"autorest_command": "autorest --version=3.9.7 --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/[email protected].17 --generate-sample=true",
"repository_url": "https://github.com/Azure/azure-rest-api-specs.git",
"release_tool": "@azure-tools/[email protected]",
"use": "@autorest/[email protected].13"
"use": "@autorest/[email protected].17"
}
2 changes: 1 addition & 1 deletion sdk/batch/arm-batch/assets.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
"AssetsRepo": "Azure/azure-sdk-assets",
"AssetsRepoPrefixPath": "js",
"TagPrefix": "js/batch/arm-batch",
"Tag": "js/batch/arm-batch_b9e91e3a94"
"Tag": "js/batch/arm-batch_5859ca6f69"
}
7 changes: 3 additions & 4 deletions sdk/batch/arm-batch/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"sdk-type": "mgmt",
"author": "Microsoft Corporation",
"description": "A generated SDK for BatchManagementClient.",
"version": "9.1.1",
"version": "9.2.0",
"engines": {
"node": ">=18.0.0"
},
Expand All @@ -12,8 +12,8 @@
"@azure/abort-controller": "^1.0.0",
"@azure/core-paging": "^1.2.0",
"@azure/core-client": "^1.7.0",
"@azure/core-auth": "^1.3.0",
"@azure/core-rest-pipeline": "^1.12.0",
"@azure/core-auth": "^1.6.0",
"@azure/core-rest-pipeline": "^1.14.0",
"tslib": "^2.2.0"
},
"keywords": [
Expand Down Expand Up @@ -79,7 +79,6 @@
"pack": "npm pack 2>&1",
"extract-api": "api-extractor run --local",
"lint": "echo skipped",
"audit": "echo skipped",
"clean": "rimraf --glob dist dist-browser dist-esm test-dist temp types *.tgz *.log",
"build:node": "echo skipped",
"build:browser": "echo skipped",
Expand Down
31 changes: 31 additions & 0 deletions sdk/batch/arm-batch/review/arm-batch.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,14 @@ export type ApplicationUpdateResponse = Application;
// @public
export type AuthenticationMode = "SharedKey" | "AAD" | "TaskAuthenticationToken";

// @public
export interface AutomaticOSUpgradePolicy {
disableAutomaticRollback?: boolean;
enableAutomaticOSUpgrade?: boolean;
osRollingUpgradeDeferral?: boolean;
useRollingUpgradePolicy?: boolean;
}

// @public
export interface AutoScaleRun {
error?: AutoScaleRunError;
Expand Down Expand Up @@ -1125,6 +1133,7 @@ export interface Pool extends ProxyResource {
targetNodeCommunicationMode?: NodeCommunicationMode;
taskSchedulingPolicy?: TaskSchedulingPolicy;
taskSlotsPerNode?: number;
upgradePolicy?: UpgradePolicy;
userAccounts?: UserAccount[];
vmSize?: string;
}
Expand Down Expand Up @@ -1433,6 +1442,17 @@ export interface ResourceFile {
// @public
export type ResourceIdentityType = "SystemAssigned" | "UserAssigned" | "None";

// @public
export interface RollingUpgradePolicy {
enableCrossZoneUpgrade?: boolean;
maxBatchInstancePercent?: number;
maxUnhealthyInstancePercent?: number;
maxUnhealthyUpgradedInstancePercent?: number;
pauseTimeBetweenBatches?: string;
prioritizeUnhealthyInstances?: boolean;
rollbackFailedInstancesOnPolicyBreach?: boolean;
}

// @public
export interface ScaleSettings {
autoScale?: AutoScaleSettings;
Expand Down Expand Up @@ -1473,6 +1493,7 @@ export type StorageAccountType = "Standard_LRS" | "Premium_LRS" | "StandardSSD_L

// @public
export interface SupportedSku {
readonly batchSupportEndOfLife?: Date;
readonly capabilities?: SkuCapability[];
readonly familyName?: string;
readonly name?: string;
Expand Down Expand Up @@ -1503,6 +1524,16 @@ export interface UefiSettings {
vTpmEnabled?: boolean;
}

// @public
export type UpgradeMode = "automatic" | "manual" | "rolling";

// @public
export interface UpgradePolicy {
automaticOSUpgradePolicy?: AutomaticOSUpgradePolicy;
mode: UpgradeMode;
rollingUpgradePolicy?: RollingUpgradePolicy;
}

// @public
export interface UserAccount {
elevationLevel?: ElevationLevel;
Expand Down
8 changes: 4 additions & 4 deletions sdk/batch/arm-batch/samples-dev/applicationCreateSample.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import {
Application,
ApplicationCreateOptionalParams,
BatchManagementClient
BatchManagementClient,
} from "@azure/arm-batch";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
Expand All @@ -22,7 +22,7 @@ dotenv.config();
* This sample demonstrates how to Adds an application to the specified Batch account.
*
* @summary Adds an application to the specified Batch account.
* x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-11-01/examples/ApplicationCreate.json
* x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2024-02-01/examples/ApplicationCreate.json
*/
async function applicationCreate() {
const subscriptionId = process.env["BATCH_SUBSCRIPTION_ID"] || "subid";
Expand All @@ -32,7 +32,7 @@ async function applicationCreate() {
const applicationName = "app1";
const parameters: Application = {
allowUpdates: false,
displayName: "myAppName"
displayName: "myAppName",
};
const options: ApplicationCreateOptionalParams = { parameters };
const credential = new DefaultAzureCredential();
Expand All @@ -41,7 +41,7 @@ async function applicationCreate() {
resourceGroupName,
accountName,
applicationName,
options
options,
);
console.log(result);
}
Expand Down
4 changes: 2 additions & 2 deletions sdk/batch/arm-batch/samples-dev/applicationDeleteSample.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ dotenv.config();
* This sample demonstrates how to Deletes an application.
*
* @summary Deletes an application.
* x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-11-01/examples/ApplicationDelete.json
* x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2024-02-01/examples/ApplicationDelete.json
*/
async function applicationDelete() {
const subscriptionId = process.env["BATCH_SUBSCRIPTION_ID"] || "subid";
Expand All @@ -31,7 +31,7 @@ async function applicationDelete() {
const result = await client.applicationOperations.delete(
resourceGroupName,
accountName,
applicationName
applicationName,
);
console.log(result);
}
Expand Down
4 changes: 2 additions & 2 deletions sdk/batch/arm-batch/samples-dev/applicationGetSample.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ dotenv.config();
* This sample demonstrates how to Gets information about the specified application.
*
* @summary Gets information about the specified application.
* x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-11-01/examples/ApplicationGet.json
* x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2024-02-01/examples/ApplicationGet.json
*/
async function applicationGet() {
const subscriptionId = process.env["BATCH_SUBSCRIPTION_ID"] || "subid";
Expand All @@ -31,7 +31,7 @@ async function applicationGet() {
const result = await client.applicationOperations.get(
resourceGroupName,
accountName,
applicationName
applicationName,
);
console.log(result);
}
Expand Down
4 changes: 2 additions & 2 deletions sdk/batch/arm-batch/samples-dev/applicationListSample.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ dotenv.config();
* This sample demonstrates how to Lists all of the applications in the specified account.
*
* @summary Lists all of the applications in the specified account.
* x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-11-01/examples/ApplicationList.json
* x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2024-02-01/examples/ApplicationList.json
*/
async function applicationList() {
const subscriptionId = process.env["BATCH_SUBSCRIPTION_ID"] || "subid";
Expand All @@ -30,7 +30,7 @@ async function applicationList() {
const resArray = new Array();
for await (let item of client.applicationOperations.list(
resourceGroupName,
accountName
accountName,
)) {
resArray.push(item);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
// Licensed under the MIT License.
import {
ActivateApplicationPackageParameters,
BatchManagementClient
BatchManagementClient,
} from "@azure/arm-batch";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
Expand All @@ -21,7 +21,7 @@ dotenv.config();
* This sample demonstrates how to Activates the specified application package. This should be done after the `ApplicationPackage` was created and uploaded. This needs to be done before an `ApplicationPackage` can be used on Pools or Tasks.
*
* @summary Activates the specified application package. This should be done after the `ApplicationPackage` was created and uploaded. This needs to be done before an `ApplicationPackage` can be used on Pools or Tasks.
* x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-11-01/examples/ApplicationPackageActivate.json
* x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2024-02-01/examples/ApplicationPackageActivate.json
*/
async function applicationPackageActivate() {
const subscriptionId = process.env["BATCH_SUBSCRIPTION_ID"] || "subid";
Expand All @@ -38,7 +38,7 @@ async function applicationPackageActivate() {
accountName,
applicationName,
versionName,
parameters
parameters,
);
console.log(result);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ dotenv.config();
* This sample demonstrates how to 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.
*
* @summary 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.
* x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-11-01/examples/ApplicationPackageCreate.json
* x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2024-02-01/examples/ApplicationPackageCreate.json
*/
async function applicationPackageCreate() {
const subscriptionId = process.env["BATCH_SUBSCRIPTION_ID"] || "subid";
Expand All @@ -33,7 +33,7 @@ async function applicationPackageCreate() {
resourceGroupName,
accountName,
applicationName,
versionName
versionName,
);
console.log(result);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ dotenv.config();
* This sample demonstrates how to Deletes an application package record and its associated binary file.
*
* @summary Deletes an application package record and its associated binary file.
* x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-11-01/examples/ApplicationPackageDelete.json
* x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2024-02-01/examples/ApplicationPackageDelete.json
*/
async function applicationPackageDelete() {
const subscriptionId = process.env["BATCH_SUBSCRIPTION_ID"] || "subid";
Expand All @@ -33,7 +33,7 @@ async function applicationPackageDelete() {
resourceGroupName,
accountName,
applicationName,
versionName
versionName,
);
console.log(result);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ dotenv.config();
* This sample demonstrates how to Gets information about the specified application package.
*
* @summary Gets information about the specified application package.
* x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-11-01/examples/ApplicationPackageGet.json
* x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2024-02-01/examples/ApplicationPackageGet.json
*/
async function applicationPackageGet() {
const subscriptionId = process.env["BATCH_SUBSCRIPTION_ID"] || "subid";
Expand All @@ -33,7 +33,7 @@ async function applicationPackageGet() {
resourceGroupName,
accountName,
applicationName,
versionName
versionName,
);
console.log(result);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ dotenv.config();
* This sample demonstrates how to Lists all of the application packages in the specified application.
*
* @summary Lists all of the application packages in the specified application.
* x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-11-01/examples/ApplicationPackageList.json
* x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2024-02-01/examples/ApplicationPackageList.json
*/
async function applicationPackageList() {
const subscriptionId = process.env["BATCH_SUBSCRIPTION_ID"] || "subid";
Expand All @@ -32,7 +32,7 @@ async function applicationPackageList() {
for await (let item of client.applicationPackageOperations.list(
resourceGroupName,
accountName,
applicationName
applicationName,
)) {
resArray.push(item);
}
Expand Down
6 changes: 3 additions & 3 deletions sdk/batch/arm-batch/samples-dev/applicationUpdateSample.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ dotenv.config();
* This sample demonstrates how to Updates settings for the specified application.
*
* @summary Updates settings for the specified application.
* x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-11-01/examples/ApplicationUpdate.json
* x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2024-02-01/examples/ApplicationUpdate.json
*/
async function applicationUpdate() {
const subscriptionId = process.env["BATCH_SUBSCRIPTION_ID"] || "subid";
Expand All @@ -29,15 +29,15 @@ async function applicationUpdate() {
const parameters: Application = {
allowUpdates: true,
defaultVersion: "2",
displayName: "myAppName"
displayName: "myAppName",
};
const credential = new DefaultAzureCredential();
const client = new BatchManagementClient(credential, subscriptionId);
const result = await client.applicationOperations.update(
resourceGroupName,
accountName,
applicationName,
parameters
parameters,
);
console.log(result);
}
Expand Down
Loading