inbound_security_rule
Creates, updates, deletes, gets or lists an inbound_security_rule resource.
Overview
| Name | inbound_security_rule |
| Type | Resource |
| Id | azure.network.inbound_security_rule |
Fields
The following fields are returned by SELECT queries:
- get
| Name | Datatype | Description |
|---|---|---|
id | string | Resource ID. |
name | string | Name of the resource. |
etag | string | A unique read-only string that changes whenever the resource is updated. |
provisioningState | string | The provisioning state of the resource. Known values are: "Failed", "Succeeded", "Canceled", "Creating", "Updating", and "Deleting". (Failed, Succeeded, Canceled, Creating, Updating, Deleting) |
ruleType | string | Rule Type. This should be either AutoExpire or Permanent. Auto Expire Rule only creates NSG rules. Permanent Rule creates NSG rule and SLB LB Rule. Known values are: "AutoExpire" and "Permanent". (AutoExpire, Permanent) |
rules | array | List of allowed rules. |
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_virtual_appliance_name, rule_collection_name, subscription_id | Retrieves the available specified Network Virtual Appliance Inbound Security Rules Collection. | |
create_or_update | insert | resource_group_name, network_virtual_appliance_name, rule_collection_name, subscription_id | Creates or updates the specified Network Virtual Appliance Inbound Security Rules. | |
create_or_update | replace | resource_group_name, network_virtual_appliance_name, rule_collection_name, subscription_id | Creates or updates the specified Network Virtual Appliance Inbound Security Rules. |
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 |
|---|---|---|
network_virtual_appliance_name | string | The name of Network Virtual Appliance. Required. |
resource_group_name | string | The name of the resource group. The name is case insensitive. Required. |
rule_collection_name | string | The name of the resource that is unique within a resource group. This name can be used to access the resource. Required. |
subscription_id | string |
SELECT examples
- get
Retrieves the available specified Network Virtual Appliance Inbound Security Rules Collection.
SELECT
id,
name,
etag,
provisioningState,
ruleType,
rules,
type
FROM azure.network.inbound_security_rule
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND network_virtual_appliance_name = '{{ network_virtual_appliance_name }}' -- required
AND rule_collection_name = '{{ rule_collection_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;
INSERT examples
- create_or_update
- Manifest
Creates or updates the specified Network Virtual Appliance Inbound Security Rules.
INSERT INTO azure.network.inbound_security_rule (
id,
name,
properties,
resource_group_name,
network_virtual_appliance_name,
rule_collection_name,
subscription_id
)
SELECT
'{{ id }}',
'{{ name }}',
'{{ properties }}',
'{{ resource_group_name }}',
'{{ network_virtual_appliance_name }}',
'{{ rule_collection_name }}',
'{{ subscription_id }}'
RETURNING
id,
name,
etag,
properties,
type
;
# Description fields are for documentation purposes
- name: inbound_security_rule
props:
- name: resource_group_name
value: "{{ resource_group_name }}"
description: Required parameter for the inbound_security_rule resource.
- name: network_virtual_appliance_name
value: "{{ network_virtual_appliance_name }}"
description: Required parameter for the inbound_security_rule resource.
- name: rule_collection_name
value: "{{ rule_collection_name }}"
description: Required parameter for the inbound_security_rule resource.
- name: subscription_id
value: "{{ subscription_id }}"
description: Required parameter for the inbound_security_rule resource.
- name: id
value: "{{ id }}"
description: |
Resource ID.
- name: name
value: "{{ name }}"
description: |
Name of the resource.
- name: properties
description: |
The properties of the Inbound Security Rules.
value:
ruleType: "{{ ruleType }}"
rules:
- name: "{{ name }}"
protocol: "{{ protocol }}"
sourceAddressPrefix: "{{ sourceAddressPrefix }}"
destinationPortRange: {{ destinationPortRange }}
destinationPortRanges: "{{ destinationPortRanges }}"
appliesOn: "{{ appliesOn }}"
provisioningState: "{{ provisioningState }}"
REPLACE examples
- create_or_update
Creates or updates the specified Network Virtual Appliance Inbound Security Rules.
REPLACE azure.network.inbound_security_rule
SET
id = '{{ id }}',
name = '{{ name }}',
properties = '{{ properties }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND network_virtual_appliance_name = '{{ network_virtual_appliance_name }}' --required
AND rule_collection_name = '{{ rule_collection_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
etag,
properties,
type;