Skip to main content

assets

Creates, updates, deletes, gets or lists an assets resource.

Overview

Nameassets
TypeResource
Idazure.media_services.assets

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
propertiesobjectThe resource properties.
systemDataobjectThe system metadata relating to this resource.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectsubscriptionId, resourceGroupName, accountName, assetNameapi-versionGet the details of an Asset in the Media Services account
listselectsubscriptionId, resourceGroupName, accountNameapi-version, $filter, $top, $orderbyList Assets in the Media Services account with optional filtering and ordering
create_or_updateinsertsubscriptionId, resourceGroupName, accountName, assetNameapi-versionCreates or updates an Asset in the Media Services account
updateupdatesubscriptionId, resourceGroupName, accountName, assetNameapi-versionUpdates an existing Asset in the Media Services account
deletedeletesubscriptionId, resourceGroupName, accountName, assetNameapi-versionDeletes an Asset in the Media Services account

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
accountNamestringThe Media Services account name.
assetNamestringThe Asset name.
resourceGroupNamestringThe name of the resource group within the Azure subscription.
subscriptionIdstringThe unique identifier for a Microsoft Azure subscription.
$filterstringRestricts the set of items returned.
$orderbystringSpecifies the key by which the result collection should be ordered.
$topinteger (int32)Specifies a non-negative integer n that limits the number of items returned from a collection. The service returns the number of available items up to but not greater than the specified value n.
api-versionstringThe version of the API to be used with the client request.

SELECT examples

Get the details of an Asset in the Media Services account

SELECT
properties,
systemData
FROM azure.media_services.assets
WHERE subscriptionId = '{{ subscriptionId }}' -- required
AND resourceGroupName = '{{ resourceGroupName }}' -- required
AND accountName = '{{ accountName }}' -- required
AND assetName = '{{ assetName }}' -- required
AND api-version = '{{ api-version }}'
;

INSERT examples

Creates or updates an Asset in the Media Services account

INSERT INTO azure.media_services.assets (
data__properties,
subscriptionId,
resourceGroupName,
accountName,
assetName,
api-version
)
SELECT
'{{ properties }}',
'{{ subscriptionId }}',
'{{ resourceGroupName }}',
'{{ accountName }}',
'{{ assetName }}',
'{{ api-version }}'
RETURNING
properties,
systemData
;

UPDATE examples

Updates an existing Asset in the Media Services account

UPDATE azure.media_services.assets
SET
data__properties = '{{ properties }}'
WHERE
subscriptionId = '{{ subscriptionId }}' --required
AND resourceGroupName = '{{ resourceGroupName }}' --required
AND accountName = '{{ accountName }}' --required
AND assetName = '{{ assetName }}' --required
AND api-version = '{{ api-version}}'
RETURNING
properties,
systemData;

DELETE examples

Deletes an Asset in the Media Services account

DELETE FROM azure.media_services.assets
WHERE subscriptionId = '{{ subscriptionId }}' --required
AND resourceGroupName = '{{ resourceGroupName }}' --required
AND accountName = '{{ accountName }}' --required
AND assetName = '{{ assetName }}' --required
AND api-version = '{{ api-version }}'
;