Skip to main content

tracks

Creates, updates, deletes, gets or lists a tracks resource.

Overview

Nametracks
TypeResource
Idazure_extras.media.tracks

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringFully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
namestringThe name of the resource.
provisioningStatestringProvisioning state of the asset track. Known values are: "Failed", "InProgress", and "Succeeded".
trackobjectDetailed information about a track in the asset.
typestringThe type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts".

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectresource_group_name, account_name, asset_name, track_name, subscription_idGet a Track. Get the details of a Track in the Asset.
listselectresource_group_name, account_name, asset_name, subscription_idList Tracks in the Asset. Lists the Tracks in the asset.
create_or_updateinsertresource_group_name, account_name, asset_name, track_name, subscription_idCreate or update a Track. Create or update a Track in the asset.
updateupdateresource_group_name, account_name, asset_name, track_name, subscription_idUpdate an Track. Updates an existing Track in the asset.
create_or_updatereplaceresource_group_name, account_name, asset_name, track_name, subscription_idCreate or update a Track. Create or update a Track in the asset.
deletedeleteresource_group_name, account_name, asset_name, track_name, subscription_idDelete a Track. Deletes a Track in the asset.
update_track_dataexecresource_group_name, account_name, asset_name, track_name, subscription_idUpdate the track data. Update the track data. Call this API after any changes are made to the track data stored in the asset container. For example, you have modified the WebVTT captions file in the Azure blob storage container for the asset, viewers will not see the new version of the captions unless this API is called. Note, the changes may not be reflected immediately. CDN cache may also need to be purged if applicable.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
account_namestringThe Media Services account name. Required.
asset_namestringThe Asset name. Required.
resource_group_namestringThe name of the resource group within the Azure subscription. Required.
subscription_idstring
track_namestringThe Asset Track name. Required.

SELECT examples

Get a Track. Get the details of a Track in the Asset.

SELECT
id,
name,
provisioningState,
track,
type
FROM azure_extras.media.tracks
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND account_name = '{{ account_name }}' -- required
AND asset_name = '{{ asset_name }}' -- required
AND track_name = '{{ track_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;

INSERT examples

Create or update a Track. Create or update a Track in the asset.

INSERT INTO azure_extras.media.tracks (
properties,
resource_group_name,
account_name,
asset_name,
track_name,
subscription_id
)
SELECT
'{{ properties }}',
'{{ resource_group_name }}',
'{{ account_name }}',
'{{ asset_name }}',
'{{ track_name }}',
'{{ subscription_id }}'
RETURNING
id,
name,
properties,
type
;

UPDATE examples

Update an Track. Updates an existing Track in the asset.

UPDATE azure_extras.media.tracks
SET
properties = '{{ properties }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND account_name = '{{ account_name }}' --required
AND asset_name = '{{ asset_name }}' --required
AND track_name = '{{ track_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
properties,
type;

REPLACE examples

Create or update a Track. Create or update a Track in the asset.

REPLACE azure_extras.media.tracks
SET
properties = '{{ properties }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND account_name = '{{ account_name }}' --required
AND asset_name = '{{ asset_name }}' --required
AND track_name = '{{ track_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
properties,
type;

DELETE examples

Delete a Track. Deletes a Track in the asset.

DELETE FROM azure_extras.media.tracks
WHERE resource_group_name = '{{ resource_group_name }}' --required
AND account_name = '{{ account_name }}' --required
AND asset_name = '{{ asset_name }}' --required
AND track_name = '{{ track_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
;

Lifecycle Methods

Update the track data. Update the track data. Call this API after any changes are made to the track data stored in the asset container. For example, you have modified the WebVTT captions file in the Azure blob storage container for the asset, viewers will not see the new version of the captions unless this API is called. Note, the changes may not be reflected immediately. CDN cache may also need to be purged if applicable.

EXEC azure_extras.media.tracks.update_track_data 
@resource_group_name='{{ resource_group_name }}' --required,
@account_name='{{ account_name }}' --required,
@asset_name='{{ asset_name }}' --required,
@track_name='{{ track_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
;