Assets - Get Encryption Key

Gets the Asset storage key
Gets the Asset storage encryption keys used to decrypt content created by version 2 of the Media Services API

POST https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices/{accountName}/assets/{assetName}/getEncryptionKey?api-version=2022-08-01

URI Parameters

Name In Required Type Description
accountName
path True
  • string

The Media Services account name.

assetName
path True
  • string

The Asset name.

resourceGroupName
path True
  • string

The name of the resource group within the Azure subscription.

subscriptionId
path True
  • string

The unique identifier for a Microsoft Azure subscription.

api-version
query True
  • string

The version of the API to be used with the client request.

Responses

Name Type Description
200 OK

OK

Other Status Codes

Detailed error information.

Examples

Get Asset Storage Encryption Keys

Sample Request

POST https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso/providers/Microsoft.Media/mediaServices/contosomedia/assets/ClimbingMountSaintHelens/getEncryptionKey?api-version=2022-08-01

Sample Response

{
  "key": "AAAAAAAAAAAAAAAAAAAAAA==",
  "assetFileEncryptionMetadata": [
    {
      "initializationVector": "-988929866",
      "assetFileName": "AssetFile0",
      "assetFileId": "a9536fa7-bd5d-4f84-a137-d1290982fe95"
    },
    {
      "initializationVector": "1604993689",
      "assetFileName": "AssetFile1",
      "assetFileId": "f4060046-94ac-422d-824c-3f1d6aa3ecf2"
    },
    {
      "initializationVector": "100082635",
      "assetFileName": "AssetFile2",
      "assetFileId": "485968d3-ddae-4b13-98e7-901201a9620b"
    }
  ]
}

Definitions

AssetFileEncryptionMetadata

The Asset File Storage encryption metadata.

ErrorAdditionalInfo

The resource management error additional info.

ErrorDetail

The error detail.

ErrorResponse

Error response

StorageEncryptedAssetDecryptionData

Data needed to decrypt asset files encrypted with legacy storage encryption.

AssetFileEncryptionMetadata

The Asset File Storage encryption metadata.

Name Type Description
assetFileId
  • string

The Asset File Id.

assetFileName
  • string

The Asset File name.

initializationVector
  • string

The Asset File initialization vector.

ErrorAdditionalInfo

The resource management error additional info.

Name Type Description
info
  • object

The additional info.

type
  • string

The additional info type.

ErrorDetail

The error detail.

Name Type Description
additionalInfo

The error additional info.

code
  • string

The error code.

details

The error details.

message
  • string

The error message.

target
  • string

The error target.

ErrorResponse

Error response

Name Type Description
error

The error object.

StorageEncryptedAssetDecryptionData

Data needed to decrypt asset files encrypted with legacy storage encryption.

Name Type Description
assetFileEncryptionMetadata

Asset File encryption metadata.

key
  • string

The Asset File storage encryption key.