Skip to main content

security_policies

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

Overview

Namesecurity_policies
TypeResource
Idazure.cdn.security_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.
deploymentStatusstringKnown values are: "NotStarted", "InProgress", "Succeeded", and "Failed". (NotStarted, InProgress, Succeeded, Failed)
parametersobjectobject which contains security policy parameters.
profileNamestringThe name of the profile which holds the security policy.
provisioningStatestringProvisioning status. Known values are: "Succeeded", "Failed", "Updating", "Deleting", and "Creating". (Succeeded, Failed, Updating, Deleting, Creating)
systemDataobjectAzure Resource Manager metadata containing createdBy and modifiedBy information.
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, profile_name, security_policy_name, subscription_idGets an existing security policy within a profile.
list_by_profileselectresource_group_name, profile_name, subscription_idLists security policies associated with the profile.
createinsertresource_group_name, profile_name, security_policy_name, subscription_idCreates a new security policy within the specified profile.
deletedeleteresource_group_name, profile_name, security_policy_name, subscription_idDeletes an existing security policy within profile.
patchexecresource_group_name, profile_name, security_policy_name, subscription_idUpdates an existing security policy within a profile.

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
profile_namestringName of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is unique within the resource group. Required.
resource_group_namestringThe name of the resource group. The name is case insensitive. Required.
security_policy_namestringName of the security policy under the profile. Required.
subscription_idstring

SELECT examples

Gets an existing security policy within a profile.

SELECT
id,
name,
deploymentStatus,
parameters,
profileName,
provisioningState,
systemData,
type
FROM azure.cdn.security_policies
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND profile_name = '{{ profile_name }}' -- required
AND security_policy_name = '{{ security_policy_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;

INSERT examples

Creates a new security policy within the specified profile.

INSERT INTO azure.cdn.security_policies (
properties,
resource_group_name,
profile_name,
security_policy_name,
subscription_id
)
SELECT
'{{ properties }}',
'{{ resource_group_name }}',
'{{ profile_name }}',
'{{ security_policy_name }}',
'{{ subscription_id }}'
RETURNING
id,
name,
properties,
systemData,
type
;

DELETE examples

Deletes an existing security policy within profile.

DELETE FROM azure.cdn.security_policies
WHERE resource_group_name = '{{ resource_group_name }}' --required
AND profile_name = '{{ profile_name }}' --required
AND security_policy_name = '{{ security_policy_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
;

Lifecycle Methods

Updates an existing security policy within a profile.

EXEC azure.cdn.security_policies.patch 
@resource_group_name='{{ resource_group_name }}' --required,
@profile_name='{{ profile_name }}' --required,
@security_policy_name='{{ security_policy_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
@@json=
'{
"properties": "{{ properties }}"
}'
;