Microsoft.Azure.Batch
16.3.1
Prefix Reserved
dotnet add package Microsoft.Azure.Batch --version 16.3.1
NuGet\Install-Package Microsoft.Azure.Batch -Version 16.3.1
<PackageReference Include="Microsoft.Azure.Batch" Version="16.3.1" />
paket add Microsoft.Azure.Batch --version 16.3.1
#r "nuget: Microsoft.Azure.Batch, 16.3.1"
// Install Microsoft.Azure.Batch as a Cake Addin #addin nuget:?package=Microsoft.Azure.Batch&version=16.3.1 // Install Microsoft.Azure.Batch as a Cake Tool #tool nuget:?package=Microsoft.Azure.Batch&version=16.3.1
License notes
The Azure Batch C# client is now under the MIT license. Prior to March 10 2017 it was under the Apache 2.0 license.
Azure Batch SDK developer guide
Microsoft.Azure.Batch.sln
is your one stop shop for all things related to the Azure Batch C# client library. This solution file contains all of the projects affiliated with the Azure Batch client (including testing and tooling).
Changing the Azure Batch client
Depending on the type of change you want to make, the work required varies. If you follow this process you shouldn't miss anything:
- Update the Azure Batch Swagger specification, which resides in the Azure/azure-rest-api-specs GitHub repository (specifically here)
- Add new entity types into the Swagger specification.
- Add new APIs as path-verb pairs in the Swagger specification.
- Add/remove properties on existing entity types in the Swagger specification.
- Regenerate the
src\GeneratedProtocol
folder using the steps below. - Update the corresponding convenience layer specification file(s) located in
Tools\ObjectModelCodeGenerator\Spec
.- Add new entities that match the Swagger defined entities.
- Add/remove properties on existing entities as done in the Swagger specification.
- Ensure that documentation is properly updated to reflect changes made in the Swagger specification (it usually helps to look at a diff of the Swagger for the API version in question).
- Regenerate the
src\Generated
folder from the convenience layer specification file using the steps below. - Add any custom code on the
Generated
objects intopartial
classes located in thesrc
directory.- You might want to do this to add an
[Obsolete]
attribute or to add some helper factory methods.
- You might want to do this to add an
- If any APIs have changed, or if new APIs have been added, you must update the following places:
- The
src\IProtocolLayer.cs
interface. - The
src\ProtocolLayer.cs
class. - The corresponding operations class, for example
PoolOperations.cs
. - The corresponding entity which the operation is performed on, for example
CloudPool.cs
.
- The
- Add tests for your new models and APIs into the correct test projects.
Azure.Batch.Unit.Tests
for unit tests. These tests do not have any external dependencies (they run entirely in-memory) and are used in the continuous integration job to validate checkins.BatchClientIntegrationTests
for integration tests. These tests run against a live Azure Batch endpoint and do not run during CI. See running the end to end tests for more details about how to run these tests.- Note: You should prefer to add unit tests over integration tests where possible -- integration tests should be reserved for ensuring that the Batch Service accepts the Swagger requests. Testing service behavior should occur in a service test, not the client.
- Update the
CHANGELOG.md
file and theVersion
tag insrc/Microsoft.Azure.Batch.csproj
. Ensure that if you are making a breaking change, you update the major version of the version number. - Run the tests and ensure that they pass.
- Open a PR to https://github.com/Azure/azure-sdk-for-net
Generate the src\GeneratedProtocol
folder using AutoRest
The GeneratedProtocol folder holds the code generated by the AutoRest tool from a Swagger specification. The AutoRest tool has a command line interface of its own which you can use directly, or you can run powershell Start-AutoRestCodeGeneration -ResourceProvider "batch/data-plane" -SdkRepoRootPath "<path to root of this repo>" -AutoRestVersion "latest" -SdkGenerationDirectory "<path to root of this repo>\sdk\batch\Microsoft.Azure.Batch\src\GeneratedProtocol" -ConfigFileTag "package-2020-03.11.0"
Generate the src\Generated
folder
This folder contains the convenience layer models for Azure Batch. It is generated from a custom tool. The custom tool reads all of the specification files located in Tools\ObjectModelCodeGenerator\Spec
. The convenience layer models require more metadata than the Swagger specification provides, so this file is an extra mapping layer on top of Swagger which provides more detail. Note: These specification files are all about the models, they have nothing to do with the actual APIs.
- New entities defined in the Swagger specification have to be added here as well. See an existing entity for an example.
- If the type or name of a property has changed in the underlying Swagger specification, it should be updated here as well.
There are a number of special flags which have meaning in the specification files. The easiest way to see a list of what flags are supported and at what level is to look at the backing code generation code:
- For properties:
Tools\ObjectModelCodeGeneration\CodeGenerationLibrary\PropertyData.cs
- For types:
Tools\ObjectModelCodeGeneration\CodeGenerationLibrary\ObjectModelTypeData.cs
Once you have added and updated the required files in Tools\ObjectModelCodeGenerator\Spec
mark the ObjectModelCodeGenerator
as your startup project in Visual Studio and run it -- it will regenerate the contents of the src\Generated
folder.
Running the end to end tests
A full end to end test pass takes 20-40 minutes. The following environment variables must be set for the the end to end tests to work - it is recommended to set up a script which sets these all so that it can easily be reused later:
MABOM_BatchAccountEndpoint
: The endpoint for your Batch account, i.e.https://<account>.<region>.batch.azure.com
MABOM_BatchAccountSubscriptionId
: The subscription id that your Batch and Storage accounts are in. Please note your storage account and your Batch account need to be in the same subscription.MABOM_BatchAccountResourceGroupName
: The resource group your Batch account is in.MABOM_BatchAccountName
: The name of your Batch account.MABOM_BatchAccountKey
: The key of your Batch account.MABOM_StorageAccountResourceGroupName
: The name of the resource group of your storage account.MABOM_StorageAccount
: The name of your storage account.MABOM_StorageKey
: The key to your storage account.MABOM_BlobEndpoint
: The blob endpoint for the storage account, i.e.https://<account>.blob.core.windows.net
MABOM_BatchManagementEndpoint
: The management endpoint for the tenant you are targeting. This will usually behttps://management.azure.com/
.MABOM_AzureAuthenticationClientId
: The client ID of an AAD App Registration with contributor access to the subscription you're using (#2).MABOM_AzureAuthenticationClientSecret
: The secret for the App Registration (#11).
If running the tests against a test tenant, you also must set:
MABOM_BatchTRPExtraHeaders
to x-ms-version=2015-12-01;x-ms-client-tenant-id=microsoft.onmicrosoft.comMABOM_BatchTRPCertificateThumbprint
: The thumbprint used to authenticate with the Batch Resource Provider.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
.NET Core | netcoreapp1.0 was computed. netcoreapp1.1 was computed. netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard1.4 is compatible. netstandard1.5 was computed. netstandard1.6 was computed. netstandard2.0 is compatible. netstandard2.1 was computed. |
.NET Framework | net452 is compatible. net46 was computed. net461 is compatible. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen30 was computed. tizen40 was computed. tizen60 was computed. |
Universal Windows Platform | uap was computed. uap10.0 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETFramework 4.5.2
- Microsoft.Rest.ClientRuntime (>= 2.3.24 && < 3.0.0)
- Microsoft.Rest.ClientRuntime.Azure (>= 3.3.19 && < 4.0.0)
- Newtonsoft.Json (>= 13.0.1)
- System.Text.Encodings.Web (>= 4.5.1)
-
.NETFramework 4.6.1
- Microsoft.Rest.ClientRuntime (>= 2.3.24 && < 3.0.0)
- Microsoft.Rest.ClientRuntime.Azure (>= 3.3.19 && < 4.0.0)
- Newtonsoft.Json (>= 13.0.1)
- System.Text.Encodings.Web (>= 4.5.1)
-
.NETStandard 1.4
- Microsoft.AspNetCore.WebUtilities (>= 1.1.2)
- Microsoft.Rest.ClientRuntime (>= 2.3.24 && < 3.0.0)
- Microsoft.Rest.ClientRuntime.Azure (>= 3.3.19 && < 4.0.0)
- NETStandard.Library (>= 1.6.1)
- Newtonsoft.Json (>= 13.0.1)
- System.Net.Http (>= 4.3.4)
- System.Text.Encodings.Web (>= 4.5.1)
-
.NETStandard 2.0
- Microsoft.AspNetCore.WebUtilities (>= 2.2.0)
- Microsoft.Rest.ClientRuntime (>= 2.3.24 && < 3.0.0)
- Microsoft.Rest.ClientRuntime.Azure (>= 3.3.19 && < 4.0.0)
- Newtonsoft.Json (>= 13.0.1)
- System.Net.Http (>= 4.3.4)
- System.Text.Encodings.Web (>= 4.5.1)
NuGet packages (3)
Showing the top 3 NuGet packages that depend on Microsoft.Azure.Batch:
Package | Downloads |
---|---|
Microsoft.Azure.Batch.Conventions.Files
This library encapsulates a set of storage conventions for Azure Batch task and job outputs, making it convenient for clients to browse and retrieve outputs by task and job id and the type of output. |
|
Microsoft.Azure.Batch.FileStaging
This library simplifies uploading resource files for use by tasks in the Microsoft Azure Batch service. Visit our home page for more detail - http://azure.microsoft.com/services/batch/. For technical overview, see http://azure.microsoft.com/documentation/articles/batch-technical-overview/. API reference can be found at http://go.microsoft.com/fwlink/?LinkId=717949. |
|
ProWorks.Azure.Batch
Package Description |
GitHub repositories (5)
Showing the top 5 popular GitHub repositories that depend on Microsoft.Azure.Batch:
Repository | Stars |
---|---|
Azure/azure-sdk-for-net
This repository is for active development of the Azure SDK for .NET. For consumers of the SDK we recommend visiting our public developer docs at https://learn.microsoft.com/dotnet/azure/ or our versioned developer docs at https://azure.github.io/azure-sdk-for-net.
|
|
Azure/azure-powershell
Microsoft Azure PowerShell
|
|
Azure-Samples/azure-batch-samples
Azure Batch and HPC Code Samples
|
|
APSIMInitiative/ApsimX
ApsimX is the next generation of APSIM
|
|
microsoft/CromwellOnAzure
Microsoft Genomics implementation of the Broad Institute's Cromwell workflow engine on Azure
|
Version | Downloads | Last updated |
---|---|---|
16.3.1 | 19,562 | 9/20/2024 |
16.3.0 | 5,228 | 9/5/2024 |
16.2.0 | 126,622 | 2/29/2024 |
16.1.0 | 34,859 | 1/27/2024 |
16.0.0 | 202,684 | 6/15/2023 |
15.4.0 | 268,635 | 11/1/2022 |
15.3.0 | 386,128 | 1/14/2022 |
15.1.0 | 270,179 | 8/11/2021 |
15.0.0 | 17,438 | 7/31/2021 |
14.0.0 | 364,433 | 9/29/2020 |
13.0.0 | 301,902 | 3/6/2020 |
12.0.0 | 202,473 | 8/7/2019 |
11.0.0 | 149,366 | 6/6/2019 |
10.1.0 | 89,378 | 2/25/2019 |
10.0.0 | 78,571 | 12/14/2018 |
9.0.1 | 82,271 | 11/2/2018 |
9.0.0 | 46,404 | 8/24/2018 |
8.1.2 | 117,053 | 5/24/2018 |