volcengine.direct_connect.GatewayRoute
Explore with Pulumi AI
Provides a resource to manage direct connect gateway route
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as volcengine from "@volcengine/pulumi";
const foo = new volcengine.direct_connect.GatewayRoute("foo", {
    destinationCidrBlock: "192.168.40.0/24",
    directConnectGatewayId: "dcg-172frxs5utjb44d1w33op****",
    nextHopId: "dcv-1729lrbfx7fuo4d1w34pk****",
});
import pulumi
import pulumi_volcengine as volcengine
foo = volcengine.direct_connect.GatewayRoute("foo",
    destination_cidr_block="192.168.40.0/24",
    direct_connect_gateway_id="dcg-172frxs5utjb44d1w33op****",
    next_hop_id="dcv-1729lrbfx7fuo4d1w34pk****")
package main
import (
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
	"github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/direct_connect"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := direct_connect.NewGatewayRoute(ctx, "foo", &direct_connect.GatewayRouteArgs{
			DestinationCidrBlock:   pulumi.String("192.168.40.0/24"),
			DirectConnectGatewayId: pulumi.String("dcg-172frxs5utjb44d1w33op****"),
			NextHopId:              pulumi.String("dcv-1729lrbfx7fuo4d1w34pk****"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Volcengine = Pulumi.Volcengine;
return await Deployment.RunAsync(() => 
{
    var foo = new Volcengine.Direct_connect.GatewayRoute("foo", new()
    {
        DestinationCidrBlock = "192.168.40.0/24",
        DirectConnectGatewayId = "dcg-172frxs5utjb44d1w33op****",
        NextHopId = "dcv-1729lrbfx7fuo4d1w34pk****",
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.volcengine.direct_connect.GatewayRoute;
import com.pulumi.volcengine.direct_connect.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 foo = new GatewayRoute("foo", GatewayRouteArgs.builder()        
            .destinationCidrBlock("192.168.40.0/24")
            .directConnectGatewayId("dcg-172frxs5utjb44d1w33op****")
            .nextHopId("dcv-1729lrbfx7fuo4d1w34pk****")
            .build());
    }
}
resources:
  foo:
    type: volcengine:direct_connect:GatewayRoute
    properties:
      destinationCidrBlock: 192.168.40.0/24
      directConnectGatewayId: dcg-172frxs5utjb44d1w33op****
      nextHopId: dcv-1729lrbfx7fuo4d1w34pk****
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: volcengine:direct_connect:GatewayRoute
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
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 Volcengine.Direct_connect.GatewayRoute("gatewayRouteResource", new()
{
    DestinationCidrBlock = "string",
    DirectConnectGatewayId = "string",
    NextHopId = "string",
});
example, err := direct_connect.NewGatewayRoute(ctx, "gatewayRouteResource", &direct_connect.GatewayRouteArgs{
	DestinationCidrBlock:   pulumi.String("string"),
	DirectConnectGatewayId: pulumi.String("string"),
	NextHopId:              pulumi.String("string"),
})
var gatewayRouteResource = new GatewayRoute("gatewayRouteResource", GatewayRouteArgs.builder()
    .destinationCidrBlock("string")
    .directConnectGatewayId("string")
    .nextHopId("string")
    .build());
gateway_route_resource = volcengine.direct_connect.GatewayRoute("gatewayRouteResource",
    destination_cidr_block="string",
    direct_connect_gateway_id="string",
    next_hop_id="string")
const gatewayRouteResource = new volcengine.direct_connect.GatewayRoute("gatewayRouteResource", {
    destinationCidrBlock: "string",
    directConnectGatewayId: "string",
    nextHopId: "string",
});
type: volcengine:direct_connect: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:
- DestinationCidr stringBlock 
- The cidr block.
- DirectConnect stringGateway Id 
- The id of direct connect gateway.
- NextHop stringId 
- The id of next hop.
- DestinationCidr stringBlock 
- The cidr block.
- DirectConnect stringGateway Id 
- The id of direct connect gateway.
- NextHop stringId 
- The id of next hop.
- destinationCidr StringBlock 
- The cidr block.
- directConnect StringGateway Id 
- The id of direct connect gateway.
- nextHop StringId 
- The id of next hop.
- destinationCidr stringBlock 
- The cidr block.
- directConnect stringGateway Id 
- The id of direct connect gateway.
- nextHop stringId 
- The id of next hop.
- destination_cidr_ strblock 
- The cidr block.
- direct_connect_ strgateway_ id 
- The id of direct connect gateway.
- next_hop_ strid 
- The id of next hop.
- destinationCidr StringBlock 
- The cidr block.
- directConnect StringGateway Id 
- The id of direct connect gateway.
- nextHop StringId 
- The id of next hop.
Outputs
All input properties are implicitly available as output properties. Additionally, the GatewayRoute resource produces the following output properties:
- AccountId string
- The id of account.
- CreationTime string
- The create time.
- DirectConnect stringGateway Route Id 
- The id of direct connect gateway route.
- Id string
- The provider-assigned unique ID for this managed resource.
- NextHop stringType 
- The type of next hop.
- RouteType string
- The type of route.
- Status string
- The status info.
- AccountId string
- The id of account.
- CreationTime string
- The create time.
- DirectConnect stringGateway Route Id 
- The id of direct connect gateway route.
- Id string
- The provider-assigned unique ID for this managed resource.
- NextHop stringType 
- The type of next hop.
- RouteType string
- The type of route.
- Status string
- The status info.
- accountId String
- The id of account.
- creationTime String
- The create time.
- directConnect StringGateway Route Id 
- The id of direct connect gateway route.
- id String
- The provider-assigned unique ID for this managed resource.
- nextHop StringType 
- The type of next hop.
- routeType String
- The type of route.
- status String
- The status info.
- accountId string
- The id of account.
- creationTime string
- The create time.
- directConnect stringGateway Route Id 
- The id of direct connect gateway route.
- id string
- The provider-assigned unique ID for this managed resource.
- nextHop stringType 
- The type of next hop.
- routeType string
- The type of route.
- status string
- The status info.
- account_id str
- The id of account.
- creation_time str
- The create time.
- direct_connect_ strgateway_ route_ id 
- The id of direct connect gateway route.
- id str
- The provider-assigned unique ID for this managed resource.
- next_hop_ strtype 
- The type of next hop.
- route_type str
- The type of route.
- status str
- The status info.
- accountId String
- The id of account.
- creationTime String
- The create time.
- directConnect StringGateway Route Id 
- The id of direct connect gateway route.
- id String
- The provider-assigned unique ID for this managed resource.
- nextHop StringType 
- The type of next hop.
- routeType String
- The type of route.
- status String
- The status info.
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: volcengine:direct_connect:GatewayRoute    get:      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.
- AccountId string
- The id of account.
- CreationTime string
- The create time.
- DestinationCidr stringBlock 
- The cidr block.
- DirectConnect stringGateway Id 
- The id of direct connect gateway.
- DirectConnect stringGateway Route Id 
- The id of direct connect gateway route.
- NextHop stringId 
- The id of next hop.
- NextHop stringType 
- The type of next hop.
- RouteType string
- The type of route.
- Status string
- The status info.
- AccountId string
- The id of account.
- CreationTime string
- The create time.
- DestinationCidr stringBlock 
- The cidr block.
- DirectConnect stringGateway Id 
- The id of direct connect gateway.
- DirectConnect stringGateway Route Id 
- The id of direct connect gateway route.
- NextHop stringId 
- The id of next hop.
- NextHop stringType 
- The type of next hop.
- RouteType string
- The type of route.
- Status string
- The status info.
- accountId String
- The id of account.
- creationTime String
- The create time.
- destinationCidr StringBlock 
- The cidr block.
- directConnect StringGateway Id 
- The id of direct connect gateway.
- directConnect StringGateway Route Id 
- The id of direct connect gateway route.
- nextHop StringId 
- The id of next hop.
- nextHop StringType 
- The type of next hop.
- routeType String
- The type of route.
- status String
- The status info.
- accountId string
- The id of account.
- creationTime string
- The create time.
- destinationCidr stringBlock 
- The cidr block.
- directConnect stringGateway Id 
- The id of direct connect gateway.
- directConnect stringGateway Route Id 
- The id of direct connect gateway route.
- nextHop stringId 
- The id of next hop.
- nextHop stringType 
- The type of next hop.
- routeType string
- The type of route.
- status string
- The status info.
- account_id str
- The id of account.
- creation_time str
- The create time.
- destination_cidr_ strblock 
- The cidr block.
- direct_connect_ strgateway_ id 
- The id of direct connect gateway.
- direct_connect_ strgateway_ route_ id 
- The id of direct connect gateway route.
- next_hop_ strid 
- The id of next hop.
- next_hop_ strtype 
- The type of next hop.
- route_type str
- The type of route.
- status str
- The status info.
- accountId String
- The id of account.
- creationTime String
- The create time.
- destinationCidr StringBlock 
- The cidr block.
- directConnect StringGateway Id 
- The id of direct connect gateway.
- directConnect StringGateway Route Id 
- The id of direct connect gateway route.
- nextHop StringId 
- The id of next hop.
- nextHop StringType 
- The type of next hop.
- routeType String
- The type of route.
- status String
- The status info.
Import
DirectConnectGatewayRoute can be imported using the id, e.g.
$ pulumi import volcengine:direct_connect/gatewayRoute:GatewayRoute default resource_id
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- volcengine volcengine/pulumi-volcengine
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the volcengineTerraform Provider.