EnableVpcClassicLinkDnsSupportCommand

This action is deprecated.

Enables a VPC to support DNS hostname resolution for ClassicLink. If enabled, the DNS hostname of a linked EC2-Classic instance resolves to its private IP address when addressed from an instance in the VPC to which it's linked. Similarly, the DNS hostname of an instance in a VPC resolves to its private IP address when addressed from a linked EC2-Classic instance.

You must specify a VPC ID in the request.

Example Syntax

Use a bare-bones client and the command you need to make an API call.

import { EC2Client, EnableVpcClassicLinkDnsSupportCommand } from "@aws-sdk/client-ec2"; // ES Modules import
// const { EC2Client, EnableVpcClassicLinkDnsSupportCommand } = require("@aws-sdk/client-ec2"); // CommonJS import
const client = new EC2Client(config);
const input = { // EnableVpcClassicLinkDnsSupportRequest
  VpcId: "STRING_VALUE",
};
const command = new EnableVpcClassicLinkDnsSupportCommand(input);
const response = await client.send(command);
// { // EnableVpcClassicLinkDnsSupportResult
//   Return: true || false,
// };

EnableVpcClassicLinkDnsSupportCommand Input

Parameter
Type
Description
VpcId
string | undefined

The ID of the VPC.

EnableVpcClassicLinkDnsSupportCommand Output

Parameter
Type
Description
$metadata
Required
ResponseMetadata
Metadata pertaining to this request.
Return
boolean | undefined

Returns true if the request succeeds; otherwise, it returns an error.

Throws

Name
Fault
Details
EC2ServiceException
Base exception class for all service exceptions from EC2 service.