describeVpcAttribute
abstract suspend fun describeVpcAttribute(input: DescribeVpcAttributeRequest): DescribeVpcAttributeResponse
Describes the specified attribute of the specified VPC. You can specify only one attribute at a time.
Samples
import aws.sdk.kotlin.services.ec2.model.VpcAttributeName
fun main() {
//sampleStart
// This example describes the enableDnsSupport attribute. This attribute indicates whether DNS
// resolution is enabled for the VPC. If this attribute is true, the Amazon DNS server resolves DNS hostnames for
// your instances to their corresponding IP addresses otherwise, it does not.
val resp = ec2Client.describeVpcAttribute {
vpcId = "vpc-a01106c2"
attribute = VpcAttributeName.fromValue("enableDnsSupport")
}
//sampleEnd
}
import aws.sdk.kotlin.services.ec2.model.VpcAttributeName
fun main() {
//sampleStart
// This example describes the enableDnsHostnames attribute. This attribute indicates whether the
// instances launched in the VPC get DNS hostnames. If this attribute is true, instances in the VPC get DNS
// hostnames otherwise, they do not.
val resp = ec2Client.describeVpcAttribute {
vpcId = "vpc-a01106c2"
attribute = VpcAttributeName.fromValue("enableDnsHostnames")
}
//sampleEnd
}