# IpAddressType

Supported IP Address Types.

- Source: [`aws-apigateway/lib/restapi.ts`](https://github.com/aws/aws-cdk/blob/v2.278.0/packages/aws-cdk-lib/aws-apigateway/lib/restapi.ts#L1155)
- Type last changed: v2.195.0 · 7 May 2025

## Example

TypeScript:

```ts
const api = new apigateway.RestApi(this, 'api', {
  endpointConfiguration: {
    types: [ apigateway.EndpointType.REGIONAL ],
    ipAddressType: apigateway.IpAddressType.DUAL_STACK,
  }
});
```

Python:

```python
api = apigateway.RestApi(self, "api",
    endpoint_configuration=apigateway.EndpointConfiguration(
        types=[apigateway.EndpointType.REGIONAL],
        ip_address_type=apigateway.IpAddressType.DUAL_STACK
    )
)
```

Java:

```java
RestApi api = RestApi.Builder.create(this, "api")
        .endpointConfiguration(EndpointConfiguration.builder()
                .types(List.of(EndpointType.REGIONAL))
                .ipAddressType(IpAddressType.DUAL_STACK)
                .build())
        .build();
```

C# / .NET:

```csharp
// Install: dotnet add package Amazon.CDK.Lib
var api = new RestApi(this, "api", new RestApiProps {
    EndpointConfiguration = new EndpointConfiguration {
        Types = new [] { EndpointType.REGIONAL },
        IpAddressType = IpAddressType.DUAL_STACK
    }
});
```

Golang:

```go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
api := apigateway.NewRestApi(this, jsii.String("api"), &RestApiProps{
	EndpointConfiguration: &EndpointConfiguration{
		Types: []EndpointType{
			apigateway.EndpointType_REGIONAL,
		},
		IpAddressType: apigateway.IpAddressType_DUAL_STACK,
	},
})
```

## Members

| Member | Description |
| --- | --- |
| `IPV4` | IPv4 address type. |
| `DUAL_STACK` | IPv4 and IPv6 address type. |

## Referenced by

- [`EndpointConfiguration`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_apigateway.EndpointConfiguration.html).ipAddressType
