Skip to main content

security_rules

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

Overview

Namesecurity_rules
TypeResource
Idazure.network.security_rules

Fields

NameDatatypeDescription
idtextResource ID.
nametextThe name of the resource that is unique within a resource group. This name can be used to access the resource.
descriptiontextfield from the properties object
accesstextfield from the properties object
destination_address_prefixtextfield from the properties object
destination_address_prefixestextfield from the properties object
destination_application_security_groupstextfield from the properties object
destination_port_rangetextfield from the properties object
destination_port_rangestextfield from the properties object
directiontextfield from the properties object
etagtextA unique read-only string that changes whenever the resource is updated.
networkSecurityGroupNametextfield from the properties object
prioritytextfield from the properties object
protocoltextfield from the properties object
provisioning_statetextfield from the properties object
resourceGroupNametextfield from the properties object
securityRuleNametextfield from the properties object
source_address_prefixtextfield from the properties object
source_address_prefixestextfield from the properties object
source_application_security_groupstextfield from the properties object
source_port_rangetextfield from the properties object
source_port_rangestextfield from the properties object
subscriptionIdtextfield from the properties object
typetextThe type of the resource.

Methods

NameAccessible byRequired ParamsDescription
getSELECTnetworkSecurityGroupName, resourceGroupName, securityRuleName, subscriptionIdGet the specified network security rule.
listSELECTnetworkSecurityGroupName, resourceGroupName, subscriptionIdGets all security rules in a network security group.
create_or_updateINSERTnetworkSecurityGroupName, resourceGroupName, securityRuleName, subscriptionIdCreates or updates a security rule in the specified network security group.
deleteDELETEnetworkSecurityGroupName, resourceGroupName, securityRuleName, subscriptionIdDeletes the specified network security rule.

SELECT examples

Gets all security rules in a network security group.

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 }}';

INSERT example

Use the following StackQL query and manifest file to create a new security_rules resource.

/*+ create */
INSERT INTO azure.network.security_rules (
networkSecurityGroupName,
resourceGroupName,
securityRuleName,
subscriptionId,
properties,
name,
type,
id
)
SELECT
'{{ networkSecurityGroupName }}',
'{{ resourceGroupName }}',
'{{ securityRuleName }}',
'{{ subscriptionId }}',
'{{ properties }}',
'{{ name }}',
'{{ type }}',
'{{ id }}'
;

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 }}';