# AzureNspAccessRule Properties

- Package: [Aspire.Hosting.Azure.Network](/reference/api/csharp/aspire.hosting.azure.network.md)
- Type: [AzureNspAccessRule](/reference/api/csharp/aspire.hosting.azure.network/azurenspaccessrule.md)
- Kind: `Properties`
- Members: `8`

Represents an access rule configuration for an Azure Network Security Perimeter.

## AddressPrefixes

- Name: `AddressPrefixes`
- Modifiers: `get; init`
- Returns: `List<string>`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/cbc352350f1a9bafbaff10d14a2c8de4ac186a48/src/Aspire.Hosting.Azure.Network/AzureNspAccessRule.cs)

Gets or initializes the list of inbound address prefixes (CIDR ranges) allowed by this rule.

```csharp
public List<string> AddressPrefixes { get; init; }
```

## Remarks

Only applicable for `NetworkSecurityPerimeterAccessRuleDirection.Inbound` rules.

## AddressPrefixReferences

- Name: `AddressPrefixReferences`
- Modifiers: `get; init`
- Returns: `List<ReferenceExpression>`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/cbc352350f1a9bafbaff10d14a2c8de4ac186a48/src/Aspire.Hosting.Azure.Network/AzureNspAccessRule.cs)

Gets or initializes the list of inbound address prefixes (CIDR ranges) `ApplicationModel.ReferenceExpression` values allowed by this rule.

```csharp
public List<ReferenceExpression> AddressPrefixReferences { get; init; }
```

## Remarks

Only applicable for `NetworkSecurityPerimeterAccessRuleDirection.Inbound` rules. Values are resolved at deploy time and combined with [AzureNspAccessRule.AddressPrefixes](/reference/api/csharp/aspire.hosting.azure.network/azurenspaccessrule/properties.md#addressprefixes).

## Direction

- Name: `Direction`
- Modifiers: `get; set`
- Returns: `NetworkSecurityPerimeterAccessRuleDirection`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/cbc352350f1a9bafbaff10d14a2c8de4ac186a48/src/Aspire.Hosting.Azure.Network/AzureNspAccessRule.cs)

Gets or sets the direction of the rule.

```csharp
public NetworkSecurityPerimeterAccessRuleDirection Direction { get; set; }
```

## FullyQualifiedDomainNameReferences

- Name: `FullyQualifiedDomainNameReferences`
- Modifiers: `get; init`
- Returns: `List<ReferenceExpression>`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/cbc352350f1a9bafbaff10d14a2c8de4ac186a48/src/Aspire.Hosting.Azure.Network/AzureNspAccessRule.cs)

Gets or initializes the fully qualified domain name `ApplicationModel.ReferenceExpression` values allowed by this rule.

```csharp
public List<ReferenceExpression> FullyQualifiedDomainNameReferences { get; init; }
```

## Remarks

Only applicable for `NetworkSecurityPerimeterAccessRuleDirection.Outbound` rules. Values are resolved at deploy time and combined with [AzureNspAccessRule.FullyQualifiedDomainNames](/reference/api/csharp/aspire.hosting.azure.network/azurenspaccessrule/properties.md#fullyqualifieddomainnames).

## FullyQualifiedDomainNames

- Name: `FullyQualifiedDomainNames`
- Modifiers: `get; init`
- Returns: `List<string>`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/cbc352350f1a9bafbaff10d14a2c8de4ac186a48/src/Aspire.Hosting.Azure.Network/AzureNspAccessRule.cs)

Gets or initializes the list of fully qualified domain names (FQDNs) allowed by this rule.

```csharp
public List<string> FullyQualifiedDomainNames { get; init; }
```

## Remarks

Only applicable for `NetworkSecurityPerimeterAccessRuleDirection.Outbound` rules.

## Name

- Name: `Name`
- Modifiers: `get; set`
- Returns: `string`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/cbc352350f1a9bafbaff10d14a2c8de4ac186a48/src/Aspire.Hosting.Azure.Network/AzureNspAccessRule.cs)

Gets or sets the name of the access rule. This name must be unique within the perimeter profile.

```csharp
public string Name { get; set; }
```

## SubscriptionReferences

- Name: `SubscriptionReferences`
- Modifiers: `get; init`
- Returns: `List<ReferenceExpression>`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/cbc352350f1a9bafbaff10d14a2c8de4ac186a48/src/Aspire.Hosting.Azure.Network/AzureNspAccessRule.cs)

Gets or initializes the subscription resource ID `ApplicationModel.ReferenceExpression` values allowed by this rule.

```csharp
public List<ReferenceExpression> SubscriptionReferences { get; init; }
```

## Remarks

Only applicable for `NetworkSecurityPerimeterAccessRuleDirection.Inbound` rules. Values are resolved at deploy time and combined with [AzureNspAccessRule.Subscriptions](/reference/api/csharp/aspire.hosting.azure.network/azurenspaccessrule/properties.md#subscriptions).

## Subscriptions

- Name: `Subscriptions`
- Modifiers: `get; init`
- Returns: `List<string>`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/cbc352350f1a9bafbaff10d14a2c8de4ac186a48/src/Aspire.Hosting.Azure.Network/AzureNspAccessRule.cs)

Gets or initializes the list of subscription IDs allowed by this rule.

```csharp
public List<string> Subscriptions { get; init; }
```

## Remarks

Only applicable for `NetworkSecurityPerimeterAccessRuleDirection.Inbound` rules. Subscription IDs should be in the format of a resource ID: `/subscriptions/{subscriptionId}`.
