Skip to content

disable_vpc_classic_link_dns_support async

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

This action is deprecated.

Disables ClassicLink DNS support for a VPC. If disabled, DNS hostnames resolve to public IP addresses when addressed between a linked EC2-Classic instance and instances in the VPC to which it's linked.

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 disable_vpc_classic_link_dns_support(
    self,
    *,
    config_overrides: Optional[AsyncEC2ClientConfig] = None,
    vpc_id: Optional["capo_ec2.types.vpc_id.VpcId"] = None,
) -> "capo_ec2.types.disable_vpc_classic_link_dns_support_result.DisableVpcClassicLinkDnsSupportResult":
    """<note> <p>This action is deprecated.</p> </note> <p>Disables ClassicLink DNS support for a VPC. If disabled, DNS hostnames resolve to public IP addresses when addressed between a linked EC2-Classic instance and instances in the VPC to which it's linked.</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.disable_vpc_classic_link_dns_support_request.DisableVpcClassicLinkDnsSupportRequest]",
    ) -> AsyncOperationResponse[
        "capo_ec2.types.disable_vpc_classic_link_dns_support_result.DisableVpcClassicLinkDnsSupportResult"
    ]:
        import capo_ec2._operations.amazon_ec2.disable_vpc_classic_link_dns_support

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DisableVpcClassicLinkDnsSupport")
    )
    input_: capo_ec2.types.disable_vpc_classic_link_dns_support_request.DisableVpcClassicLinkDnsSupportRequest = {}
    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