1. Packages
  2. Volcengine
  3. API Docs
  4. direct_connect
  5. GatewayRoute
Volcengine v0.0.23 published on Wednesday, Jan 3, 2024 by Volcengine

volcengine.direct_connect.GatewayRoute

Explore with Pulumi AI

volcengine logo
Volcengine v0.0.23 published on Wednesday, Jan 3, 2024 by Volcengine

    Provides a resource to manage direct connect gateway route

    Example Usage

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Volcengine = 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.

    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

    The GatewayRoute resource accepts the following input properties:

    DestinationCidrBlock string
    The cidr block.
    DirectConnectGatewayId string
    The id of direct connect gateway.
    NextHopId string
    The id of next hop.
    DestinationCidrBlock string
    The cidr block.
    DirectConnectGatewayId string
    The id of direct connect gateway.
    NextHopId string
    The id of next hop.
    destinationCidrBlock String
    The cidr block.
    directConnectGatewayId String
    The id of direct connect gateway.
    nextHopId String
    The id of next hop.
    destinationCidrBlock string
    The cidr block.
    directConnectGatewayId string
    The id of direct connect gateway.
    nextHopId string
    The id of next hop.
    destination_cidr_block str
    The cidr block.
    direct_connect_gateway_id str
    The id of direct connect gateway.
    next_hop_id str
    The id of next hop.
    destinationCidrBlock String
    The cidr block.
    directConnectGatewayId String
    The id of direct connect gateway.
    nextHopId String
    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.
    DirectConnectGatewayRouteId string
    The id of direct connect gateway route.
    Id string
    The provider-assigned unique ID for this managed resource.
    NextHopType string
    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.
    DirectConnectGatewayRouteId string
    The id of direct connect gateway route.
    Id string
    The provider-assigned unique ID for this managed resource.
    NextHopType string
    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.
    directConnectGatewayRouteId String
    The id of direct connect gateway route.
    id String
    The provider-assigned unique ID for this managed resource.
    nextHopType String
    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.
    directConnectGatewayRouteId string
    The id of direct connect gateway route.
    id string
    The provider-assigned unique ID for this managed resource.
    nextHopType string
    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_gateway_route_id str
    The id of direct connect gateway route.
    id str
    The provider-assigned unique ID for this managed resource.
    next_hop_type str
    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.
    directConnectGatewayRouteId String
    The id of direct connect gateway route.
    id String
    The provider-assigned unique ID for this managed resource.
    nextHopType String
    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) -> 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.
    The following state arguments are supported:
    AccountId string
    The id of account.
    CreationTime string
    The create time.
    DestinationCidrBlock string
    The cidr block.
    DirectConnectGatewayId string
    The id of direct connect gateway.
    DirectConnectGatewayRouteId string
    The id of direct connect gateway route.
    NextHopId string
    The id of next hop.
    NextHopType string
    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.
    DestinationCidrBlock string
    The cidr block.
    DirectConnectGatewayId string
    The id of direct connect gateway.
    DirectConnectGatewayRouteId string
    The id of direct connect gateway route.
    NextHopId string
    The id of next hop.
    NextHopType string
    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.
    destinationCidrBlock String
    The cidr block.
    directConnectGatewayId String
    The id of direct connect gateway.
    directConnectGatewayRouteId String
    The id of direct connect gateway route.
    nextHopId String
    The id of next hop.
    nextHopType String
    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.
    destinationCidrBlock string
    The cidr block.
    directConnectGatewayId string
    The id of direct connect gateway.
    directConnectGatewayRouteId string
    The id of direct connect gateway route.
    nextHopId string
    The id of next hop.
    nextHopType string
    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_block str
    The cidr block.
    direct_connect_gateway_id str
    The id of direct connect gateway.
    direct_connect_gateway_route_id str
    The id of direct connect gateway route.
    next_hop_id str
    The id of next hop.
    next_hop_type str
    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.
    destinationCidrBlock String
    The cidr block.
    directConnectGatewayId String
    The id of direct connect gateway.
    directConnectGatewayRouteId String
    The id of direct connect gateway route.
    nextHopId String
    The id of next hop.
    nextHopType String
    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 volcengine Terraform Provider.
    volcengine logo
    Volcengine v0.0.23 published on Wednesday, Jan 3, 2024 by Volcengine