az ams asset

Manage assets for an Azure Media Services account.

Commands

az ams asset create

Create an asset.

az ams asset delete

Delete an asset.

az ams asset get-encryption-key

Get the asset storage encryption keys used to decrypt content created by version 2 of the Media Services API.

az ams asset get-sas-urls

Lists storage container URLs with shared access signatures (SAS) for uploading and downloading Asset content. The signatures are derived from the storage account keys.

az ams asset list

List all the assets of an Azure Media Services account.

az ams asset list-streaming-locators

List streaming locators which are associated with this asset.

az ams asset show

Show the details of an asset.

az ams asset update

Update the details of an asset.

az ams asset create

Create an asset.

az ams asset create --account-name
                    --name
                    --resource-group
                    [--alternate-id]
                    [--container]
                    [--description]
                    [--storage-account]
                    [--subscription]

Required Parameters

--account-name -a

The name of the Azure Media Services account.

--name -n

The name of the asset.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Optional Parameters

--alternate-id

The alternate id of the asset.

--container

The name of the asset blob container.

--description

The asset description.

--storage-account

The name of the storage account.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

az ams asset delete

Delete an asset.

az ams asset delete [--account-name]
                    [--ids]
                    [--name]
                    [--resource-group]
                    [--subscription]

Optional Parameters

--account-name -a

The name of the Azure Media Services account.

--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

--name -n

The name of the asset.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

az ams asset get-encryption-key

Get the asset storage encryption keys used to decrypt content created by version 2 of the Media Services API.

az ams asset get-encryption-key [--account-name]
                                [--ids]
                                [--name]
                                [--resource-group]
                                [--subscription]

Optional Parameters

--account-name -a

The name of the Azure Media Services account.

--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

--name -n

The name of the asset.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

az ams asset get-sas-urls

Lists storage container URLs with shared access signatures (SAS) for uploading and downloading Asset content. The signatures are derived from the storage account keys.

az ams asset get-sas-urls [--account-name]
                          [--expiry]
                          [--ids]
                          [--name]
                          [--permissions {Read, ReadWrite, ReadWriteDelete}]
                          [--resource-group]
                          [--subscription]

Optional Parameters

--account-name -a

The name of the Azure Media Services account.

--expiry

Specifies the UTC datetime (Y-m-d'T'H:M:S'Z') at which the SAS becomes invalid. This must be less than 24 hours from the current time.

default value: 2021-01-20 12:29:25.523911
--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

--name -n

The name of the asset.

--permissions

The permissions to set on the SAS URL.

accepted values: Read, ReadWrite, ReadWriteDelete
default value: Read
--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

az ams asset list

List all the assets of an Azure Media Services account.

az ams asset list --account-name
                  --resource-group
                  [--filter]
                  [--orderby]
                  [--query-examples]
                  [--subscription]
                  [--top]

Examples

List all the assets whose names start with the string 'Something'.

az ams asset list -a amsAccount -g resourceGroup --query [?starts_with(name,'Something')]

Required Parameters

--account-name -a

The name of the Azure Media Services account.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Optional Parameters

--filter

Restricts the set of items returned.

--orderby

Specifies the key by which the result collection should be ordered.

--query-examples

Recommend JMESPath string for you. You can copy one of the query and paste it after --query parameter within double quotation marks to see the results. You can add one or more positional keywords so that we can give suggestions based on these key words.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--top

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.

az ams asset list-streaming-locators

List streaming locators which are associated with this asset.

az ams asset list-streaming-locators [--account-name]
                                     [--ids]
                                     [--name]
                                     [--resource-group]
                                     [--subscription]

Optional Parameters

--account-name -a

The name of the Azure Media Services account.

--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

--name -n

The name of the asset.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

az ams asset show

Show the details of an asset.

az ams asset show [--account-name]
                  [--ids]
                  [--name]
                  [--query-examples]
                  [--resource-group]
                  [--subscription]

Optional Parameters

--account-name -a

The name of the Azure Media Services account.

--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

--name -n

The name of the asset.

--query-examples

Recommend JMESPath string for you. You can copy one of the query and paste it after --query parameter within double quotation marks to see the results. You can add one or more positional keywords so that we can give suggestions based on these key words.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

az ams asset update

Update the details of an asset.

az ams asset update [--account-name]
                    [--add]
                    [--alternate-id]
                    [--description]
                    [--force-string]
                    [--ids]
                    [--name]
                    [--remove]
                    [--resource-group]
                    [--set]
                    [--subscription]

Optional Parameters

--account-name -a

The name of the Azure Media Services account.

--add

Add an object to a list of objects by specifying a path and key value pairs. Example: --add property.listProperty <key=value, string or JSON string>.

--alternate-id

The alternate id of the asset.

--description

The asset description.

--force-string

When using 'set' or 'add', preserve string literals instead of attempting to convert to JSON.

--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

--name -n

The name of the asset.

--remove

Remove a property or an element from a list. Example: --remove property.list OR --remove propertyToRemove.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--set

Update an object by specifying a property path and value to set. Example: --set property1.property2=.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.