Skip to main content

content_key_policies

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

Overview

Namecontent_key_policies
TypeResource
Idazure_extras.media.content_key_policies

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.
createdstring (date-time)The creation date of the Policy.
descriptionstringA description for the Policy.
lastModifiedstring (date-time)The last modified date of the Policy.
optionsarrayThe Key Policy options.
policyIdstringThe legacy Policy ID.
systemDataobjectThe system metadata relating to this resource.
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, content_key_policy_name, subscription_idGet a Content Key Policy. Get the details of a Content Key Policy in the Media Services account.
listselectresource_group_name, account_name, subscription_id$filter, $top, $orderbyList Content Key Policies. Lists the Content Key Policies in the account.
create_or_updateinsertresource_group_name, account_name, content_key_policy_name, subscription_idCreate or update an Content Key Policy. Create or update a Content Key Policy in the Media Services account.
updateupdateresource_group_name, account_name, content_key_policy_name, subscription_idUpdate a Content Key Policy. Updates an existing Content Key Policy in the Media Services account.
create_or_updatereplaceresource_group_name, account_name, content_key_policy_name, subscription_idCreate or update an Content Key Policy. Create or update a Content Key Policy in the Media Services account.
deletedeleteresource_group_name, account_name, content_key_policy_name, subscription_idDelete a Content Key Policy. Deletes a Content Key Policy in the Media Services account.
get_policy_properties_with_secretsexecresource_group_name, account_name, content_key_policy_name, subscription_idGet a Content Key Policy with secrets. Get a Content Key Policy including secret values.

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.
content_key_policy_namestringThe Content Key Policy name. Required.
resource_group_namestringThe name of the resource group within the Azure subscription. Required.
subscription_idstring
$filterstringRestricts the set of items returned. Default value is None.
$orderbystringSpecifies the key by which the result collection should be ordered. Default value is None.
$topintegerSpecifies 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. Default value is None.

SELECT examples

Get a Content Key Policy. Get the details of a Content Key Policy in the Media Services account.

SELECT
id,
name,
created,
description,
lastModified,
options,
policyId,
systemData,
type
FROM azure_extras.media.content_key_policies
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND account_name = '{{ account_name }}' -- required
AND content_key_policy_name = '{{ content_key_policy_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;

INSERT examples

Create or update an Content Key Policy. Create or update a Content Key Policy in the Media Services account.

INSERT INTO azure_extras.media.content_key_policies (
properties,
resource_group_name,
account_name,
content_key_policy_name,
subscription_id
)
SELECT
'{{ properties }}',
'{{ resource_group_name }}',
'{{ account_name }}',
'{{ content_key_policy_name }}',
'{{ subscription_id }}'
RETURNING
id,
name,
properties,
systemData,
type
;

UPDATE examples

Update a Content Key Policy. Updates an existing Content Key Policy in the Media Services account.

UPDATE azure_extras.media.content_key_policies
SET
properties = '{{ properties }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND account_name = '{{ account_name }}' --required
AND content_key_policy_name = '{{ content_key_policy_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
properties,
systemData,
type;

REPLACE examples

Create or update an Content Key Policy. Create or update a Content Key Policy in the Media Services account.

REPLACE azure_extras.media.content_key_policies
SET
properties = '{{ properties }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND account_name = '{{ account_name }}' --required
AND content_key_policy_name = '{{ content_key_policy_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
properties,
systemData,
type;

DELETE examples

Delete a Content Key Policy. Deletes a Content Key Policy in the Media Services account.

DELETE FROM azure_extras.media.content_key_policies
WHERE resource_group_name = '{{ resource_group_name }}' --required
AND account_name = '{{ account_name }}' --required
AND content_key_policy_name = '{{ content_key_policy_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
;

Lifecycle Methods

Get a Content Key Policy with secrets. Get a Content Key Policy including secret values.

EXEC azure_extras.media.content_key_policies.get_policy_properties_with_secrets 
@resource_group_name='{{ resource_group_name }}' --required,
@account_name='{{ account_name }}' --required,
@content_key_policy_name='{{ content_key_policy_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
;