How to specify StorageEncrypted when creating new assets from a transcode in Azure media services

110 views Asked by At

I'm following along with the Using AES-128 Dynamic Encryption and Key Delivery Service tutorial. I am using the Azure java SDK and I can't find a way to use the StorageEncrypted option for newly created assets (i.e. assets created as a result of transcoding). When I upload my high-quality source file I'm able to use setOptions(AssetOption.StorageEncrypted) when creating the Azure asset. I see in the Encode the asset containing the file to the adaptive bitrate MP4 set portion of the tutorial that it is possible to tell Azure I want to use StorageEncrypted on my new asset from the following C# code:

encodeTask.OutputAssets.AddNew(String.Format("{0} as {1}", inputAsset.Name, encodingPreset), AssetCreationOptions.StorageEncrypted);

I found a few vague mentions of encryption in the Task.CreateBatchOperation JavaDocs but it is unclear what they are used for or what values might make sense.

So, my question is: how do I tell Azure to use StorageEncrypted when creating new assets from a transcode using the Java SDK?

1

There are 1 answers

1
jckdnk111 On

I believe I've found the solution in the REST API docs. Basically just add a assetCreationOptions='1' attribute on your outputAsset element in the taskBody.

I'm thinking the Java SDK simply isn't on par with .Net (which makes sense given the source). You might be better off just using the REST API directly as there are several missing pieces in the Java SDK.