1. Packages
  2. Packages
  3. Bytepluscc Provider
  4. API Docs
  5. directconnect
  6. GatewayRoute
Viewing docs for bytepluscc v0.0.31
published on Monday, Jun 1, 2026 by Byteplus
bytepluscc logo
Viewing docs for bytepluscc v0.0.31
published on Monday, Jun 1, 2026 by Byteplus

    Add a static route to the dedicated gateway.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as bytepluscc from "@byteplus/pulumi-bytepluscc";
    
    const directConnectGatewayRouteDemo = new bytepluscc.directconnect.GatewayRoute("DirectConnectGatewayRouteDemo", {
        directConnectGatewayId: "dcg-****",
        nextHopId: "dcv-****",
        destinationCidrBlock: "192.168.1.0/28",
    });
    
    import pulumi
    import pulumi_bytepluscc as bytepluscc
    
    direct_connect_gateway_route_demo = bytepluscc.directconnect.GatewayRoute("DirectConnectGatewayRouteDemo",
        direct_connect_gateway_id="dcg-****",
        next_hop_id="dcv-****",
        destination_cidr_block="192.168.1.0/28")
    
    package main
    
    import (
    	"github.com/byteplus-sdk/pulumi-bytepluscc/sdk/go/bytepluscc/directconnect"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := directconnect.NewGatewayRoute(ctx, "DirectConnectGatewayRouteDemo", &directconnect.GatewayRouteArgs{
    			DirectConnectGatewayId: pulumi.String("dcg-****"),
    			NextHopId:              pulumi.String("dcv-****"),
    			DestinationCidrBlock:   pulumi.String("192.168.1.0/28"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Bytepluscc = Byteplus.Pulumi.Bytepluscc;
    
    return await Deployment.RunAsync(() => 
    {
        var directConnectGatewayRouteDemo = new Bytepluscc.Directconnect.GatewayRoute("DirectConnectGatewayRouteDemo", new()
        {
            DirectConnectGatewayId = "dcg-****",
            NextHopId = "dcv-****",
            DestinationCidrBlock = "192.168.1.0/28",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.byteplus.bytepluscc.directconnect.GatewayRoute;
    import com.byteplus.bytepluscc.directconnect.GatewayRouteArgs;
    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 directConnectGatewayRouteDemo = new GatewayRoute("directConnectGatewayRouteDemo", GatewayRouteArgs.builder()
                .directConnectGatewayId("dcg-****")
                .nextHopId("dcv-****")
                .destinationCidrBlock("192.168.1.0/28")
                .build());
    
        }
    }
    
    resources:
      directConnectGatewayRouteDemo:
        type: bytepluscc:directconnect:GatewayRoute
        name: DirectConnectGatewayRouteDemo
        properties:
          directConnectGatewayId: dcg-****
          nextHopId: dcv-****
          destinationCidrBlock: 192.168.1.0/28
    
    Example coming soon!
    

    Create GatewayRoute Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new GatewayRoute(name: string, args: GatewayRouteArgs, opts?: CustomResourceOptions);
    @overload
    def GatewayRoute(resource_name: str,
                     args: GatewayRouteArgs,
                     opts: Optional[ResourceOptions] = None)
    
    @overload
    def GatewayRoute(resource_name: str,
                     opts: Optional[ResourceOptions] = None,
                     destination_cidr_block: Optional[str] = None,
                     direct_connect_gateway_id: Optional[str] = None,
                     next_hop_id: Optional[str] = None)
    func NewGatewayRoute(ctx *Context, name string, args GatewayRouteArgs, opts ...ResourceOption) (*GatewayRoute, error)
    public GatewayRoute(string name, GatewayRouteArgs args, CustomResourceOptions? opts = null)
    public GatewayRoute(String name, GatewayRouteArgs args)
    public GatewayRoute(String name, GatewayRouteArgs args, CustomResourceOptions options)
    
    type: bytepluscc:directconnect:GatewayRoute
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    resource "bytepluscc_directconnect_gatewayroute" "name" {
        # resource properties
    }

    Parameters

    name string
    The unique name of the resource.
    args GatewayRouteArgs
    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 GatewayRouteArgs
    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 GatewayRouteArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args GatewayRouteArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args GatewayRouteArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var gatewayRouteResource = new Bytepluscc.Directconnect.GatewayRoute("gatewayRouteResource", new()
    {
        DestinationCidrBlock = "string",
        DirectConnectGatewayId = "string",
        NextHopId = "string",
    });
    
    example, err := directconnect.NewGatewayRoute(ctx, "gatewayRouteResource", &directconnect.GatewayRouteArgs{
    	DestinationCidrBlock:   pulumi.String("string"),
    	DirectConnectGatewayId: pulumi.String("string"),
    	NextHopId:              pulumi.String("string"),
    })
    
    resource "bytepluscc_directconnect_gatewayroute" "gatewayRouteResource" {
      destination_cidr_block    = "string"
      direct_connect_gateway_id = "string"
      next_hop_id               = "string"
    }
    
    var gatewayRouteResource = new GatewayRoute("gatewayRouteResource", GatewayRouteArgs.builder()
        .destinationCidrBlock("string")
        .directConnectGatewayId("string")
        .nextHopId("string")
        .build());
    
    gateway_route_resource = bytepluscc.directconnect.GatewayRoute("gatewayRouteResource",
        destination_cidr_block="string",
        direct_connect_gateway_id="string",
        next_hop_id="string")
    
    const gatewayRouteResource = new bytepluscc.directconnect.GatewayRoute("gatewayRouteResource", {
        destinationCidrBlock: "string",
        directConnectGatewayId: "string",
        nextHopId: "string",
    });
    
    type: bytepluscc:directconnect:GatewayRoute
    properties:
        destinationCidrBlock: string
        directConnectGatewayId: string
        nextHopId: string
    

    GatewayRoute Resource Properties

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

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The GatewayRoute resource accepts the following input properties:

    DestinationCidrBlock string
    Destination network segment of the dedicated gateway route.
    DirectConnectGatewayId string
    Dedicated gateway ID.
    NextHopId string
    Next hop instance ID for the dedicated gateway route.
    DestinationCidrBlock string
    Destination network segment of the dedicated gateway route.
    DirectConnectGatewayId string
    Dedicated gateway ID.
    NextHopId string
    Next hop instance ID for the dedicated gateway route.
    destination_cidr_block string
    Destination network segment of the dedicated gateway route.
    direct_connect_gateway_id string
    Dedicated gateway ID.
    next_hop_id string
    Next hop instance ID for the dedicated gateway route.
    destinationCidrBlock String
    Destination network segment of the dedicated gateway route.
    directConnectGatewayId String
    Dedicated gateway ID.
    nextHopId String
    Next hop instance ID for the dedicated gateway route.
    destinationCidrBlock string
    Destination network segment of the dedicated gateway route.
    directConnectGatewayId string
    Dedicated gateway ID.
    nextHopId string
    Next hop instance ID for the dedicated gateway route.
    destination_cidr_block str
    Destination network segment of the dedicated gateway route.
    direct_connect_gateway_id str
    Dedicated gateway ID.
    next_hop_id str
    Next hop instance ID for the dedicated gateway route.
    destinationCidrBlock String
    Destination network segment of the dedicated gateway route.
    directConnectGatewayId String
    Dedicated gateway ID.
    nextHopId String
    Next hop instance ID for the dedicated gateway route.

    Outputs

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

    AccountId string
    Account ID to which the dedicated gateway route belongs.
    CreationTime string
    Time when the dedicated gateway route was created.
    DirectConnectGatewayRouteId string
    Dedicated gateway route ID.
    Id string
    The provider-assigned unique ID for this managed resource.
    NextHopType string
    Type of the next hop instance for the dedicated gateway route. Valid values: VIF: Virtual Interface CEN: Cloud Enterprise Network TransitRouter: Transit Router.
    RouteType string
    Type of the dedicated gateway route. Valid values: BGP: BGP dynamic route Static: Static route CEN: Cloud Enterprise Network route, that is, after the dedicated gateway joins the Cloud Enterprise Network, routes synchronized from the Cloud Enterprise Network.
    Status string
    Status of the dedicated gateway route. Creating: Creating Deleting: Deleting Pending: Configuring Available: Available.
    AccountId string
    Account ID to which the dedicated gateway route belongs.
    CreationTime string
    Time when the dedicated gateway route was created.
    DirectConnectGatewayRouteId string
    Dedicated gateway route ID.
    Id string
    The provider-assigned unique ID for this managed resource.
    NextHopType string
    Type of the next hop instance for the dedicated gateway route. Valid values: VIF: Virtual Interface CEN: Cloud Enterprise Network TransitRouter: Transit Router.
    RouteType string
    Type of the dedicated gateway route. Valid values: BGP: BGP dynamic route Static: Static route CEN: Cloud Enterprise Network route, that is, after the dedicated gateway joins the Cloud Enterprise Network, routes synchronized from the Cloud Enterprise Network.
    Status string
    Status of the dedicated gateway route. Creating: Creating Deleting: Deleting Pending: Configuring Available: Available.
    account_id string
    Account ID to which the dedicated gateway route belongs.
    creation_time string
    Time when the dedicated gateway route was created.
    direct_connect_gateway_route_id string
    Dedicated gateway route ID.
    id string
    The provider-assigned unique ID for this managed resource.
    next_hop_type string
    Type of the next hop instance for the dedicated gateway route. Valid values: VIF: Virtual Interface CEN: Cloud Enterprise Network TransitRouter: Transit Router.
    route_type string
    Type of the dedicated gateway route. Valid values: BGP: BGP dynamic route Static: Static route CEN: Cloud Enterprise Network route, that is, after the dedicated gateway joins the Cloud Enterprise Network, routes synchronized from the Cloud Enterprise Network.
    status string
    Status of the dedicated gateway route. Creating: Creating Deleting: Deleting Pending: Configuring Available: Available.
    accountId String
    Account ID to which the dedicated gateway route belongs.
    creationTime String
    Time when the dedicated gateway route was created.
    directConnectGatewayRouteId String
    Dedicated gateway route ID.
    id String
    The provider-assigned unique ID for this managed resource.
    nextHopType String
    Type of the next hop instance for the dedicated gateway route. Valid values: VIF: Virtual Interface CEN: Cloud Enterprise Network TransitRouter: Transit Router.
    routeType String
    Type of the dedicated gateway route. Valid values: BGP: BGP dynamic route Static: Static route CEN: Cloud Enterprise Network route, that is, after the dedicated gateway joins the Cloud Enterprise Network, routes synchronized from the Cloud Enterprise Network.
    status String
    Status of the dedicated gateway route. Creating: Creating Deleting: Deleting Pending: Configuring Available: Available.
    accountId string
    Account ID to which the dedicated gateway route belongs.
    creationTime string
    Time when the dedicated gateway route was created.
    directConnectGatewayRouteId string
    Dedicated gateway route ID.
    id string
    The provider-assigned unique ID for this managed resource.
    nextHopType string
    Type of the next hop instance for the dedicated gateway route. Valid values: VIF: Virtual Interface CEN: Cloud Enterprise Network TransitRouter: Transit Router.
    routeType string
    Type of the dedicated gateway route. Valid values: BGP: BGP dynamic route Static: Static route CEN: Cloud Enterprise Network route, that is, after the dedicated gateway joins the Cloud Enterprise Network, routes synchronized from the Cloud Enterprise Network.
    status string
    Status of the dedicated gateway route. Creating: Creating Deleting: Deleting Pending: Configuring Available: Available.
    account_id str
    Account ID to which the dedicated gateway route belongs.
    creation_time str
    Time when the dedicated gateway route was created.
    direct_connect_gateway_route_id str
    Dedicated gateway route ID.
    id str
    The provider-assigned unique ID for this managed resource.
    next_hop_type str
    Type of the next hop instance for the dedicated gateway route. Valid values: VIF: Virtual Interface CEN: Cloud Enterprise Network TransitRouter: Transit Router.
    route_type str
    Type of the dedicated gateway route. Valid values: BGP: BGP dynamic route Static: Static route CEN: Cloud Enterprise Network route, that is, after the dedicated gateway joins the Cloud Enterprise Network, routes synchronized from the Cloud Enterprise Network.
    status str
    Status of the dedicated gateway route. Creating: Creating Deleting: Deleting Pending: Configuring Available: Available.
    accountId String
    Account ID to which the dedicated gateway route belongs.
    creationTime String
    Time when the dedicated gateway route was created.
    directConnectGatewayRouteId String
    Dedicated gateway route ID.
    id String
    The provider-assigned unique ID for this managed resource.
    nextHopType String
    Type of the next hop instance for the dedicated gateway route. Valid values: VIF: Virtual Interface CEN: Cloud Enterprise Network TransitRouter: Transit Router.
    routeType String
    Type of the dedicated gateway route. Valid values: BGP: BGP dynamic route Static: Static route CEN: Cloud Enterprise Network route, that is, after the dedicated gateway joins the Cloud Enterprise Network, routes synchronized from the Cloud Enterprise Network.
    status String
    Status of the dedicated gateway route. Creating: Creating Deleting: Deleting Pending: Configuring Available: Available.

    Look up Existing GatewayRoute Resource

    Get an existing GatewayRoute 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?: GatewayRouteState, opts?: CustomResourceOptions): GatewayRoute
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            account_id: Optional[str] = None,
            creation_time: Optional[str] = None,
            destination_cidr_block: Optional[str] = None,
            direct_connect_gateway_id: Optional[str] = None,
            direct_connect_gateway_route_id: Optional[str] = None,
            next_hop_id: Optional[str] = None,
            next_hop_type: Optional[str] = None,
            route_type: Optional[str] = None,
            status: Optional[str] = None) -> GatewayRoute
    func GetGatewayRoute(ctx *Context, name string, id IDInput, state *GatewayRouteState, opts ...ResourceOption) (*GatewayRoute, error)
    public static GatewayRoute Get(string name, Input<string> id, GatewayRouteState? state, CustomResourceOptions? opts = null)
    public static GatewayRoute get(String name, Output<String> id, GatewayRouteState state, CustomResourceOptions options)
    resources:  _:    type: bytepluscc:directconnect:GatewayRoute    get:      id: ${id}
    import {
      to = bytepluscc_directconnect_gatewayroute.example
      id = "${id}"
    }
    
    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:
    AccountId string
    Account ID to which the dedicated gateway route belongs.
    CreationTime string
    Time when the dedicated gateway route was created.
    DestinationCidrBlock string
    Destination network segment of the dedicated gateway route.
    DirectConnectGatewayId string
    Dedicated gateway ID.
    DirectConnectGatewayRouteId string
    Dedicated gateway route ID.
    NextHopId string
    Next hop instance ID for the dedicated gateway route.
    NextHopType string
    Type of the next hop instance for the dedicated gateway route. Valid values: VIF: Virtual Interface CEN: Cloud Enterprise Network TransitRouter: Transit Router.
    RouteType string
    Type of the dedicated gateway route. Valid values: BGP: BGP dynamic route Static: Static route CEN: Cloud Enterprise Network route, that is, after the dedicated gateway joins the Cloud Enterprise Network, routes synchronized from the Cloud Enterprise Network.
    Status string
    Status of the dedicated gateway route. Creating: Creating Deleting: Deleting Pending: Configuring Available: Available.
    AccountId string
    Account ID to which the dedicated gateway route belongs.
    CreationTime string
    Time when the dedicated gateway route was created.
    DestinationCidrBlock string
    Destination network segment of the dedicated gateway route.
    DirectConnectGatewayId string
    Dedicated gateway ID.
    DirectConnectGatewayRouteId string
    Dedicated gateway route ID.
    NextHopId string
    Next hop instance ID for the dedicated gateway route.
    NextHopType string
    Type of the next hop instance for the dedicated gateway route. Valid values: VIF: Virtual Interface CEN: Cloud Enterprise Network TransitRouter: Transit Router.
    RouteType string
    Type of the dedicated gateway route. Valid values: BGP: BGP dynamic route Static: Static route CEN: Cloud Enterprise Network route, that is, after the dedicated gateway joins the Cloud Enterprise Network, routes synchronized from the Cloud Enterprise Network.
    Status string
    Status of the dedicated gateway route. Creating: Creating Deleting: Deleting Pending: Configuring Available: Available.
    account_id string
    Account ID to which the dedicated gateway route belongs.
    creation_time string
    Time when the dedicated gateway route was created.
    destination_cidr_block string
    Destination network segment of the dedicated gateway route.
    direct_connect_gateway_id string
    Dedicated gateway ID.
    direct_connect_gateway_route_id string
    Dedicated gateway route ID.
    next_hop_id string
    Next hop instance ID for the dedicated gateway route.
    next_hop_type string
    Type of the next hop instance for the dedicated gateway route. Valid values: VIF: Virtual Interface CEN: Cloud Enterprise Network TransitRouter: Transit Router.
    route_type string
    Type of the dedicated gateway route. Valid values: BGP: BGP dynamic route Static: Static route CEN: Cloud Enterprise Network route, that is, after the dedicated gateway joins the Cloud Enterprise Network, routes synchronized from the Cloud Enterprise Network.
    status string
    Status of the dedicated gateway route. Creating: Creating Deleting: Deleting Pending: Configuring Available: Available.
    accountId String
    Account ID to which the dedicated gateway route belongs.
    creationTime String
    Time when the dedicated gateway route was created.
    destinationCidrBlock String
    Destination network segment of the dedicated gateway route.
    directConnectGatewayId String
    Dedicated gateway ID.
    directConnectGatewayRouteId String
    Dedicated gateway route ID.
    nextHopId String
    Next hop instance ID for the dedicated gateway route.
    nextHopType String
    Type of the next hop instance for the dedicated gateway route. Valid values: VIF: Virtual Interface CEN: Cloud Enterprise Network TransitRouter: Transit Router.
    routeType String
    Type of the dedicated gateway route. Valid values: BGP: BGP dynamic route Static: Static route CEN: Cloud Enterprise Network route, that is, after the dedicated gateway joins the Cloud Enterprise Network, routes synchronized from the Cloud Enterprise Network.
    status String
    Status of the dedicated gateway route. Creating: Creating Deleting: Deleting Pending: Configuring Available: Available.
    accountId string
    Account ID to which the dedicated gateway route belongs.
    creationTime string
    Time when the dedicated gateway route was created.
    destinationCidrBlock string
    Destination network segment of the dedicated gateway route.
    directConnectGatewayId string
    Dedicated gateway ID.
    directConnectGatewayRouteId string
    Dedicated gateway route ID.
    nextHopId string
    Next hop instance ID for the dedicated gateway route.
    nextHopType string
    Type of the next hop instance for the dedicated gateway route. Valid values: VIF: Virtual Interface CEN: Cloud Enterprise Network TransitRouter: Transit Router.
    routeType string
    Type of the dedicated gateway route. Valid values: BGP: BGP dynamic route Static: Static route CEN: Cloud Enterprise Network route, that is, after the dedicated gateway joins the Cloud Enterprise Network, routes synchronized from the Cloud Enterprise Network.
    status string
    Status of the dedicated gateway route. Creating: Creating Deleting: Deleting Pending: Configuring Available: Available.
    account_id str
    Account ID to which the dedicated gateway route belongs.
    creation_time str
    Time when the dedicated gateway route was created.
    destination_cidr_block str
    Destination network segment of the dedicated gateway route.
    direct_connect_gateway_id str
    Dedicated gateway ID.
    direct_connect_gateway_route_id str
    Dedicated gateway route ID.
    next_hop_id str
    Next hop instance ID for the dedicated gateway route.
    next_hop_type str
    Type of the next hop instance for the dedicated gateway route. Valid values: VIF: Virtual Interface CEN: Cloud Enterprise Network TransitRouter: Transit Router.
    route_type str
    Type of the dedicated gateway route. Valid values: BGP: BGP dynamic route Static: Static route CEN: Cloud Enterprise Network route, that is, after the dedicated gateway joins the Cloud Enterprise Network, routes synchronized from the Cloud Enterprise Network.
    status str
    Status of the dedicated gateway route. Creating: Creating Deleting: Deleting Pending: Configuring Available: Available.
    accountId String
    Account ID to which the dedicated gateway route belongs.
    creationTime String
    Time when the dedicated gateway route was created.
    destinationCidrBlock String
    Destination network segment of the dedicated gateway route.
    directConnectGatewayId String
    Dedicated gateway ID.
    directConnectGatewayRouteId String
    Dedicated gateway route ID.
    nextHopId String
    Next hop instance ID for the dedicated gateway route.
    nextHopType String
    Type of the next hop instance for the dedicated gateway route. Valid values: VIF: Virtual Interface CEN: Cloud Enterprise Network TransitRouter: Transit Router.
    routeType String
    Type of the dedicated gateway route. Valid values: BGP: BGP dynamic route Static: Static route CEN: Cloud Enterprise Network route, that is, after the dedicated gateway joins the Cloud Enterprise Network, routes synchronized from the Cloud Enterprise Network.
    status String
    Status of the dedicated gateway route. Creating: Creating Deleting: Deleting Pending: Configuring Available: Available.

    Import

    $ pulumi import bytepluscc:directconnect/gatewayRoute:GatewayRoute example "direct_connect_gateway_route_id"
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    bytepluscc byteplus-sdk/pulumi-bytepluscc
    License
    MPL-2.0
    Notes
    This Pulumi package is based on the bytepluscc Terraform Provider.
    bytepluscc logo
    Viewing docs for bytepluscc v0.0.31
    published on Monday, Jun 1, 2026 by Byteplus

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial