tracks
Creates, updates, deletes, gets or lists a tracks resource.
Overview
| Name | tracks |
| Type | Resource |
| Id | azure_extras.media.tracks |
Fields
The following fields are returned by SELECT queries:
- get
- list
| Name | Datatype | 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. |
provisioningState | string | Provisioning state of the asset track. Known values are: "Failed", "InProgress", and "Succeeded". |
track | object | Detailed information about a track in the asset. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
| Name | Datatype | 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. |
provisioningState | string | Provisioning state of the asset track. Known values are: "Failed", "InProgress", and "Succeeded". |
track | object | Detailed information about a track in the asset. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | resource_group_name, account_name, asset_name, track_name, subscription_id | Get a Track. Get the details of a Track in the Asset. | |
list | select | resource_group_name, account_name, asset_name, subscription_id | List Tracks in the Asset. Lists the Tracks in the asset. | |
create_or_update | insert | resource_group_name, account_name, asset_name, track_name, subscription_id | Create or update a Track. Create or update a Track in the asset. | |
update | update | resource_group_name, account_name, asset_name, track_name, subscription_id | Update an Track. Updates an existing Track in the asset. | |
create_or_update | replace | resource_group_name, account_name, asset_name, track_name, subscription_id | Create or update a Track. Create or update a Track in the asset. | |
delete | delete | resource_group_name, account_name, asset_name, track_name, subscription_id | Delete a Track. Deletes a Track in the asset. | |
update_track_data | exec | resource_group_name, account_name, asset_name, track_name, subscription_id | 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. |
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.
| Name | Datatype | Description |
|---|---|---|
account_name | string | The Media Services account name. Required. |
asset_name | string | The Asset name. Required. |
resource_group_name | string | The name of the resource group within the Azure subscription. Required. |
subscription_id | string | |
track_name | string | The Asset Track name. Required. |
SELECT examples
- get
- list
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
;
List Tracks in the Asset. Lists the Tracks 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 subscription_id = '{{ subscription_id }}' -- required
;
INSERT examples
- create_or_update
- Manifest
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
;
# Description fields are for documentation purposes
- name: tracks
props:
- name: resource_group_name
value: "{{ resource_group_name }}"
description: Required parameter for the tracks resource.
- name: account_name
value: "{{ account_name }}"
description: Required parameter for the tracks resource.
- name: asset_name
value: "{{ asset_name }}"
description: Required parameter for the tracks resource.
- name: track_name
value: "{{ track_name }}"
description: Required parameter for the tracks resource.
- name: subscription_id
value: "{{ subscription_id }}"
description: Required parameter for the tracks resource.
- name: properties
value:
track:
@odata:
type: "{{ type }}"
UPDATE examples
- update
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
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
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_track_data
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
;