# TargetAddressProperty

In a [CreateResolverRule](https://docs.aws.amazon.com/Route53/latest/APIReference/API_route53resolver_CreateResolverRule.html) request, an array of the IPs that you want to forward DNS queries to.

- Source: Generated at build time
- Type last changed: v2.163.0 · 22 Oct 2024

## Example

TypeScript:

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_route53resolver as route53resolver } from 'aws-cdk-lib';
const targetAddressProperty: route53resolver.CfnResolverRule.TargetAddressProperty = {
  ip: 'ip',
  ipv6: 'ipv6',
  port: 'port',
  protocol: 'protocol',
  serverNameIndication: 'serverNameIndication',
};
```

Python:

```python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_route53resolver as route53resolver

target_address_property = route53resolver.CfnResolverRule.TargetAddressProperty(
    ip="ip",
    ipv6="ipv6",
    port="port",
    protocol="protocol",
    server_name_indication="serverNameIndication"
)
```

Java:

```java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.route53resolver.*;

TargetAddressProperty targetAddressProperty = TargetAddressProperty.builder()
        .ip("ip")
        .ipv6("ipv6")
        .port("port")
        .protocol("protocol")
        .serverNameIndication("serverNameIndication")
        .build();
```

C# / .NET:

```csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.Route53Resolver;

var targetAddressProperty = new TargetAddressProperty {
    Ip = "ip",
    Ipv6 = "ipv6",
    Port = "port",
    Protocol = "protocol",
    ServerNameIndication = "serverNameIndication"
};
```

Golang:

```go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

targetAddressProperty := &TargetAddressProperty{
	Ip: jsii.String("ip"),
	Ipv6: jsii.String("ipv6"),
	Port: jsii.String("port"),
	Protocol: jsii.String("protocol"),
	ServerNameIndication: jsii.String("serverNameIndication"),
}
```

## Properties

- `ip`: string — One IPv4 address that you want to forward DNS queries to.

- `ipv6`: string — One IPv6 address that you want to forward DNS queries to.

- `port`: string — The port at `Ip` that you want to forward DNS queries to.

- `protocol`: string — The protocols for the target address.

  The protocol you choose needs to be supported by the outbound endpoint of the Resolver rule.

- `serverNameIndication`: string — The Server Name Indication of the DoH server that you want to forward queries to.

  This is only used if the Protocol of the `TargetAddress` is `DoH` .
