content_key_policies
Creates, updates, deletes, gets or lists a content_key_policies resource.
Overview
| Name | content_key_policies |
| Type | Resource |
| Id | azure_extras.media.content_key_policies |
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. |
created | string (date-time) | The creation date of the Policy. |
description | string | A description for the Policy. |
lastModified | string (date-time) | The last modified date of the Policy. |
options | array | The Key Policy options. |
policyId | string | The legacy Policy ID. |
systemData | object | The system metadata relating to this resource. |
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. |
created | string (date-time) | The creation date of the Policy. |
description | string | A description for the Policy. |
lastModified | string (date-time) | The last modified date of the Policy. |
options | array | The Key Policy options. |
policyId | string | The legacy Policy ID. |
systemData | object | The system metadata relating to this resource. |
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, content_key_policy_name, subscription_id | Get a Content Key Policy. Get the details of a Content Key Policy in the Media Services account. | |
list | select | resource_group_name, account_name, subscription_id | $filter, $top, $orderby | List Content Key Policies. Lists the Content Key Policies in the account. |
create_or_update | insert | resource_group_name, account_name, content_key_policy_name, subscription_id | Create or update an Content Key Policy. Create or update a Content Key Policy in the Media Services account. | |
update | update | resource_group_name, account_name, content_key_policy_name, subscription_id | Update a Content Key Policy. Updates an existing Content Key Policy in the Media Services account. | |
create_or_update | replace | resource_group_name, account_name, content_key_policy_name, subscription_id | Create or update an Content Key Policy. Create or update a Content Key Policy in the Media Services account. | |
delete | delete | resource_group_name, account_name, content_key_policy_name, subscription_id | Delete a Content Key Policy. Deletes a Content Key Policy in the Media Services account. | |
get_policy_properties_with_secrets | exec | resource_group_name, account_name, content_key_policy_name, subscription_id | Get 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.
| Name | Datatype | Description |
|---|---|---|
account_name | string | The Media Services account name. Required. |
content_key_policy_name | string | The Content Key Policy name. Required. |
resource_group_name | string | The name of the resource group within the Azure subscription. Required. |
subscription_id | string | |
$filter | string | Restricts the set of items returned. Default value is None. |
$orderby | string | Specifies the key by which the result collection should be ordered. Default value is None. |
$top | integer | 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. Default value is None. |
SELECT examples
- get
- list
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
;
List Content Key Policies. Lists the Content Key Policies in the 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 subscription_id = '{{ subscription_id }}' -- required
AND $filter = '{{ $filter }}'
AND $top = '{{ $top }}'
AND $orderby = '{{ $orderby }}'
;
INSERT examples
- create_or_update
- Manifest
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
;
# Description fields are for documentation purposes
- name: content_key_policies
props:
- name: resource_group_name
value: "{{ resource_group_name }}"
description: Required parameter for the content_key_policies resource.
- name: account_name
value: "{{ account_name }}"
description: Required parameter for the content_key_policies resource.
- name: content_key_policy_name
value: "{{ content_key_policy_name }}"
description: Required parameter for the content_key_policies resource.
- name: subscription_id
value: "{{ subscription_id }}"
description: Required parameter for the content_key_policies resource.
- name: properties
value:
description: "{{ description }}"
options:
- policyOptionId: "{{ policyOptionId }}"
name: "{{ name }}"
configuration:
@odata:
type: "{{ type }}"
restriction:
@odata:
type: "{{ type }}"
UPDATE examples
- update
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
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
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_policy_properties_with_secrets
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
;