1. Packages
  2. Alibaba Cloud
  3. API Docs
  4. vpn
  5. GatewayVcoRoute
Alibaba Cloud v3.45.0 published on Monday, Nov 27, 2023 by Pulumi

alicloud.vpn.GatewayVcoRoute

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.45.0 published on Monday, Nov 27, 2023 by Pulumi

    Provides a VPN Gateway Vco Route resource.

    For information about VPN Gateway Vco Route and how to use it, see What is Vco Route.

    NOTE: Available in v1.183.0+.

    Example Usage

    Basic Usage

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    
    return await Deployment.RunAsync(() => 
    {
        var defaultInstance = new AliCloud.Cen.Instance("defaultInstance", new()
        {
            CenInstanceName = @var.Name,
        });
    
        var defaultTransitRouter = new AliCloud.Cen.TransitRouter("defaultTransitRouter", new()
        {
            CenId = defaultInstance.Id,
            TransitRouterDescription = "desd",
            TransitRouterName = @var.Name,
        });
    
        var defaultTransitRouterAvailableResources = AliCloud.Cen.GetTransitRouterAvailableResources.Invoke();
    
        var defaultCustomerGateway = new AliCloud.Vpn.CustomerGateway("defaultCustomerGateway", new()
        {
            IpAddress = "42.104.22.210",
            Asn = "45014",
            Description = "testAccVpnConnectionDesc",
        });
    
        var defaultGatewayVpnAttachment = new AliCloud.Vpn.GatewayVpnAttachment("defaultGatewayVpnAttachment", new()
        {
            CustomerGatewayId = defaultCustomerGateway.Id,
            NetworkType = "public",
            LocalSubnet = "0.0.0.0/0",
            RemoteSubnet = "0.0.0.0/0",
            EffectImmediately = false,
            IkeConfig = new AliCloud.Vpn.Inputs.GatewayVpnAttachmentIkeConfigArgs
            {
                IkeAuthAlg = "md5",
                IkeEncAlg = "des",
                IkeVersion = "ikev2",
                IkeMode = "main",
                IkeLifetime = 86400,
                Psk = "tf-testvpn2",
                IkePfs = "group1",
                RemoteId = "testbob2",
                LocalId = "testalice2",
            },
            IpsecConfig = new AliCloud.Vpn.Inputs.GatewayVpnAttachmentIpsecConfigArgs
            {
                IpsecPfs = "group5",
                IpsecEncAlg = "des",
                IpsecAuthAlg = "md5",
                IpsecLifetime = 86400,
            },
            BgpConfig = new AliCloud.Vpn.Inputs.GatewayVpnAttachmentBgpConfigArgs
            {
                Enable = true,
                LocalAsn = 45014,
                TunnelCidr = "169.254.11.0/30",
                LocalBgpIp = "169.254.11.1",
            },
            HealthCheckConfig = new AliCloud.Vpn.Inputs.GatewayVpnAttachmentHealthCheckConfigArgs
            {
                Enable = true,
                Sip = "192.168.1.1",
                Dip = "10.0.0.1",
                Interval = 10,
                Retry = 10,
                Policy = "revoke_route",
            },
            EnableDpd = true,
            EnableNatTraversal = true,
            VpnAttachmentName = @var.Name,
        });
    
        var defaultTransitRouterVpnAttachment = new AliCloud.Cen.TransitRouterVpnAttachment("defaultTransitRouterVpnAttachment", new()
        {
            AutoPublishRouteEnabled = false,
            TransitRouterAttachmentDescription = @var.Name,
            TransitRouterAttachmentName = @var.Name,
            CenId = defaultTransitRouter.CenId,
            TransitRouterId = defaultTransitRouter.TransitRouterId,
            VpnId = defaultGatewayVpnAttachment.Id,
            Zones = new[]
            {
                new AliCloud.Cen.Inputs.TransitRouterVpnAttachmentZoneArgs
                {
                    ZoneId = defaultTransitRouterAvailableResources.Apply(getTransitRouterAvailableResourcesResult => getTransitRouterAvailableResourcesResult.Resources[0]?.MasterZones[0]),
                },
            },
        });
    
        var defaultGatewayVcoRoute = new AliCloud.Vpn.GatewayVcoRoute("defaultGatewayVcoRoute", new()
        {
            RouteDest = "192.168.12.0/24",
            NextHop = defaultTransitRouterVpnAttachment.VpnId,
            VpnConnectionId = defaultTransitRouterVpnAttachment.VpnId,
            Weight = 100,
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/cen"
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/vpn"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		defaultInstance, err := cen.NewInstance(ctx, "defaultInstance", &cen.InstanceArgs{
    			CenInstanceName: pulumi.Any(_var.Name),
    		})
    		if err != nil {
    			return err
    		}
    		defaultTransitRouter, err := cen.NewTransitRouter(ctx, "defaultTransitRouter", &cen.TransitRouterArgs{
    			CenId:                    defaultInstance.ID(),
    			TransitRouterDescription: pulumi.String("desd"),
    			TransitRouterName:        pulumi.Any(_var.Name),
    		})
    		if err != nil {
    			return err
    		}
    		defaultTransitRouterAvailableResources, err := cen.GetTransitRouterAvailableResources(ctx, nil, nil)
    		if err != nil {
    			return err
    		}
    		defaultCustomerGateway, err := vpn.NewCustomerGateway(ctx, "defaultCustomerGateway", &vpn.CustomerGatewayArgs{
    			IpAddress:   pulumi.String("42.104.22.210"),
    			Asn:         pulumi.String("45014"),
    			Description: pulumi.String("testAccVpnConnectionDesc"),
    		})
    		if err != nil {
    			return err
    		}
    		defaultGatewayVpnAttachment, err := vpn.NewGatewayVpnAttachment(ctx, "defaultGatewayVpnAttachment", &vpn.GatewayVpnAttachmentArgs{
    			CustomerGatewayId: defaultCustomerGateway.ID(),
    			NetworkType:       pulumi.String("public"),
    			LocalSubnet:       pulumi.String("0.0.0.0/0"),
    			RemoteSubnet:      pulumi.String("0.0.0.0/0"),
    			EffectImmediately: pulumi.Bool(false),
    			IkeConfig: &vpn.GatewayVpnAttachmentIkeConfigArgs{
    				IkeAuthAlg:  pulumi.String("md5"),
    				IkeEncAlg:   pulumi.String("des"),
    				IkeVersion:  pulumi.String("ikev2"),
    				IkeMode:     pulumi.String("main"),
    				IkeLifetime: pulumi.Int(86400),
    				Psk:         pulumi.String("tf-testvpn2"),
    				IkePfs:      pulumi.String("group1"),
    				RemoteId:    pulumi.String("testbob2"),
    				LocalId:     pulumi.String("testalice2"),
    			},
    			IpsecConfig: &vpn.GatewayVpnAttachmentIpsecConfigArgs{
    				IpsecPfs:      pulumi.String("group5"),
    				IpsecEncAlg:   pulumi.String("des"),
    				IpsecAuthAlg:  pulumi.String("md5"),
    				IpsecLifetime: pulumi.Int(86400),
    			},
    			BgpConfig: &vpn.GatewayVpnAttachmentBgpConfigArgs{
    				Enable:     pulumi.Bool(true),
    				LocalAsn:   pulumi.Int(45014),
    				TunnelCidr: pulumi.String("169.254.11.0/30"),
    				LocalBgpIp: pulumi.String("169.254.11.1"),
    			},
    			HealthCheckConfig: &vpn.GatewayVpnAttachmentHealthCheckConfigArgs{
    				Enable:   pulumi.Bool(true),
    				Sip:      pulumi.String("192.168.1.1"),
    				Dip:      pulumi.String("10.0.0.1"),
    				Interval: pulumi.Int(10),
    				Retry:    pulumi.Int(10),
    				Policy:   pulumi.String("revoke_route"),
    			},
    			EnableDpd:          pulumi.Bool(true),
    			EnableNatTraversal: pulumi.Bool(true),
    			VpnAttachmentName:  pulumi.Any(_var.Name),
    		})
    		if err != nil {
    			return err
    		}
    		defaultTransitRouterVpnAttachment, err := cen.NewTransitRouterVpnAttachment(ctx, "defaultTransitRouterVpnAttachment", &cen.TransitRouterVpnAttachmentArgs{
    			AutoPublishRouteEnabled:            pulumi.Bool(false),
    			TransitRouterAttachmentDescription: pulumi.Any(_var.Name),
    			TransitRouterAttachmentName:        pulumi.Any(_var.Name),
    			CenId:                              defaultTransitRouter.CenId,
    			TransitRouterId:                    defaultTransitRouter.TransitRouterId,
    			VpnId:                              defaultGatewayVpnAttachment.ID(),
    			Zones: cen.TransitRouterVpnAttachmentZoneArray{
    				&cen.TransitRouterVpnAttachmentZoneArgs{
    					ZoneId: *pulumi.String(defaultTransitRouterAvailableResources.Resources[0].MasterZones[0]),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = vpn.NewGatewayVcoRoute(ctx, "defaultGatewayVcoRoute", &vpn.GatewayVcoRouteArgs{
    			RouteDest:       pulumi.String("192.168.12.0/24"),
    			NextHop:         defaultTransitRouterVpnAttachment.VpnId,
    			VpnConnectionId: defaultTransitRouterVpnAttachment.VpnId,
    			Weight:          pulumi.Int(100),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.alicloud.cen.Instance;
    import com.pulumi.alicloud.cen.InstanceArgs;
    import com.pulumi.alicloud.cen.TransitRouter;
    import com.pulumi.alicloud.cen.TransitRouterArgs;
    import com.pulumi.alicloud.cen.CenFunctions;
    import com.pulumi.alicloud.cen.inputs.GetTransitRouterAvailableResourcesArgs;
    import com.pulumi.alicloud.vpn.CustomerGateway;
    import com.pulumi.alicloud.vpn.CustomerGatewayArgs;
    import com.pulumi.alicloud.vpn.GatewayVpnAttachment;
    import com.pulumi.alicloud.vpn.GatewayVpnAttachmentArgs;
    import com.pulumi.alicloud.vpn.inputs.GatewayVpnAttachmentIkeConfigArgs;
    import com.pulumi.alicloud.vpn.inputs.GatewayVpnAttachmentIpsecConfigArgs;
    import com.pulumi.alicloud.vpn.inputs.GatewayVpnAttachmentBgpConfigArgs;
    import com.pulumi.alicloud.vpn.inputs.GatewayVpnAttachmentHealthCheckConfigArgs;
    import com.pulumi.alicloud.cen.TransitRouterVpnAttachment;
    import com.pulumi.alicloud.cen.TransitRouterVpnAttachmentArgs;
    import com.pulumi.alicloud.cen.inputs.TransitRouterVpnAttachmentZoneArgs;
    import com.pulumi.alicloud.vpn.GatewayVcoRoute;
    import com.pulumi.alicloud.vpn.GatewayVcoRouteArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var defaultInstance = new Instance("defaultInstance", InstanceArgs.builder()        
                .cenInstanceName(var_.name())
                .build());
    
            var defaultTransitRouter = new TransitRouter("defaultTransitRouter", TransitRouterArgs.builder()        
                .cenId(defaultInstance.id())
                .transitRouterDescription("desd")
                .transitRouterName(var_.name())
                .build());
    
            final var defaultTransitRouterAvailableResources = CenFunctions.getTransitRouterAvailableResources();
    
            var defaultCustomerGateway = new CustomerGateway("defaultCustomerGateway", CustomerGatewayArgs.builder()        
                .ipAddress("42.104.22.210")
                .asn("45014")
                .description("testAccVpnConnectionDesc")
                .build());
    
            var defaultGatewayVpnAttachment = new GatewayVpnAttachment("defaultGatewayVpnAttachment", GatewayVpnAttachmentArgs.builder()        
                .customerGatewayId(defaultCustomerGateway.id())
                .networkType("public")
                .localSubnet("0.0.0.0/0")
                .remoteSubnet("0.0.0.0/0")
                .effectImmediately(false)
                .ikeConfig(GatewayVpnAttachmentIkeConfigArgs.builder()
                    .ikeAuthAlg("md5")
                    .ikeEncAlg("des")
                    .ikeVersion("ikev2")
                    .ikeMode("main")
                    .ikeLifetime(86400)
                    .psk("tf-testvpn2")
                    .ikePfs("group1")
                    .remoteId("testbob2")
                    .localId("testalice2")
                    .build())
                .ipsecConfig(GatewayVpnAttachmentIpsecConfigArgs.builder()
                    .ipsecPfs("group5")
                    .ipsecEncAlg("des")
                    .ipsecAuthAlg("md5")
                    .ipsecLifetime(86400)
                    .build())
                .bgpConfig(GatewayVpnAttachmentBgpConfigArgs.builder()
                    .enable(true)
                    .localAsn(45014)
                    .tunnelCidr("169.254.11.0/30")
                    .localBgpIp("169.254.11.1")
                    .build())
                .healthCheckConfig(GatewayVpnAttachmentHealthCheckConfigArgs.builder()
                    .enable(true)
                    .sip("192.168.1.1")
                    .dip("10.0.0.1")
                    .interval(10)
                    .retry(10)
                    .policy("revoke_route")
                    .build())
                .enableDpd(true)
                .enableNatTraversal(true)
                .vpnAttachmentName(var_.name())
                .build());
    
            var defaultTransitRouterVpnAttachment = new TransitRouterVpnAttachment("defaultTransitRouterVpnAttachment", TransitRouterVpnAttachmentArgs.builder()        
                .autoPublishRouteEnabled(false)
                .transitRouterAttachmentDescription(var_.name())
                .transitRouterAttachmentName(var_.name())
                .cenId(defaultTransitRouter.cenId())
                .transitRouterId(defaultTransitRouter.transitRouterId())
                .vpnId(defaultGatewayVpnAttachment.id())
                .zones(TransitRouterVpnAttachmentZoneArgs.builder()
                    .zoneId(defaultTransitRouterAvailableResources.applyValue(getTransitRouterAvailableResourcesResult -> getTransitRouterAvailableResourcesResult.resources()[0].masterZones()[0]))
                    .build())
                .build());
    
            var defaultGatewayVcoRoute = new GatewayVcoRoute("defaultGatewayVcoRoute", GatewayVcoRouteArgs.builder()        
                .routeDest("192.168.12.0/24")
                .nextHop(defaultTransitRouterVpnAttachment.vpnId())
                .vpnConnectionId(defaultTransitRouterVpnAttachment.vpnId())
                .weight(100)
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    default_instance = alicloud.cen.Instance("defaultInstance", cen_instance_name=var["name"])
    default_transit_router = alicloud.cen.TransitRouter("defaultTransitRouter",
        cen_id=default_instance.id,
        transit_router_description="desd",
        transit_router_name=var["name"])
    default_transit_router_available_resources = alicloud.cen.get_transit_router_available_resources()
    default_customer_gateway = alicloud.vpn.CustomerGateway("defaultCustomerGateway",
        ip_address="42.104.22.210",
        asn="45014",
        description="testAccVpnConnectionDesc")
    default_gateway_vpn_attachment = alicloud.vpn.GatewayVpnAttachment("defaultGatewayVpnAttachment",
        customer_gateway_id=default_customer_gateway.id,
        network_type="public",
        local_subnet="0.0.0.0/0",
        remote_subnet="0.0.0.0/0",
        effect_immediately=False,
        ike_config=alicloud.vpn.GatewayVpnAttachmentIkeConfigArgs(
            ike_auth_alg="md5",
            ike_enc_alg="des",
            ike_version="ikev2",
            ike_mode="main",
            ike_lifetime=86400,
            psk="tf-testvpn2",
            ike_pfs="group1",
            remote_id="testbob2",
            local_id="testalice2",
        ),
        ipsec_config=alicloud.vpn.GatewayVpnAttachmentIpsecConfigArgs(
            ipsec_pfs="group5",
            ipsec_enc_alg="des",
            ipsec_auth_alg="md5",
            ipsec_lifetime=86400,
        ),
        bgp_config=alicloud.vpn.GatewayVpnAttachmentBgpConfigArgs(
            enable=True,
            local_asn=45014,
            tunnel_cidr="169.254.11.0/30",
            local_bgp_ip="169.254.11.1",
        ),
        health_check_config=alicloud.vpn.GatewayVpnAttachmentHealthCheckConfigArgs(
            enable=True,
            sip="192.168.1.1",
            dip="10.0.0.1",
            interval=10,
            retry=10,
            policy="revoke_route",
        ),
        enable_dpd=True,
        enable_nat_traversal=True,
        vpn_attachment_name=var["name"])
    default_transit_router_vpn_attachment = alicloud.cen.TransitRouterVpnAttachment("defaultTransitRouterVpnAttachment",
        auto_publish_route_enabled=False,
        transit_router_attachment_description=var["name"],
        transit_router_attachment_name=var["name"],
        cen_id=default_transit_router.cen_id,
        transit_router_id=default_transit_router.transit_router_id,
        vpn_id=default_gateway_vpn_attachment.id,
        zones=[alicloud.cen.TransitRouterVpnAttachmentZoneArgs(
            zone_id=default_transit_router_available_resources.resources[0].master_zones[0],
        )])
    default_gateway_vco_route = alicloud.vpn.GatewayVcoRoute("defaultGatewayVcoRoute",
        route_dest="192.168.12.0/24",
        next_hop=default_transit_router_vpn_attachment.vpn_id,
        vpn_connection_id=default_transit_router_vpn_attachment.vpn_id,
        weight=100)
    
    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    
    const defaultInstance = new alicloud.cen.Instance("defaultInstance", {cenInstanceName: _var.name});
    const defaultTransitRouter = new alicloud.cen.TransitRouter("defaultTransitRouter", {
        cenId: defaultInstance.id,
        transitRouterDescription: "desd",
        transitRouterName: _var.name,
    });
    const defaultTransitRouterAvailableResources = alicloud.cen.getTransitRouterAvailableResources({});
    const defaultCustomerGateway = new alicloud.vpn.CustomerGateway("defaultCustomerGateway", {
        ipAddress: "42.104.22.210",
        asn: "45014",
        description: "testAccVpnConnectionDesc",
    });
    const defaultGatewayVpnAttachment = new alicloud.vpn.GatewayVpnAttachment("defaultGatewayVpnAttachment", {
        customerGatewayId: defaultCustomerGateway.id,
        networkType: "public",
        localSubnet: "0.0.0.0/0",
        remoteSubnet: "0.0.0.0/0",
        effectImmediately: false,
        ikeConfig: {
            ikeAuthAlg: "md5",
            ikeEncAlg: "des",
            ikeVersion: "ikev2",
            ikeMode: "main",
            ikeLifetime: 86400,
            psk: "tf-testvpn2",
            ikePfs: "group1",
            remoteId: "testbob2",
            localId: "testalice2",
        },
        ipsecConfig: {
            ipsecPfs: "group5",
            ipsecEncAlg: "des",
            ipsecAuthAlg: "md5",
            ipsecLifetime: 86400,
        },
        bgpConfig: {
            enable: true,
            localAsn: 45014,
            tunnelCidr: "169.254.11.0/30",
            localBgpIp: "169.254.11.1",
        },
        healthCheckConfig: {
            enable: true,
            sip: "192.168.1.1",
            dip: "10.0.0.1",
            interval: 10,
            retry: 10,
            policy: "revoke_route",
        },
        enableDpd: true,
        enableNatTraversal: true,
        vpnAttachmentName: _var.name,
    });
    const defaultTransitRouterVpnAttachment = new alicloud.cen.TransitRouterVpnAttachment("defaultTransitRouterVpnAttachment", {
        autoPublishRouteEnabled: false,
        transitRouterAttachmentDescription: _var.name,
        transitRouterAttachmentName: _var.name,
        cenId: defaultTransitRouter.cenId,
        transitRouterId: defaultTransitRouter.transitRouterId,
        vpnId: defaultGatewayVpnAttachment.id,
        zones: [{
            zoneId: defaultTransitRouterAvailableResources.then(defaultTransitRouterAvailableResources => defaultTransitRouterAvailableResources.resources?.[0]?.masterZones?.[0]),
        }],
    });
    const defaultGatewayVcoRoute = new alicloud.vpn.GatewayVcoRoute("defaultGatewayVcoRoute", {
        routeDest: "192.168.12.0/24",
        nextHop: defaultTransitRouterVpnAttachment.vpnId,
        vpnConnectionId: defaultTransitRouterVpnAttachment.vpnId,
        weight: 100,
    });
    
    resources:
      defaultInstance:
        type: alicloud:cen:Instance
        properties:
          cenInstanceName: ${var.name}
      defaultTransitRouter:
        type: alicloud:cen:TransitRouter
        properties:
          cenId: ${defaultInstance.id}
          transitRouterDescription: desd
          transitRouterName: ${var.name}
      defaultCustomerGateway:
        type: alicloud:vpn:CustomerGateway
        properties:
          ipAddress: 42.104.22.210
          asn: '45014'
          description: testAccVpnConnectionDesc
      defaultGatewayVpnAttachment:
        type: alicloud:vpn:GatewayVpnAttachment
        properties:
          customerGatewayId: ${defaultCustomerGateway.id}
          networkType: public
          localSubnet: 0.0.0.0/0
          remoteSubnet: 0.0.0.0/0
          effectImmediately: false
          ikeConfig:
            ikeAuthAlg: md5
            ikeEncAlg: des
            ikeVersion: ikev2
            ikeMode: main
            ikeLifetime: 86400
            psk: tf-testvpn2
            ikePfs: group1
            remoteId: testbob2
            localId: testalice2
          ipsecConfig:
            ipsecPfs: group5
            ipsecEncAlg: des
            ipsecAuthAlg: md5
            ipsecLifetime: 86400
          bgpConfig:
            enable: true
            localAsn: 45014
            tunnelCidr: 169.254.11.0/30
            localBgpIp: 169.254.11.1
          healthCheckConfig:
            enable: true
            sip: 192.168.1.1
            dip: 10.0.0.1
            interval: 10
            retry: 10
            policy: revoke_route
          enableDpd: true
          enableNatTraversal: true
          vpnAttachmentName: ${var.name}
      defaultTransitRouterVpnAttachment:
        type: alicloud:cen:TransitRouterVpnAttachment
        properties:
          autoPublishRouteEnabled: false
          transitRouterAttachmentDescription: ${var.name}
          transitRouterAttachmentName: ${var.name}
          cenId: ${defaultTransitRouter.cenId}
          transitRouterId: ${defaultTransitRouter.transitRouterId}
          vpnId: ${defaultGatewayVpnAttachment.id}
          zones:
            - zoneId: ${defaultTransitRouterAvailableResources.resources[0].masterZones[0]}
      defaultGatewayVcoRoute:
        type: alicloud:vpn:GatewayVcoRoute
        properties:
          routeDest: 192.168.12.0/24
          nextHop: ${defaultTransitRouterVpnAttachment.vpnId}
          vpnConnectionId: ${defaultTransitRouterVpnAttachment.vpnId}
          weight: 100
    variables:
      defaultTransitRouterAvailableResources:
        fn::invoke:
          Function: alicloud:cen:getTransitRouterAvailableResources
          Arguments: {}
    

    Create GatewayVcoRoute Resource

    new GatewayVcoRoute(name: string, args: GatewayVcoRouteArgs, opts?: CustomResourceOptions);
    @overload
    def GatewayVcoRoute(resource_name: str,
                        opts: Optional[ResourceOptions] = None,
                        next_hop: Optional[str] = None,
                        route_dest: Optional[str] = None,
                        vpn_connection_id: Optional[str] = None,
                        weight: Optional[int] = None)
    @overload
    def GatewayVcoRoute(resource_name: str,
                        args: GatewayVcoRouteArgs,
                        opts: Optional[ResourceOptions] = None)
    func NewGatewayVcoRoute(ctx *Context, name string, args GatewayVcoRouteArgs, opts ...ResourceOption) (*GatewayVcoRoute, error)
    public GatewayVcoRoute(string name, GatewayVcoRouteArgs args, CustomResourceOptions? opts = null)
    public GatewayVcoRoute(String name, GatewayVcoRouteArgs args)
    public GatewayVcoRoute(String name, GatewayVcoRouteArgs args, CustomResourceOptions options)
    
    type: alicloud:vpn:GatewayVcoRoute
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    name string
    The unique name of the resource.
    args GatewayVcoRouteArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args GatewayVcoRouteArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args GatewayVcoRouteArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args GatewayVcoRouteArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args GatewayVcoRouteArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    GatewayVcoRoute Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The GatewayVcoRoute resource accepts the following input properties:

    NextHop string

    The next hop of the destination route.

    RouteDest string

    The destination network segment of the destination route.

    VpnConnectionId string

    The id of the vpn attachment.

    Weight int

    The weight value of the destination route. Valid values: 0, 100.

    NextHop string

    The next hop of the destination route.

    RouteDest string

    The destination network segment of the destination route.

    VpnConnectionId string

    The id of the vpn attachment.

    Weight int

    The weight value of the destination route. Valid values: 0, 100.

    nextHop String

    The next hop of the destination route.

    routeDest String

    The destination network segment of the destination route.

    vpnConnectionId String

    The id of the vpn attachment.

    weight Integer

    The weight value of the destination route. Valid values: 0, 100.

    nextHop string

    The next hop of the destination route.

    routeDest string

    The destination network segment of the destination route.

    vpnConnectionId string

    The id of the vpn attachment.

    weight number

    The weight value of the destination route. Valid values: 0, 100.

    next_hop str

    The next hop of the destination route.

    route_dest str

    The destination network segment of the destination route.

    vpn_connection_id str

    The id of the vpn attachment.

    weight int

    The weight value of the destination route. Valid values: 0, 100.

    nextHop String

    The next hop of the destination route.

    routeDest String

    The destination network segment of the destination route.

    vpnConnectionId String

    The id of the vpn attachment.

    weight Number

    The weight value of the destination route. Valid values: 0, 100.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the GatewayVcoRoute resource produces the following output properties:

    Id string

    The provider-assigned unique ID for this managed resource.

    Status string

    The status of the vpn route entry.

    Id string

    The provider-assigned unique ID for this managed resource.

    Status string

    The status of the vpn route entry.

    id String

    The provider-assigned unique ID for this managed resource.

    status String

    The status of the vpn route entry.

    id string

    The provider-assigned unique ID for this managed resource.

    status string

    The status of the vpn route entry.

    id str

    The provider-assigned unique ID for this managed resource.

    status str

    The status of the vpn route entry.

    id String

    The provider-assigned unique ID for this managed resource.

    status String

    The status of the vpn route entry.

    Look up Existing GatewayVcoRoute Resource

    Get an existing GatewayVcoRoute resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: GatewayVcoRouteState, opts?: CustomResourceOptions): GatewayVcoRoute
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            next_hop: Optional[str] = None,
            route_dest: Optional[str] = None,
            status: Optional[str] = None,
            vpn_connection_id: Optional[str] = None,
            weight: Optional[int] = None) -> GatewayVcoRoute
    func GetGatewayVcoRoute(ctx *Context, name string, id IDInput, state *GatewayVcoRouteState, opts ...ResourceOption) (*GatewayVcoRoute, error)
    public static GatewayVcoRoute Get(string name, Input<string> id, GatewayVcoRouteState? state, CustomResourceOptions? opts = null)
    public static GatewayVcoRoute get(String name, Output<String> id, GatewayVcoRouteState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    NextHop string

    The next hop of the destination route.

    RouteDest string

    The destination network segment of the destination route.

    Status string

    The status of the vpn route entry.

    VpnConnectionId string

    The id of the vpn attachment.

    Weight int

    The weight value of the destination route. Valid values: 0, 100.

    NextHop string

    The next hop of the destination route.

    RouteDest string

    The destination network segment of the destination route.

    Status string

    The status of the vpn route entry.

    VpnConnectionId string

    The id of the vpn attachment.

    Weight int

    The weight value of the destination route. Valid values: 0, 100.

    nextHop String

    The next hop of the destination route.

    routeDest String

    The destination network segment of the destination route.

    status String

    The status of the vpn route entry.

    vpnConnectionId String

    The id of the vpn attachment.

    weight Integer

    The weight value of the destination route. Valid values: 0, 100.

    nextHop string

    The next hop of the destination route.

    routeDest string

    The destination network segment of the destination route.

    status string

    The status of the vpn route entry.

    vpnConnectionId string

    The id of the vpn attachment.

    weight number

    The weight value of the destination route. Valid values: 0, 100.

    next_hop str

    The next hop of the destination route.

    route_dest str

    The destination network segment of the destination route.

    status str

    The status of the vpn route entry.

    vpn_connection_id str

    The id of the vpn attachment.

    weight int

    The weight value of the destination route. Valid values: 0, 100.

    nextHop String

    The next hop of the destination route.

    routeDest String

    The destination network segment of the destination route.

    status String

    The status of the vpn route entry.

    vpnConnectionId String

    The id of the vpn attachment.

    weight Number

    The weight value of the destination route. Valid values: 0, 100.

    Import

    VPN Gateway Vco Route can be imported using the id, e.g.

     $ pulumi import alicloud:vpn/gatewayVcoRoute:GatewayVcoRoute example <vpn_connection_id>:<route_dest>:<next_hop>:<weight>
    

    Package Details

    Repository
    Alibaba Cloud pulumi/pulumi-alicloud
    License
    Apache-2.0
    Notes

    This Pulumi package is based on the alicloud Terraform Provider.

    alicloud logo
    Alibaba Cloud v3.45.0 published on Monday, Nov 27, 2023 by Pulumi