security_rules
Creates, updates, deletes, gets or lists a security_rules
resource.
Overview
Name | security_rules |
Type | Resource |
Id | azure.network.security_rules |
Fields
- vw_security_rules
- security_rules
Name | Datatype | Description |
---|---|---|
id | text | Resource ID. |
name | text | The name of the resource that is unique within a resource group. This name can be used to access the resource. |
description | text | field from the properties object |
access | text | field from the properties object |
destination_address_prefix | text | field from the properties object |
destination_address_prefixes | text | field from the properties object |
destination_application_security_groups | text | field from the properties object |
destination_port_range | text | field from the properties object |
destination_port_ranges | text | field from the properties object |
direction | text | field from the properties object |
etag | text | A unique read-only string that changes whenever the resource is updated. |
networkSecurityGroupName | text | field from the properties object |
priority | text | field from the properties object |
protocol | text | field from the properties object |
provisioning_state | text | field from the properties object |
resourceGroupName | text | field from the properties object |
securityRuleName | text | field from the properties object |
source_address_prefix | text | field from the properties object |
source_address_prefixes | text | field from the properties object |
source_application_security_groups | text | field from the properties object |
source_port_range | text | field from the properties object |
source_port_ranges | text | field from the properties object |
subscriptionId | text | field from the properties object |
type | text | The type of the resource. |
Name | Datatype | Description |
---|---|---|
id | string | Resource ID. |
name | string | The name of the resource that is unique within a resource group. This name can be used to access the resource. |
etag | string | A unique read-only string that changes whenever the resource is updated. |
properties | object | Security rule resource. |
type | string | The type of the resource. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | networkSecurityGroupName, resourceGroupName, securityRuleName, subscriptionId | Get the specified network security rule. |
list | SELECT | networkSecurityGroupName, resourceGroupName, subscriptionId | Gets all security rules in a network security group. |
create_or_update | INSERT | networkSecurityGroupName, resourceGroupName, securityRuleName, subscriptionId | Creates or updates a security rule in the specified network security group. |
delete | DELETE | networkSecurityGroupName, resourceGroupName, securityRuleName, subscriptionId | Deletes the specified network security rule. |
SELECT
examples
Gets all security rules in a network security group.
- vw_security_rules
- security_rules
SELECT
id,
name,
description,
access,
destination_address_prefix,
destination_address_prefixes,
destination_application_security_groups,
destination_port_range,
destination_port_ranges,
direction,
etag,
networkSecurityGroupName,
priority,
protocol,
provisioning_state,
resourceGroupName,
securityRuleName,
source_address_prefix,
source_address_prefixes,
source_application_security_groups,
source_port_range,
source_port_ranges,
subscriptionId,
type
FROM azure.network.vw_security_rules
WHERE networkSecurityGroupName = '{{ networkSecurityGroupName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';
SELECT
id,
name,
etag,
properties,
type
FROM azure.network.security_rules
WHERE networkSecurityGroupName = '{{ networkSecurityGroupName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';
INSERT
example
Use the following StackQL query and manifest file to create a new security_rules
resource.
- All Properties
- Manifest
/*+ create */
INSERT INTO azure.network.security_rules (
networkSecurityGroupName,
resourceGroupName,
securityRuleName,
subscriptionId,
properties,
name,
type,
id
)
SELECT
'{{ networkSecurityGroupName }}',
'{{ resourceGroupName }}',
'{{ securityRuleName }}',
'{{ subscriptionId }}',
'{{ properties }}',
'{{ name }}',
'{{ type }}',
'{{ id }}'
;
- name: your_resource_model_name
props:
- name: properties
value:
- name: description
value: string
- name: protocol
value: string
- name: sourcePortRange
value: string
- name: destinationPortRange
value: string
- name: sourceAddressPrefix
value: string
- name: sourceAddressPrefixes
value:
- string
- name: sourceApplicationSecurityGroups
value:
- - name: properties
value:
- name: resourceGuid
value: string
- name: provisioningState
value: []
- name: etag
value: string
- name: id
value: string
- name: name
value: string
- name: type
value: string
- name: location
value: string
- name: tags
value: object
- name: destinationAddressPrefix
value: string
- name: destinationAddressPrefixes
value:
- string
- name: destinationApplicationSecurityGroups
value:
- - name: etag
value: string
- name: id
value: string
- name: name
value: string
- name: type
value: string
- name: location
value: string
- name: tags
value: object
- name: sourcePortRanges
value:
- string
- name: destinationPortRanges
value:
- string
- name: access
value: []
- name: priority
value: integer
- name: direction
value: []
- name: name
value: string
- name: etag
value: string
- name: type
value: string
- name: id
value: string
DELETE
example
Deletes the specified security_rules
resource.
/*+ delete */
DELETE FROM azure.network.security_rules
WHERE networkSecurityGroupName = '{{ networkSecurityGroupName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND securityRuleName = '{{ securityRuleName }}'
AND subscriptionId = '{{ subscriptionId }}';