published on Monday, May 25, 2026 by Byteplus
published on Monday, May 25, 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:
- Destination
Cidr stringBlock - Destination network segment of the dedicated gateway route.
- Direct
Connect stringGateway Id - Dedicated gateway ID.
- Next
Hop stringId - Next hop instance ID for the dedicated gateway route.
- Destination
Cidr stringBlock - Destination network segment of the dedicated gateway route.
- Direct
Connect stringGateway Id - Dedicated gateway ID.
- Next
Hop stringId - Next hop instance ID for the dedicated gateway route.
- destination_
cidr_ stringblock - Destination network segment of the dedicated gateway route.
- direct_
connect_ stringgateway_ id - Dedicated gateway ID.
- next_
hop_ stringid - Next hop instance ID for the dedicated gateway route.
- destination
Cidr StringBlock - Destination network segment of the dedicated gateway route.
- direct
Connect StringGateway Id - Dedicated gateway ID.
- next
Hop StringId - Next hop instance ID for the dedicated gateway route.
- destination
Cidr stringBlock - Destination network segment of the dedicated gateway route.
- direct
Connect stringGateway Id - Dedicated gateway ID.
- next
Hop stringId - Next hop instance ID for the dedicated gateway route.
- destination_
cidr_ strblock - Destination network segment of the dedicated gateway route.
- direct_
connect_ strgateway_ id - Dedicated gateway ID.
- next_
hop_ strid - Next hop instance ID for the dedicated gateway route.
- destination
Cidr StringBlock - Destination network segment of the dedicated gateway route.
- direct
Connect StringGateway Id - Dedicated gateway ID.
- next
Hop StringId - 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:
- 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 stringGateway Route Id - Dedicated gateway route ID.
- Id string
- The provider-assigned unique ID for this managed resource.
- Next
Hop stringType - 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.
- 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 stringGateway Route Id - Dedicated gateway route ID.
- Id string
- The provider-assigned unique ID for this managed resource.
- Next
Hop stringType - 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.
- 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_ stringgateway_ route_ id - Dedicated gateway route ID.
- id string
- The provider-assigned unique ID for this managed resource.
- next_
hop_ stringtype - 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.
- 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 StringGateway Route Id - Dedicated gateway route ID.
- id String
- The provider-assigned unique ID for this managed resource.
- next
Hop StringType - 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.
- 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 stringGateway Route Id - Dedicated gateway route ID.
- id string
- The provider-assigned unique ID for this managed resource.
- next
Hop stringType - 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.
- 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_ strgateway_ route_ id - Dedicated gateway route ID.
- id str
- The provider-assigned unique ID for this managed resource.
- next_
hop_ strtype - 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.
- 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 StringGateway Route Id - Dedicated gateway route ID.
- id String
- The provider-assigned unique ID for this managed resource.
- next
Hop StringType - 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.
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) -> GatewayRoutefunc 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.
- 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 stringBlock - Destination network segment of the dedicated gateway route.
- Direct
Connect stringGateway Id - Dedicated gateway ID.
- Direct
Connect stringGateway Route Id - Dedicated gateway route ID.
- Next
Hop stringId - Next hop instance ID for the dedicated gateway route.
- Next
Hop stringType - 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.
- 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 stringBlock - Destination network segment of the dedicated gateway route.
- Direct
Connect stringGateway Id - Dedicated gateway ID.
- Direct
Connect stringGateway Route Id - Dedicated gateway route ID.
- Next
Hop stringId - Next hop instance ID for the dedicated gateway route.
- Next
Hop stringType - 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.
- 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_ stringblock - Destination network segment of the dedicated gateway route.
- direct_
connect_ stringgateway_ id - Dedicated gateway ID.
- direct_
connect_ stringgateway_ route_ id - Dedicated gateway route ID.
- next_
hop_ stringid - Next hop instance ID for the dedicated gateway route.
- next_
hop_ stringtype - 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.
- 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 StringBlock - Destination network segment of the dedicated gateway route.
- direct
Connect StringGateway Id - Dedicated gateway ID.
- direct
Connect StringGateway Route Id - Dedicated gateway route ID.
- next
Hop StringId - Next hop instance ID for the dedicated gateway route.
- next
Hop StringType - 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.
- 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 stringBlock - Destination network segment of the dedicated gateway route.
- direct
Connect stringGateway Id - Dedicated gateway ID.
- direct
Connect stringGateway Route Id - Dedicated gateway route ID.
- next
Hop stringId - Next hop instance ID for the dedicated gateway route.
- next
Hop stringType - 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.
- 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_ strblock - Destination network segment of the dedicated gateway route.
- direct_
connect_ strgateway_ id - Dedicated gateway ID.
- direct_
connect_ strgateway_ route_ id - Dedicated gateway route ID.
- next_
hop_ strid - Next hop instance ID for the dedicated gateway route.
- next_
hop_ strtype - 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.
- 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 StringBlock - Destination network segment of the dedicated gateway route.
- direct
Connect StringGateway Id - Dedicated gateway ID.
- direct
Connect StringGateway Route Id - Dedicated gateway route ID.
- next
Hop StringId - Next hop instance ID for the dedicated gateway route.
- next
Hop StringType - 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.
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
byteplusccTerraform Provider.
published on Monday, May 25, 2026 by Byteplus