firewall_rules
Creates, updates, deletes, gets or lists a firewall_rules
resource.
Overview
Name | firewall_rules |
Type | Resource |
Id | azure.mysql.firewall_rules |
Fields
- vw_firewall_rules
- firewall_rules
Name | Datatype | Description |
---|---|---|
end_ip_address | text | field from the properties object |
firewallRuleName | text | field from the properties object |
resourceGroupName | text | field from the properties object |
serverName | text | field from the properties object |
start_ip_address | text | field from the properties object |
subscriptionId | text | field from the properties object |
Name | Datatype | Description |
---|---|---|
properties | object | The properties of a server firewall rule. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | firewallRuleName, resourceGroupName, serverName, subscriptionId | Gets information about a server firewall rule. |
list_by_server | SELECT | resourceGroupName, serverName, subscriptionId | List all the firewall rules in a given server. |
create_or_update | INSERT | firewallRuleName, resourceGroupName, serverName, subscriptionId, data__properties | Creates a new firewall rule or updates an existing firewall rule. |
delete | DELETE | firewallRuleName, resourceGroupName, serverName, subscriptionId | Deletes a firewall rule. |
SELECT
examples
List all the firewall rules in a given server.
- vw_firewall_rules
- firewall_rules
SELECT
end_ip_address,
firewallRuleName,
resourceGroupName,
serverName,
start_ip_address,
subscriptionId
FROM azure.mysql.vw_firewall_rules
WHERE resourceGroupName = '{{ resourceGroupName }}'
AND serverName = '{{ serverName }}'
AND subscriptionId = '{{ subscriptionId }}';
SELECT
properties
FROM azure.mysql.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.
- All Properties
- Manifest
/*+ create */
INSERT INTO azure.mysql.firewall_rules (
firewallRuleName,
resourceGroupName,
serverName,
subscriptionId,
data__properties,
properties
)
SELECT
'{{ firewallRuleName }}',
'{{ resourceGroupName }}',
'{{ serverName }}',
'{{ subscriptionId }}',
'{{ data__properties }}',
'{{ properties }}'
;
- name: your_resource_model_name
props:
- name: properties
value:
- name: startIpAddress
value: string
- name: endIpAddress
value: string
DELETE
example
Deletes the specified firewall_rules
resource.
/*+ delete */
DELETE FROM azure.mysql.firewall_rules
WHERE firewallRuleName = '{{ firewallRuleName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND serverName = '{{ serverName }}'
AND subscriptionId = '{{ subscriptionId }}';