Skip to content

enable_vpc_classic_link_dns_support async

enable_vpc_classic_link_dns_support(
    *,
    config_overrides: Optional[AsyncEC2ClientConfig] = None,
    vpc_id: Optional[VpcId] = None,
) -> EnableVpcClassicLinkDnsSupportResult

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.

Parameters:

  • vpc_id (Optional[VpcId], default: None ) –

    The ID of the VPC.

Raises:

Source code in docs_src/capo_ec2/_services/async_ec2.py
async def enable_vpc_classic_link_dns_support(
    self,
    *,
    config_overrides: Optional[AsyncEC2ClientConfig] = None,
    vpc_id: Optional["capo_ec2.types.vpc_id.VpcId"] = None,
) -> "capo_ec2.types.enable_vpc_classic_link_dns_support_result.EnableVpcClassicLinkDnsSupportResult":
    """<note> <p>This action is deprecated.</p> </note> <p>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.</p> <p>You must specify a VPC ID in the request.</p>

    Args:
        vpc_id: <p>The ID of the VPC.</p>

    Raises:
        capo_ec2.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_ec2.types.enable_vpc_classic_link_dns_support_request.EnableVpcClassicLinkDnsSupportRequest]",
    ) -> AsyncOperationResponse[
        "capo_ec2.types.enable_vpc_classic_link_dns_support_result.EnableVpcClassicLinkDnsSupportResult"
    ]:
        import capo_ec2._operations.amazon_ec2.enable_vpc_classic_link_dns_support

        (
            output,
            http_response,
        ) = await capo_ec2._operations.amazon_ec2.enable_vpc_classic_link_dns_support.async_enable_vpc_classic_link_dns_support(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("EnableVpcClassicLinkDnsSupport")
    )
    input_: capo_ec2.types.enable_vpc_classic_link_dns_support_request.EnableVpcClassicLinkDnsSupportRequest = {}
    if vpc_id is not None:
        input_["vpc_id"] = vpc_id

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output