volcengine.direct_connect.GatewayRoute
Explore with Pulumi AI
Provides a resource to manage direct connect gateway route
Example Usage
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 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
})
}
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());
}
}
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****")
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****",
});
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:
- Destination
Cidr stringBlock - The cidr block.
- Direct
Connect stringGateway Id - The id of direct connect gateway.
- Next
Hop stringId - The id of next hop.
- Destination
Cidr stringBlock - The cidr block.
- Direct
Connect stringGateway Id - The id of direct connect gateway.
- Next
Hop stringId - The id of next hop.
- destination
Cidr StringBlock - The cidr block.
- direct
Connect StringGateway Id - The id of direct connect gateway.
- next
Hop StringId - The id of next hop.
- destination
Cidr stringBlock - The cidr block.
- direct
Connect stringGateway Id - The id of direct connect gateway.
- next
Hop 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.
- destination
Cidr StringBlock - The cidr block.
- direct
Connect StringGateway Id - The id of direct connect gateway.
- next
Hop 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:
- Account
Id string - The id of account.
- Creation
Time string - The create time.
- Direct
Connect stringGateway Route Id - The id of direct connect gateway route.
- Id string
- The provider-assigned unique ID for this managed resource.
- Next
Hop stringType - The type of next hop.
- Route
Type string - The type of route.
- Status string
- The status info.
- Account
Id string - The id of account.
- Creation
Time string - The create time.
- Direct
Connect stringGateway Route Id - The id of direct connect gateway route.
- Id string
- The provider-assigned unique ID for this managed resource.
- Next
Hop stringType - The type of next hop.
- Route
Type string - The type of route.
- Status string
- The status info.
- account
Id String - The id of account.
- creation
Time String - The create time.
- direct
Connect StringGateway Route Id - The id of direct connect gateway route.
- id String
- The provider-assigned unique ID for this managed resource.
- next
Hop StringType - The type of next hop.
- route
Type String - The type of route.
- status String
- The status info.
- account
Id string - The id of account.
- creation
Time string - The create time.
- direct
Connect stringGateway Route Id - The id of direct connect gateway route.
- id string
- The provider-assigned unique ID for this managed resource.
- next
Hop stringType - The type of next hop.
- route
Type 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.
- account
Id String - The id of account.
- creation
Time String - The create time.
- direct
Connect StringGateway Route Id - The id of direct connect gateway route.
- id String
- The provider-assigned unique ID for this managed resource.
- next
Hop StringType - The type of next hop.
- route
Type 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) -> 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)
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.
- Account
Id string - The id of account.
- Creation
Time string - The create time.
- Destination
Cidr stringBlock - The cidr block.
- Direct
Connect stringGateway Id - The id of direct connect gateway.
- Direct
Connect stringGateway Route Id - The id of direct connect gateway route.
- Next
Hop stringId - The id of next hop.
- Next
Hop stringType - The type of next hop.
- Route
Type string - The type of route.
- Status string
- The status info.
- Account
Id string - The id of account.
- Creation
Time string - The create time.
- Destination
Cidr stringBlock - The cidr block.
- Direct
Connect stringGateway Id - The id of direct connect gateway.
- Direct
Connect stringGateway Route Id - The id of direct connect gateway route.
- Next
Hop stringId - The id of next hop.
- Next
Hop stringType - The type of next hop.
- Route
Type string - The type of route.
- Status string
- The status info.
- account
Id String - The id of account.
- creation
Time String - The create time.
- destination
Cidr StringBlock - The cidr block.
- direct
Connect StringGateway Id - The id of direct connect gateway.
- direct
Connect StringGateway Route Id - The id of direct connect gateway route.
- next
Hop StringId - The id of next hop.
- next
Hop StringType - The type of next hop.
- route
Type String - The type of route.
- status String
- The status info.
- account
Id string - The id of account.
- creation
Time string - The create time.
- destination
Cidr stringBlock - The cidr block.
- direct
Connect stringGateway Id - The id of direct connect gateway.
- direct
Connect stringGateway Route Id - The id of direct connect gateway route.
- next
Hop stringId - The id of next hop.
- next
Hop stringType - The type of next hop.
- route
Type 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.
- account
Id String - The id of account.
- creation
Time String - The create time.
- destination
Cidr StringBlock - The cidr block.
- direct
Connect StringGateway Id - The id of direct connect gateway.
- direct
Connect StringGateway Route Id - The id of direct connect gateway route.
- next
Hop StringId - The id of next hop.
- next
Hop StringType - The type of next hop.
- route
Type 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
volcengine
Terraform Provider.