Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Bicep resource definition
The networkSecurityGroups resource type can be deployed with operations that target:
- Resource groups - See resource group deployment commands
For a list of changed properties in each API version, see change log.
Resource format
To create a Microsoft.AzureStackHCI/networkSecurityGroups resource, add the following Bicep to your template.
resource symbolicname 'Microsoft.AzureStackHCI/networkSecurityGroups@2026-04-01-preview' = {
extendedLocation: {
name: 'string'
type: 'string'
}
location: 'string'
name: 'string'
properties: {}
tags: {
{customized property}: 'string'
}
}
Property Values
Microsoft.AzureStackHCI/networkSecurityGroups
| Name | Description | Value |
|---|---|---|
| extendedLocation | The extendedLocation of the resource. | ExtendedLocation |
| location | The geo-location where the resource lives | string (required) |
| name | The resource name | string Constraints: Pattern = ^[a-zA-Z0-9]$|^[a-zA-Z0-9][-._a-zA-Z0-9]{0,62}[a-zA-Z0-9]$ (required) |
| properties | The resource-specific properties for this resource. | NetworkSecurityGroupProperties |
| tags | Resource tags | Dictionary of tag names and values. See Tags in templates |
ExtendedLocation
| Name | Description | Value |
|---|---|---|
| name | The name of the extended location. | string |
| type | The type of the extended location. | 'CustomLocation' |
NetworkSecurityGroupProperties
| Name | Description | Value |
|---|
TrackedResourceTags
| Name | Description | Value |
|---|
ARM template resource definition
The networkSecurityGroups resource type can be deployed with operations that target:
- Resource groups - See resource group deployment commands
For a list of changed properties in each API version, see change log.
Resource format
To create a Microsoft.AzureStackHCI/networkSecurityGroups resource, add the following JSON to your template.
{
"type": "Microsoft.AzureStackHCI/networkSecurityGroups",
"apiVersion": "2026-04-01-preview",
"name": "string",
"extendedLocation": {
"name": "string",
"type": "string"
},
"location": "string",
"properties": {
},
"tags": {
"{customized property}": "string"
}
}
Property Values
Microsoft.AzureStackHCI/networkSecurityGroups
| Name | Description | Value |
|---|---|---|
| apiVersion | The api version | '2026-04-01-preview' |
| extendedLocation | The extendedLocation of the resource. | ExtendedLocation |
| location | The geo-location where the resource lives | string (required) |
| name | The resource name | string Constraints: Pattern = ^[a-zA-Z0-9]$|^[a-zA-Z0-9][-._a-zA-Z0-9]{0,62}[a-zA-Z0-9]$ (required) |
| properties | The resource-specific properties for this resource. | NetworkSecurityGroupProperties |
| tags | Resource tags | Dictionary of tag names and values. See Tags in templates |
| type | The resource type | 'Microsoft.AzureStackHCI/networkSecurityGroups' |
ExtendedLocation
| Name | Description | Value |
|---|---|---|
| name | The name of the extended location. | string |
| type | The type of the extended location. | 'CustomLocation' |
NetworkSecurityGroupProperties
| Name | Description | Value |
|---|
TrackedResourceTags
| Name | Description | Value |
|---|
Usage Examples
Terraform (AzAPI provider) resource definition
The networkSecurityGroups resource type can be deployed with operations that target:
- Resource groups
For a list of changed properties in each API version, see change log.
Resource format
To create a Microsoft.AzureStackHCI/networkSecurityGroups resource, add the following Terraform to your template.
resource "azapi_resource" "symbolicname" {
type = "Microsoft.AzureStackHCI/networkSecurityGroups@2026-04-01-preview"
name = "string"
parent_id = "string"
location = "string"
tags = {
{customized property} = "string"
}
body = {
extendedLocation = {
name = "string"
type = "string"
}
properties = {
}
}
}
Property Values
Microsoft.AzureStackHCI/networkSecurityGroups
| Name | Description | Value |
|---|---|---|
| extendedLocation | The extendedLocation of the resource. | ExtendedLocation |
| location | The geo-location where the resource lives | string (required) |
| name | The resource name | string Constraints: Pattern = ^[a-zA-Z0-9]$|^[a-zA-Z0-9][-._a-zA-Z0-9]{0,62}[a-zA-Z0-9]$ (required) |
| properties | The resource-specific properties for this resource. | NetworkSecurityGroupProperties |
| tags | Resource tags | Dictionary of tag names and values. |
| type | The resource type | "Microsoft.AzureStackHCI/networkSecurityGroups@2026-04-01-preview" |
ExtendedLocation
| Name | Description | Value |
|---|---|---|
| name | The name of the extended location. | string |
| type | The type of the extended location. | 'CustomLocation' |
NetworkSecurityGroupProperties
| Name | Description | Value |
|---|
TrackedResourceTags
| Name | Description | Value |
|---|