interface PrivateDnsNameOptionsProperty
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.EC2.CfnInstance.PrivateDnsNameOptionsProperty |
Java | software.amazon.awscdk.services.ec2.CfnInstance.PrivateDnsNameOptionsProperty |
Python | aws_cdk.aws_ec2.CfnInstance.PrivateDnsNameOptionsProperty |
TypeScript | @aws-cdk/aws-ec2 » CfnInstance » 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 .
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as ec2 from '@aws-cdk/aws-ec2';
const privateDnsNameOptionsProperty: ec2.CfnInstance.PrivateDnsNameOptionsProperty = {
enableResourceNameDnsAaaaRecord: false,
enableResourceNameDnsARecord: false,
hostnameType: 'hostnameType',
};
Properties
Name | Type | Description |
---|---|---|
enable | boolean | IResolvable | Indicates whether to respond to DNS queries for instance hostnames with DNS A records. |
enable | boolean | IResolvable | Indicates whether to respond to DNS queries for instance hostnames with DNS AAAA records. |
hostname | string | The type of hostnames to assign to instances in the subnet at launch. |
enableResourceNameDnsARecord?
Type:
boolean |
IResolvable
(optional)
Indicates whether to respond to DNS queries for instance hostnames with DNS A records.
For more information, see Amazon EC2 instance hostname types in the Amazon Elastic Compute Cloud User Guide .
enableResourceNameDnsAaaaRecord?
Type:
boolean |
IResolvable
(optional)
Indicates whether to respond to DNS queries for instance hostnames with DNS AAAA records.
For more information, see Amazon EC2 instance hostname types in the Amazon Elastic Compute Cloud User Guide .
hostnameType?
Type:
string
(optional)
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 .