Streaming Locators - Create
Create a Streaming Locator in the Media Services account
PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices/{accountName}/streamingLocators/{streamingLocatorName}?api-version=2022-08-01
URI Parameters
Name | In | Required | Type | Description |
---|---|---|---|---|
account
|
path | True |
string |
The Media Services account name. |
resource
|
path | True |
string |
The name of the resource group within the Azure subscription. |
streaming
|
path | True |
string |
The Streaming Locator name. |
subscription
|
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. |
Request Body
Name | Required | Type | Description |
---|---|---|---|
properties.assetName | True |
string |
Asset Name |
properties.streamingPolicyName | True |
string |
Name of the Streaming Policy used by this Streaming Locator. Either specify the name of Streaming Policy you created or use one of the predefined Streaming Policies. The predefined Streaming Policies available are: 'Predefined_DownloadOnly', 'Predefined_ClearStreamingOnly', 'Predefined_DownloadAndClearStreaming', 'Predefined_ClearKey', 'Predefined_MultiDrmCencStreaming' and 'Predefined_MultiDrmStreaming' |
properties.alternativeMediaId |
string |
Alternative Media ID of this Streaming Locator |
|
properties.contentKeys |
The ContentKeys used by this Streaming Locator. |
||
properties.defaultContentKeyPolicyName |
string |
Name of the default ContentKeyPolicy used by this Streaming Locator. |
|
properties.endTime |
string |
The end time of the Streaming Locator. |
|
properties.filters |
string[] |
A list of asset or account filters which apply to this streaming locator |
|
properties.startTime |
string |
The start time of the Streaming Locator. |
|
properties.streamingLocatorId |
string |
The StreamingLocatorId of the Streaming Locator. |
Responses
Name | Type | Description |
---|---|---|
201 Created |
Created |
|
Other Status Codes |
Detailed error information. |
Examples
Creates a Streaming Locator with clear streaming |
Creates a Streaming Locator with secure streaming |
Creates a Streaming Locator with user defined content keys |
Creates a Streaming Locator with clear streaming
Sample request
PUT https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contosorg/providers/Microsoft.Media/mediaServices/contosomedia/streamingLocators/UserCreatedClearStreamingLocator?api-version=2022-08-01
{
"properties": {
"streamingPolicyName": "clearStreamingPolicy",
"assetName": "ClimbingMountRainier"
}
}
Sample response
{
"name": "UserCreatedClearStreamingLocator",
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contosorg/providers/Microsoft.Media/mediaservices/contosomedia/streamingLocators/UserCreatedClearStreamingLocator",
"type": "Microsoft.Media/mediaservices/streamingLocators",
"properties": {
"assetName": "ClimbingMountRainier",
"created": "2018-08-08T18:29:32.4323237Z",
"endTime": "9999-12-31T23:59:59.9999999Z",
"streamingLocatorId": "e34b0fc4-3be0-4a3c-9793-1f6b7be5b013",
"streamingPolicyName": "clearStreamingPolicy",
"contentKeys": []
}
}
Creates a Streaming Locator with secure streaming
Sample request
PUT https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contosorg/providers/Microsoft.Media/mediaServices/contosomedia/streamingLocators/UserCreatedSecureStreamingLocator?api-version=2022-08-01
{
"properties": {
"streamingPolicyName": "UserCreatedSecureStreamingPolicy",
"assetName": "ClimbingMountRainier",
"startTime": "2018-03-01T00:00:00Z",
"endTime": "2028-12-31T23:59:59.9999999Z"
}
}
Sample response
{
"name": "UserCreatedSecureStreamingLocator",
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contosorg/providers/Microsoft.Media/mediaservices/contosomedia/streamingLocators/UserCreatedSecureStreamingLocator",
"type": "Microsoft.Media/mediaservices/streamingLocators",
"properties": {
"assetName": "ClimbingMountRainier",
"created": "2018-08-08T18:29:32.6243295Z",
"startTime": "2018-03-01T00:00:00Z",
"endTime": "2028-12-31T23:59:59.9999999Z",
"streamingLocatorId": "962775be-41fb-452a-b0dc-72ca2543a945",
"streamingPolicyName": "UserCreatedSecureStreamingPolicy",
"contentKeys": [
{
"id": "1b2d5581-4518-4a51-ad8a-f55d3bf993d4",
"type": "CommonEncryptionCbcs",
"labelReferenceInStreamingPolicy": "cbcsDefaultKey",
"tracks": []
},
{
"id": "1a9858b1-3566-4bf1-9fee-60f2fb98e7e4",
"type": "CommonEncryptionCenc",
"labelReferenceInStreamingPolicy": "cencDefaultKey",
"tracks": []
},
{
"id": "5faac86a-3aca-4d6b-99c0-6bb8cc3497a1",
"type": "EnvelopeEncryption",
"labelReferenceInStreamingPolicy": "aesDefaultKey",
"tracks": []
}
]
}
}
Creates a Streaming Locator with user defined content keys
Sample request
PUT https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contosorg/providers/Microsoft.Media/mediaServices/contosomedia/streamingLocators/UserCreatedSecureStreamingLocatorWithUserDefinedContentKeys?api-version=2022-08-01
{
"properties": {
"assetName": "ClimbingMountRainier",
"streamingPolicyName": "secureStreamingPolicy",
"streamingLocatorId": "90000000-0000-0000-0000-00000000000A",
"contentKeys": [
{
"labelReferenceInStreamingPolicy": "aesDefaultKey",
"id": "60000000-0000-0000-0000-000000000001",
"value": "1UqLohAfWsEGkULYxHjYZg=="
},
{
"labelReferenceInStreamingPolicy": "cencDefaultKey",
"id": "60000000-0000-0000-0000-000000000004",
"value": "4UqLohAfWsEGkULYxHjYZg=="
},
{
"labelReferenceInStreamingPolicy": "cbcsDefaultKey",
"id": "60000000-0000-0000-0000-000000000007",
"value": "7UqLohAfWsEGkULYxHjYZg=="
}
]
}
}
Sample response
{
"name": "UserCreatedSecureStreamingLocatorWithUserDefinedContentKeys",
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contosorg/providers/Microsoft.Media/mediaservices/contosomedia/streamingLocators/UserCreatedSecureStreamingLocatorWithUserDefinedContentKeys",
"type": "Microsoft.Media/mediaservices/streamingLocators",
"properties": {
"assetName": "ClimbingMountRainier",
"created": "2018-08-08T18:29:32.7859424Z",
"endTime": "9999-12-31T23:59:59.9999999Z",
"streamingLocatorId": "90000000-0000-0000-0000-00000000000a",
"streamingPolicyName": "secureStreamingPolicy",
"contentKeys": [
{
"id": "60000000-0000-0000-0000-000000000007",
"type": "CommonEncryptionCbcs",
"labelReferenceInStreamingPolicy": "cbcsDefaultKey",
"tracks": []
},
{
"id": "60000000-0000-0000-0000-000000000004",
"type": "CommonEncryptionCenc",
"labelReferenceInStreamingPolicy": "cencDefaultKey",
"tracks": []
},
{
"id": "60000000-0000-0000-0000-000000000001",
"type": "EnvelopeEncryption",
"labelReferenceInStreamingPolicy": "aesDefaultKey",
"tracks": []
}
]
}
}
Definitions
Name | Description |
---|---|
created |
The type of identity that created the resource. |
Error |
The resource management error additional info. |
Error |
The error detail. |
Error |
Error response |
Streaming |
A Streaming Locator resource |
Streaming |
Class for content key in Streaming Locator |
Streaming |
Encryption type of Content Key |
system |
Metadata pertaining to creation and last modification of the resource. |
Track |
Track property condition operation |
Track |
Class to specify one track property condition |
Track |
Track property type |
Track |
Class to select a track |
createdByType
The type of identity that created the resource.
Name | Type | Description |
---|---|---|
Application |
string |
|
Key |
string |
|
ManagedIdentity |
string |
|
User |
string |
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. |
StreamingLocator
A Streaming Locator resource
Name | Type | Description |
---|---|---|
id |
string |
Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} |
name |
string |
The name of the resource |
properties.alternativeMediaId |
string |
Alternative Media ID of this Streaming Locator |
properties.assetName |
string |
Asset Name |
properties.contentKeys |
The ContentKeys used by this Streaming Locator. |
|
properties.created |
string |
The creation time of the Streaming Locator. |
properties.defaultContentKeyPolicyName |
string |
Name of the default ContentKeyPolicy used by this Streaming Locator. |
properties.endTime |
string |
The end time of the Streaming Locator. |
properties.filters |
string[] |
A list of asset or account filters which apply to this streaming locator |
properties.startTime |
string |
The start time of the Streaming Locator. |
properties.streamingLocatorId |
string |
The StreamingLocatorId of the Streaming Locator. |
properties.streamingPolicyName |
string |
Name of the Streaming Policy used by this Streaming Locator. Either specify the name of Streaming Policy you created or use one of the predefined Streaming Policies. The predefined Streaming Policies available are: 'Predefined_DownloadOnly', 'Predefined_ClearStreamingOnly', 'Predefined_DownloadAndClearStreaming', 'Predefined_ClearKey', 'Predefined_MultiDrmCencStreaming' and 'Predefined_MultiDrmStreaming' |
systemData |
The system metadata relating to this resource. |
|
type |
string |
The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" |
StreamingLocatorContentKey
Class for content key in Streaming Locator
Name | Type | Description |
---|---|---|
id |
string |
ID of Content Key |
labelReferenceInStreamingPolicy |
string |
Label of Content Key as specified in the Streaming Policy |
policyName |
string |
ContentKeyPolicy used by Content Key |
tracks |
Tracks which use this Content Key |
|
type |
Encryption type of Content Key |
|
value |
string |
Value of Content Key |
StreamingLocatorContentKeyType
Encryption type of Content Key
Name | Type | Description |
---|---|---|
CommonEncryptionCbcs |
string |
Common Encryption using CBCS |
CommonEncryptionCenc |
string |
Common Encryption using CENC |
EnvelopeEncryption |
string |
Envelope Encryption |
systemData
Metadata pertaining to creation and last modification of the resource.
Name | Type | Description |
---|---|---|
createdAt |
string |
The timestamp of resource creation (UTC). |
createdBy |
string |
The identity that created the resource. |
createdByType |
The type of identity that created the resource. |
|
lastModifiedAt |
string |
The timestamp of resource last modification (UTC) |
lastModifiedBy |
string |
The identity that last modified the resource. |
lastModifiedByType |
The type of identity that last modified the resource. |
TrackPropertyCompareOperation
Track property condition operation
Name | Type | Description |
---|---|---|
Equal |
string |
Equal operation |
Unknown |
string |
Unknown track property compare operation |
TrackPropertyCondition
Class to specify one track property condition
Name | Type | Description |
---|---|---|
operation |
Track property condition operation |
|
property |
Track property type |
|
value |
string |
Track property value |
TrackPropertyType
Track property type
Name | Type | Description |
---|---|---|
FourCC |
string |
Track FourCC |
Unknown |
string |
Unknown track property |
TrackSelection
Class to select a track
Name | Type | Description |
---|---|---|
trackSelections |
TrackSelections is a track property condition list which can specify track(s) |