Open jGuru opened 4 years ago
Using Java you can create application packages with azure-mgmt-batch
BatchAccount batchAccount = azure.batchAccounts().define(batchAccountName)
.withRegion(region)
.withNewResourceGroup(rgName)
.defineNewApplication(applicationName)
.defineNewApplicationPackage(applicationPackageName)
.withAllowUpdates(true)
.withDisplayName(applicationDisplayName)
.attach()
.withNewStorageAccount(storageAccountName)
.create();
Once it is created you can do a get operation on the ApplicationPackage to get the storage url to upload your bits to (with the storage SDK).
Then you need to call activate on the ApplicationPackage
Thanks for your response. I have created the batch account already with the above-given code. I will explore the Storage SDK then will get back to you.
The Java SDK only has methods to create logical application package reference on the portal but do not have any method to upload .zip file for the application. i.e. I wanted to create a new batch account with .zip file in my local. How can I do that?
Thanks