Skip to content
Closed
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
13 changes: 6 additions & 7 deletions common/config/rush/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 16 additions & 8 deletions sdk/batch/arm-batch/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,23 @@
# Release History

## 8.0.0 (2022-11-01)

**Features**

## 7.2.1 (Unreleased)

### Features Added

### Breaking Changes

### Bugs Fixed
- Added Type Alias NodeCommunicationMode
- 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
- Interface CifsMountConfiguration has a new required parameter userName


## 7.2.0 (2022-07-19)

**Features**
Expand Down
8 changes: 4 additions & 4 deletions sdk/batch/arm-batch/_meta.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"commit": "c03c258c7a01a7d57b3110cc20e2e76752b6f2d6",
"commit": "af4da22aef08af36c87e278a959ab97ebca9d850",
"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"
}
19 changes: 5 additions & 14 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": "7.2.1",
"version": "8.0.0",
"engines": {
"node": ">=14.0.0"
},
Expand Down Expand Up @@ -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",
Expand All @@ -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": {
Expand Down Expand Up @@ -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
}
11 changes: 8 additions & 3 deletions sdk/batch/arm-batch/review/arm-batch.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -661,7 +661,7 @@ export interface CifsMountConfiguration {
password: string;
relativeMountPath: string;
source: string;
username: string;
userName: string;
}

// @public
Expand Down Expand Up @@ -977,7 +977,7 @@ export type NameAvailabilityReason = "Invalid" | "AlreadyExists";

// @public
export interface NetworkConfiguration {
dynamicVNetAssignmentScope?: DynamicVNetAssignmentScope;
dynamicVnetAssignmentScope?: DynamicVNetAssignmentScope;
endpointConfiguration?: PoolEndpointConfiguration;
publicIPAddressConfiguration?: PublicIPAddressConfiguration;
subnetId?: string;
Expand Down Expand Up @@ -1007,6 +1007,9 @@ export interface NFSMountConfiguration {
source: string;
}

// @public
export type NodeCommunicationMode = "Default" | "Classic" | "Simplified";

// @public
export interface NodePlacementConfiguration {
policy?: NodePlacementPolicyType;
Expand Down Expand Up @@ -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;
Expand All @@ -1101,6 +1105,7 @@ export interface Pool extends ProxyResource {
readonly resizeOperationStatus?: ResizeOperationStatus;
scaleSettings?: ScaleSettings;
startTask?: StartTask;
targetNodeCommunicationMode?: NodeCommunicationMode;
taskSchedulingPolicy?: TaskSchedulingPolicy;
taskSlotsPerNode?: number;
userAccounts?: UserAccount[];
Expand Down Expand Up @@ -1346,7 +1351,7 @@ export interface PrivateLinkResourceOperations {

// @public
export interface PrivateLinkServiceConnectionState {
readonly actionRequired?: string;
readonly actionsRequired?: string;
description?: string;
status: PrivateLinkServiceConnectionStatus;
}
Expand Down
41 changes: 24 additions & 17 deletions sdk/batch/arm-batch/src/batchManagementClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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}`
Expand All @@ -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
Expand Down
27 changes: 20 additions & 7 deletions sdk/batch/arm-batch/src/models/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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. */
Expand Down Expand Up @@ -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. */
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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. */
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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[];
Expand All @@ -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. */
Expand Down Expand Up @@ -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";

Expand Down
Loading