I need to automate the creation of Assets, the uploading of MP3 files and the running Jobs in Azure Media Services.
I have successfully created Azure CLI scripts to create Assets and upload the MP3 files into those assets.
However, when I create a Job using the "az ams job start" (https://docs.microsoft.com/en-us/cli/azure/ams/job?view=azure-cli-latest#az-ams-job-start) command it returns with
"list index out of range"
If I run the same command in the Azure portal, it returns with the same error message.
The paramaters that I am using are of this format.
az ams job start --account-name myaccount --input-asset-name "myinputasset" --files "myfile.mp3" --transform-name "mytransform" --output-assets "myoutputasset" --resource-group "mygroup" --name "myname"
Can anyone provide any hints as to what I have done wrong or how I can get more details about what I need to do differently? The documentation is not great and I feel I have tried every combination of settings to get this to work.
CodePudding user response:
The reason the command is failing is because you are missing an "=" sign after the --output-asset
parameter. To clarify, this is how the CLI says the --output-asset
parameter should be formatted:
--output-assets [Required] : Space-separated assets in 'assetName=label' format. An asset without label can be sent like this: 'assetName='.
To get the command to work change the command from --output-assets "myoutputasset"
to --output-assets "myoutputasset="
Sorry about the error message, it is definitely not helpful. I have submitted a PR to update the error message to something more useful, thanks!