az ams content-key-policy
Manage content key policies for an Azure Media Services account.
Commands
Name | Description | Type | Status |
---|---|---|---|
az ams content-key-policy create |
Create a new content key policy. |
Core | GA |
az ams content-key-policy delete |
Delete a content key policy. |
Core | GA |
az ams content-key-policy list |
List all the content key policies within an Azure Media Services account. |
Core | GA |
az ams content-key-policy option |
Manage options for an existing content key policy. |
Core | GA |
az ams content-key-policy option add |
Add a new option to an existing content key policy. |
Core | GA |
az ams content-key-policy option remove |
Remove an option from an existing content key policy. |
Core | GA |
az ams content-key-policy option update |
Update an option from an existing content key policy. |
Core | GA |
az ams content-key-policy show |
Show an existing content key policy. |
Core | GA |
az ams content-key-policy update |
Update an existing content key policy. |
Core | GA |
az ams content-key-policy create
Create a new content key policy.
az ams content-key-policy create --account-name
--name
--policy-option-name
--resource-group
[--alt-rsa-token-keys]
[--alt-symmetric-token-keys]
[--alt-x509-token-keys]
[--ask]
[--audience]
[--clear-key-configuration]
[--description]
[--fair-play-pfx]
[--fair-play-pfx-password]
[--fp-playback-duration-seconds]
[--fp-storage-duration-seconds]
[--issuer]
[--open-id-connect-discovery-document]
[--open-restriction]
[--play-ready-template]
[--rental-and-lease-key-type]
[--rental-duration]
[--token-claims]
[--token-key]
[--token-key-type]
[--token-type]
[--widevine-template]
Examples
Create an content-key-policy with a FairPlay Configuration.
az ams content-key-policy create -a amsAccount -g resourceGroup -n contentKeyPolicyName --policy-option-name policyOptionName --open-restriction --ask "ask-32-chars-hex-string" --fair-play-pfx pfxPath --fair-play-pfx-password "pfxPassword" --rental-and-lease-key-type PersistentUnlimited --rental-duration 5000
Required Parameters
The name of the Azure Media Services account.
The content key policy name.
The content key policy option name.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Optional Parameters
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
Space-separated list of alternate rsa token keys.
Property | Value |
---|---|
Parameter group: | Token Restriction Arguments |
Space-separated list of alternate symmetric token keys.
Property | Value |
---|---|
Parameter group: | Token Restriction Arguments |
Space-separated list of alternate x509 certificate token keys.
Property | Value |
---|---|
Parameter group: | Token Restriction Arguments |
The key that must be used as FairPlay Application Secret Key, which is a 32 character hex string.
Property | Value |
---|---|
Parameter group: | FairPlay Configuration Arguments |
The audience for the token.
Property | Value |
---|---|
Parameter group: | Token Restriction Arguments |
Use Clear Key configuration, a.k.a AES encryption. It's intended for non-DRM keys.
Property | Value |
---|---|
Parameter group: | Clear Key Configuration (AES Encryption) Arguments |
Default value: | False |
The content key policy description.
The filepath to a FairPlay certificate file in PKCS 12 (pfx) format (including private key).
Property | Value |
---|---|
Parameter group: | FairPlay Configuration Arguments |
The password encrypting FairPlay certificate in PKCS 12 (pfx) format.
Property | Value |
---|---|
Parameter group: | FairPlay Configuration Arguments |
Playback duration.
Property | Value |
---|---|
Parameter group: | FairPlay Configuration Arguments |
Storage duration.
Property | Value |
---|---|
Parameter group: | FairPlay Configuration Arguments |
The token issuer.
Property | Value |
---|---|
Parameter group: | Token Restriction Arguments |
The OpenID connect discovery document.
Property | Value |
---|---|
Parameter group: | Token Restriction Arguments |
Use open restriction. License or key will be delivered on every request. Not recommended for production environments.
Property | Value |
---|---|
Parameter group: | Open Restriction Arguments |
Default value: | False |
JSON PlayReady license template. Use @{file} to load from a file.
Property | Value |
---|---|
Parameter group: | PlayReady Configuration Arguments |
The rental and lease key type. Available values: Undefined, DualExpiry, PersistentUnlimited, PersistentLimited.
Property | Value |
---|---|
Parameter group: | FairPlay Configuration Arguments |
The rental duration. Must be greater than or equal to 0.
Property | Value |
---|---|
Parameter group: | FairPlay Configuration Arguments |
Space-separated required token claims in '[key=value]' format.
Property | Value |
---|---|
Parameter group: | Token Restriction Arguments |
Either a string (for symmetric key) or a filepath to a certificate (x509) or public key (rsa). Must be used in conjunction with --token-key-type.
Property | Value |
---|---|
Parameter group: | Token Restriction Arguments |
The type of the token key to be used for the primary verification key. Allowed values: Symmetric, RSA, X509.
Property | Value |
---|---|
Parameter group: | Token Restriction Arguments |
The type of token. Allowed values: Jwt, Swt.
Property | Value |
---|---|
Parameter group: | Token Restriction Arguments |
JSON Widevine license template. Use @{file} to load from a file.
Property | Value |
---|---|
Parameter group: | Widevine Configuration Arguments |
Global Parameters
Increase logging verbosity to show all debug logs.
Property | Value |
---|---|
Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
Property | Value |
---|---|
Default value: | False |
Output format.
Property | Value |
---|---|
Default value: | json |
Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
Property | Value |
---|---|
Default value: | False |
az ams content-key-policy delete
Delete a content key policy.
az ams content-key-policy delete [--account-name]
[--ids]
[--name]
[--resource-group]
[--subscription]
Optional Parameters
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
The name of the Azure Media Services account.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
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.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
The content key policy name.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
Global Parameters
Increase logging verbosity to show all debug logs.
Property | Value |
---|---|
Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
Property | Value |
---|---|
Default value: | False |
Output format.
Property | Value |
---|---|
Default value: | json |
Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath query string. See http://jmespath.org/ for more information and examples.
Increase logging verbosity. Use --debug for full debug logs.
Property | Value |
---|---|
Default value: | False |
az ams content-key-policy list
List all the content key policies within an Azure Media Services account.
az ams content-key-policy list --account-name
--resource-group
[--filter]
[--orderby]
[--top]
Examples
list the content key policies within an Azure Media Services account with a filter clause.
az ams content-key-policy list -a amsAccount -g resourceGroup --filter "properties/lastModified gt 2022-08-16 or properties/created lt 2022-08-17"
Required Parameters
The name of the Azure Media Services account.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Optional Parameters
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
Restricts the set of items returned.
Specifies the key by which the result collection should be ordered.
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.
Global Parameters
Increase logging verbosity to show all debug logs.
Property | Value |
---|---|
Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
Property | Value |
---|---|
Default value: | False |
Output format.
Property | Value |
---|---|
Default value: | json |
Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
Property | Value |
---|---|
Default value: | False |
az ams content-key-policy show
Show an existing content key policy.
az ams content-key-policy show [--account-name]
[--ids]
[--name]
[--resource-group]
[--subscription]
[--with-secrets]
Optional Parameters
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
The name of the Azure Media Services account.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
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.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
The content key policy name.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
Include secret values of the content key policy.
Property | Value |
---|---|
Default value: | False |
Global Parameters
Increase logging verbosity to show all debug logs.
Property | Value |
---|---|
Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
Property | Value |
---|---|
Default value: | False |
Output format.
Property | Value |
---|---|
Default value: | json |
Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath query string. See http://jmespath.org/ for more information and examples.
Increase logging verbosity. Use --debug for full debug logs.
Property | Value |
---|---|
Default value: | False |
az ams content-key-policy update
Update an existing content key policy.
az ams content-key-policy update [--account-name]
[--add]
[--description]
[--force-string]
[--ids]
[--name]
[--remove]
[--resource-group]
[--set]
[--subscription]
Examples
Update an existing content-key-policy, set a new description and edit its first option setting a new issuer and audience.
az ams content-key-policy update -n contentKeyPolicyName -a amsAccount --description newDescription --set options[0].restriction.issuer=newIssuer --set options[0].restriction.audience=newAudience
Optional Parameters
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
The name of the Azure Media Services account.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
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>
.
Property | Value |
---|---|
Parameter group: | Generic Update Arguments |
Default value: | [] |
The content key policy description.
When using 'set' or 'add', preserve string literals instead of attempting to convert to JSON.
Property | Value |
---|---|
Parameter group: | Generic Update Arguments |
Default value: | False |
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.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
The content key policy name.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
Remove a property or an element from a list. Example: --remove property.list <indexToRemove>
OR --remove propertyToRemove
.
Property | Value |
---|---|
Parameter group: | Generic Update Arguments |
Default value: | [] |
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
Update an object by specifying a property path and value to set. Example: --set property1.property2=<value>
.
Property | Value |
---|---|
Parameter group: | Generic Update Arguments |
Default value: | [] |
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
Global Parameters
Increase logging verbosity to show all debug logs.
Property | Value |
---|---|
Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
Property | Value |
---|---|
Default value: | False |
Output format.
Property | Value |
---|---|
Default value: | json |
Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath query string. See http://jmespath.org/ for more information and examples.
Increase logging verbosity. Use --debug for full debug logs.
Property | Value |
---|---|
Default value: | False |