Search code examples
azureazure-blob-storageazure-media-services

Azure Media Services (v3) - specific output asset container name


I have a program similar to AMSV3Quickstarts example and I need to change the default name for container for the output asset in accordance with my program logic/contract. Is it possible to change the output asset container name somehow?

What I tried:

  • RTFM
  • Change the transform job name
  • Change the locator name
  • Change the output asset name

However, in my blob storage, it is still in asset-{GUID} format.


Solution

  • When using the REST API for Create Asset you are able to set the container name:

    https://management.azure.com/subscriptions/:subscriptionId/resourceGroups/:resourceGroupName/providers/Microsoft.Media/mediaServices/:accountName/assets/:assetName?api-version={{api-version}}
    
    {
      "properties": {
        "description": "A documentary showing the ascent of Mount Logan",
        "alternateId": "(Optional) some GUID",
        "storageAccountName": "(Optional) someStorageAccount",
        "container": "(Optional) custom container name if you want"
      }
    }
    

    When using the .NET SDK, the Asset model contains the same parameters: https://learn.microsoft.com/en-us/dotnet/api/microsoft.azure.management.media.models.asset?view=azure-dotnet