aws-cdk-lib.aws_ec2.CfnSubnet.PrivateDnsNameOptionsOnLaunchProperty

interface PrivateDnsNameOptionsOnLaunchProperty

LanguageType name
.NETAmazon.CDK.AWS.EC2.CfnSubnet.PrivateDnsNameOptionsOnLaunchProperty
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awsec2#CfnSubnet_PrivateDnsNameOptionsOnLaunchProperty
Javasoftware.amazon.awscdk.services.ec2.CfnSubnet.PrivateDnsNameOptionsOnLaunchProperty
Pythonaws_cdk.aws_ec2.CfnSubnet.PrivateDnsNameOptionsOnLaunchProperty
TypeScript aws-cdk-lib » aws_ec2 » CfnSubnet » PrivateDnsNameOptionsOnLaunchProperty

Describes the options for instance hostnames.

Example

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_ec2 as ec2 } from 'aws-cdk-lib';
const privateDnsNameOptionsOnLaunchProperty: ec2.CfnSubnet.PrivateDnsNameOptionsOnLaunchProperty = {
  enableResourceNameDnsAaaaRecord: false,
  enableResourceNameDnsARecord: false,
  hostnameType: 'hostnameType',
};

Properties

NameTypeDescription
enableResourceNameDnsARecord?boolean | IResolvableIndicates whether to respond to DNS queries for instance hostnames with DNS A records.
enableResourceNameDnsAaaaRecord?boolean | IResolvableIndicates whether to respond to DNS queries for instance hostname with DNS AAAA records.
hostnameType?stringThe type of hostname for EC2 instances.

enableResourceNameDnsARecord?

Type: boolean | IResolvable (optional)

Indicates whether to respond to DNS queries for instance hostnames with DNS A records.


enableResourceNameDnsAaaaRecord?

Type: boolean | IResolvable (optional)

Indicates whether to respond to DNS queries for instance hostname with DNS AAAA records.


hostnameType?

Type: string (optional)

The type of hostname for EC2 instances.

For IPv4 only subnets, an instance DNS name must be based on the instance IPv4 address. For IPv6 only subnets, an instance DNS name must be based on the instance ID. For dual-stack subnets, you can specify whether DNS names use the instance IPv4 address or the instance ID.