security_groups
Creates, updates, deletes, gets or lists a security_groups
resource.
Overview
Name | security_groups |
Type | Resource |
Id | azure.network.security_groups |
Fields
The following fields are returned by SELECT
queries:
- get
- list
- list_all
Request successful. The operation returns the resulting NetworkSecurityGroup resource.
Name | Datatype | Description |
---|---|---|
id | string (arm-id) | Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" |
name | string | The name of the resource |
etag | string | A unique read-only string that changes whenever the resource is updated. |
properties | object | Properties of the network security group. |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" |
Request successful. The operation returns a list of NetworkSecurityGroup resources.
Name | Datatype | Description |
---|---|---|
id | string (arm-id) | Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" |
name | string | The name of the resource |
etag | string | A unique read-only string that changes whenever the resource is updated. |
properties | object | Properties of the network security group. |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" |
Request successful. The operation returns a list of NetworkSecurityGroup resources.
Name | Datatype | Description |
---|---|---|
id | string (arm-id) | Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" |
name | string | The name of the resource |
etag | string | A unique read-only string that changes whenever the resource is updated. |
properties | object | Properties of the network security group. |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
get | select | resourceGroupName , networkSecurityGroupName , subscriptionId | $expand | Gets the specified network security group. |
list | select | resourceGroupName , subscriptionId | Gets all network security groups in a resource group. | |
list_all | select | subscriptionId | Gets all network security groups in a subscription. | |
create_or_update | insert | resourceGroupName , networkSecurityGroupName , subscriptionId | Creates or updates a network security group in the specified resource group. | |
delete | delete | resourceGroupName , networkSecurityGroupName , subscriptionId | Deletes the specified network security group. | |
update_tags | exec | resourceGroupName , networkSecurityGroupName , subscriptionId | Updates a network security group tags. |
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 |
---|---|---|
networkSecurityGroupName | string | The name of the network security group. |
resourceGroupName | string | The name of the resource group. |
subscriptionId | string (uuid) | The ID of the target subscription. The value must be an UUID. |
$expand | string | Expands referenced resources. |
SELECT
examples
- get
- list
- list_all
Gets the specified network security group.
SELECT
id,
name,
etag,
properties,
systemData,
type
FROM azure.network.security_groups
WHERE resourceGroupName = '{{ resourceGroupName }}' -- required
AND networkSecurityGroupName = '{{ networkSecurityGroupName }}' -- required
AND subscriptionId = '{{ subscriptionId }}' -- required
AND $expand = '{{ $expand }}'
;
Gets all network security groups in a resource group.
SELECT
id,
name,
etag,
properties,
systemData,
type
FROM azure.network.security_groups
WHERE resourceGroupName = '{{ resourceGroupName }}' -- required
AND subscriptionId = '{{ subscriptionId }}' -- required
;
Gets all network security groups in a subscription.
SELECT
id,
name,
etag,
properties,
systemData,
type
FROM azure.network.security_groups
WHERE subscriptionId = '{{ subscriptionId }}' -- required
;
INSERT
examples
- create_or_update
- Manifest
Creates or updates a network security group in the specified resource group.
INSERT INTO azure.network.security_groups (
data__properties,
resourceGroupName,
networkSecurityGroupName,
subscriptionId
)
SELECT
'{{ properties }}',
'{{ resourceGroupName }}',
'{{ networkSecurityGroupName }}',
'{{ subscriptionId }}'
RETURNING
id,
name,
etag,
properties,
systemData,
type
;
# Description fields are for documentation purposes
- name: security_groups
props:
- name: resourceGroupName
value: string
description: Required parameter for the security_groups resource.
- name: networkSecurityGroupName
value: string
description: Required parameter for the security_groups resource.
- name: subscriptionId
value: string (uuid)
description: Required parameter for the security_groups resource.
- name: properties
value: object
description: |
Properties of the network security group.
DELETE
examples
- delete
Deletes the specified network security group.
DELETE FROM azure.network.security_groups
WHERE resourceGroupName = '{{ resourceGroupName }}' --required
AND networkSecurityGroupName = '{{ networkSecurityGroupName }}' --required
AND subscriptionId = '{{ subscriptionId }}' --required
;
Lifecycle Methods
- update_tags
Updates a network security group tags.
EXEC azure.network.security_groups.update_tags
@resourceGroupName='{{ resourceGroupName }}' --required,
@networkSecurityGroupName='{{ networkSecurityGroupName }}' --required,
@subscriptionId='{{ subscriptionId }}' --required
@@json=
'{
"tags": "{{ tags }}"
}'
;