PrivateDnsNameOptionsProperty
The type of hostnames to assign to instances in the subnet at launch.
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. For more information, see Amazon EC2 instance hostname types in the Amazon Elastic Compute Cloud User Guide .
| Source | |
|---|---|
| Type last changed |
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 privateDnsNameOptionsProperty: ec2.CfnInstance.PrivateDnsNameOptionsProperty = {
enableResourceNameDnsAaaaRecord: false,
enableResourceNameDnsARecord: false,
hostnameType: 'hostnameType',
};
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_ec2 as ec2
private_dns_name_options_property = ec2.CfnInstance.PrivateDnsNameOptionsProperty(
enable_resource_name_dns_aaaa_record=False,
enable_resource_name_dns_a_record=False,
hostname_type="hostnameType"
)
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.ec2.*;
PrivateDnsNameOptionsProperty privateDnsNameOptionsProperty = PrivateDnsNameOptionsProperty.builder()
.enableResourceNameDnsAaaaRecord(false)
.enableResourceNameDnsARecord(false)
.hostnameType("hostnameType")
.build();
// 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.EC2;
var privateDnsNameOptionsProperty = new PrivateDnsNameOptionsProperty {
EnableResourceNameDnsAaaaRecord = false,
EnableResourceNameDnsARecord = false,
HostnameType = "hostnameType"
};
// 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"
privateDnsNameOptionsProperty := &PrivateDnsNameOptionsProperty{
EnableResourceNameDnsAaaaRecord: jsii.Boolean(false),
EnableResourceNameDnsARecord: jsii.Boolean(false),
HostnameType: jsii.String("hostnameType"),
}
Properties
enableResourceNameDnsAaaaRecordoptionalboolean | IResolvableenable_resource_name_dns_aaaa_recordoptionaltyping.Union[bool, IResolvable]enableResourceNameDnsAaaaRecordoptionalBooleanEnableResourceNameDnsAaaaRecordoptionalboolEnableResourceNameDnsAaaaRecordoptionalinterface{} #For more information, see Amazon EC2 instance hostname types in the Amazon Elastic Compute Cloud User Guide .
enableResourceNameDnsARecordoptionalboolean | IResolvableenable_resource_name_dns_a_recordoptionaltyping.Union[bool, IResolvable]enableResourceNameDnsARecordoptionalBooleanEnableResourceNameDnsARecordoptionalboolEnableResourceNameDnsARecordoptionalinterface{} #For more information, see Amazon EC2 instance hostname types in the Amazon Elastic Compute Cloud User Guide .
hostnameTypeoptionalstringhostname_typeoptionalstrhostnameTypeoptionalStringHostnameTypeoptionalstringHostnameTypeoptional*string #notes
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. For more information, see Amazon EC2 instance hostname types in the Amazon Elastic Compute Cloud User Guide .