# AzureSubnetResource.denyOutbound

- Module: [Aspire.Hosting.Azure.Network](/reference/api/typescript/aspire.hosting.azure.network.md)
- Defined on: [AzureSubnetResource](/reference/api/typescript/aspire.hosting.azure.network/azuresubnetresource.md)
- Version: `13.4.0`
- Kind: `method`

Adds an outbound deny rule to the subnet's Network Security Group.

## Definition

```typescript
interface AzureSubnetResource {
  // ... omitted for brevity
  denyOutbound(
      port?: string,
      from?: string,
      to?: string,
      protocol?: SecurityRuleProtocol,
      priority?: number,
      name?: string): AzureSubnetResource;
}
```

## Signature

```typescript
denyOutbound(
    port?: string,
    from?: string,
    to?: string,
    protocol?: SecurityRuleProtocol,
    priority?: number,
    name?: string): AzureSubnetResource
```

## Parameters

- `port` (`string`) `optional`
- `from` (`string`) `optional`
- `to` (`string`) `optional`
- `protocol` (`SecurityRuleProtocol`) `optional`
- `priority` (`number`) `optional`
- `name` (`string`) `optional`

## Returns

[AzureSubnetResource](/reference/api/typescript/aspire.hosting.azure.network/azuresubnetresource.md) `builder`

## Defined on

- [AzureSubnetResource](/reference/api/typescript/aspire.hosting.azure.network/azuresubnetresource.md) -- `handle`
