default_security_rules
Creates, updates, deletes, gets or lists a default_security_rules resource.
Overview
| Name | default_security_rules |
| Type | Resource |
| Id | azure.network.default_security_rules |
Fields
The following fields are returned by SELECT queries:
- get
- list
| Name | Datatype | Description |
|---|---|---|
id | string | Resource ID. |
name | string | Name of the resource. |
access | string | The network traffic is allowed or denied. Required. Known values are: "Allow" and "Deny". (Allow, Deny) |
description | string | A description for this rule. Restricted to 140 chars. |
destinationAddressPrefix | string | The destination address prefix. CIDR or destination IP range. Asterisk '*' can also be used to match all source IPs. Default tags such as 'VirtualNetwork', 'AzureLoadBalancer' and 'Internet' can also be used. |
destinationAddressPrefixes | array | The destination address prefixes. CIDR or destination IP ranges. |
destinationApplicationSecurityGroups | array | The application security group specified as destination. |
destinationPortRange | string | The destination port or range. Integer or range between 0 and 65535. Asterisk '*' can also be used to match all ports. |
destinationPortRanges | array | The destination port ranges. |
direction | string | The direction of the rule. The direction specifies if rule will be evaluated on incoming or outgoing traffic. Required. Known values are: "Inbound" and "Outbound". (Inbound, Outbound) |
etag | string | A unique read-only string that changes whenever the resource is updated. |
priority | integer | The priority of the rule. The value can be between 100 and 4096. The priority number must be unique for each rule in the collection. The lower the priority number, the higher the priority of the rule. Required. |
protocol | string | Network protocol this rule applies to. Required. Known values are: "Tcp", "Udp", "Icmp", "Esp", "*", and "Ah". (Tcp, Udp, Icmp, Esp, *, Ah) |
provisioningState | string | The provisioning state of the security rule resource. Known values are: "Failed", "Succeeded", "Canceled", "Creating", "Updating", and "Deleting". (Failed, Succeeded, Canceled, Creating, Updating, Deleting) |
sourceAddressPrefix | string | The CIDR or source IP range. Asterisk '*' can also be used to match all source IPs. Default tags such as 'VirtualNetwork', 'AzureLoadBalancer' and 'Internet' can also be used. If this is an ingress rule, specifies where network traffic originates from. |
sourceAddressPrefixes | array | The CIDR or source IP ranges. |
sourceApplicationSecurityGroups | array | The application security group specified as source. |
sourcePortRange | string | The source port or range. Integer or range between 0 and 65535. Asterisk '*' can also be used to match all ports. |
sourcePortRanges | array | The source port ranges. |
type | string | Resource type. |
| Name | Datatype | Description |
|---|---|---|
id | string | Resource ID. |
name | string | Name of the resource. |
access | string | The network traffic is allowed or denied. Required. Known values are: "Allow" and "Deny". (Allow, Deny) |
description | string | A description for this rule. Restricted to 140 chars. |
destinationAddressPrefix | string | The destination address prefix. CIDR or destination IP range. Asterisk '*' can also be used to match all source IPs. Default tags such as 'VirtualNetwork', 'AzureLoadBalancer' and 'Internet' can also be used. |
destinationAddressPrefixes | array | The destination address prefixes. CIDR or destination IP ranges. |
destinationApplicationSecurityGroups | array | The application security group specified as destination. |
destinationPortRange | string | The destination port or range. Integer or range between 0 and 65535. Asterisk '*' can also be used to match all ports. |
destinationPortRanges | array | The destination port ranges. |
direction | string | The direction of the rule. The direction specifies if rule will be evaluated on incoming or outgoing traffic. Required. Known values are: "Inbound" and "Outbound". (Inbound, Outbound) |
etag | string | A unique read-only string that changes whenever the resource is updated. |
priority | integer | The priority of the rule. The value can be between 100 and 4096. The priority number must be unique for each rule in the collection. The lower the priority number, the higher the priority of the rule. Required. |
protocol | string | Network protocol this rule applies to. Required. Known values are: "Tcp", "Udp", "Icmp", "Esp", "*", and "Ah". (Tcp, Udp, Icmp, Esp, *, Ah) |
provisioningState | string | The provisioning state of the security rule resource. Known values are: "Failed", "Succeeded", "Canceled", "Creating", "Updating", and "Deleting". (Failed, Succeeded, Canceled, Creating, Updating, Deleting) |
sourceAddressPrefix | string | The CIDR or source IP range. Asterisk '*' can also be used to match all source IPs. Default tags such as 'VirtualNetwork', 'AzureLoadBalancer' and 'Internet' can also be used. If this is an ingress rule, specifies where network traffic originates from. |
sourceAddressPrefixes | array | The CIDR or source IP ranges. |
sourceApplicationSecurityGroups | array | The application security group specified as source. |
sourcePortRange | string | The source port or range. Integer or range between 0 and 65535. Asterisk '*' can also be used to match all ports. |
sourcePortRanges | array | The source port ranges. |
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, network_security_group_name, default_security_rule_name, subscription_id | Get the specified default network security rule. | |
list | select | resource_group_name, network_security_group_name, subscription_id | Gets all default security rules in a network security group. |
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 |
|---|---|---|
default_security_rule_name | string | The name of the default security rule. Required. |
network_security_group_name | string | The name of the network security group. Required. |
resource_group_name | string | The name of the resource group. The name is case insensitive. Required. |
subscription_id | string |
SELECT examples
- get
- list
Get the specified default network security rule.
SELECT
id,
name,
access,
description,
destinationAddressPrefix,
destinationAddressPrefixes,
destinationApplicationSecurityGroups,
destinationPortRange,
destinationPortRanges,
direction,
etag,
priority,
protocol,
provisioningState,
sourceAddressPrefix,
sourceAddressPrefixes,
sourceApplicationSecurityGroups,
sourcePortRange,
sourcePortRanges,
type
FROM azure.network.default_security_rules
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND network_security_group_name = '{{ network_security_group_name }}' -- required
AND default_security_rule_name = '{{ default_security_rule_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;
Gets all default security rules in a network security group.
SELECT
id,
name,
access,
description,
destinationAddressPrefix,
destinationAddressPrefixes,
destinationApplicationSecurityGroups,
destinationPortRange,
destinationPortRanges,
direction,
etag,
priority,
protocol,
provisioningState,
sourceAddressPrefix,
sourceAddressPrefixes,
sourceApplicationSecurityGroups,
sourcePortRange,
sourcePortRanges,
type
FROM azure.network.default_security_rules
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND network_security_group_name = '{{ network_security_group_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;