ddos_custom_policies
Creates, updates, deletes, gets or lists a ddos_custom_policies resource.
Overview
| Name | ddos_custom_policies |
| Type | Resource |
| Id | azure.network.ddos_custom_policies |
Fields
The following fields are returned by SELECT queries:
- get
- list
- list_all
| Name | Datatype | Description |
|---|---|---|
id | string | Resource ID. |
name | string | Resource name. |
detectionRules | array | The list of DDoS detection rules associated with the custom policy. |
etag | string | A unique read-only string that changes whenever the resource is updated. |
frontEndIpConfiguration | array | The list of frontend IP configurations associated with the custom policy. |
location | string | Resource location. |
provisioningState | string | The provisioning state of the DDoS custom policy resource. Known values are: "Failed", "Succeeded", "Canceled", "Creating", "Updating", and "Deleting". (Failed, Succeeded, Canceled, Creating, Updating, Deleting) |
publicIPAddresses | array | The list of public IP addresses associated with the custom policy. This list is read-only. |
resourceGuid | string | The resource GUID property of the DDoS custom policy resource. It uniquely identifies the resource, even if the user changes its name or migrate the resource across subscriptions or resource groups. |
tags | object | Resource tags. |
type | string | Resource type. |
| Name | Datatype | Description |
|---|---|---|
id | string | Resource ID. |
name | string | Resource name. |
detectionRules | array | The list of DDoS detection rules associated with the custom policy. |
etag | string | A unique read-only string that changes whenever the resource is updated. |
frontEndIpConfiguration | array | The list of frontend IP configurations associated with the custom policy. |
location | string | Resource location. |
provisioningState | string | The provisioning state of the DDoS custom policy resource. Known values are: "Failed", "Succeeded", "Canceled", "Creating", "Updating", and "Deleting". (Failed, Succeeded, Canceled, Creating, Updating, Deleting) |
publicIPAddresses | array | The list of public IP addresses associated with the custom policy. This list is read-only. |
resourceGuid | string | The resource GUID property of the DDoS custom policy resource. It uniquely identifies the resource, even if the user changes its name or migrate the resource across subscriptions or resource groups. |
tags | object | Resource tags. |
type | string | Resource type. |
| Name | Datatype | Description |
|---|---|---|
id | string | Resource ID. |
name | string | Resource name. |
detectionRules | array | The list of DDoS detection rules associated with the custom policy. |
etag | string | A unique read-only string that changes whenever the resource is updated. |
frontEndIpConfiguration | array | The list of frontend IP configurations associated with the custom policy. |
location | string | Resource location. |
provisioningState | string | The provisioning state of the DDoS custom policy resource. Known values are: "Failed", "Succeeded", "Canceled", "Creating", "Updating", and "Deleting". (Failed, Succeeded, Canceled, Creating, Updating, Deleting) |
publicIPAddresses | array | The list of public IP addresses associated with the custom policy. This list is read-only. |
resourceGuid | string | The resource GUID property of the DDoS custom policy resource. It uniquely identifies the resource, even if the user changes its name or migrate the resource across subscriptions or resource groups. |
tags | object | Resource tags. |
type | string | Resource type. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | resource_group_name, ddos_custom_policy_name, subscription_id | Gets information about the specified DDoS custom policy. | |
list | select | resource_group_name, subscription_id | Gets all the DDoS custom policies in a resource group. | |
list_all | select | subscription_id | Gets all the DDoS custom policies in a subscription. | |
create_or_update | insert | resource_group_name, ddos_custom_policy_name, subscription_id | Creates or updates a DDoS custom policy. | |
update_tags | update | resource_group_name, ddos_custom_policy_name, subscription_id | Update a DDoS custom policy tags. | |
create_or_update | replace | resource_group_name, ddos_custom_policy_name, subscription_id | Creates or updates a DDoS custom policy. | |
delete | delete | resource_group_name, ddos_custom_policy_name, subscription_id | Deletes the specified DDoS custom policy. |
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 |
|---|---|---|
ddos_custom_policy_name | string | The name of the DDoS custom policy. Required. |
resource_group_name | string | The name of the resource group. The name is case insensitive. Required. |
subscription_id | string |
SELECT examples
- get
- list
- list_all
Gets information about the specified DDoS custom policy.
SELECT
id,
name,
detectionRules,
etag,
frontEndIpConfiguration,
location,
provisioningState,
publicIPAddresses,
resourceGuid,
tags,
type
FROM azure.network.ddos_custom_policies
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND ddos_custom_policy_name = '{{ ddos_custom_policy_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;
Gets all the DDoS custom policies in a resource group.
SELECT
id,
name,
detectionRules,
etag,
frontEndIpConfiguration,
location,
provisioningState,
publicIPAddresses,
resourceGuid,
tags,
type
FROM azure.network.ddos_custom_policies
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;
Gets all the DDoS custom policies in a subscription.
SELECT
id,
name,
detectionRules,
etag,
frontEndIpConfiguration,
location,
provisioningState,
publicIPAddresses,
resourceGuid,
tags,
type
FROM azure.network.ddos_custom_policies
WHERE subscription_id = '{{ subscription_id }}' -- required
;
INSERT examples
- create_or_update
- Manifest
Creates or updates a DDoS custom policy.
INSERT INTO azure.network.ddos_custom_policies (
id,
location,
tags,
properties,
resource_group_name,
ddos_custom_policy_name,
subscription_id
)
SELECT
'{{ id }}',
'{{ location }}',
'{{ tags }}',
'{{ properties }}',
'{{ resource_group_name }}',
'{{ ddos_custom_policy_name }}',
'{{ subscription_id }}'
RETURNING
id,
name,
etag,
location,
properties,
tags,
type
;
# Description fields are for documentation purposes
- name: ddos_custom_policies
props:
- name: resource_group_name
value: "{{ resource_group_name }}"
description: Required parameter for the ddos_custom_policies resource.
- name: ddos_custom_policy_name
value: "{{ ddos_custom_policy_name }}"
description: Required parameter for the ddos_custom_policies resource.
- name: subscription_id
value: "{{ subscription_id }}"
description: Required parameter for the ddos_custom_policies resource.
- name: id
value: "{{ id }}"
description: |
Resource ID.
- name: location
value: "{{ location }}"
description: |
Resource location.
- name: tags
value: "{{ tags }}"
description: |
Resource tags.
- name: properties
description: |
Properties of the DDoS custom policy.
value:
resourceGuid: "{{ resourceGuid }}"
provisioningState: "{{ provisioningState }}"
detectionRules:
- id: "{{ id }}"
name: "{{ name }}"
etag: "{{ etag }}"
type: "{{ type }}"
properties:
provisioningState: "{{ provisioningState }}"
detectionMode: "{{ detectionMode }}"
trafficDetectionRule:
trafficType: "{{ trafficType }}"
packetsPerSecond: {{ packetsPerSecond }}
frontEndIpConfiguration:
- id: "{{ id }}"
publicIPAddresses:
- id: "{{ id }}"
UPDATE examples
- update_tags
Update a DDoS custom policy tags.
UPDATE azure.network.ddos_custom_policies
SET
tags = '{{ tags }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND ddos_custom_policy_name = '{{ ddos_custom_policy_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
etag,
location,
properties,
tags,
type;
REPLACE examples
- create_or_update
Creates or updates a DDoS custom policy.
REPLACE azure.network.ddos_custom_policies
SET
id = '{{ id }}',
location = '{{ location }}',
tags = '{{ tags }}',
properties = '{{ properties }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND ddos_custom_policy_name = '{{ ddos_custom_policy_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
etag,
location,
properties,
tags,
type;
DELETE examples
- delete
Deletes the specified DDoS custom policy.
DELETE FROM azure.network.ddos_custom_policies
WHERE resource_group_name = '{{ resource_group_name }}' --required
AND ddos_custom_policy_name = '{{ ddos_custom_policy_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
;