# AzureNetworkSecurityGroupResource

- Module: [Aspire.Hosting.Azure.Network](/reference/api/go/aspire.hosting.azure.network.md)
- Version: `17.0.0`
- Kind: `handle`
- Source: [GitHub](https://github.com/microsoft/aspire/tree/2d325b13709752ba6d9a943635c5e2940a2530c0)

## Definition

```go
type AzureNetworkSecurityGroupResource interface {
    Resource
}
```

## Embeds

- `Resource`

## Methods

- [WithSecurityRule](/reference/api/go/aspire.hosting.azure.network/azurenetworksecuritygroupresource/withsecurityrule.md) -- `method` -- Adds a security rule to the Network Security Group.
  ```go
  WithSecurityRule(rule *AzureSecurityRule) AzureNetworkSecurityGroupResource
  ```
