# coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***

import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from .. import _utilities
from . import outputs
from ._inputs import *

__all__ = ['ConnectionArgs', 'Connection']

@pulumi.input_type
class ConnectionArgs:
    def __init__(__self__, *,
                 customer_gateway_id: pulumi.Input[str],
                 local_subnets: pulumi.Input[Sequence[pulumi.Input[str]]],
                 remote_subnets: pulumi.Input[Sequence[pulumi.Input[str]]],
                 vpn_gateway_id: pulumi.Input[str],
                 effect_immediately: Optional[pulumi.Input[bool]] = None,
                 ike_configs: Optional[pulumi.Input[Sequence[pulumi.Input['ConnectionIkeConfigArgs']]]] = None,
                 ipsec_configs: Optional[pulumi.Input[Sequence[pulumi.Input['ConnectionIpsecConfigArgs']]]] = None,
                 name: Optional[pulumi.Input[str]] = None):
        """
        The set of arguments for constructing a Connection resource.
        :param pulumi.Input[str] customer_gateway_id: The ID of the customer gateway.
        :param pulumi.Input[Sequence[pulumi.Input[str]]] local_subnets: The CIDR block of the VPC to be connected with the local data center. This parameter is used for phase-two negotiation.
        :param pulumi.Input[Sequence[pulumi.Input[str]]] remote_subnets: The CIDR block of the local data center. This parameter is used for phase-two negotiation.
        :param pulumi.Input[str] vpn_gateway_id: The ID of the VPN gateway.
        :param pulumi.Input[bool] effect_immediately: Whether to delete a successfully negotiated IPsec tunnel and initiate a negotiation again. Valid value:true,false.
        :param pulumi.Input[Sequence[pulumi.Input['ConnectionIkeConfigArgs']]] ike_configs: The configurations of phase-one negotiation.
        :param pulumi.Input[Sequence[pulumi.Input['ConnectionIpsecConfigArgs']]] ipsec_configs: The configurations of phase-two negotiation.
        :param pulumi.Input[str] name: The name of the IPsec connection.
        """
        pulumi.set(__self__, "customer_gateway_id", customer_gateway_id)
        pulumi.set(__self__, "local_subnets", local_subnets)
        pulumi.set(__self__, "remote_subnets", remote_subnets)
        pulumi.set(__self__, "vpn_gateway_id", vpn_gateway_id)
        if effect_immediately is not None:
            pulumi.set(__self__, "effect_immediately", effect_immediately)
        if ike_configs is not None:
            pulumi.set(__self__, "ike_configs", ike_configs)
        if ipsec_configs is not None:
            pulumi.set(__self__, "ipsec_configs", ipsec_configs)
        if name is not None:
            pulumi.set(__self__, "name", name)

    @property
    @pulumi.getter(name="customerGatewayId")
    def customer_gateway_id(self) -> pulumi.Input[str]:
        """
        The ID of the customer gateway.
        """
        return pulumi.get(self, "customer_gateway_id")

    @customer_gateway_id.setter
    def customer_gateway_id(self, value: pulumi.Input[str]):
        pulumi.set(self, "customer_gateway_id", value)

    @property
    @pulumi.getter(name="localSubnets")
    def local_subnets(self) -> pulumi.Input[Sequence[pulumi.Input[str]]]:
        """
        The CIDR block of the VPC to be connected with the local data center. This parameter is used for phase-two negotiation.
        """
        return pulumi.get(self, "local_subnets")

    @local_subnets.setter
    def local_subnets(self, value: pulumi.Input[Sequence[pulumi.Input[str]]]):
        pulumi.set(self, "local_subnets", value)

    @property
    @pulumi.getter(name="remoteSubnets")
    def remote_subnets(self) -> pulumi.Input[Sequence[pulumi.Input[str]]]:
        """
        The CIDR block of the local data center. This parameter is used for phase-two negotiation.
        """
        return pulumi.get(self, "remote_subnets")

    @remote_subnets.setter
    def remote_subnets(self, value: pulumi.Input[Sequence[pulumi.Input[str]]]):
        pulumi.set(self, "remote_subnets", value)

    @property
    @pulumi.getter(name="vpnGatewayId")
    def vpn_gateway_id(self) -> pulumi.Input[str]:
        """
        The ID of the VPN gateway.
        """
        return pulumi.get(self, "vpn_gateway_id")

    @vpn_gateway_id.setter
    def vpn_gateway_id(self, value: pulumi.Input[str]):
        pulumi.set(self, "vpn_gateway_id", value)

    @property
    @pulumi.getter(name="effectImmediately")
    def effect_immediately(self) -> Optional[pulumi.Input[bool]]:
        """
        Whether to delete a successfully negotiated IPsec tunnel and initiate a negotiation again. Valid value:true,false.
        """
        return pulumi.get(self, "effect_immediately")

    @effect_immediately.setter
    def effect_immediately(self, value: Optional[pulumi.Input[bool]]):
        pulumi.set(self, "effect_immediately", value)

    @property
    @pulumi.getter(name="ikeConfigs")
    def ike_configs(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['ConnectionIkeConfigArgs']]]]:
        """
        The configurations of phase-one negotiation.
        """
        return pulumi.get(self, "ike_configs")

    @ike_configs.setter
    def ike_configs(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['ConnectionIkeConfigArgs']]]]):
        pulumi.set(self, "ike_configs", value)

    @property
    @pulumi.getter(name="ipsecConfigs")
    def ipsec_configs(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['ConnectionIpsecConfigArgs']]]]:
        """
        The configurations of phase-two negotiation.
        """
        return pulumi.get(self, "ipsec_configs")

    @ipsec_configs.setter
    def ipsec_configs(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['ConnectionIpsecConfigArgs']]]]):
        pulumi.set(self, "ipsec_configs", value)

    @property
    @pulumi.getter
    def name(self) -> Optional[pulumi.Input[str]]:
        """
        The name of the IPsec connection.
        """
        return pulumi.get(self, "name")

    @name.setter
    def name(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "name", value)


@pulumi.input_type
class _ConnectionState:
    def __init__(__self__, *,
                 customer_gateway_id: Optional[pulumi.Input[str]] = None,
                 effect_immediately: Optional[pulumi.Input[bool]] = None,
                 ike_configs: Optional[pulumi.Input[Sequence[pulumi.Input['ConnectionIkeConfigArgs']]]] = None,
                 ipsec_configs: Optional[pulumi.Input[Sequence[pulumi.Input['ConnectionIpsecConfigArgs']]]] = None,
                 local_subnets: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                 name: Optional[pulumi.Input[str]] = None,
                 remote_subnets: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                 status: Optional[pulumi.Input[str]] = None,
                 vpn_gateway_id: Optional[pulumi.Input[str]] = None):
        """
        Input properties used for looking up and filtering Connection resources.
        :param pulumi.Input[str] customer_gateway_id: The ID of the customer gateway.
        :param pulumi.Input[bool] effect_immediately: Whether to delete a successfully negotiated IPsec tunnel and initiate a negotiation again. Valid value:true,false.
        :param pulumi.Input[Sequence[pulumi.Input['ConnectionIkeConfigArgs']]] ike_configs: The configurations of phase-one negotiation.
        :param pulumi.Input[Sequence[pulumi.Input['ConnectionIpsecConfigArgs']]] ipsec_configs: The configurations of phase-two negotiation.
        :param pulumi.Input[Sequence[pulumi.Input[str]]] local_subnets: The CIDR block of the VPC to be connected with the local data center. This parameter is used for phase-two negotiation.
        :param pulumi.Input[str] name: The name of the IPsec connection.
        :param pulumi.Input[Sequence[pulumi.Input[str]]] remote_subnets: The CIDR block of the local data center. This parameter is used for phase-two negotiation.
        :param pulumi.Input[str] status: The status of VPN connection.
        :param pulumi.Input[str] vpn_gateway_id: The ID of the VPN gateway.
        """
        if customer_gateway_id is not None:
            pulumi.set(__self__, "customer_gateway_id", customer_gateway_id)
        if effect_immediately is not None:
            pulumi.set(__self__, "effect_immediately", effect_immediately)
        if ike_configs is not None:
            pulumi.set(__self__, "ike_configs", ike_configs)
        if ipsec_configs is not None:
            pulumi.set(__self__, "ipsec_configs", ipsec_configs)
        if local_subnets is not None:
            pulumi.set(__self__, "local_subnets", local_subnets)
        if name is not None:
            pulumi.set(__self__, "name", name)
        if remote_subnets is not None:
            pulumi.set(__self__, "remote_subnets", remote_subnets)
        if status is not None:
            pulumi.set(__self__, "status", status)
        if vpn_gateway_id is not None:
            pulumi.set(__self__, "vpn_gateway_id", vpn_gateway_id)

    @property
    @pulumi.getter(name="customerGatewayId")
    def customer_gateway_id(self) -> Optional[pulumi.Input[str]]:
        """
        The ID of the customer gateway.
        """
        return pulumi.get(self, "customer_gateway_id")

    @customer_gateway_id.setter
    def customer_gateway_id(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "customer_gateway_id", value)

    @property
    @pulumi.getter(name="effectImmediately")
    def effect_immediately(self) -> Optional[pulumi.Input[bool]]:
        """
        Whether to delete a successfully negotiated IPsec tunnel and initiate a negotiation again. Valid value:true,false.
        """
        return pulumi.get(self, "effect_immediately")

    @effect_immediately.setter
    def effect_immediately(self, value: Optional[pulumi.Input[bool]]):
        pulumi.set(self, "effect_immediately", value)

    @property
    @pulumi.getter(name="ikeConfigs")
    def ike_configs(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['ConnectionIkeConfigArgs']]]]:
        """
        The configurations of phase-one negotiation.
        """
        return pulumi.get(self, "ike_configs")

    @ike_configs.setter
    def ike_configs(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['ConnectionIkeConfigArgs']]]]):
        pulumi.set(self, "ike_configs", value)

    @property
    @pulumi.getter(name="ipsecConfigs")
    def ipsec_configs(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['ConnectionIpsecConfigArgs']]]]:
        """
        The configurations of phase-two negotiation.
        """
        return pulumi.get(self, "ipsec_configs")

    @ipsec_configs.setter
    def ipsec_configs(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['ConnectionIpsecConfigArgs']]]]):
        pulumi.set(self, "ipsec_configs", value)

    @property
    @pulumi.getter(name="localSubnets")
    def local_subnets(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
        """
        The CIDR block of the VPC to be connected with the local data center. This parameter is used for phase-two negotiation.
        """
        return pulumi.get(self, "local_subnets")

    @local_subnets.setter
    def local_subnets(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]):
        pulumi.set(self, "local_subnets", value)

    @property
    @pulumi.getter
    def name(self) -> Optional[pulumi.Input[str]]:
        """
        The name of the IPsec connection.
        """
        return pulumi.get(self, "name")

    @name.setter
    def name(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "name", value)

    @property
    @pulumi.getter(name="remoteSubnets")
    def remote_subnets(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
        """
        The CIDR block of the local data center. This parameter is used for phase-two negotiation.
        """
        return pulumi.get(self, "remote_subnets")

    @remote_subnets.setter
    def remote_subnets(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]):
        pulumi.set(self, "remote_subnets", value)

    @property
    @pulumi.getter
    def status(self) -> Optional[pulumi.Input[str]]:
        """
        The status of VPN connection.
        """
        return pulumi.get(self, "status")

    @status.setter
    def status(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "status", value)

    @property
    @pulumi.getter(name="vpnGatewayId")
    def vpn_gateway_id(self) -> Optional[pulumi.Input[str]]:
        """
        The ID of the VPN gateway.
        """
        return pulumi.get(self, "vpn_gateway_id")

    @vpn_gateway_id.setter
    def vpn_gateway_id(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "vpn_gateway_id", value)


class Connection(pulumi.CustomResource):
    @overload
    def __init__(__self__,
                 resource_name: str,
                 opts: Optional[pulumi.ResourceOptions] = None,
                 customer_gateway_id: Optional[pulumi.Input[str]] = None,
                 effect_immediately: Optional[pulumi.Input[bool]] = None,
                 ike_configs: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['ConnectionIkeConfigArgs']]]]] = None,
                 ipsec_configs: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['ConnectionIpsecConfigArgs']]]]] = None,
                 local_subnets: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                 name: Optional[pulumi.Input[str]] = None,
                 remote_subnets: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                 vpn_gateway_id: Optional[pulumi.Input[str]] = None,
                 __props__=None):
        """
        ## Example Usage

        Basic Usage

        ```python
        import pulumi
        import pulumi_alicloud as alicloud

        foo_gateway = alicloud.vpn.Gateway("fooGateway",
            vpc_id="vpc-fake-id",
            bandwidth=10,
            enable_ssl=True,
            instance_charge_type="PostPaid",
            description="test_create_description")
        foo_customer_gateway = alicloud.vpn.CustomerGateway("fooCustomerGateway",
            ip_address="42.104.22.228",
            description="testAccVpnCgwDesc")
        foo_connection = alicloud.vpn.Connection("fooConnection",
            vpn_gateway_id=foo_gateway.id,
            customer_gateway_id=foo_customer_gateway.id,
            local_subnets=[
                "172.16.0.0/24",
                "172.16.1.0/24",
            ],
            remote_subnets=[
                "10.0.0.0/24",
                "10.0.1.0/24",
            ],
            effect_immediately=True,
            ike_configs=[alicloud.vpn.ConnectionIkeConfigArgs(
                ike_auth_alg="md5",
                ike_enc_alg="des",
                ike_version="ikev1",
                ike_mode="main",
                ike_lifetime=86400,
                psk="tf-testvpn2",
                ike_pfs="group1",
                ike_remote_id="testbob2",
                ike_local_id="testalice2",
            )],
            ipsec_configs=[alicloud.vpn.ConnectionIpsecConfigArgs(
                ipsec_pfs="group5",
                ipsec_enc_alg="des",
                ipsec_auth_alg="md5",
                ipsec_lifetime=8640,
            )])
        ```

        ## Import

        VPN connection can be imported using the id, e.g.

        ```sh
         $ pulumi import alicloud:vpn/connection:Connection example vco-abc123456
        ```

        :param str resource_name: The name of the resource.
        :param pulumi.ResourceOptions opts: Options for the resource.
        :param pulumi.Input[str] customer_gateway_id: The ID of the customer gateway.
        :param pulumi.Input[bool] effect_immediately: Whether to delete a successfully negotiated IPsec tunnel and initiate a negotiation again. Valid value:true,false.
        :param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['ConnectionIkeConfigArgs']]]] ike_configs: The configurations of phase-one negotiation.
        :param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['ConnectionIpsecConfigArgs']]]] ipsec_configs: The configurations of phase-two negotiation.
        :param pulumi.Input[Sequence[pulumi.Input[str]]] local_subnets: The CIDR block of the VPC to be connected with the local data center. This parameter is used for phase-two negotiation.
        :param pulumi.Input[str] name: The name of the IPsec connection.
        :param pulumi.Input[Sequence[pulumi.Input[str]]] remote_subnets: The CIDR block of the local data center. This parameter is used for phase-two negotiation.
        :param pulumi.Input[str] vpn_gateway_id: The ID of the VPN gateway.
        """
        ...
    @overload
    def __init__(__self__,
                 resource_name: str,
                 args: ConnectionArgs,
                 opts: Optional[pulumi.ResourceOptions] = None):
        """
        ## Example Usage

        Basic Usage

        ```python
        import pulumi
        import pulumi_alicloud as alicloud

        foo_gateway = alicloud.vpn.Gateway("fooGateway",
            vpc_id="vpc-fake-id",
            bandwidth=10,
            enable_ssl=True,
            instance_charge_type="PostPaid",
            description="test_create_description")
        foo_customer_gateway = alicloud.vpn.CustomerGateway("fooCustomerGateway",
            ip_address="42.104.22.228",
            description="testAccVpnCgwDesc")
        foo_connection = alicloud.vpn.Connection("fooConnection",
            vpn_gateway_id=foo_gateway.id,
            customer_gateway_id=foo_customer_gateway.id,
            local_subnets=[
                "172.16.0.0/24",
                "172.16.1.0/24",
            ],
            remote_subnets=[
                "10.0.0.0/24",
                "10.0.1.0/24",
            ],
            effect_immediately=True,
            ike_configs=[alicloud.vpn.ConnectionIkeConfigArgs(
                ike_auth_alg="md5",
                ike_enc_alg="des",
                ike_version="ikev1",
                ike_mode="main",
                ike_lifetime=86400,
                psk="tf-testvpn2",
                ike_pfs="group1",
                ike_remote_id="testbob2",
                ike_local_id="testalice2",
            )],
            ipsec_configs=[alicloud.vpn.ConnectionIpsecConfigArgs(
                ipsec_pfs="group5",
                ipsec_enc_alg="des",
                ipsec_auth_alg="md5",
                ipsec_lifetime=8640,
            )])
        ```

        ## Import

        VPN connection can be imported using the id, e.g.

        ```sh
         $ pulumi import alicloud:vpn/connection:Connection example vco-abc123456
        ```

        :param str resource_name: The name of the resource.
        :param ConnectionArgs args: The arguments to use to populate this resource's properties.
        :param pulumi.ResourceOptions opts: Options for the resource.
        """
        ...
    def __init__(__self__, resource_name: str, *args, **kwargs):
        resource_args, opts = _utilities.get_resource_args_opts(ConnectionArgs, pulumi.ResourceOptions, *args, **kwargs)
        if resource_args is not None:
            __self__._internal_init(resource_name, opts, **resource_args.__dict__)
        else:
            __self__._internal_init(resource_name, *args, **kwargs)

    def _internal_init(__self__,
                 resource_name: str,
                 opts: Optional[pulumi.ResourceOptions] = None,
                 customer_gateway_id: Optional[pulumi.Input[str]] = None,
                 effect_immediately: Optional[pulumi.Input[bool]] = None,
                 ike_configs: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['ConnectionIkeConfigArgs']]]]] = None,
                 ipsec_configs: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['ConnectionIpsecConfigArgs']]]]] = None,
                 local_subnets: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                 name: Optional[pulumi.Input[str]] = None,
                 remote_subnets: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                 vpn_gateway_id: Optional[pulumi.Input[str]] = None,
                 __props__=None):
        if opts is None:
            opts = pulumi.ResourceOptions()
        if not isinstance(opts, pulumi.ResourceOptions):
            raise TypeError('Expected resource options to be a ResourceOptions instance')
        if opts.version is None:
            opts.version = _utilities.get_version()
        if opts.id is None:
            if __props__ is not None:
                raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource')
            __props__ = ConnectionArgs.__new__(ConnectionArgs)

            if customer_gateway_id is None and not opts.urn:
                raise TypeError("Missing required property 'customer_gateway_id'")
            __props__.__dict__["customer_gateway_id"] = customer_gateway_id
            __props__.__dict__["effect_immediately"] = effect_immediately
            __props__.__dict__["ike_configs"] = ike_configs
            __props__.__dict__["ipsec_configs"] = ipsec_configs
            if local_subnets is None and not opts.urn:
                raise TypeError("Missing required property 'local_subnets'")
            __props__.__dict__["local_subnets"] = local_subnets
            __props__.__dict__["name"] = name
            if remote_subnets is None and not opts.urn:
                raise TypeError("Missing required property 'remote_subnets'")
            __props__.__dict__["remote_subnets"] = remote_subnets
            if vpn_gateway_id is None and not opts.urn:
                raise TypeError("Missing required property 'vpn_gateway_id'")
            __props__.__dict__["vpn_gateway_id"] = vpn_gateway_id
            __props__.__dict__["status"] = None
        super(Connection, __self__).__init__(
            'alicloud:vpn/connection:Connection',
            resource_name,
            __props__,
            opts)

    @staticmethod
    def get(resource_name: str,
            id: pulumi.Input[str],
            opts: Optional[pulumi.ResourceOptions] = None,
            customer_gateway_id: Optional[pulumi.Input[str]] = None,
            effect_immediately: Optional[pulumi.Input[bool]] = None,
            ike_configs: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['ConnectionIkeConfigArgs']]]]] = None,
            ipsec_configs: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['ConnectionIpsecConfigArgs']]]]] = None,
            local_subnets: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
            name: Optional[pulumi.Input[str]] = None,
            remote_subnets: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
            status: Optional[pulumi.Input[str]] = None,
            vpn_gateway_id: Optional[pulumi.Input[str]] = None) -> 'Connection':
        """
        Get an existing Connection resource's state with the given name, id, and optional extra
        properties used to qualify the lookup.

        :param str resource_name: The unique name of the resulting resource.
        :param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
        :param pulumi.ResourceOptions opts: Options for the resource.
        :param pulumi.Input[str] customer_gateway_id: The ID of the customer gateway.
        :param pulumi.Input[bool] effect_immediately: Whether to delete a successfully negotiated IPsec tunnel and initiate a negotiation again. Valid value:true,false.
        :param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['ConnectionIkeConfigArgs']]]] ike_configs: The configurations of phase-one negotiation.
        :param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['ConnectionIpsecConfigArgs']]]] ipsec_configs: The configurations of phase-two negotiation.
        :param pulumi.Input[Sequence[pulumi.Input[str]]] local_subnets: The CIDR block of the VPC to be connected with the local data center. This parameter is used for phase-two negotiation.
        :param pulumi.Input[str] name: The name of the IPsec connection.
        :param pulumi.Input[Sequence[pulumi.Input[str]]] remote_subnets: The CIDR block of the local data center. This parameter is used for phase-two negotiation.
        :param pulumi.Input[str] status: The status of VPN connection.
        :param pulumi.Input[str] vpn_gateway_id: The ID of the VPN gateway.
        """
        opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))

        __props__ = _ConnectionState.__new__(_ConnectionState)

        __props__.__dict__["customer_gateway_id"] = customer_gateway_id
        __props__.__dict__["effect_immediately"] = effect_immediately
        __props__.__dict__["ike_configs"] = ike_configs
        __props__.__dict__["ipsec_configs"] = ipsec_configs
        __props__.__dict__["local_subnets"] = local_subnets
        __props__.__dict__["name"] = name
        __props__.__dict__["remote_subnets"] = remote_subnets
        __props__.__dict__["status"] = status
        __props__.__dict__["vpn_gateway_id"] = vpn_gateway_id
        return Connection(resource_name, opts=opts, __props__=__props__)

    @property
    @pulumi.getter(name="customerGatewayId")
    def customer_gateway_id(self) -> pulumi.Output[str]:
        """
        The ID of the customer gateway.
        """
        return pulumi.get(self, "customer_gateway_id")

    @property
    @pulumi.getter(name="effectImmediately")
    def effect_immediately(self) -> pulumi.Output[Optional[bool]]:
        """
        Whether to delete a successfully negotiated IPsec tunnel and initiate a negotiation again. Valid value:true,false.
        """
        return pulumi.get(self, "effect_immediately")

    @property
    @pulumi.getter(name="ikeConfigs")
    def ike_configs(self) -> pulumi.Output[Sequence['outputs.ConnectionIkeConfig']]:
        """
        The configurations of phase-one negotiation.
        """
        return pulumi.get(self, "ike_configs")

    @property
    @pulumi.getter(name="ipsecConfigs")
    def ipsec_configs(self) -> pulumi.Output[Sequence['outputs.ConnectionIpsecConfig']]:
        """
        The configurations of phase-two negotiation.
        """
        return pulumi.get(self, "ipsec_configs")

    @property
    @pulumi.getter(name="localSubnets")
    def local_subnets(self) -> pulumi.Output[Sequence[str]]:
        """
        The CIDR block of the VPC to be connected with the local data center. This parameter is used for phase-two negotiation.
        """
        return pulumi.get(self, "local_subnets")

    @property
    @pulumi.getter
    def name(self) -> pulumi.Output[str]:
        """
        The name of the IPsec connection.
        """
        return pulumi.get(self, "name")

    @property
    @pulumi.getter(name="remoteSubnets")
    def remote_subnets(self) -> pulumi.Output[Sequence[str]]:
        """
        The CIDR block of the local data center. This parameter is used for phase-two negotiation.
        """
        return pulumi.get(self, "remote_subnets")

    @property
    @pulumi.getter
    def status(self) -> pulumi.Output[str]:
        """
        The status of VPN connection.
        """
        return pulumi.get(self, "status")

    @property
    @pulumi.getter(name="vpnGatewayId")
    def vpn_gateway_id(self) -> pulumi.Output[str]:
        """
        The ID of the VPN gateway.
        """
        return pulumi.get(self, "vpn_gateway_id")

