diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index 652d4d196478..5bf9a36f2eba 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -9554,7 +9554,7 @@ packages: dev: false file:projects/arm-batch.tgz: - resolution: {integrity: sha512-U12+hJthmarEst+7U9wWLyW7wIgGgrkQHJlKK6+wsN+/bUv5wdbvh2K02YKa3Z1uGNWfHzb0heHM44HlzMio7g==, tarball: file:projects/arm-batch.tgz} + resolution: {integrity: sha512-t4XU94LdSx/5vgAwQWb0ERXkM2MXtdzoCOCnf/NuyfdjAy/RdF5J6v4a6SSPS36XORY/V4S/4a2hDsOlB8x8zw==, tarball: file:projects/arm-batch.tgz} name: '@rush-temp/arm-batch' version: 0.0.0 dependencies: @@ -9562,16 +9562,16 @@ packages: '@azure/arm-storage': 17.0.0 '@azure/identity': 2.0.4 '@microsoft/api-extractor': 7.19.4 - '@rollup/plugin-commonjs': 21.0.1_rollup@2.67.1 - '@rollup/plugin-json': 4.1.0_rollup@2.67.1 - '@rollup/plugin-multi-entry': 3.0.1_rollup@2.67.1 - '@rollup/plugin-node-resolve': 8.4.0_rollup@2.67.1 + '@rollup/plugin-commonjs': 11.0.2_rollup@1.32.1 + '@rollup/plugin-json': 4.1.0_rollup@1.32.1 + '@rollup/plugin-multi-entry': 3.0.1_rollup@1.32.1 + '@rollup/plugin-node-resolve': 8.4.0_rollup@1.32.1 cross-env: 7.0.3 mkdirp: 1.0.4 mocha: 7.2.0 rimraf: 3.0.2 - rollup: 2.67.1 - rollup-plugin-sourcemaps: 0.4.2_rollup@2.67.1 + rollup: 1.32.1 + rollup-plugin-sourcemaps: 0.4.2_rollup@1.32.1 tslib: 2.3.1 typescript: 4.2.4 uglify-js: 3.15.1 @@ -13950,7 +13950,7 @@ packages: dev: false file:projects/core-lro.tgz: - resolution: {integrity: sha512-HBOLfQKGgGh53OwwMxd12xQyT0PfH3r+ajH/UmdsJ7+9MV2Z2QjFoZcrJVq/2Vpjolvfj8eLOhh43BujCaXpxA==, tarball: file:projects/core-lro.tgz} + resolution: {integrity: sha512-ewaXXxQnfcoQb9H1pkXNur7L86VeTvVvxx4s4BkJARNGh9tdf8ADHKGMDsmwh76hwWQQvM75cCxOAwURhOkgLw==, tarball: file:projects/core-lro.tgz} name: '@rush-temp/core-lro' version: 0.0.0 dependencies: @@ -15762,7 +15762,7 @@ packages: dev: false file:projects/perf-search-documents.tgz: - resolution: {integrity: sha512-AgXMuGJhPrpPiIQTYpATvq2ZEyH/zDApKB1hUCr6PR+w5SAXk7fAjTEafBvPHdtKgIJ4mGjQGvjbiqKeisbCUA==, tarball: file:projects/perf-search-documents.tgz} + resolution: {integrity: sha512-fDGQFcgVitwZW22LuRwj1sHE0wCl34WzYcSfeZAnr+k/lf9LCZKPxmDkCejI+PV5N2MY1bnoKw873zzOma8Adw==, tarball: file:projects/perf-search-documents.tgz} name: '@rush-temp/perf-search-documents' version: 0.0.0 dependencies: diff --git a/sdk/batch/arm-batch/CHANGELOG.md b/sdk/batch/arm-batch/CHANGELOG.md index fb144dc54424..c001a4fe0c5d 100644 --- a/sdk/batch/arm-batch/CHANGELOG.md +++ b/sdk/batch/arm-batch/CHANGELOG.md @@ -1,15 +1,23 @@ # Release History - -## 7.0.1 (Unreleased) - -### Features Added - -### Breaking Changes - -### Bugs Fixed - -### Other Changes - + +## 7.1.0 (2022-03-07) + +**Features** + + - Added operation BatchAccountOperations.getDetector + - Added operation BatchAccountOperations.listDetectors + - Added Interface BatchAccountGetDetectorOptionalParams + - Added Interface BatchAccountListDetectorsNextOptionalParams + - Added Interface BatchAccountListDetectorsOptionalParams + - Added Interface DetectorListResult + - Added Type Alias BatchAccountGetDetectorResponse + - Added Type Alias BatchAccountListDetectorsNextResponse + - Added Type Alias BatchAccountListDetectorsResponse + - Added Type Alias DetectorResponse + - Added Type Alias DynamicVNetAssignmentScope + - Interface NetworkConfiguration has a new optional parameter dynamicVNetAssignmentScope + + ## 7.0.0 (2021-12-24) The package of @azure/arm-batch is using our next generation design principles since version 7.0.0, which contains breaking changes. diff --git a/sdk/batch/arm-batch/LICENSE b/sdk/batch/arm-batch/LICENSE index ccb63b166732..5d1d36e0af80 100644 --- a/sdk/batch/arm-batch/LICENSE +++ b/sdk/batch/arm-batch/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2021 Microsoft +Copyright (c) 2022 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/_meta.json b/sdk/batch/arm-batch/_meta.json index 5fd6b75fc80c..5b3032b101d7 100644 --- a/sdk/batch/arm-batch/_meta.json +++ b/sdk/batch/arm-batch/_meta.json @@ -1,7 +1,7 @@ { - "commit": "698ebc782f3cc4650f6df1d765f6a38a6695ad50", + "commit": "8c78db058eb581e28976d2f71626a7beb8c4d195", "readme": "specification/batch/resource-manager/readme.md", - "autorest_command": "autorest --version=3.1.3 --typescript --modelerfour.lenient-model-deduplication --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\mydev\\azure-sdk-for-js ../azure-rest-api-specs/specification/batch/resource-manager/readme.md --use=@autorest/typescript@6.0.0-alpha.16.20211217.1", + "autorest_command": "autorest --version=3.7.3 --typescript --modelerfour.lenient-model-deduplication --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-js ../azure-rest-api-specs/specification/batch/resource-manager/readme.md --use=@autorest/typescript@6.0.0-alpha.16.20220105.1", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "use": "@autorest/typescript@6.0.0-alpha.16.20211217.1" + "use": "@autorest/typescript@6.0.0-alpha.16.20220105.1" } \ No newline at end of file diff --git a/sdk/batch/arm-batch/api-extractor.json b/sdk/batch/arm-batch/api-extractor.json index 74a32fc5ad6e..d6617ba118c0 100644 --- a/sdk/batch/arm-batch/api-extractor.json +++ b/sdk/batch/arm-batch/api-extractor.json @@ -1,18 +1,31 @@ { "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json", "mainEntryPointFilePath": "./dist-esm/src/index.d.ts", - "docModel": { "enabled": true }, - "apiReport": { "enabled": true, "reportFolder": "./review" }, + "docModel": { + "enabled": true + }, + "apiReport": { + "enabled": true, + "reportFolder": "./review" + }, "dtsRollup": { "enabled": true, "untrimmedFilePath": "", "publicTrimmedFilePath": "./types/arm-batch.d.ts" }, "messages": { - "tsdocMessageReporting": { "default": { "logLevel": "none" } }, + "tsdocMessageReporting": { + "default": { + "logLevel": "none" + } + }, "extractorMessageReporting": { - "ae-missing-release-tag": { "logLevel": "none" }, - "ae-unresolved-link": { "logLevel": "none" } + "ae-missing-release-tag": { + "logLevel": "none" + }, + "ae-unresolved-link": { + "logLevel": "none" + } } } -} +} \ No newline at end of file diff --git a/sdk/batch/arm-batch/package.json b/sdk/batch/arm-batch/package.json index a5eb59def7cf..33f84fbd25e9 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.0.1", + "version": "1.0.0-beta.1", "engines": { "node": ">=12.0.0" }, @@ -29,12 +29,12 @@ "types": "./types/arm-batch.d.ts", "devDependencies": { "@microsoft/api-extractor": "^7.18.11", - "@rollup/plugin-commonjs": "^21.0.1", + "@rollup/plugin-commonjs": "11.0.2", "@rollup/plugin-json": "^4.0.0", "@rollup/plugin-multi-entry": "^3.0.0", "@rollup/plugin-node-resolve": "^8.0.0", "mkdirp": "^1.0.4", - "rollup": "^2.0.0", + "rollup": "^1.16.3", "rollup-plugin-sourcemaps": "^0.4.2", "typescript": "~4.2.0", "uglify-js": "^3.4.9", @@ -42,8 +42,7 @@ "@azure/identity": "^2.0.1", "@azure-tools/test-recorder": "^1.0.0", "mocha": "^7.1.1", - "cross-env": "^7.0.2", - "@azure/arm-storage": "^17.0.0" + "cross-env": "^7.0.2" }, "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/batch/arm-batch", "repository": { @@ -100,4 +99,4 @@ }, "sideEffects": false, "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 dd151ccc0e5c..bf8a2382e4d0 100644 --- a/sdk/batch/arm-batch/review/arm-batch.api.md +++ b/sdk/batch/arm-batch/review/arm-batch.api.md @@ -274,6 +274,13 @@ export interface BatchAccountDeleteOptionalParams extends coreClient.OperationOp updateIntervalInMs?: number; } +// @public +export interface BatchAccountGetDetectorOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type BatchAccountGetDetectorResponse = DetectorResponse; + // @public export interface BatchAccountGetKeysOptionalParams extends coreClient.OperationOptions { } @@ -319,6 +326,20 @@ export interface BatchAccountListByResourceGroupOptionalParams extends coreClien // @public export type BatchAccountListByResourceGroupResponse = BatchAccountListResult; +// @public +export interface BatchAccountListDetectorsNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type BatchAccountListDetectorsNextResponse = DetectorListResult; + +// @public +export interface BatchAccountListDetectorsOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type BatchAccountListDetectorsResponse = DetectorListResult; + // @public export interface BatchAccountListNextOptionalParams extends coreClient.OperationOptions { } @@ -360,9 +381,11 @@ export interface BatchAccountOperations { beginDelete(resourceGroupName: string, accountName: string, options?: BatchAccountDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(resourceGroupName: string, accountName: string, options?: BatchAccountDeleteOptionalParams): Promise; get(resourceGroupName: string, accountName: string, options?: BatchAccountGetOptionalParams): Promise; + getDetector(resourceGroupName: string, accountName: string, detectorId: string, options?: BatchAccountGetDetectorOptionalParams): Promise; getKeys(resourceGroupName: string, accountName: string, options?: BatchAccountGetKeysOptionalParams): Promise; list(options?: BatchAccountListOptionalParams): PagedAsyncIterableIterator; listByResourceGroup(resourceGroupName: string, options?: BatchAccountListByResourceGroupOptionalParams): PagedAsyncIterableIterator; + listDetectors(resourceGroupName: string, accountName: string, options?: BatchAccountListDetectorsOptionalParams): PagedAsyncIterableIterator; listOutboundNetworkDependenciesEndpoints(resourceGroupName: string, accountName: string, options?: BatchAccountListOutboundNetworkDependenciesEndpointsOptionalParams): PagedAsyncIterableIterator; regenerateKey(resourceGroupName: string, accountName: string, parameters: BatchAccountRegenerateKeyParameters, options?: BatchAccountRegenerateKeyOptionalParams): Promise; synchronizeAutoStorageKeys(resourceGroupName: string, accountName: string, options?: BatchAccountSynchronizeAutoStorageKeysOptionalParams): Promise; @@ -706,6 +729,17 @@ export interface DeploymentConfiguration { virtualMachineConfiguration?: VirtualMachineConfiguration; } +// @public +export interface DetectorListResult { + nextLink?: string; + value?: DetectorResponse[]; +} + +// @public +export type DetectorResponse = ProxyResource & { + value?: string; +}; + // @public export interface DiffDiskSettings { placement?: "CacheDisk"; @@ -719,6 +753,9 @@ export interface DiskEncryptionConfiguration { // @public export type DiskEncryptionTarget = "OsDisk" | "TemporaryDisk"; +// @public +export type DynamicVNetAssignmentScope = "none" | "job"; + // @public export type ElevationLevel = "NonAdmin" | "Admin"; @@ -920,6 +957,7 @@ export type NameAvailabilityReason = "Invalid" | "AlreadyExists"; // @public export interface NetworkConfiguration { + dynamicVNetAssignmentScope?: DynamicVNetAssignmentScope; endpointConfiguration?: PoolEndpointConfiguration; publicIPAddressConfiguration?: PublicIPAddressConfiguration; subnetId?: string; diff --git a/sdk/batch/arm-batch/src/batchManagementClient.ts b/sdk/batch/arm-batch/src/batchManagementClient.ts index 7c3c80e9ea77..4942eddbe002 100644 --- a/sdk/batch/arm-batch/src/batchManagementClient.ts +++ b/sdk/batch/arm-batch/src/batchManagementClient.ts @@ -65,7 +65,7 @@ export class BatchManagementClient extends coreClient.ServiceClient { credential: credentials }; - const packageDetails = `azsdk-js-arm-batch/7.0.0`; + const packageDetails = `azsdk-js-arm-batch/7.1.0`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` @@ -88,7 +88,7 @@ export class BatchManagementClient extends coreClient.ServiceClient { // Assigning values to Constant parameters this.$host = options.$host || "https://management.azure.com"; - this.apiVersion = options.apiVersion || "2021-06-01"; + this.apiVersion = options.apiVersion || "2022-01-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 34c4a9e86a9d..766e39ceec3c 100644 --- a/sdk/batch/arm-batch/src/models/index.ts +++ b/sdk/batch/arm-batch/src/models/index.ts @@ -426,6 +426,14 @@ export interface CertificateBaseProperties { format?: CertificateFormat; } +/** Values returned by the List operation. */ +export interface DetectorListResult { + /** The collection of Batch account detectors returned by the listing operation. */ + value?: DetectorResponse[]; + /** The URL to get the next set of results. */ + nextLink?: string; +} + /** Values returned by the List operation. */ export interface ListPrivateLinkResourcesResult { /** The collection of returned private link resources. */ @@ -502,7 +510,7 @@ export interface ImageReference { publisher?: string; /** For example, UbuntuServer or WindowsServer. */ offer?: string; - /** For example, 18.04-LTS or 2019-Datacenter. */ + /** For example, 18.04-LTS or 2022-datacenter. */ sku?: string; /** A value of 'latest' can be specified to select the latest version of an image. If omitted, the default is 'latest'. */ version?: string; @@ -659,6 +667,8 @@ export interface AutoScaleRunError { 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; /** 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. */ @@ -703,7 +713,7 @@ export interface NetworkSecurityGroupRule { export interface PublicIPAddressConfiguration { /** The default value is BatchManaged */ provision?: IPAddressProvisioningType; - /** The number of IPs specified here limits the maximum size of the Pool - 100 dedicated nodes or 100 low-priority nodes can be allocated for each public IP. For example, a pool needing 250 dedicated VMs would need at least 3 public IPs specified. Each element of this collection is of the form: /subscriptions/{subscription}/resourceGroups/{group}/providers/Microsoft.Network/publicIPAddresses/{ip}. */ + /** The number of IPs specified here limits the maximum size of the Pool - 100 dedicated nodes or 100 Spot/low-priority nodes can be allocated for each public IP. For example, a pool needing 250 dedicated VMs would need at least 3 public IPs specified. Each element of this collection is of the form: /subscriptions/{subscription}/resourceGroups/{group}/providers/Microsoft.Network/publicIPAddresses/{ip}. */ ipAddressIds?: string[]; } @@ -761,7 +771,7 @@ export interface StartTask { environmentSettings?: EnvironmentSetting[]; /** If omitted, the task runs as a non-administrative user unique to the task. */ userIdentity?: UserIdentity; - /** The Batch service retries a task if its exit code is nonzero. Note that this value specifically controls the number of retries. The Batch service will try the task once, and may then retry up to this limit. For example, if the maximum retry count is 3, Batch tries the task up to 4 times (one initial try and 3 retries). If the maximum retry count is 0, the Batch service does not retry the task. If the maximum retry count is -1, the Batch service retries the task without limit. */ + /** The Batch service retries a task if its exit code is nonzero. Note that this value specifically controls the number of retries. The Batch service will try the task once, and may then retry up to this limit. For example, if the maximum retry count is 3, Batch tries the task up to 4 times (one initial try and 3 retries). If the maximum retry count is 0, the Batch service does not retry the task. If the maximum retry count is -1, the Batch service retries the task without limit, however this is not recommended for a start task or any task. The default value is 0 (no retries). */ maxTaskRetryCount?: number; /** If true and the start task fails on a compute node, the Batch service retries the start task up to its maximum retry count (maxTaskRetryCount). If the task has still not completed successfully after all retries, then the Batch service marks the compute node unusable, and will not schedule tasks to it. This condition can be detected via the node state and scheduling error detail. If false, the Batch service will not wait for the start task to complete. In this case, other tasks can start executing on the compute node while the start task is still running; and even if the start task fails, new tasks will continue to be scheduled on the node. The default is true. */ waitForSuccess?: boolean; @@ -847,7 +857,7 @@ export interface ApplicationPackageReference { export interface ResizeOperationStatus { /** The desired number of dedicated compute nodes in the pool. */ targetDedicatedNodes?: number; - /** The desired number of low-priority compute nodes in the pool. */ + /** The desired number of Spot/low-priority compute nodes in the pool. */ targetLowPriorityNodes?: number; /** The default value is 15 minutes. The minimum value is 5 minutes. If you specify a value less than 5 minutes, the Batch service returns an error; if you are calling the REST API directly, the HTTP status code is 400 (Bad Request). */ resizeTimeout?: string; @@ -1107,6 +1117,12 @@ export type CertificateCreateOrUpdateParameters = ProxyResource & { password?: string; }; +/** Contains the information for a detector. */ +export type DetectorResponse = ProxyResource & { + /** A base64 encoded string that represents the content of a detector. */ + value?: string; +}; + /** Contains information about a private link resource. */ export type PrivateLinkResource = ProxyResource & { /** @@ -1172,7 +1188,7 @@ export type Pool = ProxyResource & { */ readonly currentDedicatedNodes?: number; /** - * The number of low-priority compute nodes currently in the pool. + * The number of Spot/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; @@ -1492,6 +1508,8 @@ export type ComputeNodeDeallocationOption = | "RetainedData"; /** Defines values for InterNodeCommunicationState. */ export type InterNodeCommunicationState = "Enabled" | "Disabled"; +/** Defines values for DynamicVNetAssignmentScope. */ +export type DynamicVNetAssignmentScope = "none" | "job"; /** Defines values for InboundEndpointProtocol. */ export type InboundEndpointProtocol = "TCP" | "UDP"; /** Defines values for NetworkSecurityGroupRuleAccess. */ @@ -1587,6 +1605,20 @@ export interface BatchAccountGetKeysOptionalParams /** Contains response data for the getKeys operation. */ export type BatchAccountGetKeysResponse = BatchAccountKeys; +/** Optional parameters. */ +export interface BatchAccountListDetectorsOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listDetectors operation. */ +export type BatchAccountListDetectorsResponse = DetectorListResult; + +/** Optional parameters. */ +export interface BatchAccountGetDetectorOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the getDetector operation. */ +export type BatchAccountGetDetectorResponse = DetectorResponse; + /** Optional parameters. */ export interface BatchAccountListOutboundNetworkDependenciesEndpointsOptionalParams extends coreClient.OperationOptions {} @@ -1608,6 +1640,13 @@ export interface BatchAccountListByResourceGroupNextOptionalParams /** Contains response data for the listByResourceGroupNext operation. */ export type BatchAccountListByResourceGroupNextResponse = BatchAccountListResult; +/** Optional parameters. */ +export interface BatchAccountListDetectorsNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listDetectorsNext operation. */ +export type BatchAccountListDetectorsNextResponse = DetectorListResult; + /** Optional parameters. */ export interface BatchAccountListOutboundNetworkDependenciesEndpointsNextOptionalParams extends coreClient.OperationOptions {} diff --git a/sdk/batch/arm-batch/src/models/mappers.ts b/sdk/batch/arm-batch/src/models/mappers.ts index 53269a449d52..734a747f9fbd 100644 --- a/sdk/batch/arm-batch/src/models/mappers.ts +++ b/sdk/batch/arm-batch/src/models/mappers.ts @@ -1013,6 +1013,33 @@ export const CertificateBaseProperties: coreClient.CompositeMapper = { } }; +export const DetectorListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DetectorListResult", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "DetectorResponse" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + export const ListPrivateLinkResourcesResult: coreClient.CompositeMapper = { type: { name: "Composite", @@ -1688,6 +1715,13 @@ export const NetworkConfiguration: coreClient.CompositeMapper = { name: "String" } }, + dynamicVNetAssignmentScope: { + serializedName: "dynamicVNetAssignmentScope", + type: { + name: "Enum", + allowedValues: ["none", "job"] + } + }, endpointConfiguration: { serializedName: "endpointConfiguration", type: { @@ -2935,6 +2969,22 @@ export const CertificateCreateOrUpdateParameters: coreClient.CompositeMapper = { } }; +export const DetectorResponse: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DetectorResponse", + modelProperties: { + ...ProxyResource.type.modelProperties, + value: { + serializedName: "properties.value", + type: { + name: "String" + } + } + } + } +}; + export const PrivateLinkResource: coreClient.CompositeMapper = { type: { name: "Composite", diff --git a/sdk/batch/arm-batch/src/models/parameters.ts b/sdk/batch/arm-batch/src/models/parameters.ts index 3815a96a0fec..1610c3503209 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: "2021-06-01", + defaultValue: "2022-01-01", isConstant: true, serializedName: "api-version", type: { @@ -141,6 +141,17 @@ export const parameters2: OperationParameter = { mapper: BatchAccountRegenerateKeyParametersMapper }; +export const detectorId: OperationURLParameter = { + parameterPath: "detectorId", + mapper: { + serializedName: "detectorId", + required: true, + type: { + name: "String" + } + } +}; + export const nextLink: OperationURLParameter = { parameterPath: "nextLink", mapper: { diff --git a/sdk/batch/arm-batch/src/operations/batchAccountOperations.ts b/sdk/batch/arm-batch/src/operations/batchAccountOperations.ts index 792bb2d50249..63142c666ef9 100644 --- a/sdk/batch/arm-batch/src/operations/batchAccountOperations.ts +++ b/sdk/batch/arm-batch/src/operations/batchAccountOperations.ts @@ -20,6 +20,9 @@ import { BatchAccountListOptionalParams, BatchAccountListByResourceGroupNextOptionalParams, BatchAccountListByResourceGroupOptionalParams, + DetectorResponse, + BatchAccountListDetectorsNextOptionalParams, + BatchAccountListDetectorsOptionalParams, OutboundEnvironmentEndpoint, BatchAccountListOutboundNetworkDependenciesEndpointsNextOptionalParams, BatchAccountListOutboundNetworkDependenciesEndpointsOptionalParams, @@ -40,9 +43,13 @@ import { BatchAccountRegenerateKeyResponse, BatchAccountGetKeysOptionalParams, BatchAccountGetKeysResponse, + BatchAccountListDetectorsResponse, + BatchAccountGetDetectorOptionalParams, + BatchAccountGetDetectorResponse, BatchAccountListOutboundNetworkDependenciesEndpointsResponse, BatchAccountListNextResponse, BatchAccountListByResourceGroupNextResponse, + BatchAccountListDetectorsNextResponse, BatchAccountListOutboundNetworkDependenciesEndpointsNextResponse } from "../models"; @@ -154,6 +161,77 @@ export class BatchAccountOperationsImpl implements BatchAccountOperations { } } + /** + * Gets information about the detectors available for a given Batch account. + * @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. + */ + public listDetectors( + resourceGroupName: string, + accountName: string, + options?: BatchAccountListDetectorsOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listDetectorsPagingAll( + resourceGroupName, + accountName, + options + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listDetectorsPagingPage( + resourceGroupName, + accountName, + options + ); + } + }; + } + + private async *listDetectorsPagingPage( + resourceGroupName: string, + accountName: string, + options?: BatchAccountListDetectorsOptionalParams + ): AsyncIterableIterator { + let result = await this._listDetectors( + resourceGroupName, + accountName, + options + ); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listDetectorsNext( + resourceGroupName, + accountName, + continuationToken, + options + ); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *listDetectorsPagingAll( + resourceGroupName: string, + accountName: string, + options?: BatchAccountListDetectorsOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listDetectorsPagingPage( + resourceGroupName, + accountName, + options + )) { + yield* page; + } + } + /** * 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, @@ -531,6 +609,42 @@ export class BatchAccountOperationsImpl implements BatchAccountOperations { ); } + /** + * Gets information about the detectors available for a given Batch account. + * @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. + */ + private _listDetectors( + resourceGroupName: string, + accountName: string, + options?: BatchAccountListDetectorsOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, accountName, options }, + listDetectorsOperationSpec + ); + } + + /** + * Gets information about the given detector for a given Batch account. + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param detectorId The name of the detector. + * @param options The options parameters. + */ + getDetector( + resourceGroupName: string, + accountName: string, + detectorId: string, + options?: BatchAccountGetDetectorOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, accountName, detectorId, options }, + getDetectorOperationSpec + ); + } + /** * 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, @@ -585,6 +699,25 @@ export class BatchAccountOperationsImpl implements BatchAccountOperations { ); } + /** + * ListDetectorsNext + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param nextLink The nextLink from the previous successful call to the ListDetectors method. + * @param options The options parameters. + */ + private _listDetectorsNext( + resourceGroupName: string, + accountName: string, + nextLink: string, + options?: BatchAccountListDetectorsNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, accountName, nextLink, options }, + listDetectorsNextOperationSpec + ); + } + /** * ListOutboundNetworkDependenciesEndpointsNext * @param resourceGroupName The name of the resource group that contains the Batch account. @@ -814,6 +947,51 @@ const getKeysOperationSpec: coreClient.OperationSpec = { headerParameters: [Parameters.accept], serializer }; +const listDetectorsOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/detectors", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.DetectorListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.accountName1 + ], + headerParameters: [Parameters.accept], + serializer +}; +const getDetectorOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/detectors/{detectorId}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.DetectorResponse + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.accountName1, + Parameters.detectorId + ], + headerParameters: [Parameters.accept], + serializer +}; const listOutboundNetworkDependenciesEndpointsOperationSpec: coreClient.OperationSpec = { path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/outboundNetworkDependenciesEndpoints", @@ -877,6 +1055,28 @@ const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { headerParameters: [Parameters.accept], serializer }; +const listDetectorsNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.DetectorListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.accountName1, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer +}; const listOutboundNetworkDependenciesEndpointsNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", httpMethod: "GET", diff --git a/sdk/batch/arm-batch/src/operationsInterfaces/batchAccountOperations.ts b/sdk/batch/arm-batch/src/operationsInterfaces/batchAccountOperations.ts index a8c6d1f4ad2d..24c1be7d5026 100644 --- a/sdk/batch/arm-batch/src/operationsInterfaces/batchAccountOperations.ts +++ b/sdk/batch/arm-batch/src/operationsInterfaces/batchAccountOperations.ts @@ -12,6 +12,8 @@ import { BatchAccount, BatchAccountListOptionalParams, BatchAccountListByResourceGroupOptionalParams, + DetectorResponse, + BatchAccountListDetectorsOptionalParams, OutboundEnvironmentEndpoint, BatchAccountListOutboundNetworkDependenciesEndpointsOptionalParams, BatchAccountCreateParameters, @@ -28,7 +30,9 @@ import { BatchAccountRegenerateKeyOptionalParams, BatchAccountRegenerateKeyResponse, BatchAccountGetKeysOptionalParams, - BatchAccountGetKeysResponse + BatchAccountGetKeysResponse, + BatchAccountGetDetectorOptionalParams, + BatchAccountGetDetectorResponse } from "../models"; /// @@ -50,6 +54,17 @@ export interface BatchAccountOperations { resourceGroupName: string, options?: BatchAccountListByResourceGroupOptionalParams ): PagedAsyncIterableIterator; + /** + * Gets information about the detectors available for a given Batch account. + * @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. + */ + listDetectors( + resourceGroupName: string, + accountName: string, + options?: BatchAccountListDetectorsOptionalParams + ): PagedAsyncIterableIterator; /** * 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, @@ -193,4 +208,17 @@ export interface BatchAccountOperations { accountName: string, options?: BatchAccountGetKeysOptionalParams ): Promise; + /** + * Gets information about the given detector for a given Batch account. + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param detectorId The name of the detector. + * @param options The options parameters. + */ + getDetector( + resourceGroupName: string, + accountName: string, + detectorId: string, + options?: BatchAccountGetDetectorOptionalParams + ): Promise; } diff --git a/sdk/batch/arm-batch/test/sampleTest.ts b/sdk/batch/arm-batch/test/sampleTest.ts index 429eb13c0443..7ed89b043e1b 100644 --- a/sdk/batch/arm-batch/test/sampleTest.ts +++ b/sdk/batch/arm-batch/test/sampleTest.ts @@ -10,14 +10,9 @@ import { env, record, RecorderEnvironmentSetup, - Recorder, - delay, - isPlaybackMode + Recorder } from "@azure-tools/test-recorder"; import * as assert from "assert"; -import { ClientSecretCredential } from "@azure/identity"; -import { BatchManagementClient } from "../src/batchManagementClient"; -import { StorageManagementClient,StorageAccountCreateParameters } from "@azure/arm-storage"; const recorderEnvSetup: RecorderEnvironmentSetup = { replaceableVariables: { @@ -36,296 +31,18 @@ const recorderEnvSetup: RecorderEnvironmentSetup = { queryParametersToSkip: [] }; -export const testPollingOptions = { - updateIntervalInMs: isPlaybackMode() ? 0 : undefined, -}; - -describe("Batch test", () => { +describe("My test", () => { let recorder: Recorder; - let subscriptionId: string; - let client: BatchManagementClient; - let storage_client: StorageManagementClient; - let location: string; - let resourceGroup: string; - let accountName: string; - let applicationName: string; - let storageaccountName: string; - let certificateName: string; - let poolName: string; beforeEach(async function() { recorder = record(this, recorderEnvSetup); - subscriptionId = env.SUBSCRIPTION_ID; - // This is an example of how the environment variables are used - const credential = new ClientSecretCredential( - env.AZURE_TENANT_ID, - env.AZURE_CLIENT_ID, - env.AZURE_CLIENT_SECRET - ); - client = new BatchManagementClient(credential, subscriptionId); - storage_client = new StorageManagementClient(credential, subscriptionId); - location = "eastus"; - resourceGroup = "myjstest"; - accountName = "myaccountxxx"; - applicationName = "myapplicationxxx"; - storageaccountName = "mystorageaccountxxx"; - certificateName = "sha1-cff2ab63c8c955aaf71989efa641b906558d9fb7"; - poolName = "mypoolxxx"; }); afterEach(async function() { await recorder.stop(); }); - async function storageAccounts_beginCreateAndWait() { - const parameter: StorageAccountCreateParameters = { - sku: { - name: "Standard_GRS", - }, - kind: "StorageV2", - location: "westeurope", - encryption: { - services: { - file: { - keyType: "Account", - enabled: true - }, - blob: { - keyType: "Account", - enabled: true - }, - }, - keySource: "Microsoft.Storage", - }, - tags: { - key1: "value1", - key2: "value2", - } - } - const res = await storage_client.storageAccounts.beginCreateAndWait(resourceGroup,storageaccountName,parameter,testPollingOptions); - }; - - it("batchAccountOperations create test", async function() { - // await storageAccounts_beginCreateAndWait(); - const res = await client.batchAccountOperations.beginCreateAndWait(resourceGroup,accountName,{ - location: location, - autoStorage: { - storageAccountId: "/subscriptions/"+subscriptionId+"/resourceGroups/"+resourceGroup+"/providers/Microsoft.Storage/storageAccounts/"+storageaccountName - } - },testPollingOptions); - assert.equal(res.name,accountName); - }); - - it("batchAccountOperations get test", async function() { - const res = await client.batchAccountOperations.get(resourceGroup,accountName); - assert.equal(res.name,accountName); - }); - - it("batchAccountOperations getkeys test", async function() { - const res = await client.batchAccountOperations.getKeys(resourceGroup,accountName); - assert.equal(res.accountName,accountName); - }); - - it("batchAccountOperations regenerateKey test", async function() { - const res = await client.batchAccountOperations.regenerateKey(resourceGroup,accountName,{keyName: "Primary"}); - assert.equal(res.accountName,accountName); - }); - - it("batchAccountOperations list test", async function() { - const resArray = new Array(); - for await (let item of client.batchAccountOperations.list()){ - resArray.push(item); - } - assert.equal(resArray.length,1); - }); - - it("batchAccountOperations update test", async function() { - const res = await client.batchAccountOperations.update(resourceGroup,accountName,{tags: {key1: "value1"}}); - assert.equal(res.type,"Microsoft.Batch/batchAccounts"); - }); - - it("applicationOperations create test", async function() { - const res = await client.applicationOperations.create(resourceGroup,accountName,applicationName,{parameters: {allowUpdates: false}}); - assert.equal(res.name,applicationName); - }); - - it("applicationOperations get test", async function() { - const res = await client.applicationOperations.get(resourceGroup,accountName,applicationName); - assert.equal(res.name,applicationName); - }); - - it("applicationOperations list test", async function() { - const resArray = new Array(); - for await (let item of client.applicationOperations.list(resourceGroup,accountName)){ - resArray.push(item); - } - assert.equal(resArray.length,1); - }); - - it("certificateOperations create test", async function() { - const res = await client.certificateOperations.create(resourceGroup,accountName,certificateName,{ - thumbprint:'cff2ab63c8c955aaf71989efa641b906558d9fb7', - thumbprintAlgorithm:'sha1', - data:'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', - format: "Pfx", - password: "nodesdk" - }); - assert.equal(res.name,certificateName); - }); - - it("certificateOperations get test", async function() { - const res = await client.certificateOperations.get(resourceGroup,accountName,certificateName); - assert.equal(res.name,certificateName); - }); - - it("certificateOperations list test", async function() { - const resArray = new Array(); - for await (let item of client.certificateOperations.listByBatchAccount(resourceGroup,accountName)){ - resArray.push(item); - } - assert.equal(resArray.length,1); - }); - - it("certificateOperations update test", async function() { - const res = await client.certificateOperations.update(resourceGroup,accountName,certificateName,{ - data:'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', - password: "nodesdk" - - }); - assert.equal(res.type,"Microsoft.Batch/batchAccounts/certificates"); - }); - - it("certificateOperations cancelDeletion test", async function() { - const res = await client.certificateOperations.cancelDeletion(resourceGroup,accountName,certificateName); - assert.equal(res.name,certificateName); - }); - - it("location checkNameAvailability test", async function() { - const res = await client.location.checkNameAvailability(location,{name: accountName,type: "Microsoft.Batch/batchAccounts"}); - assert.equal(res.reason,"AlreadyExists") - }); - - it("location getQuotas test", async function() { - const res = await client.location.getQuotas(location); - assert.equal(res.accountQuota,3) - }); - - it("location listSupportedCloudServiceSkus test", async function() { - const resArray = new Array(); - for await (let item of client.location.listSupportedCloudServiceSkus(location)){ - resArray.push(item); - } - assert.notEqual(resArray.length,0); - }); - - it("location listSupportedVirtualMachineSkus test", async function() { - const resArray = new Array(); - for await (let item of client.location.listSupportedVirtualMachineSkus(location)){ - resArray.push(item); - } - assert.notEqual(resArray.length,0); - }); - - it("poolOperations create test", async function() { - const res = await client.poolOperations.create(resourceGroup,accountName,poolName,{ - vmSize: "STANDARD_D4", - deploymentConfiguration: { - cloudServiceConfiguration: { - osFamily: "5" - } - }, - scaleSettings: { - fixedScale: { - targetDedicatedNodes: 3 - } - } - }) - assert.equal(res.name,poolName); - }); - - it("poolOperations get test", async function() { - const res = await client.poolOperations.get(resourceGroup,accountName,poolName); - console.log(res); - }); - - it("poolOperations listByBatchAccount test", async function() { - const resArray = new Array(); - for await (let item of client.poolOperations.listByBatchAccount(resourceGroup,accountName)){ - resArray.push(item); - } - assert.equal(resArray.length,1); - }); - - it("poolOperations update test", async function() { - const res = await client.poolOperations.update(resourceGroup,accountName,poolName,{ - scaleSettings: { - autoScale: { - formula: "$TargetDedicatedNodes=34" - } - } - }); - assert.equal(res.type,"Microsoft.Batch/batchAccounts/pools"); - }); - - it("poolOperations disableAutoScale test", async function() { - const res = await client.poolOperations.disableAutoScale(resourceGroup,accountName,poolName); - assert.equal(res.name,poolName); - }); - - it("poolOperations stopResize test", async function() { - const res = await client.poolOperations.stopResize(resourceGroup,accountName,poolName); - assert.equal(res.name,poolName); - }); - - it("privateEndpointConnectionOperations listByBatchAccount test", async function() { - const resArray = new Array(); - for await (let item of client.privateEndpointConnectionOperations.listByBatchAccount(resourceGroup,accountName)){ - resArray.push(item); - } - assert.equal(resArray.length,0); - }); - - it("privateLinkResourceOperations listByBatchAccount test", async function() { - const resArray = new Array(); - for await (let item of client.privateLinkResourceOperations.listByBatchAccount(resourceGroup,accountName)){ - resArray.push(item); - } - assert.equal(resArray.length,0); - }); - - it("poolOperations delete test", async function() { - const res = await client.poolOperations.beginDeleteAndWait(resourceGroup,accountName,poolName,testPollingOptions); - const resArray = new Array(); - for await (let item of client.poolOperations.listByBatchAccount(resourceGroup,accountName)){ - resArray.push(item); - } - assert.equal(resArray.length,0); - }); - - it("certificateOperations delete test", async function() { - const res = await client.certificateOperations.beginDeleteAndWait(resourceGroup,accountName,certificateName,testPollingOptions); - const resArray = new Array(); - for await (let item of client.certificateOperations.listByBatchAccount(resourceGroup,accountName)){ - resArray.push(item); - } - assert.equal(resArray.length,0); - }); - - it("applicationOperations delete test", async function() { - const res = await client.applicationOperations.delete(resourceGroup,accountName,applicationName); - const resArray = new Array(); - for await (let item of client.applicationOperations.list(resourceGroup,accountName)){ - resArray.push(item); - } - assert.equal(resArray.length,0); - }); - - it("batchAccountOperations delete test", async function() { - const res = await client.batchAccountOperations.beginDeleteAndWait(resourceGroup,accountName,testPollingOptions); - const resArray = new Array(); - for await (let item of client.batchAccountOperations.list()){ - resArray.push(item); - } - assert.equal(resArray.length,0); + 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 6e3251194117..3e6ae96443f3 100644 --- a/sdk/batch/arm-batch/tsconfig.json +++ b/sdk/batch/arm-batch/tsconfig.json @@ -9,11 +9,19 @@ "esModuleInterop": true, "allowSyntheticDefaultImports": true, "forceConsistentCasingInFileNames": true, - "lib": ["es6", "dom"], + "lib": [ + "es6", + "dom" + ], "declaration": true, "outDir": "./dist-esm", "importHelpers": true }, - "include": ["./src/**/*.ts", "./test/**/*.ts"], - "exclude": ["node_modules"] -} + "include": [ + "./src/**/*.ts", + "./test/**/*.ts" + ], + "exclude": [ + "node_modules" + ] +} \ No newline at end of file diff --git a/sdk/batch/ci.mgmt.yml b/sdk/batch/ci.mgmt.yml index 8f8f7b115ca6..d205e78ecd98 100644 --- a/sdk/batch/ci.mgmt.yml +++ b/sdk/batch/ci.mgmt.yml @@ -1,5 +1,5 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. - + trigger: branches: include: @@ -10,6 +10,7 @@ trigger: include: - sdk/batch/ci.mgmt.yml - sdk/batch/arm-batch/ + - sdk/batch/arm-batch pr: branches: include: @@ -23,11 +24,11 @@ pr: include: - sdk/batch/ci.mgmt.yml - sdk/batch/arm-batch/ - + - sdk/batch/arm-batch extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: ServiceDirectory: batch Artifacts: - name: azure-arm-batch - safeName: azurearmbatch \ No newline at end of file + safeName: azurearmbatch