Skip to main content

firewall_rules

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

Overview

Namefirewall_rules
TypeResource
Idazure.sql.firewall_rules

Fields

NameDatatypeDescription
end_ip_addresstextfield from the properties object
firewallRuleNametextfield from the properties object
resourceGroupNametextfield from the properties object
serverNametextfield from the properties object
start_ip_addresstextfield from the properties object
subscriptionIdtextfield from the properties object

Methods

NameAccessible byRequired ParamsDescription
getSELECTfirewallRuleName, resourceGroupName, serverName, subscriptionIdGets a firewall rule.
list_by_serverSELECTresourceGroupName, serverName, subscriptionIdGets a list of firewall rules.
create_or_updateINSERTfirewallRuleName, resourceGroupName, serverName, subscriptionIdCreates or updates a firewall rule.
deleteDELETEfirewallRuleName, resourceGroupName, serverName, subscriptionIdDeletes a firewall rule.
replaceREPLACEresourceGroupName, serverName, subscriptionIdReplaces all firewall rules on the server.

SELECT examples

Gets a list of firewall rules.

SELECT
end_ip_address,
firewallRuleName,
resourceGroupName,
serverName,
start_ip_address,
subscriptionId
FROM azure.sql.vw_firewall_rules
WHERE resourceGroupName = '{{ resourceGroupName }}'
AND serverName = '{{ serverName }}'
AND subscriptionId = '{{ subscriptionId }}';

INSERT example

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

/*+ create */
INSERT INTO azure.sql.firewall_rules (
firewallRuleName,
resourceGroupName,
serverName,
subscriptionId,
properties
)
SELECT
'{{ firewallRuleName }}',
'{{ resourceGroupName }}',
'{{ serverName }}',
'{{ subscriptionId }}',
'{{ properties }}'
;

REPLACE example

Replaces all fields in the specified firewall_rules resource.

/*+ update */
REPLACE azure.sql.firewall_rules
SET
values = '{{ values }}'
WHERE
resourceGroupName = '{{ resourceGroupName }}'
AND serverName = '{{ serverName }}'
AND subscriptionId = '{{ subscriptionId }}';

DELETE example

Deletes the specified firewall_rules resource.

/*+ delete */
DELETE FROM azure.sql.firewall_rules
WHERE firewallRuleName = '{{ firewallRuleName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND serverName = '{{ serverName }}'
AND subscriptionId = '{{ subscriptionId }}';