Azure Batch Job Creation using az batch job create --template argument not recgonise

SoonJoo@Genting 241 Reputation points
2022-10-27T01:37:09.333+00:00

Hi,

I try to create task using the job template but the following command no longer supported:

az batch job create --template job.json

This command will prompt for pool id and job id, but instead the command is now "az batch job create --json-file job.json"

However, when we trying to execute the above command, we are getting the following error:

Parameter 'JobAddParameter.id' can not be None.

Wonder where should we define this parameter, is it in the JSON file or on the command itself?

Best regards.

Azure Batch
Azure Batch
An Azure service that provides cloud-scale job scheduling and compute management.
302 questions
{count} votes

2 answers

Sort by: Most helpful
  1. SoonJoo@Genting 241 Reputation points
    2022-10-27T02:17:32.97+00:00

    Must install the extension in order to use the json template.

    To install the extension:

    az extension add --name azure-batch-cli-extensions

    1 person found this answer helpful.

  2. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more