# NetworkSecurityGroupProxy

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

Represents the NetworkSecurityGroup Azure Provisioning model.

## Definition

```typescript
interface NetworkSecurityGroupProxy {
  readonly defaultSecurityRules: Aspire_Hosting_Azure_Provisioning_Network_Generated_ListOfSecurityRuleProxy;
  readonly eTag: BicepValueProxy;
  readonly flowLogs: Aspire_Hosting_Azure_Provisioning_Network_Generated_ListOfFlowLogProxy;
  flushConnection: BicepValueProxy | boolean;
  id: BicepValueProxy;
  location: BicepValueProxy;
  name: BicepValueProxy | string;
  readonly networkInterfaces: Aspire_Hosting_Azure_Provisioning_Network_Generated_ListOfNetworkInterfaceProxy;
  readonly provisioningState: BicepValueProxy | NetworkProvisioningState;
  readonly resourceGuid: BicepValueProxy | guid;
  securityRules: Aspire_Hosting_Azure_Provisioning_Network_Generated_ListOfSecurityRuleProxy;
  readonly subnets: Aspire_Hosting_Azure_Provisioning_Network_Generated_ListOfSubnetResourceProxy;
  tags: Aspire_Hosting_Azure_Provisioning_Network_Generated_DictionaryOfStringProxy;
  addTo(infrastructure: AzureResourceInfrastructure): void;
  clearFlushConnection(): void;
  clearId(): void;
  clearLocation(): void;
  clearName(): void;
}
```

## Properties

- `defaultSecurityRules`: [Aspire_Hosting_Azure_Provisioning_Network_Generated_ListOfSecurityRuleProxy](/reference/api/typescript/aspire.hosting.azure.provisioning.network/aspire-hosting-azure-provisioning-network-generated-listofsecurityruleproxy.md) `get` -- Gets the DefaultSecurityRules provisioning property.
- `eTag`: `BicepValueProxy` `get` -- Gets the ETag provisioning property.
- `flowLogs`: [Aspire_Hosting_Azure_Provisioning_Network_Generated_ListOfFlowLogProxy](/reference/api/typescript/aspire.hosting.azure.provisioning.network/aspire-hosting-azure-provisioning-network-generated-listofflowlogproxy.md) `get` -- Gets the FlowLogs provisioning property.
- `flushConnection`: `BicepValueProxy | boolean` `get - set` -- Gets or sets the FlushConnection provisioning property.
- `id`: `BicepValueProxy` `get - set` -- Gets or sets the Id provisioning property.
- `location`: `BicepValueProxy` `get - set` -- Gets or sets the Location provisioning property.
- `name`: `BicepValueProxy | string` `get - set` -- Gets or sets the Name provisioning property.
- `networkInterfaces`: [Aspire_Hosting_Azure_Provisioning_Network_Generated_ListOfNetworkInterfaceProxy](/reference/api/typescript/aspire.hosting.azure.provisioning.network/aspire-hosting-azure-provisioning-network-generated-listofnetworkinterfaceproxy.md) `get` -- Gets the NetworkInterfaces provisioning property.
- `provisioningState`: `BicepValueProxy | NetworkProvisioningState` `get` -- Gets the ProvisioningState provisioning property.
- `resourceGuid`: `BicepValueProxy | guid` `get` -- Gets the ResourceGuid provisioning property.
- `securityRules`: [Aspire_Hosting_Azure_Provisioning_Network_Generated_ListOfSecurityRuleProxy](/reference/api/typescript/aspire.hosting.azure.provisioning.network/aspire-hosting-azure-provisioning-network-generated-listofsecurityruleproxy.md) `get - set` -- Gets or sets the SecurityRules provisioning property.
- `subnets`: [Aspire_Hosting_Azure_Provisioning_Network_Generated_ListOfSubnetResourceProxy](/reference/api/typescript/aspire.hosting.azure.provisioning.network/aspire-hosting-azure-provisioning-network-generated-listofsubnetresourceproxy.md) `get` -- Gets the Subnets provisioning property.
- `tags`: [Aspire_Hosting_Azure_Provisioning_Network_Generated_DictionaryOfStringProxy](/reference/api/typescript/aspire.hosting.azure.provisioning.network/aspire-hosting-azure-provisioning-network-generated-dictionaryofstringproxy.md) `get - set` -- Gets or sets the Tags provisioning property.

## Methods

- [addTo](/reference/api/typescript/aspire.hosting.azure.provisioning.network/networksecuritygroupproxy/addto.md) -- `method` -- Adds this provisioning resource to the Azure resource infrastructure.
    ```typescript
  addTo(infrastructure: AzureResourceInfrastructure): void
  ```
- [clearFlushConnection](/reference/api/typescript/aspire.hosting.azure.provisioning.network/networksecuritygroupproxy/clearflushconnection.md) -- `method` -- Clears the FlushConnection provisioning property.
    ```typescript
  clearFlushConnection(): void
  ```
- [clearId](/reference/api/typescript/aspire.hosting.azure.provisioning.network/networksecuritygroupproxy/clearid.md) -- `method` -- Clears the Id provisioning property.
    ```typescript
  clearId(): void
  ```
- [clearLocation](/reference/api/typescript/aspire.hosting.azure.provisioning.network/networksecuritygroupproxy/clearlocation.md) -- `method` -- Clears the Location provisioning property.
    ```typescript
  clearLocation(): void
  ```
- [clearName](/reference/api/typescript/aspire.hosting.azure.provisioning.network/networksecuritygroupproxy/clearname.md) -- `method` -- Clears the Name provisioning property.
    ```typescript
  clearName(): void
  ```
